I did develop the code for the core VM paypal plugin to prevent automatic refunds based on an order status update
Unfortunately it has never made it to the core:
I can try again
No dont set them to confirmed!!
If you want to hard code for now - to prevent vm initiating a refund (you can test this code of course before moving to live)
in plugins paypal / paypal.php
comment out the code in function plgVmOnUpdateOrderPayment where it tries to handle the refund status
//dont inititate a paypal refund based on VM order status
// elseif ($order->order_status == $this->_currentMethod->status_refunded /*OR $order->order_status == $this->_currentMethod->status_canceled*/) {
// $paypalInterface = $this->_loadPayPalInterface();
// $paypalInterface->setOrder($order);
// $paypalInterface->setTotal($order->order_total);
// $paypalInterface->loadCustomerData();
// if ($paypalInterface->RefundTransaction($payment)) {
// if ($this->_currentMethod->payment_type == '_xclick-subscriptions') {
// $paypalInterface->debugLog(vmText::_('VMPAYMENT_PAYPAL_SUBSCRIPTION_CANCELLED'), 'plgVmOnUpdateOrderPayment Refund', 'message', true);
// } else {
// //Mark the order as refunded
// // $order->order_status = $method->status_refunded;
// $paypalInterface->debugLog(vmText::_('VMPAYMENT_PAYPAL_API_TRANSACTION_REFUNDED'), 'plgVmOnUpdateOrderPayment Refund', 'message', true);
// }
// $this->_storePaypalInternalData( $paypalInterface->getResponse(false), $order->virtuemart_order_id, $payment->virtuemart_paymentmethod_id, $order->order_number);
// }
// }
return true;
}
Ask the team to do a very straightforward configuration inclusion
Config:
Refund PayPal transactions when the refund status is set in VM:
VMpaypalRefunds
Default = Yes
Option = Y/N