Jump to content

[Resolved] CubeCart - PayPal communication


BradScott

Recommended Posts

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

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...