Jump to content

ps_checkout module validation error


Shwetab55

Recommended Posts

Hi,

I'm using the PS 1.7.6.5

We added Prestashop Checkout as a payment method. When you click on pay it seems to all go through and it takes money out of the account but it doesnt create the order or confirm it.

It just shows a message with Order Cannot Be Saved.

And We have wkbundle module installed, and this module overrides the file override/classes/PaymentModule.php.

I have checked the error logs for ps_checkout module, it has following error - [2023-04-11 12:44:45] ps_checkout.ERROR: ValidateOrder - Exception 40 {"exception":"[object] (PrestaShop\\Module\\PrestashopCheckout\\Exception\\PsCheckoutException(code: 40): PrestaShop cannot validate order at /var/www/test/modules/ps_checkout/src/ValidateOrder.php:238, PrestaShopException(code: 0): Can't load Order status at /var/www/test/override/classes/PaymentModule.php:93)","paypal_order":"test"} []

I have checked the code in the override/classes/PaymentModule.php:93 for above error -
$order_status = new OrderState((int) $id_order_state, (int) $this->context->language->id);
        if (!Validate::isLoadedObject($order_status)) {
            PrestaShopLogger::addLog(
                'PaymentModule::validateOrder - Order Status cannot be loaded',
                3,
                null,
                'Cart',
                (int) $id_cart,
                true
            );
            throw new PrestaShopException('Can\'t load Order status');
        }

Thanks in advance.

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