Srigar
Srigar

Reputation: 1688

Unable to add test card in Google Pay TEST environment and order total

  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.com instead of https://pay.sandbox.google.com (Is this expected behaviour?) new google.payments.api.PaymentsClient({ environment: ‘TEST’ })

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

Upvotes: 2

Views: 19436

Answers (3)

Vo Chi Long
Vo Chi Long

Reputation: 11

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

Test Cards: https://docs.adyen.com/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.com/pay/api/web/guides/resources/test-card-suite I hope this helps you

Upvotes: 0

Yassine Mourad
Yassine Mourad

Reputation: 1

in this function getGoogleTransactionInfo() add to totalPrice:

"<?php echo $prix; ?>" 

As in the comment.

Upvotes: 0

Jose L Ugia
Jose L Ugia

Reputation: 6250

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.

Upvotes: 4

Related Questions