Jump to content

PayPal 3.5.5 Fatal Error Can't load Order state status express_checkout/payment.php


djmarkm

Recommended Posts

Hi

I'm struggling with a new shop having intermittent problems with the Paypal module.

 

PrestaShop v 1.5.4.1 / PayPal 3.5.5

Single language (GB)

 

Server information

Server information: Linux #1 SMP Thu Sep 20 05:53:15 EDT 2012 x86_64

Server software version: Apache

PHP version: 5.3.24

Memory limit: 128M

Max execution time: 120

 

 

Symptoms

  1. Place order
     
  2. Select Paypal Payment
     
  3. Log in to Paypal, Choose Payment and click Confirm

Paypal Successfully processes the payment and passes back to payment.php

eg.

http://<MyDOMAIN>/shop/modules/paypal/express_checkout/payment.php?token=EC-6YF88494EN957864W&PayerID=CSD49XPTY2XJ8

 

This then results in a 500 Internal server error with the following in the error logs

 

[27-Jun-2013 15:15:44 Europe/London] PHP Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't load Order state status' in /home/grpross/public_html/shop/classes/PaymentModule.php:145

Stack trace:

#0 /home/grpross/public_html/shop/modules/paypal/paypal.php(1235): PaymentModuleCore->validateOrder(80, 0, 7.5, 'PayPal', NULL, Array, 1, false, '82b3e8e707db789...', Object(Shop))

#1 /home/grpross/public_html/shop/modules/paypal/express_checkout/payment.php(267): PayPal->validateOrder(80, NULL, 7.5, 'PayPal', NULL, Array, 1, false, '82b3e8e707db789...', Object(Shop))

#2 /home/grpross/public_html/shop/modules/paypal/express_checkout/payment.php(283): validateOrder(Object(Customer), Object(Cart), Object(PaypalExpressCheckout))

#3 {main}

thrown in /home/grpross/public_html/shop/classes/PaymentModule.php on line 145

 

As the processing had been interupted the cart is not promoted to an order.

 

Other Info

I've tested this on Firefox, Opera, Chrome and IE9. Before each test I have cleared browser cache/history/files/cookies

 

During last test. IE9 / Firefox /Opera all failed as above but my Chrome test was successful !?!

 

Attempted Resolutions

 

Shop is NOT in maintenance Mode

Checked the pr_order_state table is populated

Ensured all file permissions were set to 755

Removed Paypal module and reinstall & configure (3 times) (as recommended here http://www.prestasho...-empty-message/ )

Deleted contents of /cache/smarty/compile (grasping at straws!)

 

I had thought I had resolved this yesterday by removing and reinstalling the paypal module as test orders briefly started to going through but it stopped working again within a few hours.

 

 

I'm totally lost on this one :(

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

Hi

Thanks for the screenshot.

 

My order statuses exactly matches yours except I have an additional item at the bottom

 

Id : 13 Authorization accepted from Paypal

 

Order status table would seem to be ok

Link to comment
Share on other sites

I apologize, I had not installed the 3.5.5 version of paypal...when installed, I like you have ID 13

AUTHORIZATION ACCEPTED FROM PAYPAL

 

Sorry I'm not much help...I can't find anything 'searching' that matches your problem, well you can find them but they had to do with empty or incorrect order statues.

 

I suggest you open a bug report on the PrestaShop forge. They are pretty good about addressing them espeically when like you, you document the problem.

 

Here is the link:

http://forge.prestashop.com/secure/Dashboard.jspa

 

post your forge problem report here.

Link to comment
Share on other sites

Thanks for your help.

 

Pointing me to order statuses has helped me realise tt's definately an order status problem.

 

I've mentioned before that the problem was intermittent. During my testing (live payments using my personal paypal account), although all the payments were successfull with paypal, express_checkout/payment.php would crash about 70%-80% of the time.

 

I've now just realised that the only times that express_checkout/payment.php did not crash is when the payment went through with an order status of id:11 "AWAITING PAYPAL PAYMENT"

 

I'm assuming therefore the orders that should have had a status of ID:13 AUTHORIZATION ACCEPTED FROM PAYPAL are the ones causing this problem.

 

Which is great because I can now point the developers in the right direction! :)

Edited by djmarkm (see edit history)
  • Like 2
Link to comment
Share on other sites

Hi Marco,

Thanks for your reply.

 

I had already tried folders at 755/files at 644 & Folders & files at 755. No change

 

It's not a file permissions problem as paypal orders with status of id:11 "AWAITING PAYPAL PAYMENT" succeed but orders that should have a status of ID:13 AUTHORIZATION ACCEPTED FROM PAYPAL cause paypal.php to fault.

Link to comment
Share on other sites

please make sure to post your forge bug report here so other can 'vote' on it and or follow it.

 

hoping this gets resolved for you in short order. The last forge report I made was fixed in 4-5 days. When documented well and responded to when there area questions the ps development team can do wonders.

  • Like 1
Link to comment
Share on other sites

Hi All,

 

Thought I would post an update.

 

This has been confirmed by François Gaillard as a bug in the Paypal module (3.5.5)

 

it's due to an unknown return code from Paypal : "Completed_Funds_Held".

 

It has now been resolved on my shop by Francois. A module update should be issued in a few days.

 

 

Thanks for your help

 

 

 

Mark

Link to comment
Share on other sites

Hi All,

 

Thought I would post an update.

 

This has been confirmed by François Gaillard as a bug in the Paypal module (3.5.5)

 

it's due to an unknown return code from Paypal : "Completed_Funds_Held".

 

It has now been resolved on my shop by Francois. A module update should be issued in a few days.

 

 

Thanks for your help

 

 

 

Mark

 

That is great news Mark. Please post here when the bug report has been closed/fixed.

  • Like 1
Link to comment
Share on other sites

The assigned developer, Francois Gaillard has now closed this report and updated it's resolution status as Fixed.

 

Quote:-

 

Francois Gaillard added a comment - 02/Jul/13 9:22 AM

 

Thank you Mark,

It has been fixed and will be available soon in a new release.

 

Once again, thanks for the help!

Link to comment
Share on other sites

  • 2 months later...
  • 2 years later...

I had this error when deleted some of statuses by my boss' request. I had to reinsert status nr 2 manually via phpMyAdmin, This is weird, because this statuses should not be possible to delete.

 

@EDIT: If someone's curious: you can always set up example prestashop, and look up this statuses in ps_order_state and ps_order_state_lang tables. Copy by id_order_state.

Edited by khejit68 (see edit history)
  • Like 1
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...