When I first set up Paypal in Magento I had the transaction processing mode set to "authorize". One order was processed with this mode then.
Now I cannot manage to set this first order to "complete". The status stays in "processing". Instead I am getting below error when I want to alter this order or invoice on the product;
PayPal gateway has rejected request. Authorization has already been completed (#10602: Authorization completed).
The Paypal transaction is authorized and completed. I have changed the transaction processing mode to "sale" now and I am not getting any errors for new orders anymore but I have still the error on the first order and the status is still "processing",
However I want that to be changed to "complete" and finally close the order. Any ideas how to do it in an easy way?
Ok. I found the second part of the solution myself now :)
I used the following query to update the invoice tables so that the status of the invoice is shown as "paid":
UPDATE `sales_flat_invoice_grid` SET `state` = '2' where `increment_id` = YOUR_ORDER_ICREMENT_ID;
UPDATE `sales_flat_invoice` SET `state` = '2', `state` = '2' where `increment_id` = YOUR_ORDER_ICREMENT_ID;
Thanks again, wiram, for your kind help on this issue! Appreciate it :)
After change processing mode to "sale", You need to manually update order status in db for force complete the old order. Below Query is useful for set complete order status for specific order's increment id. You need to run this query via phpMyadmin or MySql console for quick solution.
UPDATE `sales_flat_order_grid` SET `status` = 'complete' where `increment_id` = YOUR_ORDER_ICREMENT_ID;
UPDATE `sales_flat_order` SET `status` = 'complete', `state` = 'complete' where `increment_id` = YOUR_ORDER_ICREMENT_ID;
If you need change in invoice status detail than you need manually update invoice table
like sales_flat_invoice_grid and sales_flat_invoice.
Also If you want to revise order history detail so you can update sales_flat_order_status_history table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With