最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unable to add test card in Google Pay TEST environment and order total - Stack Overflow

programmeradmin3浏览0评论
  1. In GooglePay, how to display the order total in googlepay payment sheet?(Is it possible to do?) Could not find any documentation for that.
  2. Im using TEST environment but still unable to add any test card which is mentioned in the below URL and also it is redirecting to instead of (Is this expected behaviour?) new google.payments.api.PaymentsClient({ environment: ‘TEST’ })

Test Cards:

  1. In GooglePay, how to display the order total in googlepay payment sheet?(Is it possible to do?) Could not find any documentation for that.
  2. Im using TEST environment but still unable to add any test card which is mentioned in the below URL and also it is redirecting to https://pay.google. instead of https://pay.sandbox.google. (Is this expected behaviour?) new google.payments.api.PaymentsClient({ environment: ‘TEST’ })

Test Cards: https://docs.adyen./developers/test-cards/test-card-numbers

Share Improve this question asked Dec 5, 2018 at 13:35 SrigarSrigar 1,6883 gold badges14 silver badges29 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

UPDATE: Google Pay now supports dynamically showing the total price on the payments sheet. This price can also be updated as the user changes their selection at checkout (eg.: shipping option). You can configure these pricing updates as shown in the docs.

You can also check out the official announcement for more details.
Hope it helps.


  1. That's right, it is not possible to add the total price to the payments sheet.
  2. The way the test environment works for Google Pay is slightly different to the sandboxes some payment providers offer. When you use Google Pay in the TEST environment, the APIs are, by default, still expecting valid card numbers. As such, if you use invalid information, the checks will still fail. Said so, your card is never charged nor the token that the systems responds with allows to perform any transaction.

in this function getGoogleTransactionInfo() add to totalPrice:

"<?php echo $prix; ?>" 

As in the ment.

In environment TEST, if you did not join the site test, you cannot use the card test.

Test Cards: https://docs.adyen./developers/test-cards/test-card-numbers

You have to add your email to test card suite group. This sets up your account so that when you open the payment sheet with the environment variable set to TEST

google.payments.api.PaymentsClient({ environment: ‘TEST’ })

https://developers.google./pay/api/web/guides/resources/test-card-suite I hope this helps you

发布评论

评论列表(0)

  1. 暂无评论