I am using Paytm CheckOut JS in dart webview with redirect as false in merchant config.
===JS Code===
"merchant": {
"redirect": false
},
"handler": {
"notifyMerchant": function(eventName,data){
console.log("notifyMerchant handler function called");
console.log("eventName => ",eventName);
console.log("data => ",data);
},
transactionStatus: function(data){
console.log("payment status ", data);
var form = document.createElement('form');
document.body.appendChild(form);
form.method = 'post';
form.action = 'https://<myWebsite>/paymentReceipt.php';
for (var name in data) {
var input = document.createElement('input');
input.type = 'hidden';
input.name = name;
input.value = data[name];
form.appendChild(input);
}
form.submit();
},
}
===Code ENDS===
I wanted to redirect the transaction Status response to my page paymentReceipt.php to process it. The redirect happens properly in desktop browser. But when it is run on a flutter app through a webview the transaction is sucessfull but does not redirect to my page paymentReceipt.php instead it redirects to the a paytm page.