google-pay / google-pay-button

Google Pay button - React, Angular, and custom element
Apache License 2.0
250 stars 60 forks source link

GPay button is not shown on Firefox iOs #215

Closed FedkinAndrey closed 1 year ago

FedkinAndrey commented 1 year ago

This question is related to:

I have a problem with displaying a button on the screen. Everything works fine on all platforms in all browsers in test and production enviroment except firefox ios.

<GooglePayButton
                      environment={googlePayEnvironment as google.payments.api.Environment}
                      paymentRequest={{
                        emailRequired: true,
                        apiVersion: 2,
                        apiVersionMinor: 0,
                        allowedPaymentMethods: [
                          {
                            type: 'CARD',
                            parameters: {
                              allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
                              allowedCardNetworks: ['MASTERCARD', 'VISA'],
                            },
                            tokenizationSpecification: {
                              type: 'PAYMENT_GATEWAY',
                              parameters: {
                                gateway: gateway,
                                gatewayMerchantId: gatewayMerchantId,
                              },
                            },
                          },
                        ],
                        merchantInfo: {
                          merchantId: googlePayMerchantId,
                          merchantName: googlePayMerchantName,
                        },
                        transactionInfo: {
                          totalPriceStatus: 'FINAL',
                          totalPriceLabel: 'Total',
                          totalPrice: `100.00`,
                          currencyCode: 'UAH',
                          countryCode: 'UA',
                        },
                      }}
                      onLoadPaymentData={(paymentRequest) => {
                        myownmethodhere(paymentRequest)
                      }}
                      buttonType="plain"
                    />
dmengelt commented 1 year ago

Hi @FedkinAndrey Currently isReadyToPay always returns false for Firefox on iOS. The button components use isReadyToPay to determine if the button should be displayed. That's the reason why you don't see the button.

FedkinAndrey commented 1 year ago

Thank you very much for your reply. If I understand you correctly, there is no way I can influence this behavior?

dmengelt commented 1 year ago

Thats correct. We are currently looking into this.

dmengelt commented 1 year ago

@FedkinAndrey we adjusted isReadyToPay to return true for Firefox on iOS. You should now see the Google Pay button.

FedkinAndrey commented 1 year ago

Sounds cool! I need to test it and will let you know after that

But thank you anyway ))