Jump to content

[SOLVED] Paypal does not allow your country of residence to ship to the country you wish to


Recommended Posts

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 to

It 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

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_BillingShippingAddress

The 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

  • 2 months later...
  • 5 months later...

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.5
Module Paypal v2.4

STEP 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 callback

FILE paypal.php

Comment 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

  • 6 months later...
  • 3 months later...

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

  • 4 years later...

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

  • 1 month later...

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

×
×
  • Create New...