Web Session Object
Season Set Object
Payment Provider Object
Payment Method Object
The reversePayment method allows you to reverse payments made using the makePayment method. This method may only be used against payments made using the MerchantAcceptedPaymentpayment method.
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.
autobill: the AutoBill to which this reversal applies.
timestamp: the time that payment reversal occurs.
paymentId: the paymentId of the Payment to be reversed. Either the paymentId, or the invoiceId (and optional indexNumber) must be specified.
The paymentId is automatically set by CashBox when a payment is made to an Invoice, AutoBill, or Account. In reversing a payment, you must reference the appropriate paymentId.
invoiceId: the ID of the Invoice associated with the payment reversal. Either the paymentId, or the invoiceId (and optional indexNumber) must be specified.
indexNumber: the indexNumber of the payment item (on the invoiceId invoice) to be reversed.
note: an optional memo regarding the payment reversal.
return: an object of type Return that indicates the success or failure of the call.
In addition to those listed in Standard Return Codes, this call returns:
One of the following:
Payment ID not found.
// to reverse a payment made using makePayment
$autobill = new AutoBill();
$autobill->setMerchantAutoBillId($abID); // for some $abID
$paymentMethod = new PaymentMethod();
$paymentMethod->setMerchantPaymentMethodId($pmId); // for some $pmId
$paymentId = $paymentMethod->merchantAcceptedPayment->paymentId;
$response = $autobill->reversePayment(
'Changed my mind.'
// check $response