Cancellation Postback
Setting up postbacks for cancelled transactions will send the saved form data on the page to the specified URL in the desired format when a transaction is cancelled by clicking the cancel button, closing the tab/browser, or going to a different URL.
Cancellation Postback Settings
There are three settings to determine on the form's details to utilize these postback capabilities:
- Cancellation URL: address where postback data will be sent
- POST-Back Format: choose between POST, JSON, and XML format
- POST-Back On Cancellation and Failure: Opt in box to receive cancellation postbacks.
Note that the third setting is an opt-in checkbox. By default, clients using the original postback capability will still only receive postback on success until they update their handler code to look at the status and then opt-in by selecting the checkbox. This setting is present to differentiate between postbacks on successful transactions and postbacks on cancellations/failures
Functionality Defined
If the cancellation URL is entered, it will place a ‘Cancel’ button on the first and second steps of the payment form. If the ‘Cancel’ button is explicitly clicked by the user, all saved form data (except CC/E-Check data) will be POSTed as normal name/value form data pairs to the cancellation URL. Saved data is any form data present on the page when the ‘Calculate Total’ button is clicked or on the confirmation page (Step 2). For ALL cancellations (e.g. the user clicks the ‘Cancel’ button if present, closes their tab/browser, or goes to a different URL) the postback URL will be sent data in the desired format ONLY IF the ‘POST-Back On Cancellation and Failure?’ checkbox is selected in the cancellation postback settings. When you select the opt-in checkbox, you will also receive a postback in the desired format when there is a bank failure. So, for an explicit cancellation, you will receive data two ways:
- via POST (name/value pairs) to the cancellation URL
- via POST in their desired format to the postback URL.
For cancellations, failures, and successes there is new ‘trans_status’ parameter returned with these possible values:
- cancel
- test_trans (only for pages in test-mode that have a test-mode charge)
- approved
- denied
- timeout
If you elect to receive postbacks in JSON or XML format, the data will only have one name/value pair. The name will be ‘data’ and the value will be encoded in either JSON or XML as desired and will need to be decoded on your end to do with the data as you choose.
If you have questions about any of the information contained within this document, please contact an Acceptiva customer service representative at: 1-800-507-3871