Handling redirect payment methods
Gain a better understanding of how to handle transactions funded with a redirect payment method
How to implement a submit then redirect flow
let digitalRiver = new DigitalRiver("Your public API key", {
"locale": "en-GB"
});
let configuration = {
"sessionId": "fe50c56f-88a4-4961-8142-7d4784b87264",
"options": {
"flow": "checkout",
"redirect": {
"disableAutomaticRedirects": true,
"returnUrl": "https://mywebsite.com/paymentCallBack.html",
"cancelUrl": "https://mywebsite.com/paymentCallBack.html"
},
...
},
onSuccess: function(data) {
//send sourceId to your backend
var sourceId = data.source.id;
},
...
}
let dropin = digitalriverpayments.createDropin(configuration);
dropin.mount("drop-in");Last updated