Daniel Patilea Posted September 11, 2015 Share Posted September 11, 2015 Hello I have a problem with some orders. It seems to duplicate the amout paid and it gives me this error: "Warning 2 518,80 $ paid instead of 1 259,40 $" Here's a screenshot: http://i.imgur.com/pk1sQl3.png Can you help me please? 1 Link to comment Share on other sites More sharing options...
bellini13 Posted September 11, 2015 Share Posted September 11, 2015 What payment module are you using? 1 Link to comment Share on other sites More sharing options...
Daniel Patilea Posted September 14, 2015 Author Share Posted September 14, 2015 What payment module are you using? Hi bellini13, The website is this. For that duplicate order payment, Cash on Delivery payment method was selected. Thanks 1 Link to comment Share on other sites More sharing options...
bellini13 Posted September 14, 2015 Share Posted September 14, 2015 I noticed in your screen shot that the payment entries occurred at 14:33 and 14:51, that is 18 minutes apart. I assume the order was created at 14:33, but what exactly occurred at 14:51? Did you make a change, like updating the order status? Link to comment Share on other sites More sharing options...
powercom Posted September 16, 2015 Share Posted September 16, 2015 (edited) Yes, when order status has changed, they duplicate payment. I have the same problem after i upgrade to 1.6.1.1. It's the same with Paypal and Paymill module. Edited September 16, 2015 by powercom (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 17, 2015 Share Posted September 17, 2015 What if you use bankwire or check module? Link to comment Share on other sites More sharing options...
powercom Posted September 17, 2015 Share Posted September 17, 2015 same Link to comment Share on other sites More sharing options...
jumpcom Posted September 17, 2015 Share Posted September 17, 2015 I have the same problem, with Paypal and Payplug... Duplicate payment. Link to comment Share on other sites More sharing options...
bellini13 Posted September 18, 2015 Share Posted September 18, 2015 Well then you likely have some override or custom module installed that is causing problems. Try disabling overrides and non-ps modules in back office advanced parameters > performance page and try again Link to comment Share on other sites More sharing options...
jumpcom Posted September 18, 2015 Share Posted September 18, 2015 Thanks, but i can't disable Non Ps modules, i need them ! I read in another post that there is a problem when we disable the "Invoices". I started to use invoices, to see, i will say you the result. Link to comment Share on other sites More sharing options...
jumpcom Posted September 18, 2015 Share Posted September 18, 2015 Ok, effectively, when i use the Invoices function, i don't have the duplicate entry for the payments. But now : delivery PDF and Invoice PDF are available as "documents" but not the icons, i don't have Delivery Icon, but i have the delivery document... Strange... Link to comment Share on other sites More sharing options...
bellini13 Posted September 19, 2015 Share Posted September 19, 2015 Thanks, but i can't disable Non Ps modules, i need them ! I read in another post that there is a problem when we disable the "Invoices". I started to use invoices, to see, i will say you the result. well you can to perform a test and see if one of those things are causing your issue. It's called troubleshooting and ruling things out 1 Link to comment Share on other sites More sharing options...
lcalin Posted September 29, 2015 Share Posted September 29, 2015 I have the same issue with duplicate payment records. I have applied this fix: http://forge.prestashop.com/browse/PSCSX-6831 but it does not make any difference. The issue comes on CashOnDelivery in my tests, immediately after the order confirmation. Actually, one payment record is with the confirmation moment, the other is with the moment the system finish the confirmation: the difference is about 40s. PS. version: 1.6.1.1 Any clue? Thanks! Link to comment Share on other sites More sharing options...
climia Posted November 13, 2015 Share Posted November 13, 2015 In my case after upgrade from 1.6.0.9 to 1.6.1.1 it only duplicated when the payment method used caused default order status “1-payment accepted” to resolve edit the offending order status in question and remove the tick from “Set the order as paid.” for me it resolved the issue Link to comment Share on other sites More sharing options...
ariom Posted February 27, 2016 Share Posted February 27, 2016 In my case after upgrade from 1.6.0.9 to 1.6.1.1 it only duplicated when the payment method used caused default order status “1-payment accepted” to resolve edit the offending order status in question and remove the tick from “Set the order as paid.” for me it resolved the issue I had same problem and found out same solution as climia also suggested, so to solve the duplicated payment issue (for me it was with paypal module), but then another issue arised: in delivery slip now there is no total paid and empty selected payment, so i have to cut off half of the delivery slip when i print it for the carrier. PS 1.6.1.4 - default theme only graphics mod. @climia ... did you also got this problem? if so did you find any solution? tks to all for suggestions Link to comment Share on other sites More sharing options...
Sharak Posted March 8, 2016 Share Posted March 8, 2016 I have the same problem on presta 1.6.1.4 for both cashondelivery (presta's default) and cashondeliverywithfee (custom). I remember fixing it on presta 1.5 but can't find where. Anybody found fix for that? Link to comment Share on other sites More sharing options...
Gabriel Perez Posted April 13, 2016 Share Posted April 13, 2016 A work arround for this is to uncheck the "set the order as paid" option in all the order statuses. If you wanna fix this in the code, you need to remove the last part of the changeIdORderState funcion in the OrderHistory class. // set orders as paid if ($new_os->paid == 1) { ... } Link to comment Share on other sites More sharing options...
something394124 Posted May 3, 2016 Share Posted May 3, 2016 A work arround for this is to uncheck the "set the order as paid" option in all the order statuses. If you wanna fix this in the code, you need to remove the last part of the changeIdORderState funcion in the OrderHistory class. // set orders as paid if ($new_os->paid == 1) { ... } Changing the class file did not work, makes all orders throw a server 500 error when validating order from customer end. Link to comment Share on other sites More sharing options...
Gabriel Perez Posted May 5, 2016 Share Posted May 5, 2016 Changing the class file did not work, makes all orders throw a server 500 error when validating order from customer end. Can you post your OrderHistory.php? Link to comment Share on other sites More sharing options...
Czarekplpl Posted May 12, 2016 Share Posted May 12, 2016 My solution. I had got duplicate payment for Paypall, Alipay and Weixin. Problem is that you have to generate Delivery Note at least one status before you set order as Paid. Sample of statuses sequence: PAYMENT RECEIVED - order cannot be set as paid (no delivery note no invoice). So you delivery note to be gererated in the next status. ORDER ACCEPTED - order still cannot be set as paid - generate Delivery Note. ORDER PROCESSING - because pdf i generated in previous order you can set order as paid. This works for me in 1613 1 Link to comment Share on other sites More sharing options...
PatBK Posted May 20, 2016 Share Posted May 20, 2016 This issue happens in 1.6.1.5 too and to me the code fix seems a poor one as it shouldn't disable setting an order paid, it should check if payment was received and only insert in to the DB if payment wasn't received yet. The option to set paid is a way to not have to select paid manually first before setting another status. Or am I mistaken here? A work arround for this is to uncheck the "set the order as paid" option in all the order statuses. If you wanna fix this in the code, you need to remove the last part of the changeIdORderState funcion in the OrderHistory class. // set orders as paid if ($new_os->paid == 1) { ... } Link to comment Share on other sites More sharing options...
PatBK Posted May 20, 2016 Share Posted May 20, 2016 A work arround for this is to uncheck the "set the order as paid" option in all the order statuses. If you wanna fix this in the code, you need to remove the last part of the changeIdORderState funcion in the OrderHistory class. // set orders as paid if ($new_os->paid == 1) { ... } Shouldn't it be something like.... // set orders as paid if ($new_os->paid == 1) { $invoices = $order->getInvoicesCollection(); if ($order->total_paid != 0) { $payment_method = Module::getInstanceByName($order->module); } foreach ($invoices as $invoice) { /** @var OrderInvoice $invoice */ $rest_paid = $invoice->getRestPaid(); if ($rest_paid > 0 && $order->total_paid == 0) { // added && $order->total_paid == 0 so an allready paid order doesn't get 'paid' double or more in the stats and db entries $payment = new OrderPayment(); $payment->order_reference = Tools::substr($order->reference, 0, 9); $payment->id_currency = $order->id_currency; $payment->amount = $rest_paid; if ($order->total_paid != 0) { $payment->payment_method = $payment_method->displayName; } else { $payment->payment_method = null; } // Update total_paid_real value for backward compatibility reasons if ($payment->id_currency == $order->id_currency) { $order->total_paid_real += $payment->amount; } else { $order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2); } $order->save(); $payment->conversion_rate = 1; $payment->save(); Db::getInstance()->execute(' INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` (`id_order_invoice`, `id_order_payment`, `id_order`) VALUES('.(int)$invoice->id.', '.(int)$payment->id.', '.(int)$order->id.')'); } } } 1 Link to comment Share on other sites More sharing options...
Gabriel Perez Posted May 26, 2016 Share Posted May 26, 2016 Or am I mistaken here? You're completely right. I just pointed where the problem was and the place to fix it, the code that I posted don't pretend to be a solution. Link to comment Share on other sites More sharing options...
PatBK Posted May 26, 2016 Share Posted May 26, 2016 I hope you don't feel I was criticizing you or worse. It was my question and following a suggestion for a fix. You're completely right. I just pointed where the problem was and the place to fix it, the code that I posted don't pretend to be a solution. Link to comment Share on other sites More sharing options...
Gabriel Perez Posted May 27, 2016 Share Posted May 27, 2016 I hope you don't feel I was criticizing you or worse. It was my question and following a suggestion for a fix. Dont worry You did well your job, i cant feel bad about this. Link to comment Share on other sites More sharing options...
robertocommerce Posted May 31, 2016 Share Posted May 31, 2016 Hi, you have solved this problem?, I also have the same problem with PayPal thanks Link to comment Share on other sites More sharing options...
PatBK Posted May 31, 2016 Share Posted May 31, 2016 (edited) The issue was with the order status change settings. When in there, in the status, an order is set paid, a new payment entry is made. The way to fix this is to disable payment set in the order change line. It's the 'zet bestelling op betaling ontvangen' line which needs to be unchecked. Hi, you have solved this problem?, I also have the same problem with PayPal thanks Edited May 31, 2016 by PatBK (see edit history) Link to comment Share on other sites More sharing options...
bitclick Posted September 12, 2016 Share Posted September 12, 2016 My solution. I had got duplicate payment for Paypall, Alipay and Weixin. Problem is that you have to generate Delivery Note at least one status before you set order as Paid. Sample of statuses sequence: PAYMENT RECEIVED - order cannot be set as paid (no delivery note no invoice). So you delivery note to be gererated in the next status. ORDER ACCEPTED - order still cannot be set as paid - generate Delivery Note. ORDER PROCESSING - because pdf i generated in previous order you can set order as paid. This works for me in 1613 I still have the problem with PayPal. I removed "set as paid" from all the statuses, I generate the Delivery Slip in both the "Payment accepted" ones (normal and paypal), then in "Shipped" i set it as paid but it still duplicates the payment. Everything else works fine, it's just PayPal. PS 1.6.1.6 Link to comment Share on other sites More sharing options...
Gabriel Perez Posted September 12, 2016 Share Posted September 12, 2016 Use PatBK solution, it will do the job for all payment forms // added && $order->total_paid == 0 so an allready paid order doesn't get 'paid' double or more in the stats and db entries if ($rest_paid > 0 && $order->total_paid == 0) { Link to comment Share on other sites More sharing options...
kirubanidhi Posted November 25, 2016 Share Posted November 25, 2016 Warning $10.25 paid instead of $10 Im using prestashop 1.5.6, How to resolve this error.. anyone can help me.. In which reason this error are occured Link to comment Share on other sites More sharing options...
kirubanidhi Posted November 25, 2016 Share Posted November 25, 2016 How to resolve Warning paid instead of error in my module... Im using prestashop 1.5.6 and authorize.net payment Link to comment Share on other sites More sharing options...
Mercader Virtual Posted July 29, 2020 Share Posted July 29, 2020 (edited) On 2/27/2016 at 1:22 AM, ariom said: I had same problem and found out same solution as climia also suggested, so to solve the duplicated payment issue (for me it was with paypal module), but then another issue arised: in delivery slip now there is no total paid and empty selected payment, so i have to cut off half of the delivery slip when i print it for the carrier. PS 1.6.1.4 - default theme only graphics mod. @climia ... did you also got this problem? if so did you find any solution? tks to all for suggestions The solution for 1.7, although it should work on 1.6 as well: Edit: /classes/pdf/HTMLTemplateDeliverySlip.php Assign this variable to smarty (aprox line 130): 'order_payments' => $this->order->getOrderPayments(), Then edit this file: pdf/delivery-slip.payment-tab.tpl Change: {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} To: {foreach from=$order_payments item=payment} Notice that we are getting payments directly from order and not from invoice. This is the solution specially if you have invoices disabled in prestashop. And to prevent payment duplication, Just keep "set as paid" only on the statuses that require it. Edited July 29, 2020 by Mercader Virtual (see edit history) Link to comment Share on other sites More sharing options...
pixelicous Posted August 31, 2020 Share Posted August 31, 2020 I'm having the same problems on 1.7.6 To me it's with prestashop checkout module with paypal Seems that is related to if you have one more than one carrier for the order, it will split your orders. The weird thing is, that I use the same carrier name for all carriers, this is in order to bypass prestashop limitations of shipping price per category. Anyhow, what happens is that the user receives an invoice only for part of the order, while he paid in full and gets a paypal invoice for paying in full. After you manually accept the second order as payment approved then he will get the second invoice with the total minus the first order. some VERRRRYYY WEIRD and BAD stuff here.. And i do get the same warning. it takes the total of the whole order, and then adds the total of the splitted item (the one that prestashop split because of different carriers). "Warning $92.50 paid instead of $69.65" (which is totally incorrect) I see the github issues of this run even before 2016 and still not fixed. basic functionality for ecommerce. This is dangerous, i have no idea who developed it like that, to me this is a very strong bright warning sign that i might need to switch to a different e-commerce solution Although i really wish i wouldn't need as recreating everything takes time. 1 Link to comment Share on other sites More sharing options...
immeleet Posted November 12, 2020 Share Posted November 12, 2020 Just signed up to share my solution to the community. Perhaps it saves someone time. I had the same problem and i tried different combinations. It turned out that i needed to have invoice activated on "payment accepted" otherwise it would duplicate because it was missing. I have set as payed on 2,3 and 4. Not sure if its correct but it seem to work 😎 Link to comment Share on other sites More sharing options...
salouso Posted March 23, 2021 Share Posted March 23, 2021 Hi Same problem on PS 1.7.6. Unfortunatelly above solutions/workarounds won`t work for me. I have a problem though with just unticking "set order as paid" for all statuses before delivery slip is created, because I sell some virtual products. If the status of the the order (i.e. Payment accepted) is not set as paid, the customer will not receive the automated email with the download link for their purchase. I need that to happen automatically as soon as order is accepted. On some payment methods the module (Saferpay) will go through 3 order statuses within a couple seconds. From "awaiting payment", to "payment authorized", to "payment accepted". For all three of them it creates a "payment" and therefore obviously shows" Warning CHFxxx paid instead of CHFxxx". Eventhough for "awaiting payment" the status is not set as "set the order as paid" is still creates a payment. Oh and to make things more interesting 🙂 -> I use the delivery slip as a picking list, so this needs to be created right from the start. My first order status in hierarchy creates a delivery slip and also is regarded as paid. And one more thing to top it off: my main payment module will always go to "awaiting payment" and then "payment authorized" automatically (if the payment is successfull of course), but only goes to "payment accepted" automatically if the customer used a creditcard (3D-Secure checked). If the customer used a debit card or our other main swiss payment method (Twint), I will need to capture the payment manually first. Only after that the status changes to "payment accepted". So at the very minimum I will have those 2 statuses set to "set as paid". Is there any other solution to this problem? Help much appreciated 🙂 Link to comment Share on other sites More sharing options...
Vincent.Parrin Posted October 14, 2022 Share Posted October 14, 2022 Check this thread : https://github.com/PrestaShop/PrestaShop/pull/15417 It solves apparently the bug https://github.com/PrestaShop/PrestaShop/issues/12588 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