darius
#1
Is there a way to add additional statuses to
PayPal payments addon > Order status on partial refund > Order status - Do Not Change
I'd like to add Reversed status to do not change order status.
What I need is something like
/addons/paypal/config.php
define('PAYPAL_ORDER_STATUS_REFUNDED', 'Refunded');
to something like
define('PAYPAL_ORDER_STATUS_REFUNDED', 'Refunded', 'Reversed');
but would that work ?
You could try or have you already ?
darius
#3
No did not try, know too little about php
This constant is used in the app/addons/paypal/func.php file only. So you can replace
} elseif ($data['payment_status'] == PAYPAL_ORDER_STATUS_REFUNDED) {
with
} elseif ($data['payment_status'] == PAYPAL_ORDER_STATUS_REFUNDED || $data['payment_status'] == 'Reversed') {
darius
#5
So change I have described in first post does not need to be done?
This constant is used in the app/addons/paypal/func.php file only. So you can replace
} elseif ($data['payment_status'] == PAYPAL_ORDER_STATUS_REFUNDED) {
with
} elseif ($data['payment_status'] == PAYPAL_ORDER_STATUS_REFUNDED || $data['payment_status'] == 'Reversed') {
Can you explain me what you change will do or not do after I use it ?
Sorry I misunderstood initial question. Try to replace
if ($forced_status) {
$cart[‘payment_info’][‘order_status’] = $forced_status;
} else {
$cart[‘payment_info’][‘order_status’] = $pp_settings[‘pp_statuses’][strtolower($data[‘payment_status’])];
}
with
if ($forced_status) {
$cart[‘payment_info’][‘order_status’] = $forced_status;
} elseif ($data[‘payment_status’] == ‘Reversed’) {
$cart[‘payment_info’][‘order_status’] = $order_info[‘status’];
} else {
$cart[‘payment_info’][‘order_status’] = $pp_settings[‘pp_statuses’][strtolower($data[‘payment_status’])];
}
This code should save current status
(!) Not tested
darius
#7
Forgot to write what file to make changes to, also what does it do ?
Sorry I misunderstood initial question. Try to replace
if ($forced_status) {
$cart['payment_info']['order_status'] = $forced_status;
} else {
$cart['payment_info']['order_status'] = $pp_settings['pp_statuses'][strtolower($data['payment_status'])];
}
with
if ($forced_status) {
$cart['payment_info']['order_status'] = $forced_status;
} elseif ($data['payment_status'] == 'Reversed') {
$cart['payment_info']['order_status'] = $order_info['status'];
} else {
$cart['payment_info']['order_status'] = $pp_settings['pp_statuses'][strtolower($data['payment_status'])];
}
This code should save current status
(!) Not tested
The file is app/addons/paypal/func.php. The system will set current status to order on "Reversed" response