w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Google Pay disappears from payment methods list #935

Closed kersov closed 3 years ago

kersov commented 3 years ago

On some devices, Google Pay is not available in the Payment Request API even though it was added in the code. It was tested even with an example from https://developers.google.com/pay/api/web/guides/paymentrequest/tutorial . Steps to reproduce:

  1. write code for 2 payment methods: basic-credit and google pay;
  2. test it on different devices; Actual result: on some devices only basic-credit will be available even though it is Chrome browser and google account has saved credit cards.

I also tried to use the same code but remove basic-credit and that Google Pay becomes available but when I added basic-credit back Google Pay disappears again.

Has someone experienced the same issue?

Thank you in advance.

ianbjacobs commented 3 years ago

Hi @rsolomakhin, any thoughts on this?

rsolomakhin commented 3 years ago

This is a long-standing behavior where just-in-time installable (not yet installed on device) apps are hidden from the user, if the user already has a different app (e.g., basic-card) available on their device. @danyao performed some experimentation in this area based on similar developer feedback. @danyao - what were the outcomes of these experiments?

@kersov - if you always want to see Google Pay and that's your only concern, then don't add basic-card to the list of supported payment methods.

danyao commented 3 years ago

This is a long-standing behavior where just-in-time installable (not yet installed on device) apps are hidden from the user, if the user already has a different app (e.g., basic-card) available on their device. @danyao performed some experimentation in this area based on similar developer feedback. @danyao - what were the outcomes of these experiments?

The experiment fell off the priority list.

@kersov - if you always want to see Google Pay and that's your only concern, then don't add basic-card to the list of supported payment methods.

+1. This is the best workaround for now. @kersov Is it critical for your use case that basic-card and Google Pay are requested in a single request?

kersov commented 3 years ago

Hi @rsolomakhin and @danyao, Thank you for your answers.

Is it critical for your use case that basic-card and Google Pay are requested in a single request? For me, it just was not obvious why Google pay is available in some cases and in other cases is not. We are developing an extension for e-commerce sites that can be used with any combination of payment methods and as for me, it is better to show all possible payment options to customers so they will be able to choose. I suppose customers expect to have a similar experience as on the regular checkout so disappearing of payment option may confuse them.

So as far as I understand customers shall use Google Pay at least once in the browser to get it installed and then both payment methods will be visible?

rsolomakhin commented 3 years ago

So as far as I understand customers shall use Google Pay at least once in the browser to get it installed and then both payment methods will be visible?

That is correct.

kersov commented 3 years ago

Is there any other way to show two or more payment instruments? We may use some external payment methods or even create our own with Payment Handler API but we want the customer to see all of them even if they are not installed.

marcoscaceres commented 3 years ago

Closing as this is a browser bug, not a spec bug