- Posts: 11
- Thank you received: 0
Paypal State code not showing in Paypal page
13 years 5 months ago #102406
by adzy1981
Paypal State code not showing in Paypal page was created by adzy1981
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??
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 or Create an account to join the conversation.
13 years 5 months ago #102478
by Xavier
Replied by Xavier on topic Paypal State code not showing in Paypal page
Hi,
This code should be sent to Paypal thanks to the code:
Have you the latest version of HikaShop ? Have you edited the zone codes, or the paypal plugin ?
This code should be sent to Paypal thanks to the code:
Code:
$vars["state"]=@$order->cart->$address_type->address_state->zone_code_3;
$vars["country"]=@$order->cart->$address_type->address_country->zone_code_2;
Please Log in or Create an account to join the conversation.
13 years 5 months ago - 13 years 5 months ago #102553
by adzy1981
Replied by adzy1981 on topic Paypal State code not showing in Paypal 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
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.
Please Log in or Create an account to join the conversation.
13 years 5 months ago #102599
by adzy1981
Replied by adzy1981 on topic Paypal State code not showing in Paypal 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.
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 or Create an account to join the conversation.
13 years 5 months ago #102671
by Xavier
Replied by Xavier on topic Paypal State code not showing in Paypal page
Hi,
Can you try with the "Northern Territory" Australia state ?
Is the state code displayed in PayPal ?
Can you try with the "Northern Territory" Australia state ?
Is the state code displayed in PayPal ?
Please Log in or Create an account to join the conversation.
13 years 5 months ago #102737
by adzy1981
Replied by adzy1981 on topic Paypal State code not showing in Paypal page
Same result with Northern Territory. No transfer of info to PayPal payment site
Please Log in or Create an account to join the conversation.
13 years 5 months ago #102751
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Paypal State code not showing in Paypal page
Hi,
Searching on the Internet, I found an interesting message:
stackoverflow.com/questions/7578717/payp...stralian-state-codes
So I guess that a specific check is required, something like:
Regards,
Searching on the Internet, I found an interesting message:
stackoverflow.com/questions/7578717/payp...stralian-state-codes
So I guess that a specific check is required, something like:
Code:
$vars["country"]=@$order->cart->$address_type->address_country->zone_code_2;
$vars["state"]=@$order->cart->$address_type->address_state->zone_code_3;
if($vars["country"] == 'AU')
$vars["state"] = @$order->cart->$address_type->address_state->zone_name_english;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
13 years 5 months ago - 13 years 5 months ago #105084
by adzy1981
Replied by adzy1981 on topic Paypal State code not showing in Paypal 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
With
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->cart->$address_type->address_state->zone_code_3;
$vars["country"]=@$order->cart->$address_type->address_country->zone_code_2;
With
Code:
$vars["country"]=@$order->cart->$address_type->address_country->zone_code_2;
$vars["state"]=@$order->cart->$address_type->address_state->zone_code_3;
if($vars["country"] == 'AU')
$vars["state"] = @$order->cart->$address_type->address_state->zone_name_english;
Last edit: 13 years 5 months ago by adzy1981.
Please Log in or Create an account to join the conversation.
Time to create page: 0.108 seconds