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

标签 javascript payment-gateway payment adyen

我正在尝试将 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/

相关文章:

javascript - 如何使用 Tablesorter lib 创建自定义过滤器来搜索全表?

javascript - 我收到错误 : Compile Error: ifCond is not a helper when I am trying to write a helper function in Ember

android - Payu支付错误 "Some error occurred, Try again!"

asp.net - Paypal : How to get User's Email Id and Address Details In case of Canceled and Success purchase Product?

Paypal 形式的php脚本

javascript - 将 JSON 映射到 backbone.js 集合

javascript - 在移动设备上禁用视差

paypal - Paypal IPN 总是必要的吗?

payment-gateway - 如何管理在 BlueSnap 中销售特殊订单的销售代表?

Android:3d 安全重定向响应