Jump to content

Fatal Error when confirming payment


deselsa

Recommended Posts

 When finalising payment for a test order (in Paypal), the payment was processed by Paypal but then instead of returning to my shop, the computer displayed the following error message..... 

Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't load Order state status' in /home/omglin5/public_html/classes/PaymentModule.php:145 Stack trace: #0 /home/omglin5/public_html/modules/paypal/paypal.php(1235): PaymentModuleCore->validateOrder(12, 0, 112.51, 'PayPal', NULL, Array, 4, false, 'e791abfe49c3a72...', Object(Shop)) #1 /home/omglin5/public_html/modules/paypal/express_checkout/payment.php(267): PayPal->validateOrder(12, NULL, 112.51, 'PayPal', NULL, Array, 4, false, 'e791abfe49c3a72...', Object(Shop)) #2 /home/omglin5/public_html/modules/paypal/express_checkout/payment.php(283): validateOrder(Object(Customer), Object(Cart), Object(PaypalExpressCheckout)) #3 {main} thrown in/home/omglin5/public_html/classes/PaymentModule.php on line 145 

When I returned to my shop, I found that there was no record of the order having been placed.  However, payment had been made to PayPal.
How can I fix the problem so that it doesn't affect future orders?

Link to comment
Share on other sites

ok, it's probably because of NULL in:

PayPal->validateOrder(12, NULL, 112.51, 

 

 

can you please try to change NULL to ID state which exist in your store?

 

modules/paypal/paypal.php(1235) + /modules/paypal/express_checkout/payment.php(267):

 

(number) is a line where validateOrder appears

Link to comment
Share on other sites

  • 1 year later...

Hi, You give me nice clue.

ok, it's probably because of NULL in:

PayPal->validateOrder(12, NULL, 112.51, 

 

can you please try to change NULL to ID state which exist in your store?

modules/paypal/paypal.php(1235) + /modules/paypal/express_checkout/payment.php(267):

(number) is a line where validateOrder appears

 

 

TO ALL WITH THIS PROBLEM, SOLUTION:

 

In   modules/paypal/paypal.php     in line contains from ()    example like had deselsa here

modules/paypal/paypal.php(1235)

replace 

(int)$id_order_state

to    number ID in Admin for Payment accepted from Status. In my case its 2. So my code looks like that now:

else
	parent::validateOrder((int)$id_cart, 2, (float)$amount_paid, $payment_method, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key, $shop);

Hope this help.

Edited by requ (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...