Closed woshizhangxiaohao closed 4 years ago
Can you share your initiate transaction code snippet?
Specifically, what is the CallBack Url you are using?
Can you share your initiate transaction code snippet?
Specifically, what is the CallBack Url you are using?
try {
Map<dynamic, dynamic> response = await Paytm.payWithPaytm(
payInfoModel.merchantId,
payInfoModel.payId.toString(),
payInfoModel.paymentToken,
payInfoModel.payAmount.toString(),
payInfoModel.callbackUrl,
payInfoModel.isStaging);
print(response.toString());
} catch (err) {
print(err.message);
}
The callback address is my own H5, which shows the payment status, success or failure. When displaying H5 content, I can't go back to the previous page or close the current page, because the current page is a webhook
You can use the following as a callback URL.
String callBackUrl = (testing ? 'https://securegw-stage.paytm.in' : 'https://securegw.paytm.in') + '/theia/paytmCallback?ORDER_ID=' + orderId;
It will get the response within the app from there you can update and verify the transaction in your backend code.
You can use the following as a callback URL.
String callBackUrl = (testing ? 'https://securegw-stage.paytm.in' : 'https://securegw.paytm.in') + '/theia/paytmCallback?ORDER_ID=' + orderId;
It will get the response within the app from there you can update and verify the transaction in your backend code.
thks,it's ok!
When I click payment on Android phone, Webhook will be created automatically. The H5 address returned by all payment successful callback is in this Webhook, not in my own WebView, which can't control to return to the previous page. I need to automatically close the current page, how to deal with it