我在网站上集成 GPay India 付款选项时遇到错误。付款失败并出现神秘错误消息。
我已经阅读了集成文档。此集成使用付款请求接口,该接口会出现错误并显示奇怪的消息。进行此调用的代码如下:
request.show()
.then(function (instrument) {
// Process payment - code never reaches here
window.clearTimeout(paymentTimeout);
processResponse(instrument);
})
.catch(function (err) {
console.log(err); // Error here!
});
Run Code Online (Sandbox Code Playgroud)
致电后,request.show()该网站会将我们重定向到 Google Pay 应用程序,我们将在其中验证收款人详细信息和金额。继续付款时,我们在应用程序中收到以下错误:
您的钱尚未被扣除
您的付款已被拒绝
通过其他 UPI 支付应用程序向同一 UPI ID 进行支付不会出现任何问题。忽略此消息后,我们将返回到出现以下错误的网站:
DOMException:支付应用程序返回无效结果。缺少意图额外内容。
我已经在具有不同 GPay 帐户的不同设备上尝试过此操作,但结果相同。本次支付请求传递的参数如下:
const supportedInstruments = [{
supportedMethods: ['https://tez.google.com/pay'],
data: {
pa: 'xxxx@xxx', // The UPI ID
pn: 'Merchant Name', // The Merchant name
tr: trId, // A unique UUID
url: 'https://xxxxxxx', // …Run Code Online (Sandbox Code Playgroud)