Web Session Object
Season Set Object
Payment Provider Object
Payment Method Object
The makePayment method allows you to record a payment against an outstanding invoice. This method may be used to enter check or cash payments, payment of goods in trade, or payments made with active Payment Methods.
Using the makePayment method on the Account object will cause CashBox to allocate the payment to the oldest open invoice or AutoBill. To apply a payment directly to an outstanding AutoBill, use AutoBill.makePayment instead.
Whether you use a standard PaymentMethod, or a MerchantAcceptedPayment, the makePaymentmethod generates a Transaction, and processes the Transaction through the auth/capture cycle appropriate to the input Payment Method. Credit Card, ECP, PayPal, and other standard Payment Methods are routed through the appropriate Payment Processor. The MerchantAcceptedPaymentPayment Method is routed through Vindicia’s internal transaction process. Both Payment Method types appear as a Transaction in the Account’s history.
srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.
Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.
account: the Account to which this payment applies.
paymentMethod: the PaymentMethod to be used for this payment. This paymentMethod can be of type MerchantAcceptedPayment, credit card, or PayPal. If you use PayPal, the PayPal payment method must be already populated with a Billing Agreement ID (BAID), acquired either from an earlier AutoBill creation or from a one-time transaction conducted for the customer's account, in which a PayPal reference ID was requested. You can not use an PayPal payment method that requires customer approval at the PayPal site in this call.
Note For tracking purposes, assign a unique ID for every Account.makePayment call that uses a MerchantAcceptedPayment Payment Method.)
amount: the amount of the payment being made. (Required Float.)
currency: the ISO 4217 currency code for amount. This must match the currency used for charges on the current invoice. (If not specified, the AutoBill/Invoice currency will be used.)
invoiceId: the ID of the Invoice to make payment against. If not specified, the oldest unpaid invoice or AutoBill will be paid first. To make a payment against an invoice in Open status, an ID must be specified—CashBox will not direct overage against such a future invoice.
For more information, see Working with Invoices in the CashBox Programming Guide.
overageDisposition: an object of type PaymentOverageDisposition, defines how to allocate payments in excess of a required AutoBill payment amount. Enumerated values include:
• applyToOldestInvoice (the default)
note: an optional memo regarding the payment made.
return: an object of type Return that indicates the success or failure of the call.
transaction: the Transaction object reflecting the payment.
summary: an object of type TransactionAttemptSummary that includes the summary of the payment attempt.
In addition to those listed in Standard Return Codes, this call returns:
One of the following:
Payment transaction failed - payment not applied.
Specified Account could not be found - payment not applied.
Specified PaymentMethod could not be found - payment not applied.
$acct = new Account();
$paymentMethod = new PaymentMethod();
$cc = new CreditCard();
$response = $acct->makePayment(
'200 bucks for Charles'
// check $response