[Skip to main content](#vessel-content)

#   Paypal State code not showing in Paypal page

##

- **[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")**
- [![adzy1981's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17503-adzy1981 "View adzy1981's Profile") Topic Author
- [ Offline](/forum/user/17503-adzy1981)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 5 months ago [\#102406](#102406) by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")  *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102406 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")* was created by *[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")*

Hi guys,

Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).

If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment.
If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.

My Hikashop address page shows the Long version / Full name of the state in a drop down box.

Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 5 months ago [\#102478](#102478) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102478 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

Hi,

This code should be sent to Paypal thanks to the code: Code:

$vars["state"]=@$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_code_3; $vars["country"]=@$order-&gt;cart-&gt;$address_type-&gt;address_country-&gt;zone_code_2;

Have you the latest version of HikaShop ? Have you edited the zone codes, or the paypal plugin ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")**
- [![adzy1981's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17503-adzy1981 "View adzy1981's Profile") Topic Author
- [ Offline](/forum/user/17503-adzy1981)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 5 months ago -  13 years 5 months ago [\#102553](#102553) by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")  Replied by *[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102553 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

I'll check on that code. Thanks.

And Yes, I have the latest version of hika shop.

No, I haven't edited the state codes, and I'm pretty sure I haven't played with the PayPal.php file

Last edit: 13 years 5 months ago by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")**
- [![adzy1981's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17503-adzy1981 "View adzy1981's Profile") Topic Author
- [ Offline](/forum/user/17503-adzy1981)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 5 months ago [\#102599](#102599) by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")  Replied by *[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102599 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

well that code is written into the Paypal.php exactly as you posted.

To be specific, If I am in Australia and I choose New South Wales as the country in my drop down. I proceed to Paypal payment page and the State code at the bottom of the page is Blank.

I'm stuck as to why this is happening (I have Hikashop essentials, latest update and a Joomla 1.5.26 site)

Another note - USA addresses work just fine. It's the Australian states I seem to be having trouble with. All other info comes across okay.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 5 months ago [\#102671](#102671) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102671 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

Hi,

Can you try with the "Northern Territory" Australia state ?
Is the state code displayed in PayPal ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")**
- [![adzy1981's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17503-adzy1981 "View adzy1981's Profile") Topic Author
- [ Offline](/forum/user/17503-adzy1981)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 5 months ago [\#102737](#102737) by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")  Replied by *[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102737 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

Same result with Northern Territory. No transfer of info to PayPal payment site

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#102751](#102751) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#102751 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

Hi,

Searching on the Internet, I found an interesting message:
[ stackoverflow.com/questions/7578717/payp...stralian-state-codes](http://stackoverflow.com/questions/7578717/paypal-australian-state-codes)

So I guess that a specific check is required, something like: Code:

$vars["country"]=@$order-&gt;cart-&gt;$address_type-&gt;address_country-&gt;zone_code_2; $vars["state"]=@$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_code_3; if($vars["country"] == 'AU') $vars["state"] = @$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_name_english;

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")**
- [![adzy1981's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17503-adzy1981 "View adzy1981's Profile") Topic Author
- [ Offline](/forum/user/17503-adzy1981)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 5 months ago -  13 years 5 months ago [\#105084](#105084) by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")  Replied by *[adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile")* on topic *[Paypal State code not showing in Paypal page](/forum/4-how-to/81407-paypal-state-code-not-showing-in-paypal-page#105084 "Hi guys,  Anyone know why the 3 letter code referring to a STATE is not appearing in the Paypal webpage (after re-direct on check-out).  If I choose paypal (standard) as the method of payment I am redirected to the Paypal page for payment. If I choose to pay without logging into a paypal account (i.e - pay by debit or credit card) the address fields are completed / filled in as expected, except for the State/Territory section of the paypal webpage.  My Hikashop address page shows the Long version / Full name of the state in a drop down box.  Any ideas how to get the 3 letter code or 2 letter code to transfer across to the Paypal payment page??")*

Hi guys, sorry for the delayed response. This worked for me:

Go to the root folder of your website and edit the following file:
**public\_html/plugins/hikashoppayment/paypal.php**

**Replace these 2 lines**
Code:

$vars["state"]=@$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_code_3; $vars["country"]=@$order-&gt;cart-&gt;$address_type-&gt;address_country-&gt;zone_code_2;

**With**
Code:

$vars["country"]=@$order-&gt;cart-&gt;$address_type-&gt;address_country-&gt;zone_code_2; $vars["state"]=@$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_code_3; if($vars["country"] == 'AU') $vars["state"] = @$order-&gt;cart-&gt;$address_type-&gt;address_state-&gt;zone_name_english;

Last edit: 13 years 5 months ago by [adzy1981](/forum/user/17503-adzy1981 "View adzy1981's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxNDA3LXBheXBhbC1zdGF0ZS1jb2RlLW5vdC1zaG93aW5nLWluLXBheXBhbC1wYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.084 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
