@@ -94,9 +94,10 @@ instance FromJSON AuthResponse where
9494-- | Authorise a credit card payment.
9595authorisePayment :: CreditCard -- ^ Credit card details (see 'CreditCard')
9696 -> Money USD -- ^ Amount to charge, USD
97+ -> Maybe Text -- ^ Invoice description
9798 -> Maybe Text -- ^ Merchant description that will appear in a customer's statement.
9899 -> ConnexpayM AuthResponse
99−authorisePayment cc amt vendor =
100+authorisePayment cc amt invoice vendor =
100101 do resp <- sendRequestJson "authonlys" body
101102 let rbody = responseBody resp
102103 -- Special case for Connexpay local transaction
@@ -111,6 +112,8 @@ authorisePayment cc amt vendor =
111112 where body = execWriter $
112113 do tell [ "Card" .= cc ]
113114 tell [ "Amount" .= getAmount amt ]
115+ whenJust invoice $ \i ->
116+ tell [ "OrderNumber" .= i ]
114117 whenJust vendor $ \v ->
115118 tell [ "StatementDescription" .= v ]
116119 -- We are supposed to pass RiskData, but it still