Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Specifing Default Country for Paypal Express

Specifing Default Country for Paypal Express

Views: 2,482

Results 1 to 6 of 6
18 May 2014, 9:00 AM
#1
ttzz avatar

ttzz

New Zenner

Join Date:
May 2014
Posts:
7
Plugin Contributions:
0

Specifing Default Country for Paypal Express

When a customer clicks the "Checkout with Paypal" button to make a payment with the Paypal Express, the Paypal payment page shows the United States as the default country, but I'd like to show another country such as Australia by default.

How can I specify the default country?

Thanks in advance.

19 May 2014, 3:54 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Specifing Default Country for Paypal Express

I thought it made its selection according to your store's default, as set in Admin->Configuration->My Store and/or Shipping/Packaging ?

19 May 2014, 10:37 AM
#3
ttzz avatar

ttzz

New Zenner

Join Date:
May 2014
Posts:
7
Plugin Contributions:
0

Re: Specifing Default Country for Paypal Express

Thanks for your reply.
Although I set both of them Australia, the Paypal payment page still showed the United States.

When I tried to find a solution on the internet, I found a conversation below.

"Is there a way to set the country code for PayPal Express checkout, so when the user is redirected to paypal, it's auto selected their country from the country drop down list instead of showing the default 'united states'?"

"Try passing "card" => array("country" => "au"), pretty sure that will work"

"Works great! Thanks!"

I was not sure how I could apply it to Zen Cart, though. I would appreciate your help.

21 May 2014, 7:19 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Specifing Default Country for Paypal Express

The document you point to is for a different architecture, not for Express Checkout. Zen Cart's Express Checkout code already correctly passes country information.

I just set up a brand new install of v1.5.1, then enabled PayPal Express Checkout and inserted my API credentials.
I then added a product to my shopping cart and clicked the orange PayPal button. It defaulted to United States, as expected. I did nothing on that page; I just clicked the Back button in my browser to return to the store.
Then I went into my Admin->Configuration->My Store settings and changed Country to Australia.
I went back to my store's shopping cart page, with the same item in the cart, and clicked the orange paypal button again.
It took me to the PayPal site, with Australia as the default country.

So, it seems the original Zen Cart code is fine.
In what ways have you altered your site from the original Zen Cart code? or original Zen Cart data for countries? or Zones? Or any other admin settings?

26 May 2014, 9:48 AM
#6
ttzz avatar

ttzz

New Zenner

Join Date:
May 2014
Posts:
7
Plugin Contributions:
0

Re: Specifing Default Country for Paypal Express

I see.
Thank you for testing out the express checkout with the new install of zen cart.
It seems that I did not understand my test results of the Paypal express checkout and the Paypal official pages properly.
The result you were able to get was what I was trying to achieve, so it seems that I do not have to change my paypal express checkout settings.

I appreciate your help.