Jump to content

Paypal module crashes with "Fatal Error" when Address State not set.


petzo

Recommended Posts

I've already created a bug report for that:

http://forge.prestashop.com/browse/PNM-3410

 

Copy/paste from the report:

Paypal ExpressCheckout API requires some addresses to include state (link to info at the end). If for some reason such state was not defined in a user's address, Paypal module finishes the payment flow with a "Fatal error" screen with no chance to recover. By default most of those (but not ALL) countries in a new Prestashop 1.6.0.14 installation require state. But this is not true when updating from old installation. I was updating from 1.4 and this is how I experienced the bug.

Steps to reproduce:
1. Clean Prestashop 1.6.0.14 install
2. Install Paypal module
3. Create an user with an address in Brazil (by default Brazil doesn't have states, but they are required in Paypal)
4. Buy with Paypal
5. Paypal doesn't complain about the wrong address - just ignores it
6. When You complete the steps in Paypal.com and you are taken to your store, Paypal doesn't return correct(any) address (as it was ignored). This results in a "Fatal Error".
When debug mode is enabled you can see some kind of debug info. 
The most reviewing is this:
Notice: Undefined index: PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE in .../modules/paypal/express_checkout/payment.php on line 91
I'm attaching the file.
List of addresses requiring states:
Argentina, Brazil, Canada, China, Indonesia, India, Japan, Mexico, Thailand or USA. Source: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/#id09BHCD0707U__id107SHG090HS
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I have a US site but had to start using the European PayPal module due to PayPal orders coming back to my site with all items still in cart and the sale not processed.  Now I seem to have this same error where most orders receive a "fatal error" after being sent to PayPal's checkout page.  

 

Any solutions???

Link to comment
Share on other sites

  • 8 months later...
  • 6 months later...

We've just installed this module (got rid of Braintree, which had PayPal integrated). Getting same error due to state being missed.

 

(I'm in the UK and using states for different regions to differentiate delivery charges.)

 

I assume that turning off express checkout is the "solution" until this oversight is sorted out.

 

It looks like Express Checkout is not good for my shop anyway because it then completely ignores delivery charges.

Edited by n_s_simpson (see edit history)
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...