Admag Posted December 5, 2022 Share Posted December 5, 2022 When I was trying to add order using validateOrder method $this->module->validateOrder( (int) $cartId, Configuration::get('PS_OS_PAYMENT'), (float) $this->context->cart->getOrderTotal(true, Cart::BOTH), $this->GetPaymentMethod($paymentDetails), null, null, (int) $this->context->currency->id, false, $customer->secure_key ); as mentioned above but most of the time wrong status was getting added in PrestaShop. when validating in the ValidateOrder method of PrestaShop it goes breaks at the below condition PaymentModule.php amount_paid will be 3rd parameter which we passing to method (float) $this->context->cart->getOrderTotal(true, Cart::BOTH) $cart_total_paid = (float) Tools::ps_round( (float) $this->context->cart->getOrderTotal(true, Cart::BOTH), Context::getContext()->getComputingPrecision() ); $comp_precision = Context::getContext()->getComputingPrecision(); if ($order_status->logable && (number_format($cart_total_paid, $comp_precision) !== number_format($amount_paid, $comp_precision))) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Total paid amount does not match cart total', 3, null, 'Cart', (int) $id_cart, true); $id_order_state = Configuration::get('PS_OS_ERROR'); } as mentioned above both values were fetched dynamically by Prestashop itself it goes failed and the order got added with "Payment with error" status. Thanks in advanced Link to comment Share on other sites More sharing options...
abdamu Posted December 27, 2022 Share Posted December 27, 2022 Hello, I join this error, I just received an order with the same problem. Using the free "Redsys v3.1.1" module and Prestashop version 1.7.8.8 Someone knows something about it? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now