Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
Paypal Standard: Country Code - 2 letter or 3 letter?
Posted: 26 July 2010 03:15 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  17
Joined  2010-06-14

Hi there,

I have seen in the Paypal Standard examples the note that PayPal needs 2 letter country codes.  Based on this, early on I made sure that every country dropdown list I have uses 2 letter codes.

I now want to show the full country name for billing and shipping address on the confirmation page and email notification for admins.

I found:

{exp:cartthrob:view_country_name country_code="{customer_country_code}"

But it needs a three letter code in order to look up the full country name.  Now I am thinking it was a mistake to make all the country codes 2 letter.  I did just notice in this post that you’ve have added a module to convert 3 letter to 2 letter for the gateways that need it.

So, maybe you can give me a little guidance - should I be using 3 letter codes or 2 letter codes?  If I use 3 letter codes, how do I make sure PayPal will be sent the 2 letter code they need?

I am fine with 2 letter codes all the way as I use reegion_select from Derek Hogue in other areas of the site - but I need a way to use view_country_name with 2 letter codes.  But if 3 letter is better for CT then no problem, its fairly easy to change to 3 letters at this point if PayPal Standard will be OK with it somehow.

Thanks for all your help.
Tek

 Signature 

EE 1.6.8 | CartThrob v.0.9337

Profile
 
 
Posted: 26 July 2010 03:30 AM   [ Ignore ]   [ # 1 ]
Wallflower
Rank
Total Posts:  17
Joined  2010-06-14

Just found the following in the PayPal Standard gateway…

'country'                => $this->_get_alpha2_country_code($customer_info['country_code']), 

So I think I have my answer - use 3 letter codes and the PayPal gateway will turn it into 2 letters.  smile

Let me know if I should be doing something else.

 Signature 

EE 1.6.8 | CartThrob v.0.9337

Profile
 
 
Posted: 26 July 2010 11:37 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10279
Joined  2008-09-29

Yes. It will turn it into the 2 letter country code automatically.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile