Jump to content

PayPal Problem with shipping address


vapp

Recommended Posts

Hi everybody

My customers cannot use PayPal anymore to pay their orders.

I wonder if it is a Prestashop error or if its from PayPal.

Everything was working fine up to yesterday and I did not change anything in my store for weeks.

Following is what appears on the screen when trying to pay the order...   My customers are all in Canada;

 

-----------------------------------------------------------------------

 

There’s a problem with your shipping address.

Please return to the merchant and update your information, including your city, state, and ZIP code.
James Fresco  
8968 rue Frontenac undefined
 
Lac-Megantic QC G6B 1Y5
 
------------------------------------------------------------------------
 
Do you have any idea on how to solve this problem?
Thank you

 

Link to comment
Share on other sites

Hello, I am having the same problem! My shop  is also operating in Canada, but the thing i noticed in PayPal

that the message it gets is :

 

-------------------------------------------------------------------------------------------------------

There’s a problem with your shipping address.
Please return to the merchant and update your information, including your city, state, and ZIP code.
First LastName
1031 StreetName Rd undefined
 
Haliburton ON L0ML20

 

 

--------------------------------------------------------------------------------------------------------

Note : I changed the names and address for discretion.

 

Notice the "undefined" parameter above, maybe that's the cause of the problem but that seems to be generated by prestashop. Is it doing it wrong?

Link to comment
Share on other sites

i just used the same address as a successful transaction to try making payment and it returned error as well

 

There’s a problem with your shipping address.
Please return to the merchant and update your information, including your city, state, and ZIP code.
 
lauxxx kxxx
3xx 23rd st S
33xxx FL xxxxx
 
address changed but actual address was inserted and also changed the last digit of the house number , both came back with same error.
 
using version paypal 1.3.8 and prestashop1.6.0.9
 
someone pls help thanks i really dont know what to do
 
rgds
charmaine
Link to comment
Share on other sites

 Hi,

 

I just realise there is this error today coz a customer called in with this error.

Nothing was changed at all on admin, paypal payment has been working all along.

Up until now, this error suddenly appeared. 

Is this a Paypal issue? or do we have to change something on Prestashop admin to make Paypal like us enough for payment to go through? 

 

presta_11.jpg
presta-22.jpg

Link to comment
Share on other sites

Hi,

 

Same problem from last two days, some UK clients reported the same problem.

 

I also tried to fill the "Undefined" fields by enabling states and successfully filled all the fields and there is no any undefined field anymore but still having the same problem.

 

I had updated to the latest 1.6.1.17 version and thought it might be the problem, so I rolled back to previous version and still having the same problem.

Hope someone could help here.

 

Thanks!

  • Like 1
Link to comment
Share on other sites

I've already contacted them and waiting for a reply.

We only sell digital products, do they need a physical address to delver the digital files? I don't think so, it was working fine for over 1 and half years and started doing it recently, I think they have changed something, may be Prestashop needs to be updated to meet their new requirements?

 

Hope someone look into the problem and come up with a solution.

Link to comment
Share on other sites

We are lucky guys, I've resolved the issue, here is how, it seems PayPal became more strict about addresses,

and what happens in Prestashop is this, it does not send the country code, hence people from Canada, Australia, etc having issues,

to fix that if you are using PayPalUSA plugin, it does 2 wrong things sends "address2"  variable as "undefined" and does NOT  send the country code.

So here is the fix:

 

Go to /modules/paypalusa/views/templates/hooks/standard.tpl (if you are using standard paypal gateway, if you are using different one you have to edit

payment-advanced.tpl or express-checkout.tpl)

and edit these lines:

 

line 28-29:

 

{if ($paypal_usa_billing_address->address2  != '')}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />{/if}

 
to this:
 
{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
 
this way the address2 will be in the paypal inputs even if it's empty, so you won't get "undefined"
 
then also add this line for country iso_code to send to paypal, right after address2 line or after state, as you wish:
 
<input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />
 
This will add the country parameters that will be sent to paypal, this way paypal will recognize the address and issue will be resolved.
 
This has fixed the issue for me, hope it fixes it for you!  :)
  • Like 6
Link to comment
Share on other sites

 

We are lucky guys, I've resolved the issue, here is how, it seems PayPal became more strict about addresses,

and what happens in Prestashop is this, it does not send the country code, hence people from Canada, Australia, etc having issues,

to fix that if you are using PayPalUSA plugin, it does 2 wrong things sends "address2"  variable as "undefined" and does NOT  send the country code.

So here is the fix:

 

Go to /modules/paypalusa/views/templates/hooks/standard.tpl (if you are using standard paypal gateway, if you are using different one you have to edit

payment-advanced.tpl or express-checkout.tpl)

and edit these lines:

 

line 28-29:

 

{if ($paypal_usa_billing_address->address2  != '')}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />{/if}

 
to this:
 
{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
 
this way the address2 will be in the paypal inputs even if it's empty, so you won't get "undefined"
 
then also add this line for country iso_code to send to paypal, right after address2 line or after state, as you wish:
 
<input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />
 
This will add the country parameters that will be sent to paypal, this way paypal will recognize the address and issue will be resolved.
 
This has fixed the issue for me, hope it fixes it for you!  :)

 

We are lucky to have you! Thank you for informing us of the fix.

I have applied it and it works! Thank you so much! :D

  • Like 1
Link to comment
Share on other sites

We are lucky to have you! Thank you for informing us of the fix.

I have applied it and it works! Thank you so much! :D

Thanks for the solution, unfortunately it's not working for me  :(  may be I'm doing something wrong  :unsure:  it would be great if you could upload the edited file, I would be very thankful for you  :)

Thank you so much for your help.

Link to comment
Share on other sites

 

We are lucky guys, I've resolved the issue, here is how, it seems PayPal became more strict about addresses,

and what happens in Prestashop is this, it does not send the country code, hence people from Canada, Australia, etc having issues,

to fix that if you are using PayPalUSA plugin, it does 2 wrong things sends "address2"  variable as "undefined" and does NOT  send the country code.

So here is the fix:

 

Go to /modules/paypalusa/views/templates/hooks/standard.tpl (if you are using standard paypal gateway, if you are using different one you have to edit

payment-advanced.tpl or express-checkout.tpl)

and edit these lines:

 

line 28-29:

 

{if ($paypal_usa_billing_address->address2  != '')}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />{/if}

 
to this:
 
{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
 
this way the address2 will be in the paypal inputs even if it's empty, so you won't get "undefined"
 
then also add this line for country iso_code to send to paypal, right after address2 line or after state, as you wish:
 
<input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />
 
This will add the country parameters that will be sent to paypal, this way paypal will recognize the address and issue will be resolved.
 
This has fixed the issue for me, hope it fixes it for you!  :)

 

Thanks for the solution, unfortunately it's not working for me   :(  may be I'm doing something wrong   :unsure:  it would be great if you could upload the edited file, I would be very thankful for you   :)

Thank you so much for your help.

Link to comment
Share on other sites

I am using PayPal USA, Canada v1.3.9 and Prestashop 1.6.1.17. My paypal module code is different for that file and I have no idea how to fix it. Any advice since others may also have this problem? Thanks so much! I thought my site might be completely done for!

<form action="{$paypal_usa_action|escape:'htmlall':'UTF-8'}" method="post">
	<p class="payment_module">
		<input type="hidden" name="cmd" value="_cart" />
		<input type="hidden" name="upload" value="1" />
		<input type="hidden" name="charset" value="utf8" />
		<input type="hidden" name="business" value="{$paypal_usa_business_account|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="currency_code" value="{$currency->iso_code|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="custom" value="{$cart->id|intval};{if isset($cart->id_shop)}{$cart->id_shop|intval}{else}0{/if}" />
		<input type="hidden" name="amount" value="{$cart->getOrderTotal(true)|floatval}" />
		<input type="hidden" name="first_name" value="{$paypal_usa_billing_address->firstname|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="last_name" value="{$paypal_usa_billing_address->lastname|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="address1" value="{$paypal_usa_billing_address->address1|escape:'htmlall':'UTF-8'}" />
		{if $paypal_usa_billing_address->address2}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />{/if}
		<input type="hidden" name="city" value="{$paypal_usa_billing_address->city|escape:'htmlall':'UTF-8'}" />
		{if ($paypal_usa_billing_address->id_state != 0)}
			<input type="hidden" name="state" value="{$paypal_usa_billing_address->state->iso_code|escape:'htmlall':'UTF-8'}" />
		{/if}
		<input type="hidden" name="zip" value="{$paypal_usa_billing_address->postcode|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="email" value="{$paypal_usa_customer->email|escape:'htmlall':'UTF-8'}" />
		{if (isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)) || (isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone))}
		<input type="hidden" name="night_phone_b" value="{if isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)}{$paypal_usa_billing_address->phone_mobile|escape:'htmlall':'UTF-8'}{else}{if isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone)}{$paypal_usa_billing_address->phone|escape:'htmlall':'UTF-8'}{/if}{/if}" />
		{/if}
		<input type="hidden" name="address_override" value="1" />
		
		{assign var="paypal_usa_total_discounts" value=$cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)}
		{if $paypal_usa_total_discounts == 0}
			{foreach from=$cart->getProducts() item=paypal_usa_product name="paypal_usa_products"}
				<input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.name|escape:'htmlall':'UTF-8'}" />
				<input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|string_format:"%.2f"}" />
				<input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.quantity|intval}" />
			{/foreach}
			{assign var="paypal_usa_total_shipping" value=$cart->getOrderTotal(true, Cart::ONLY_SHIPPING)}
			{if $paypal_usa_total_shipping}
				<input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{l s='Shipping' mod='paypalusa'}" />
				<input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_total_shipping|floatval}" />
				<input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="1">
			{/if}
		{else}	
			<input type="hidden" name="item_name_1" value="{l s="Your order" mod="paypalusa"}" />
			<input type="hidden" name="amount_1" value="{$cart->getOrderTotal(!$show_taxes)|floatval}" />
		{/if}
		
		<input type="hidden" name="tax_cart" value="{$paypal_usa_total_tax|floatval}" />
		
		<input type="hidden" name="notify_url" value="{$paypal_usa_notify_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="return" value="{$paypal_usa_return_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="cancel_return" value="{$paypal_usa_cancel_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="no_shipping" value="1" />
		<input type="hidden" name="bn" value="PrestashopUS_Cart" />
		<input id="paypal-standard-btn" type="image" name="submit" src="https://www.paypalobjects.com/{if $lang_iso == 'en'}en_US{else}{if $lang_iso == 'fr'}fr_CA{else}{if $lang_iso == 'es'}es_ES{else}en_US{/if}{/if}{/if}/i/bnr/horizontal_solution_PPeCheck.gif" alt="" style="vertical-align: middle; margin-right: 10px;" /> {l s='Pay with PayPal' mod='paypalusa'}
	</p>
</form>

 

  • Like 1
Link to comment
Share on other sites

It broke when a customer didn't add an address 2 field I replaced line 29 on my version with your new address 2 code and added the country code to line 60. Seems to be working, but I thought so before and a random customer who wasn't testing immediately broke it and emailed me. Fingers crossed that this holds! Thanks for the fix! It's very helpful for those of us that haven't coded in over a decade.

Edited by FichtenFoo (see edit history)
Link to comment
Share on other sites

It broke when a customer didn't add an address 2 field I replaced line 29 on my version with your new address 2 code and added the country code to line 60. Seems to be working, but I thought so before and a random customer who wasn't testing immediately broke it and emailed me. Fingers crossed that this holds! Thanks for the fix! It's very helpful for those of us that haven't coded in over a decade.

I only added the country code to line 60 and it's working like a charm.

Link to comment
Share on other sites

yes i just applied and inserted the country line code provided by kind eteralone and it fixed the issue, big thank you !  i am wondering if i should continue using prestashop or switching platforms , this is pretty frustrating for someone who dont know coding,  it was good while it lasted i guess, hope it gets better , in the meantime will be looking at alternatives for sure haha.

 

BIG THANKS Eteralone!!!!

 

 

charmaine

Link to comment
Share on other sites

yes i just applied and inserted the country line code provided by kind eteralone and it fixed the issue, big thank you !  i am wondering if i should continue using prestashop or switching platforms , this is pretty frustrating for someone who dont know coding,  it was good while it lasted i guess, hope it gets better , in the meantime will be looking at alternatives for sure haha.

 

BIG THANKS Eteralone!!!!

 

 

charmaine

Yes, a BIG Thanks to Eteralone for sure! he is a life saver here.

I was thinking exactly like you to switch the platform when I started using prestashop and got some issues, but I found a fix for almost every problem in the GREAT prestashop community, and successfully using it from over 1 and half years, and I can't live without it now, LOL  :D 

  • Like 2
Link to comment
Share on other sites

i know what you mean , but these events i am wondering whether it is worth staying on or bailing and look for an alternative , i guess its open source so you cannot really rely on a specific goto company for support tats wat i am saying, or im just unlucky so far looking for a reliable goto specialist. i am soo tired of having to fix try to find solutions one after another!  maybe im just more jittery , but its bad for my nerves for sure.  But big thanks to the good people of this community fer sure!

Link to comment
Share on other sites

I only added the country code to line 60 and it's working like a charm.

 

I did that at first as well and had a friend in Australia who was ordering anyway test it. It worked... but he had filled out both address fields. The very next customer (also in Australia) did not fill out Address 2 and it had the same paypal error so I had to replace that other line of code as well. NOW it's working as overnight I got a bunch of international orders from customers who were emailing me about the issue who couldn't order sooner. So DEFINITELY fix the ADDRESS 2 line as well or else it's just a matter of time before someone gets the error and you lose sales.

Link to comment
Share on other sites

i know what you mean , but these events i am wondering whether it is worth staying on or bailing and look for an alternative , i guess its open source so you cannot really rely on a specific goto company for support tats wat i am saying, or im just unlucky so far looking for a reliable goto specialist. i am soo tired of having to fix try to find solutions one after another!  maybe im just more jittery , but its bad for my nerves for sure.  But big thanks to the good people of this community fer sure!

Anxiety is a problem for me... yesterday was an especially bad day trying to figure out a solution for this. I even broke and had to restore my entire site twice trying! I even went so far as to look into dedicated shop hosts like Volusion. However they don't really migrate your existing data and recommend their freelance partner companies to do that for an extra charge. Quotes for migration from the 5 shops I emailed ranged from $700-$4000. That alone made me redouble my efforts to fix and stick with what I'm doing.

Link to comment
Share on other sites

wow tat much ? i'll have to start looking around, i'm really tired of all this, feels like im chained whether i like it or not haha, dont mind me ,just ranting away , guess its a bad prestashop experience day for me. and i will stop now so people can focus on reparing their site again :(

  • Like 1
Link to comment
Share on other sites

I did that at first as well and had a friend in Australia who was ordering anyway test it. It worked... but he had filled out both address fields. The very next customer (also in Australia) did not fill out Address 2 and it had the same paypal error so I had to replace that other line of code as well. NOW it's working as overnight I got a bunch of international orders from customers who were emailing me about the issue who couldn't order sooner. So DEFINITELY fix the ADDRESS 2 line as well or else it's just a matter of time before someone gets the error and you lose sales.

I've tested it by creating some test accounts on my website with and without entering the ADDRESS 2 field and it's working fine in both ways, it didn't work at first because I forgot to refresh the page after editing the file and proceeded to order, but it worked when I tried again and still working fine so far, got some orders from different countries including UK and Australia, I'll update if I find any problem.

  • Like 2
Link to comment
Share on other sites

Anxiety is a problem for me... yesterday was an especially bad day trying to figure out a solution for this. I even broke and had to restore my entire site twice trying! I even went so far as to look into dedicated shop hosts like Volusion. However they don't really migrate your existing data and recommend their freelance partner companies to do that for an extra charge. Quotes for migration from the 5 shops I emailed ranged from $700-$4000. That alone made me redouble my efforts to fix and stick with what I'm doing.

WOW! I had also restored my website to previous version due to the problem but apparently it didn't help.

Thank God I configured daily backups on my VPS server and able to restore again to the latest version.

  • Like 1
Link to comment
Share on other sites

Hi there, i’m pretty new to this and I came across this issue yesterday, ive edited the file mentionned in the fix by connecting to the site using ftp. But the issue is still there with both adress or just one. Is there anything I need to do after editing the file to make it work?

Link to comment
Share on other sites

Hi there, i’m pretty new to this and I came across this issue yesterday, ive edited the file mentionned in the fix by connecting to the site using ftp. But the issue is still there with both adress or just one. Is there anything I need to do after editing the file to make it work?

You should provide more details.

 

1) What address is being used?  Maybe you have a different issue

2) After you made the changes, did you verify that the address line 2 and country are now being sent to Paypal correctly?

Link to comment
Share on other sites

Can someone show me a snippet of where to place the second code or where line 60 is please. I am using a notepad. I think I've done it right however my paypal still isn't working. Thank you!

Try downloading a editor. Such as notepad ++ or either Atom.io This makes it easy seeing which line the code is.

Link to comment
Share on other sites

Hi, I'm having the exact same problem.... I tried the solutions, but nothing works... anyone got a fix?  I modified the line 29 and added the other on line 60 and still doesn't work...

 

Here's the message, appeared a few days ago... why isn't it working for me with the fix applied?

 

There’s a problem with your shipping address.

Please return to the merchant and update your information, including your city, state, and ZIP code.
Firstname Lastname
ADDRESS undefined
 
Gatineau QC J8R5T8
Edited by kylegap (see edit history)
Link to comment
Share on other sites

You should provide more details.

 

1) What address is being used?  Maybe you have a different issue

2) After you made the changes, did you verify that the address line 2 and country are now being sent to Paypal correctly?

How can you verify that the address line 2 and country are now being sent to Paypal correctly?

Link to comment
Share on other sites

I'm using standard and that's the file I modified.... here's the error on paypal:

 

There’s a problem with your shipping address.

Please return to the merchant and update your information, including your city, state, and ZIP code.
Firstname Lastname
ADDRESS undefined
 
Gatineau QC J8R5T8
Link to comment
Share on other sites

I'm going to try replacing the links again but it doesn't seem to be working for me. Then again I've never changed a code before.

 

Either way, thought I'd share Paypal's reply:

 

"Thank you for contacting PayPal Merchant Technical Services.

There is a known issue with the standard buttons that our team is currently working on.

I have given them your examples and I will reach out to you via this ticket when I get an update."

Edited by fc2013 (see edit history)
Link to comment
Share on other sites

attachicon.gifstandard.txt

 

Here is my version of the standard.tpl file, don't overwrite your own, or back up if you do, i am on v1.6.09, you can take a look at how i modified the file there.

 

note that the country input is after State id_state input

 

Just checked it out, made the exact same modifications and still got the exact same error... :( damn... I even tried copying your file entirely and still got the error....

Edited by kylegap (see edit history)
Link to comment
Share on other sites

@kylegap

Do you have custom theme maybe ? Check then in your theme/modules/paypalusa/ folder if there is 

maybe standard.tpl. Theme could maybe override file.

 

Also clear cache in Advanced Parameters > Performance.

Wow thanks, I cleared the cache and now it gets through!!! Thank you very much!

  • Like 1
Link to comment
Share on other sites

Hello! I use v1.3.9-paypalusa and have tried the solutions above including clearing cache but have had no luck, I still receive the "There’s a problem with your shipping address.

Please return to the merchant and update your information, including your city, state, and ZIP code." message. Here is the code for standard.tlp. Thanks in advance.
 

<form action="{$paypal_usa_action|escape:'htmlall':'UTF-8'}" method="post">
 <p class="payment_module">
  <input type="hidden" name="cmd" value="_cart" />
  <input type="hidden" name="upload" value="1" />
  <input type="hidden" name="charset" value="utf8" />
  <input type="hidden" name="business" value="{$paypal_usa_business_account|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="currency_code" value="{$currency->iso_code|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="custom" value="{$cart->id|intval};{if isset($cart->id_shop)}{$cart->id_shop|intval}{else}0{/if}" />
  <input type="hidden" name="amount" value="{$cart->getOrderTotal(true)|floatval}" />
  <input type="hidden" name="first_name" value="{$paypal_usa_billing_address->firstname|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="last_name" value="{$paypal_usa_billing_address->lastname|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="address1" value="{$paypal_usa_billing_address->address1|escape:'htmlall':'UTF-8'}" />
  {if ($paypal_usa_billing_address->address2  != '')}{/if}
  <input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="city" value="{$paypal_usa_billing_address->city|escape:'htmlall':'UTF-8'}" />
  {if ($paypal_usa_billing_address->id_state != 0)}
   <input type="hidden" name="state" value="{$paypal_usa_billing_address->state->iso_code|escape:'htmlall':'UTF-8'}" />
  {/if}
  <input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="zip" value="{$paypal_usa_billing_address->postcode|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="email" value="{$paypal_usa_customer->email|escape:'htmlall':'UTF-8'}" />
  {if (isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)) || (isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone))}
  <input type="hidden" name="night_phone_b" value="{if isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)}{$paypal_usa_billing_address->phone_mobile|escape:'htmlall':'UTF-8'}{else}{if isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone)}{$paypal_usa_billing_address->phone|escape:'htmlall':'UTF-8'}{/if}{/if}" />
  {/if}
  <input type="hidden" name="address_override" value="1" />
  
  {assign var="paypal_usa_total_discounts" value=$cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)}
  {if $paypal_usa_total_discounts == 0}
   {foreach from=$cart->getProducts() item=paypal_usa_product name="paypal_usa_products"}
    <input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.name|escape:'htmlall':'UTF-8'}" />
    <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|string_format:"%.2f"}" />
    <input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.quantity|intval}" />
   {/foreach}
   {assign var="paypal_usa_total_shipping" value=$cart->getOrderTotal(true, Cart::ONLY_SHIPPING)}
   {if $paypal_usa_total_shipping}
    <input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{l s='Shipping' mod='paypalusa'}" />
    <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_total_shipping|floatval}" />
    <input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="1">
   {/if}
  {else} 
   <input type="hidden" name="item_name_1" value="{l s="Your order" mod="paypalusa"}" />
   <input type="hidden" name="amount_1" value="{$cart->getOrderTotal(!$show_taxes)|floatval}" />
  {/if}
  
  <input type="hidden" name="tax_cart" value="{$paypal_usa_total_tax|floatval}" />
  
  <input type="hidden" name="notify_url" value="{$paypal_usa_notify_url|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="return" value="{$paypal_usa_return_url|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="cancel_return" value="{$paypal_usa_cancel_url|escape:'htmlall':'UTF-8'}" />
  <input type="hidden" name="no_shipping" value="1" />
  <input type="hidden" name="bn" value="PrestashopUS_Cart" />
  <input id="paypal-standard-btn" type="image" name="submit" src="https://www.paypalobjects.com/{if $lang_iso == 'en'}en_US{else}{if $lang_iso == 'fr'}fr_CA{else}{if $lang_iso == 'es'}es_ES{else}en_US{/if}{/if}{/if}/i/bnr/horizontal_solution_PPeCheck.gif" alt="" style="vertical-align: middle; margin-right: 10px;" /> {l s='Pay with PayPal' mod='paypalusa'}
 </p>
</form>
Link to comment
Share on other sites

  • 1 month later...
On 9/14/2017 at 3:59 PM, zameer said:

I've already contacted them and waiting for a reply.

We only sell digital products, do they need a physical address to delver the digital files? I don't think so, it was working fine for over 1 and half years and started doing it recently, I think they have changed something, may be Prestashop needs to be updated to meet their new requirements?

 

Hope someone look into the problem and come up with a solution.

Thanks Zameer for your kind support :), Appreciate that for you :)

  • Like 1
Link to comment
Share on other sites

Thanks for the solution above, it worked for me!

First time ever editing a module.
For any total noobs like myself,

absolutely download notepad a++ and install it.
go to the directory mentioned above on your ftp site (modules/paypalusa/views/templates/hooks)

what i did is copied the standard.tpl file over to my local drive to edit. 
then i renamed the current file standard.tpl file to backupthing.tpl there so i couldn't mess anything up and i had a original copy :D

for me, it was only ONE of the lines, 28 or 29 (i think 28) that needed to be removed and edited with the line provided 
i deleted both 28 and 29 and that gave me problems my first attempt. my fault for not reading correctly.


then i added line 60 as stated above.

 

everything works great. thanks so much !

Link to comment
Share on other sites

  • 4 weeks later...

{*
** @author PrestaShop SA <[email protected]>
** @copyright  2007-2014 PrestaShop SA
**
** International Registered Trademark & Property of PrestaShop SA
**
** Description: "PayPal Standard" payment form template
**
** This template is displayed on the payment page and called by the Payment hook
**
** Step 1: The customer is validating this form by clicking on the PayPal payment button
** Step 2: All parameters are sent to PayPal including the billing address to pre-fill a maximum of values/fields for the customer
** Step 3: The transaction success or failure is sent to you by PayPal at the following URL: http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1
** This step is also called IPN ("Instant Payment Notification")
** Step 4: The customer is redirected to his/her "Order history" page ("My account" section)
*}
<form action="{$paypal_usa_action|escape:'htmlall':'UTF-8'}" method="post">
    <p class="payment_module">
        <input type="hidden" name="cmd" value="_cart" />
        <input type="hidden" name="upload" value="1" />
        <input type="hidden" name="charset" value="utf8" />
        <input type="hidden" name="business" value="{$paypal_usa_business_account|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="currency_code" value="{$currency->iso_code|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="custom" value="{$cart->id|intval};{if isset($cart->id_shop)}{$cart->id_shop|intval}{else}0{/if}" />
        <input type="hidden" name="amount" value="{$cart->getOrderTotal(true)|floatval}" />
        <input type="hidden" name="first_name" value="{$paypal_usa_billing_address->firstname|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="last_name" value="{$paypal_usa_billing_address->lastname|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="address1" value="{$paypal_usa_billing_address->address1|escape:'htmlall':'UTF-8'}" />
        {if ($ paypal_{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />usa_billing_address-> adresse2! = '')} {/ if} <entrée type = "caché" nom = "adresse2" valeur = "{$ paypal_usa_billing_address-> adresse2 | escape: 'htmlall': 'UTF-8 '} "/>
        <input type="hidden" name="city" value="{$paypal_usa_billing_address->city|escape:'htmlall':'UTF-8'}" />
        {if ($paypal_usa_billing_address->id_state != 0)}
            <input type="hidden" name="state" value="{$paypal_usa_billing_address->state->iso_code|escape:'htmlall':'UTF-8'}" />
        {/if}
        <input type="hidden" name="zip" value="{$paypal_usa_billing_address->postcode|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="email" value="{$paypal_usa_customer->email|escape:'htmlall':'UTF-8'}" />
        {if (isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)) || (isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone))}
        <input type="hidden" name="night_phone_b" value="{if isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)}{$paypal_usa_billing_address->phone_mobile|escape:'htmlall':'UTF-8'}{else}{if isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone)}{$paypal_usa_billing_address->phone|escape:'htmlall':'UTF-8'}{/if}{/if}" />
        {/if}
        <input type="hidden" name="address_override" value="1" />
        
        {assign var="paypal_usa_total_discounts" value=$cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)}
        {if $paypal_usa_total_discounts == 0}
            {foreach from=$cart->getProducts() item=paypal_usa_product name="paypal_usa_products"}
                <input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.name|escape:'htmlall':'UTF-8'}" />
                <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|string_format:"%.2f"}" />
                <input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.quantity|intval}" />
            {/foreach}
            {assign var="paypal_usa_total_shipping" value=$cart->getOrderTotal(true, Cart::ONLY_SHIPPING)}
            {if $paypal_usa_total_shipping}
                <input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{l s='Shipping' mod='paypalusa'}" />
                <input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_total_shipping|floatval}" />
                <input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="1">
            {/if}
        {else}    
            <input type="hidden" name="item_name_1" value="{l s="Your order" mod="paypalusa"}" />
            <input type="hidden" name="amount_1" value="{$cart->getOrderTotal(!$show_taxes)|floatval}" />
        {/if}
        
        <input type="hidden" name="tax_cart" value="{$paypal_usa_total_tax|floatval}" />
        <input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" /
        <input type="hidden" name="notify_url" value="{$paypal_usa_notify_url|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="return" value="{$paypal_usa_return_url|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="cancel_return" value="{$paypal_usa_cancel_url|escape:'htmlall':'UTF-8'}" />
        <input type="hidden" name="no_shipping" value="1" />
        <input type="hidden" name="bn" value="PrestashopUS_Cart" />
        <input id="paypal-standard-btn" type="image" name="submit" src="https://www.paypalobjects.com/{if $lang_iso == 'en'}en_US{else}{if $lang_iso == 'fr'}fr_CA{else}{if $lang_iso == 'es'}es_ES{else}en_US{/if}{/if}{/if}/i/bnr/horizontal_solution_PPeCheck.gif" alt="" style="vertical-align: middle; margin-right: 10px;" /> {l s='Pay with PayPal' mod='paypalusa'}
    </p>
</form>

 

Link to comment
Share on other sites

  • 3 weeks later...

J_Nine, check the solution of provided earlier and the tip of clearing the cache by Razaro, I literally hit my head for not deleting the cache before. I wasted 3 days on it. and finally Razaro's tip of clearing cache helped :)

 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 months later...

If it is not working after doing the modifications to the address2 field, add the following line after zip: 

<input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...
  • 3 months later...

Hello everyone,

I implemented the fix, but now i get this check out page.
Stating that there is a problem with the checkout, does anyone know how i can fix this?


 

{*
** @author PrestaShop SA <contact@prestashop.com>
** @copyright  2007-2014 PrestaShop SA
**
** International Registered Trademark & Property of PrestaShop SA
**
** Description: "PayPal Standard" payment form template
**
** This template is displayed on the payment page and called by the Payment hook
**
** Step 1: The customer is validating this form by clicking on the PayPal payment button
** Step 2: All parameters are sent to PayPal including the billing address to pre-fill a maximum of values/fields for the customer
** Step 3: The transaction success or failure is sent to you by PayPal at the following URL: http://www.mystore.com/modules/paypalusa/controllers/front/validation.php?pps=1
** This step is also called IPN ("Instant Payment Notification")
** Step 4: The customer is redirected to his/her "Order history" page ("My account" section)
*}
<form action="{$paypal_usa_action|escape:'htmlall':'UTF-8'}" method="post">
	<p class="payment_module">
		<input type="hidden" name="cmd" value="_cart" />
		<input type="hidden" name="upload" value="1" />
		<input type="hidden" name="charset" value="utf8" />
		<input type="hidden" name="business" value="{$paypal_usa_business_account|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="currency_code" value="{$currency->iso_code|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="custom" value="{$cart->id|intval};{if isset($cart->id_shop)}{$cart->id_shop|intval}{else}0{/if}" />
		<input type="hidden" name="amount" value="{$cart->getOrderTotal(true)|floatval}" />
		<input type="hidden" name="first_name" value="{$paypal_usa_billing_address->firstname|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="last_name" value="{$paypal_usa_billing_address->lastname|escape:'htmlall':'UTF-8'}" />
		{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
		{if ($paypal_usa_billing_address->address2  != '')}{/if}<input type="hidden" name="address2" value="{$paypal_usa_billing_address->address2|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="city" value="{$paypal_usa_billing_address->city|escape:'htmlall':'UTF-8'}" />
		{if ($paypal_usa_billing_address->id_state != 0)}
			<input type="hidden" name="country" value="{$paypal_usa_billing_address->country->iso_code|escape:'htmlall':'UTF-8'}" />
		{/if}
		<input type="hidden" name="zip" value="{$paypal_usa_billing_address->postcode|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="email" value="{$paypal_usa_customer->email|escape:'htmlall':'UTF-8'}" />
		{if (isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)) || (isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone))}
		<input type="hidden" name="night_phone_b" value="{if isset($paypal_usa_billing_address->phone_mobile) && !empty($paypal_usa_billing_address->phone_mobile)}{$paypal_usa_billing_address->phone_mobile|escape:'htmlall':'UTF-8'}{else}{if isset($paypal_usa_billing_address->phone) && !empty($paypal_usa_billing_address->phone)}{$paypal_usa_billing_address->phone|escape:'htmlall':'UTF-8'}{/if}{/if}" />
		{/if}
		<input type="hidden" name="address_override" value="1" />
		
		{assign var="paypal_usa_total_discounts" value=$cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)}
		{if $paypal_usa_total_discounts == 0}
			{foreach from=$cart->getProducts() item=paypal_usa_product name="paypal_usa_products"}
				<input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.name|escape:'htmlall':'UTF-8'}" />
				<input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.price|string_format:"%.2f"}" />
				<input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+1|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_product.quantity|intval}" />
			{/foreach}
			{assign var="paypal_usa_total_shipping" value=$cart->getOrderTotal(true, Cart::ONLY_SHIPPING)}
			{if $paypal_usa_total_shipping}
				<input type="hidden" name="item_name_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{l s='Shipping' mod='paypalusa'}" />
				<input type="hidden" name="amount_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="{$paypal_usa_total_shipping|floatval}" />
				<input type="hidden" name="quantity_{$smarty.foreach.paypal_usa_products.index+2|escape:'htmlall':'UTF-8'}" value="1">
			{/if}
		{else}	
			<input type="hidden" name="item_name_1" value="{l s="Your order" mod="paypalusa"}" />
			<input type="hidden" name="amount_1" value="{$cart->getOrderTotal(!$show_taxes)|floatval}" />
		{/if}
		
		<input type="hidden" name="tax_cart" value="{$paypal_usa_total_tax|floatval}" />
		
		<input type="hidden" name="notify_url" value="{$paypal_usa_notify_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="return" value="{$paypal_usa_return_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="cancel_return" value="{$paypal_usa_cancel_url|escape:'htmlall':'UTF-8'}" />
		<input type="hidden" name="no_shipping" value="1" />
		<input type="hidden" name="bn" value="PrestashopUS_Cart" />
		<input id="paypal-standard-btn" type="image" name="submit" src="https://www.paypalobjects.com/{if $lang_iso == 'en'}en_US{else}{if $lang_iso == 'fr'}fr_CA{else}{if $lang_iso == 'es'}es_ES{else}en_US{/if}{/if}{/if}/i/bnr/horizontal_solution_PPeCheck.gif" alt="" style="vertical-align: middle; margin-right: 10px;" /> {l s='Pay with PayPal' mod='paypalusa'}
	</p>
</form>

 

Knipsel.PNG

Edited by Jochimslagh
Adding code (see edit history)
Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...