Quote:
Originally Posted by Stizerg
Thanks Steve, looking at logs I see that PayPal returns correct address
[region] => New South Wales
[country] => AU
but in x-cart the State is set to Australian Capital Territory (first in the list).
btw, test mode doesn't work for me, Paypal login page doesn't exist at sandbox.paypal.com ...
|
Please use the following patch and make the necessary changes to 'modules/PayPal_Login/pp_return.php' file to fix this issue:
Code:
Index: modules/PayPal_Login/pp_return.php
--- a/modules/PayPal_Login/pp_return.php
+++ b/modules/PayPal_Login/pp_return.php
@@ -106,6 +106,18 @@ $_pplogin_address = array(
'phone' => $user->getPhoneNumber(),
);
+$_pplogin_state_error = 0;
+
+x_load('paypal');
+
+// detect state from state info returned by PayPal
+$_pplogin_address['state'] = func_paypal_detect_state(
+ $_pplogin_address['country'],
+ $_pplogin_address['state'],
+ $_pplogin_address['zipcode'],
+ $_pplogin_state_error
+);
+
$_pplogin_check_result = func_pplogin_check_user($_pplogin_profile['payerid'], $_pplogin_profile['openid_identity']);