BradScott Posted September 30, 2016 Share Posted September 30, 2016 Hey All, Just wondering if there is an easy way to stop an order status being set to cancelled/declined if PayPal claim is raised? Currently if a customer decides to use PayPal as a communication method the order gets set to cancelled and instead of getting a chance to communicate a customer they get an order cancelled email and it looks like we have cancelled the order instead of communicating with them. I'm just using the Standard PayPal Gateway V1.04 Quote Link to comment Share on other sites More sharing options...
Noodleman Posted September 30, 2016 Share Posted September 30, 2016 is this for the standard paypal module, or one of the other variations? Quote Link to comment Share on other sites More sharing options...
BradScott Posted September 30, 2016 Author Share Posted September 30, 2016 Sorry just the standard module Quote Link to comment Share on other sites More sharing options...
Noodleman Posted September 30, 2016 Share Posted September 30, 2016 in the paypal module, edit the "gateway.class.php" file. FIND: case 'Canceled_Reversal': $transData['notes'][] = "This means a reversal has been canceled; for example, you, the merchant, won a dispute with the customer and the funds for the transaction that was reversed have been returned to you."; $order->paymentStatus(Order::PAYMENT_CANCEL, $cart_order_id); $order->orderStatus(Order::ORDER_CANCELLED, $cart_order_id); break; And simply remove it. that should do what you need. if you want to prevent ALL conditions that can set it to cancelled, also remove: case 'Denied': $transData['notes'][] = "You, the merchant, denied the payment. This will only happen if the payment was previously pending due to one of the following pending reasons."; $order->paymentStatus(Order::PAYMENT_DECLINE, $cart_order_id); $order->orderStatus(Order::ORDER_CANCELLED, $cart_order_id); break; AND if((string)$_POST['mc_gross']==(string)'-'.$order_summary['total']) { // Change status to refunded if it is a full refund $order->paymentStatus(Order::PAYMENT_CANCEL, $cart_order_id); $order->orderStatus(Order::ORDER_CANCELLED, $cart_order_id); } break; AND case 'Reversed': $transData['notes'][] = "This means that a payment was reversed due to a chargeback or other type of reversal. The funds have been debited from your account balance and returned to the customer. The reason for the reversal is given by the reason_code variable."; $order->paymentStatus(Order::PAYMENT_CANCEL, $cart_order_id); $order->orderStatus(Order::ORDER_CANCELLED, $cart_order_id); break; Quote Link to comment Share on other sites More sharing options...
BradScott Posted October 7, 2016 Author Share Posted October 7, 2016 Thanks heaps Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.