Hi Maxence
I found the problem about the double value of "total_paid_real" field in the order table in the database
Try this example with bankwire (this module is ok by it serve to show you tthis bug)
Edit bankwire/controllers/front/payment.php at line 65 and change
Configuration::get('PS_OS_BANKWIRE')
to
Configuration::get('PS_OS_PREPARATION')
After this go in the front-office and make an order with bankwire. At the end it gives an error, ok this is not the error that I want to show you.
Now go in the order table in the database of your website and you can see the order just done with "total_paid_real" field that has a doblue value of "total_paid"
So make another test leaving Configuration::get('PS_OS_PREPARATION') in that file and go to remove this code from classes/paymentmodule.php (202-207 lines)
// Register Payment only if the order status validate the order
if ($result && $order_status->logable)
{
if (!$order->addOrderPayment($amount_paid))
throw new PrestaShopException('Can\'t save Order Payment');
}
and now redone another order and you will see that in the order table that field has the right value so I think the problem is here
$order->addOrderPayment($amount_paid)
in this function
I get this error with my modules because they use PS_OS_PREPARATION
byeeee
Hi
I've found where is the problem
is in this code, if I remove it from "validateOrder" the value of "total_paid_real" (the problem is only into the database) return ok like total_paid
// Register Payment only if the order status validate the order
{ if (!$order->addOrderPayment($amount_paid)) throw new PrestaShopException('Can\'t save Order Payment'); }if ($result && $order_status->logable)