Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaymentDataRequest allowedCountryCodes not taking effect #719

Open
danshirley1 opened this issue Jul 24, 2024 · 0 comments
Open

PaymentDataRequest allowedCountryCodes not taking effect #719

danshirley1 opened this issue Jul 24, 2024 · 0 comments

Comments

@danshirley1
Copy link

General information

  • SDK version: 3.101.3
  • Environment: Sandbox
  • Browser and OS Chrome 125.0.6422.76 (Official Build) (x86_64) MacOS 14.4.1

Issue description

For Google Pay, If I set a country code of UK for shippingAddressParameters.allowedCountryCodes in my call to createPaymentDataRequest() should I be able to select a delivery address from another country? It seems that when I try an address in France I can select that address and submit the payment successfully with no messaging or issue.

Actual Result

I can select a shipping address in France.

Expected Result

I'm assuming I shouldn't be able to select a shipping address in a country other than UK.

Code Example

        const paymentDataRequest = googlePaymentInstance.createPaymentDataRequest({
          transactionInfo: {
            countryCode: 'GB',
            currencyCode: 'GBP,
            totalPriceStatus: 'ESTIMATED',
            totalPrice: '123.45',
          },
          shippingAddressRequired: true,
          shippingOptionRequired: true,
          emailRequired: true,
          callbackIntents: ['PAYMENT_AUTHORIZATION', 'SHIPPING_ADDRESS', 'SHIPPING_OPTION'],
          shippingAddressParameters: {
            allowedCountryCodes: ['UK'],
          },
        });

        const paymentData = await paymentsClient.loadPaymentData(paymentDataRequest);
        ...
@danshirley1 danshirley1 changed the title PaymentData Request allowedCountryCodes not taking effect PaymentDataRequest allowedCountryCodes not taking effect Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant