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

How to change default country on PayPal debit/credit card form? #181

Open
shreyshahh opened this issue Jul 23, 2021 · 1 comment
Open

How to change default country on PayPal debit/credit card form? #181

shreyshahh opened this issue Jul 23, 2021 · 1 comment

Comments

@shreyshahh
Copy link

shreyshahh commented Jul 23, 2021

I am sending country code to shipping address setting like,

shipping: {
              address: {
                country_code: 'GB',
             }
}

Also I have tried to send country code in payer's setting like,

payer: {
          address: {
            country_code: 'GB'
          }
        },

Also tried to set locale in application context settings like,

application_context: {
          locale: "en-GB",
        }

Still it shows United States as country, is there a way I can change the country?

Screenshot (63)

@sebauer96
Copy link
Contributor

PayPal uses the navigator location to set the default country BUT sometimes it doesn't work, so you need in (advanced extraqueryparams) add locale value. (This is when you declare Paypal Config)
Like this:
advanced: { commit: 'true', extraQueryParams: [{ name: 'locale', value: 'es_MX' }], },
You can see the list of value on https://developer.paypal.com/reference/locale-codes/

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

2 participants