ShanghaiMike Posted October 20, 2010 Share Posted October 20, 2010 Hi,Does anyone know how to fix this error in the Paypal Module?Paypal does not allow your country of residence to ship to the country you wish toIt worked fine from my account (USA), but when I set up my client's e-mail address in the prestashop settings (Chinese), I get the above message when I go to check out. All payments will come from China.I checked the forums to see if this problem had been fixed before, and there was no exact solution. Any help would be greatly appreciated!Thanks,Mike Link to comment Share on other sites More sharing options...
codegrunt Posted October 20, 2010 Share Posted October 20, 2010 This is a PayPal restriction. It is discussed a bit here:https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_html_Appx_BillingShippingAddressThe issue is that by default with PayPal you are not allowed to have billing and shipping addresses in different countries. This is done for fraud prevention. The PayPal template in Prestashop has "address_override" set 1 which means the passed address is used. PayPal expects the shipping country to match that of the PayPal account so refuses the transaction.I believe you can get around this by disabling "address_override" though I have not tried it myself. You would need to change the "modules/paypal/redirect.tpl" template:from <input type="hidden" name="address_override" value="1" /> to <input type="hidden" name="address_override" value="0" /> This will cause the address in the customer's PayPal account to be used instead which will be correct. It will be up to you as the store owner to sort out the true shipping address based on what the customer entered in their Prestashop account. Using the Mail Alerts module would probably make that more obvious (as the PayPal generated message may have a different address).Cheers Link to comment Share on other sites More sharing options...
ShanghaiMike Posted October 21, 2010 Author Share Posted October 21, 2010 You are awesome! Thank you so much! All is fixed. Link to comment Share on other sites More sharing options...
colafreak Posted January 3, 2011 Share Posted January 3, 2011 I have the same problem. However, I can not see how to edit the redirect.tpl file.When I open the file I get the image I attach.Any ideas? Link to comment Share on other sites More sharing options...
rocky Posted January 4, 2011 Share Posted January 4, 2011 The file is opening in HTML view. You need to open the file in an editor with the option to display the file in plain text so you can see the HTML codes. Link to comment Share on other sites More sharing options...
freedomson Posted June 16, 2011 Share Posted June 16, 2011 I tried changing the tpl file but it did not worked for me.Here is the solution I identified.Tested for:PrestaShop™ 1.4.2.5Module Paypal v2.4STEP 1 - Prevent error at paypal site Index: payment/paypalpayment.php =================================================================== --- payment/paypalpayment.php (revision 3) +++ payment/paypalpayment.php (working copy) [spam-filter] -97,8 +97,7 [spam-filter] $request .= '&SHIPTOZIP;='.urlencode($address->postcode); $request .= '&SHIPTOCOUNTRY;='.urlencode($country->iso_code); $request .= '&SHIPTOPHONENUM;='.urlencode($address->phone); - $request .= '&ADDROVERRIDE=1'; - + $request .= '&ADDROVERRIDE=0'; // Calling PayPal API include(_PS_MODULE_DIR_.'paypal/api/paypallib.php'); $ppAPI = new PaypalLib(); STEP 2- Prevent error at callbackFILE paypal.phpComment following line near line 405 #$requestAddress = '&SHIPTONAME;='.urlencode($address->company.' '.$address->firstname.' '.$address->lastname).'&SHIPTOSTREET;='.urlencode($address->address1.' '.$address->address2).'&SHIPTOCITY;='.urlencode($address->city).'&SHIPTOSTATE;='.urlencode($address->id_state ? $state->iso_code :$country->iso_code).'&SHIPTOCOUNTRYCODE;='.urlencode($country->iso_code).'&SHIPTOZIP;='.urlencode($address->postcode); Link to comment Share on other sites More sharing options...
PocketChalker Posted June 17, 2011 Share Posted June 17, 2011 Same issue here.....made the same changes and no love...not working. Anyone else with some ideas? Link to comment Share on other sites More sharing options...
thecult Posted December 20, 2011 Share Posted December 20, 2011 I have found more locations where param "address_override" is beign initialized (not only redirect.tpl) use any editor (like ultraedit) to search inside folder and you will find almost 3 concurrences regards Link to comment Share on other sites More sharing options...
akingston Posted April 4, 2012 Share Posted April 4, 2012 I was about to give up on this after seeing the same advice in so many posts but thankfully I eventually came across the following: (From http://customprestsh...country-of.html ) Right here is a solution that finally worked for me after reading lots of posts, this line was already set to overide address in the modules/paypal/standard/redirect.tpl line:36 <input type="hidden" name="address_override" value="0" /> However in the modules/paypal/payment/paypalpayment.php i noticed that Line: 105 was as follows $request .= '&ADDROVERRIDE=1'; so i changed it to $request .= '&ADDROVERRIDE=0'; Link to comment Share on other sites More sharing options...
Jayasilen Posted May 11, 2016 Share Posted May 11, 2016 Hi, I actually un-checked one of the country so that PayPal module won't be available for customers from that particular country. However, PayPal still appears for the un-checked country. I tried restricting the module by currency but it only give radio button and I cannot select multiple currency. Appreciate if someone can give some suggestions. Link to comment Share on other sites More sharing options...
ELITIV Posted June 17, 2016 Share Posted June 17, 2016 Hi everyone. I try multiple variations, many solutions that marked as SOLVED but this not solved this problem. I change ADDROVERRIDE to 0 but this only allow users to not show country restriction but payment not processed. Any suggestion to solve this? Please. ERROR. PayPal response:TIMESTAMP -> 2016-06-16T21:36:20ZL_ERRORCODE0 -> 10474L_SHORTMESSAGE0 -> Invalid DataL_LONGMESSAGE0 -> This transaction cannot be processed. The shipping country is not allowed by the buyer's country of residence.L_SEVERITYCODE0 -> Error Link to comment Share on other sites More sharing options...
Recommended Posts