Page History
...
After payment is completed, the server returns the order number and status as response. To process the response, you must add the appropriate code:
Code Block | ||
---|---|---|
| ||
$.post("/pay/tokenpay_widget_ap.cfm", JSON.stringify(data)).then(function (result) {
//payment processing example:
if (!result.hasOwnProperty('firstcode') && JSON.stringify(result.order.orderstate) == '"Approved"' && JSON.stringify(result.order.orderstate) == '"Delayed"') {
applePaySession.completePayment(ApplePaySession.STATUS_SUCCESS);
} else {
applePaySession.completePayment(ApplePaySession.STATUS_FAILURE);
}
}); |