添加 google 支付到 Adyen Web SDK

Adding google pay to Adyen Web SDK

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

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

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。但是在我的页面上我只看到:

所有文档都说要做的是:

我添加了 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 支付库。

<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如果您的商家帐户中未正确配置付款,付款将不会出现在付款方式列表中。