transactionConfirm method
void
transactionConfirm()
Implementation
void transactionConfirm() {
String script = "Bootpay.confirm().then(function(confirmRes) { BootpayDone.postMessage(JSON.stringify(confirmRes)); }, function(confirmRes) { if (confirmRes.event === 'error') { BootpayError.postMessage(JSON.stringify(confirmRes)); } else if (confirmRes.event === 'cancel') { BootpayCancel.postMessage(JSON.stringify(confirmRes)); } })";
if(payload?.extra?.openType == 'redirect') {
script = "Bootpay.confirm();";
// script = "window.Bootpay.submit();";
}
print("transactionConfirm : $script");
// // Ensure JavaScript is run on the main thread
// WidgetsBinding.instance.addPostFrameCallback((_) {
// print("transactionConfirm 22 : $script");
// _controller.runJavaScript(script);
// });
_controller.runJavaScript(script);
// _controller.
// _controller.runJavaScript("alert(1);");
}