View Single Post
  #22  
Old 03-17-2014, 05:17 AM
 
mixon mixon is offline
Michael Bugrov
 

X-Cart team
  
Join Date: Jul 2005
Posts: 91
 

Default Re: X-Cart 4.6.3: "Amazon Payments", "PayPal Access", another USPS update.

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']);
Attached Files
File Type: diff PATCH.diff (632 Bytes, 3 views)
__________________
--
Sincerely yours,
Michael Bugrov,
X-Cart Software Architector

founder of: X-Monitoring service
founder of: Infinite scroll

Facebook
Linked-in

Last edited by mixon : 04-14-2014 at 11:20 PM.
Reply With Quote