Jump to content

[SOLVED] PAYPAL - Invalid new order state.


Recommended Posts

Hi there,

I have a blank screen with “invalid new order state”. I have droped all the order_state and order_state_lang and re-created them, i have also reinstalled the paypal module. I am still getting the error.

I am using version 1.2.5.0 and i have read almost all forums regarding this error in Presta shop.

The website is live and i really need this working, please help me with suggestions if you can.

Link to comment
Share on other sites

I have droped all the order_state and order_state_lang and re-created them, i have also reinstalled the paypal module.

I just guess, maybe the order status ID is changed and they does not match the original one.
You must make sure all id of order state is correct as original installed.

Just a thought. maybe you can install a new copy of 1.2.5 with new database at other folder and then copy exactly the data for order status related tables from this database.
Link to comment
Share on other sites

it seems that you are using Paypal API version, not standard version.
I checked the related files, related code is as following

File: \modules\paypalapi\ipn.php( line 54)

$history->changeIdOrderState(intval($id_order_state), intval($order->id));




File: \classes\OrderHistory.php(line 77):

   if (!Validate::isLoadedObject($newOS) OR !Validate::isLoadedObject($order))
       die(Tools::displayError('Invalid new order state'));



Hope this helps

Link to comment
Share on other sites

Hi There,

Thanks so much for your help mate.

I fixed the issue, i added a status, which should have been installed when i installed the paypal module, but for some reason it didn't.
I added a status of "Awaiting Paypal Payment" with a template of 'preparation' which now seems to fix the issue.

Thanks for all your support.

Link to comment
Share on other sites

  • 7 months later...
  • 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...