Jump to content

Fatal error - id_customer change after payment to paypal


cathNantel

Recommended Posts

Please, fellow Prestashop developper,  help me with this problem: 
 
I'm using prestashop 1.5.4.1 with the module PayPal USA, Canada 1.2.5. I am using express checkout option from paypal.
 
I got this weird "Fatal Error message" blank page right after confirming payment to paypal on my store. However, the order is sent without any problem to Paypal. It seems to me that it just can't register as an order in the backoffice.
 
Here are the steps :

 

1 - Add an item to the cart,

2 - login with my client id,

3 - confirm the order,

4 - go to Paypal website in order to complete the payment.

5 - Then come back on the store where one need to click on the confirmation button to confirm the order.

 

Right after clicking on the button (step #5), there is a blank page with "Fatal Error message". 
 
I found out that anyone has this problem, except customer id #1!!
 
So I openened the Smarty debug console and went through the payment steps, trying to make an order with customer id #2 knowing I would get the error. 
 
According to the Smarty debug console, all ->id_customer variable are set with the correct one (2) for all the steps above (#1, #2, #3 and #4), except when I return from the Paypal website (step #5). At that time, the ->id_customer variable is set back to 1!!
 
How come the ->id_customer variable change between step 4 and 5? I am sure this is the cause of the fatal error!
 
Does anyone know how to change this? Which line of code should I change?
 
Thanks!
 
Catherine
Edited by cathNantel (see edit history)
Link to comment
Share on other sites

I finally solved my problem and this was caused by the prestashop module.

 

In short, let's say that client A has 2 account on the boutique and one of them has the same e-mail address that is been used when logging to Paypal to make the payment. Then everything is fine. If that same client is using his other account (with an e-mail different that the one used to log to Paypal to make the payment) the payment error occurs.  This is caused by the fact that when the client come back to store after making his payment to Paypal, the validation in place in the module takes the email adress used in Paypal to get the profile back on the store and complete the payment. As e-mail adress exists but belongs to another user, we get the fatal error (or session expired error) and this is normal as the session doesn't exists or is expired...

  • Like 1
Link to comment
Share on other sites

I finally solved my problem and this was caused by the prestashop module.

 

In short, let's say that client A has 2 account on the boutique and one of them has the same e-mail address that is been used when logging to Paypal to make the payment. Then everything is fine. If that same client is using his other account (with an e-mail different that the one used to log to Paypal to make the payment) the payment error occurs.  This is caused by the fact that when the client come back to store after making his payment to Paypal, the validation in place in the module takes the email adress used in Paypal to get the profile back on the store and complete the payment. As e-mail adress exists but belongs to another user, we get the fatal error (or session expired error) and this is normal as the session doesn't exists or is expired...

Yes that the conclusion I came to myself. Did you get a fix, or just turn off the express?

I have just turned off Express for now (it was causing a whole host of problems), but have a further issue that I do not get order confirmation on my Paypal store.

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