Jump to content

PayPal USA, Canada v1.3.8 charges clients, but no sale in BO. Only on French site, English OK


papagino

Recommended Posts

Hey folks,

 

I have a shop that is in English and French. When a client makes a purchase on the French site and pays via PayPal module, he will be charge but no sale will be created on the backoffice (I have to create the sale manually using the "Abondoned Carts).

 

I noticed this problem since I upgraded the site from 1.6.0.9 to 1.6.0.11. I upgraded my site to the latest 1.6.0.14 this week and the problem is still there.

 

So to recap, if a sale is made from http://www.miraxsupplements.com/en/ everything is fine, but if it is made via the French version site http://www.miraxsupplements.com/fr/, no sale will be created in backoffice and I have to create the sale using the abondoned cart in Backoffice.

 

I am on Prestashop version is 1.6.0.14 and Paypal module is "PayPal USA, Canada v1.3.8".

I also have a premium theme (Not using default-bootstrap)

 

My Paypal account has no IPN configured and I only accept CAD currency on my site.

 

Here is a sample code for a working English Paypal button created for an item:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<p class="payment_module">
<input type="hidden" value="_cart" name="cmd">
<input type="hidden" value="1" name="upload">
<input type="hidden" value="utf8" name="charset">
<input type="hidden" value="xxxxxx" name="business">
<input type="hidden" value="CAD" name="currency_code">
<input type="hidden" value="970;1" name="custom">
<input type="hidden" value="51.42" name="amount">
<input type="hidden" value="xxxxxx" name="first_name">
<input type="hidden" value="xxxxxx" name="last_name">
<input type="hidden" value="382 de la Chatelaine" name="address1">
<input type="hidden" value="St-Jérome" name="city">
<input type="hidden" value="QC" name="state">
<input type="hidden" value="J5L0A4" name="zip">
<input type="hidden" value="xxxxxxxxxxxxx" name="email">
<input type="hidden" value="1" name="address_override">
<input type="hidden" value="Colloidal silver 10ppm 500ml" name="item_name_1">
<input type="hidden" value="38.95" name="amount_1">
<input type="hidden" value="1" name="quantity_1">
<input type="hidden" value="Shipping" name="item_name_2">
<input type="hidden" value="12.47" name="amount_2">
<input type="hidden" value="1" name="quantity_2">
<input type="hidden" value="0" name="tax_cart">
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" value="1" name="no_shipping">
<input type="hidden" value="PrestashopUS_Cart" name="bn">
<input id="paypal-standard-btn" type="image" style="vertical-align: middle; margin-right: 10px;" alt="" src="https://www.paypalobjects.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif" name="submit">
Pay with PayPal

and here is the Paypal button code for the same item on the French site:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<p class="payment_module">
<input type="hidden" value="_cart" name="cmd">
<input type="hidden" value="1" name="upload">
<input type="hidden" value="utf8" name="charset">
<input type="hidden" value="xxxxxxxxxxxxx" name="business">
<input type="hidden" value="CAD" name="currency_code">
<input type="hidden" value="970;1" name="custom">
<input type="hidden" value="51.42" name="amount">
<input type="hidden" value="xxxxxx" name="first_name">
<input type="hidden" value="xxxxxxxxxx" name="last_name">
<input type="hidden" value="123 de la Chatelaine" name="address1">
<input type="hidden" value="St-Jérome" name="city">
<input type="hidden" value="QC" name="state">
<input type="hidden" value="J5L0A4" name="zip">
<input type="hidden" value="xxxxxxxxxxxxxx" name="email">
<input type="hidden" value="1" name="address_override">
<input type="hidden" value="Argent colloïdal 10ppm 500ml" name="item_name_1">
<input type="hidden" value="38.95" name="amount_1">
<input type="hidden" value="1" name="quantity_1">
<input type="hidden" value="Frais d'expédition" name="item_name_2">
<input type="hidden" value="12.47" name="amount_2">
<input type="hidden" value="1" name="quantity_2">
<input type="hidden" value="0" name="tax_cart">
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<input type="hidden" value="1" name="no_shipping">
<input type="hidden" value="PrestashopUS_Cart" name="bn">
<input id="paypal-standard-btn" type="image" style="vertical-align: middle; margin-right: 10px;" alt="" src="https://www.paypalobjects.com/fr_CA/i/bnr/horizontal_solution_PPeCheck.gif" name="submit">
Payez avec PayPal

No IPN created from the French site when checking the access log.

 

Also, I noticed that in module translation related to Paypal, translation fields for english are all blank (pink) but have contents for the french translation.

I am in Canada, so I did change translation for the field "State" for "Province" and "zip" to "Postal Code" for the ADDRESS "expressions".

 

Any ideas what may be the problems?

 

Cheers

Dan

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

IPN does not need to be configured in your Paypal profile, the module instructs Paypal gateway where to send the IPN.  The IPN URL is the notify_url, which I copied below for reference

https://www.miraxsupplements.com/fr/module/paypalusa/validation?pps=1
https://www.miraxsupplements.com/en/module/paypalusa/validation?pps=1

Since an order is created when using the english language, that means the IPN is being received and processed properly.  I assume you see those in the access log?

 

Since an order is not being created for the french language, that means 1 of 2 things

1) The IPN is not being received

2) The IPN is being received, but it is failing to be processed

 

Now you said you didn't see the IPN in the access log.  If that is true, then you need to contact Paypal support, since that means they are not sending the IPN.  Nothing we can do for you.

 

Note: You should see 1 IPN request in your access log, which is me testing your website to ensure it does not redirect, which it did not.  So confirm that you see my request in the access log, I have added bellini=1 to the URL so it is clear it is my request

https://www.miraxsupplements.com/fr/module/paypalusa/validation?pps=1&bellini=1

Link to comment
Share on other sites

Thanks Bellini, yes I see your IPN in the Access Log:

 

[28/Mar/2015:06:00:21 -0600] "GET /fr/module/paypalusa/validation?pps=1&bellini=1

 

The problem seems that it is not being processed with an actual sale made from the french site!

 

I noticed that when looking in my/modules/paypalusa/translations folder, there is only a translation for Mexico (mx.php), none for French!

 

Could it be related to a translation problem?

 

Also, I notice I get these warnings in my host error logs:

[27-Mar-2015 18:08:03] PHP Warning: parse_url(/login?back=https://www.miraxsupplements.com/en/order?step=1) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home1/amaxmed1/public_html/classes/Dispatcher.php on line 746 

[27-Mar-2015 18:12:34] PHP Warning: parse_url(/login?back=https://www.miraxsupplements.com/en/order?step=1&display_guest_checkout=1) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home1/amaxmed1/public_html/classes/Dispatcher.php on line 746 

[27-Mar-2015 18:13:01] PHP Warning: parse_url(/login?back=https://www.miraxsupplements.com/en/order?step=1&display_guest_checkout=1) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home1/amaxmed1/public_html/classes/Dispatcher.php on line 746 

[27-Mar-2015 18:13:11] PHP Warning: parse_url(/login?back=https://www.miraxsupplements.com/en/order?step=1&display_guest_checkout=1) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /home1/amaxmed1/public_html/classes/Dispatcher.php on line 746 /home1/amaxmed1/public_html/js/error_log: 

[25-Mar-2015 06:52:51] PHP Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home1/amaxmed1/public_html/js/retro-compat.js.php on line 71 

[25-Mar-2015 06:52:52] PHP Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home1/amaxmed1/public_html/js/retro-compat.js.php on line 71 /home1/amaxmed1/public_html/modules/paypalusa/controllers/front/error_log: 

[27-Mar-2015 14:20:00] PHP Fatal error: Class 'ModuleFrontController' not found in /home1/amaxmed1/public_html/modules/paypalusa/controllers/front/validation.php on line 31 

Thanks for your help

Dan

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

Hi Bellini, looking at the access log for March, I see this:

 

8 X POST /fr/module/paypalusa/validation?pps=1

2 X GET /fr/module/paypalusa/validation?pps=1

 

and

13 X POST /en/module/paypalusa/validation?pps=1

2 X GET /en/module/paypalusa/validation?pps=1

 

But I don't recall getting any sales being registered from the French site, I had to create all of them via the abondoned cart.

Sales being made from the English site are always registered.

 

Hope that help...

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

So if you believe you are getting the IPN, then you now need to determine why it is failing to be processed.  And for that, you need to test and debug the IPN process until you locate the issue.  This will mean creating orders on the french site, adding debug trace statements to the validation controller, and figuring out where it is failing.

Link to comment
Share on other sites

Thanks Bellini, I tried to uninstall, delete and reinstall the Paypal module and still have same problem.

I have read similar problems with this module (Orders not being generated in BO) and it was fixed by using another Paypal module (Europe).

 

I will try this and post my findings...

 

Thanks again.

 

Dan

Link to comment
Share on other sites

Update:

 

I have Disable, Uninstalled and Deleted the Paypal module. I then did a "clear cache" and set to "Force compilation" in the Advanced Parameters/Performance in backoffice.

I then downloaded the PayPal USA, Canada v1.3.8 module from the Prestashop Addon site and installed from zip. I set back the "Force compilation" to "Recompile templates if the files have been updated" in Advanced Parameters/Performance in backoffice.

 

Now, it seems to have fixed the problems I had.

 

I will update to Solved after receiving a few more sales to confirm it is finally working in a couple days...

 

(Fingers crossed)

 

Cheers

Dan

Link to comment
Share on other sites

  • 2 years 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...