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

#   HikaShop PayPal plugin truncates 'state'

##

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

Less More

- Posts: 37
- Thank you received: 1
-
-

13 years 9 months ago [\#88944](#88944) by [tidosho](/forum/user/13071-tidosho "View tidosho's Profile")  *[HikaShop PayPal plugin truncates 'state'](/forum/3-bug-report/78120-hikashop-paypal-plugin-truncates-state#88944 "Hi there:  I have noticed during testing that when my test customer has a billing address&#95;state of 'Oxfordshire' the HS PayPal plugin actually sends a 3-letter code to PayPal, in this case 'OXF'. I assume this is what PayPal expects, but when PayPal shows the billing address to the customer they will see the 3-letter code ... which they might not expect. Has anyone encountered problems with this?  Regards,  Martin")* was created by *[tidosho](/forum/user/13071-tidosho "View tidosho's Profile")*

Hi there:

I have noticed during testing that when my test customer has a billing address_state of 'Oxfordshire' the HS PayPal plugin actually sends a 3-letter code to PayPal, in this case 'OXF'. I assume this is what PayPal expects, but when PayPal shows the billing address to the customer they will see the 3-letter code ... which they might not expect. Has anyone encountered problems with this?

Regards,

Martin

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Online](/forum/user/63-nicolas)

Less More

- Posts: 86560
- Thank you received: 14307
-
-

13 years 9 months ago [\#89113](#89113) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[HikaShop PayPal plugin truncates 'state'](/forum/3-bug-report/78120-hikashop-paypal-plugin-truncates-state#89113 "Hi there:  I have noticed during testing that when my test customer has a billing address&#95;state of 'Oxfordshire' the HS PayPal plugin actually sends a 3-letter code to PayPal, in this case 'OXF'. I assume this is what PayPal expects, but when PayPal shows the billing address to the customer they will see the 3-letter code ... which they might not expect. Has anyone encountered problems with this?  Regards,  Martin")*

Hi,

If you want to, you can remove the state from the PayPal form by removing the line: Code:

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

in the file plugins/hikashoppayment/paypal/paypal.php

However, that field is required to US addresses and it has to be the code of the state not the name based on the paypal API documentation. So if you remove it and have US citizens buying on your website, it will probably generate an error on PayPal website if you remove the state.
If you only sell in the UK, that won't be a problem though.

The following user(s) said Thank You: [tidosho](/forum/user/13071-tidosho "View tidosho's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83ODEyMC1oaWthc2hvcC1wYXlwYWwtcGx1Z2luLXRydW5jYXRlcy1zdGF0ZT90bXBsPW1hcmtkb3du) 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.049 seconds

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