gpt4 book ai didi

javascript - 添加谷歌支付到 Adyen Web SDK

转载 作者:行者123 更新时间:2023-11-30 19:48:36 26 4
gpt4 key购买 nike

我正在尝试将 Google Pay 添加为付款方式。我正在使用 Adyen Web SDK .

我正在执行 CURL 以获取付款 session :

curl -H "Content-Type: application/json" -H "X-API-Key: my_key" -X POST -d '{ 
"merchantAccount": "my account",
"sdkVersion": "1.9.2",
"channel": "Web",
"amount": {
"currency": "EUR",
"value": 2500
},
"reference": "Your order number",
"countryCode": "IE",
"shopperLocale": "en_IE",
"origin": "http://192.168.43.16:3000",
"returnUrl": "http://localhost:8080/payment/completed/the_guid_from_UI/"
}' https://checkout-test.adyen.com/v41/paymentSession -i

我正在将 paymentSession 复制到 UI 中。但是在我的页面上我只看到:

enter image description here

所有文档都说要做的是:

enter image description here

我添加了 pay.js 库。是吗?我还需要做什么?

编辑我使用的是旧版本的 Adyen Web SDK(不支持 Google Pay)。我现在添加了最新版本:

`<script type="text/javascript" src="https://checkoutshopper-test.adyen.com/checkoutshopper/assets/js/sdk/checkoutSDK.1.9.2.min.js"></script>`

但是我仍然看到相同的结果...

最佳答案

是的,没错。您需要在加载 Web SDK 之前加载 Google Pay 库。

<script src="https://pay.google.com/gp/p/js/pay.js"></script>
<script type="text/javascript" src="https://checkoutshopper-test.adyen.com/checkoutshopper/assets/js/sdk/checkoutSDK.1.9.2.min.js"></script>

为了确定,您是否已完成该屏幕截图中的第 2 步?

  1. Before you can start accepting live Google Pay payments, we need to configure your Google Pay merchantID. Follow Google Pay's Deploy production environment guidelines then contact Support Team and provide your merchantID from your Google Pay Developer Profile.

如果未在您的商家帐户中正确配置,Google Pay 将不会出现在付款方式列表中。

关于javascript - 添加谷歌支付到 Adyen Web SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54708961/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com