I save orders with PHP after the payment is done by express checkout. I do this by updating and sending my form in onAuthorize: onAuthorize: function(data, actions) {
return actions.payment.execute().then(function() {
document.getElementById('paypal_transaction').value = data.paymentID;
document.forms['paymentform'].action = 'order-done-paypal.htm';
document.forms['paymentform'].submit();
});
} After a half year there were 3 payments, from more then 100, without orders. So how to send my form, when PayPal fails? Is there something like: onFail: function() {
document.getElementById('paypal_transaction').value = 'No Payment ID';
document.forms['paymentform'].action = 'order-done-paypal.htm';
document.forms['paymentform'].submit();
}
... View more