Jump to content

[SOLVED] Paypal Template problem


MrBaseball34

Recommended Posts

We have two shops both running PrestaShop.
One (Version 1.3.0.1) has this code in paypal.tpl in the paypal module directory:





       {l s='Pay with PayPal' mod='paypal'}



<form action="{$paypalUrl}" method="post" id="paypal_form" class="hidden">
   <input type="hidden" name="upload" value="1" />
   <input type="hidden" name="first_name" value="{$address->firstname}" />
   <input type="hidden" name="last_name" value="{$address->lastname}" />
   <input type="hidden" name="address1" value="{$address->address1}" />
   {if !empty($address->address2)}<input type="hidden" name="address2" value="{$address->address2}" />{/if}
   <input type="hidden" name="city" value="{$address->city}" />
   <input type="hidden" name="zip" value="{$address->postcode}" />
   <input type="hidden" name="country" value="{$country->iso_code}" />
   <input type="hidden" name="amount" value="{$amount}" />
   <input type="hidden" name="email" value="{$customer->email}" />
   <input type="hidden" name="item_name_1" value="{l s='My cart' mod='paypal'}" />
   <input type="hidden" name="amount_1" value="{$total}" />
   <input type="hidden" name="quantity_1" value="1" />
   <input type="hidden" name="business" value="{$business}" />
   <input type="hidden" name="receiver_email" value="{$business}" />
   <input type="hidden" name="cmd" value="_cart" />
   <input type="hidden" name="charset" value="utf-8" />
   <input type="hidden" name="currency_code" value="{$currency->iso_code}" />
   <input type="hidden" name="payer_id" value="{$customer->id}" />
   <input type="hidden" name="payer_email" value="{$customer->email}" />
   <input type="hidden" name="custom" value="{$id_cart}" />
   <input type="hidden" name="return" value="{$goBackUrl}" />
   <input type="hidden" name="cancel_return" value="{$cancelUrl}" />
   <input type="hidden" name="notify_url" value="{$notify}" />
   {if $header}<input type="hidden" name="cpp_header_image" value="{$header}" />{/if}
   <input type="hidden" name="rm" value="2" />
   <input type="hidden" name="bn" value="PRESTASHOP_WPS" />
   <input type="hidden" name="cbt" value="{l s='Return to' mod='paypal'} {$meta_title}" />
</form>


This code is the other one (Version 1.2.5.0):





       {l s='Pay with PayPal' mod='paypal'}



<form action="{$paypalUrl}" method="post" id="paypal_form" class="hidden">
   <input type="hidden" name="upload" value="1" />
   <input type="hidden" name="first_name" value="{$address->firstname}" />
   <input type="hidden" name="last_name" value="{$address->lastname}" />
   <input type="hidden" name="address1" value="{$address->address1}" />
   {if !empty($address->address2)}<input type="hidden" name="address2" value="{$address->address2}" />{/if}
   <input type="hidden" name="city" value="{$address->city}" />
   <input type="hidden" name="zip" value="{$address->postcode}" />
   <input type="hidden" name="country" value="{$country->iso_code}" />
   <input type="hidden" name="amount" value="{$amount}" />
   <input type="hidden" name="email" value="{$customer->email}" />
{if !$discounts}
   <input type="hidden" name="shipping_1" value="{$shipping}" />
   {counter assign=i}
   {foreach from=$products item=product}
   <input type="hidden" name="item_name_{$i}" value="{$product.name}{if isset($product.attributes)} - {$product.attributes}{/if}" />
   <input type="hidden" name="amount_{$i}" value="{$product.paypalAmount}" />
   <input type="hidden" name="quantity_{$i}" value="{$product.quantity}" />
   {counter print=false}
   {/foreach}
{else}
   <input type="hidden" name="item_name_1" value="{l s='My cart' mod='paypal'}" />
   <input type="hidden" name="amount_1" value="{$total}" />
   <input type="hidden" name="quantity_1" value="1" />
{/if}
   <input type="hidden" name="business" value="{$business}" />
   <input type="hidden" name="receiver_email" value="{$business}" />
   <input type="hidden" name="cmd" value="_cart" />
   <input type="hidden" name="charset" value="utf-8" />
   <input type="hidden" name="currency_code" value="{$currency->iso_code}" />
   <input type="hidden" name="payer_id" value="{$customer->id}" />
   <input type="hidden" name="payer_email" value="{$customer->email}" />
   <input type="hidden" name="custom" value="{$id_cart}" />
   <input type="hidden" name="return" value="{$goBackUrl}" />
   <input type="hidden" name="cancel_return" value="{$cancelUrl}" />
   <input type="hidden" name="notify_url" value="{$notify}" />
   {if $header}<input type="hidden" name="cpp_header_image" value="{$header}" />{/if}
   <input type="hidden" name="rm" value="2" />
   <input type="hidden" name="bn" value="PRESTASHOP_WPS" />
   <input type="hidden" name="cbt" value="{l s='Return to' mod='paypal'} {$meta_title}" />
</form>


We’ve having problems getting paypal notifications from the shop in the first listing, do you think that is a contributor to our problem in not receiving notifications or BO records about orders?

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...

I am not sure if my problem is similar or not, but this came up when I tried to start a new topic so here goes.

I have a message saying that my Paypal Template is invalid. I am using Prestashop 1.4 and I downloaded and installed baypal from within 1.4 so I cannot see why I should get such a message.

If the problem is related to the above solution, can someone tell me which file to alter in my case. Thanks

Link to comment
Share on other sites

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...