'payment_instrument_id' => CRM_Utils_Array::value('payment_instrument_id', $params, $params['contribution']->payment_instrument_id),
'check_number' => CRM_Utils_Array::value('check_number', $params),
);
- if ($contributionStatus == 'Refunded' || $contributionStatus == 'Chargeback') {
+ if ($contributionStatus == 'Refunded' || $contributionStatus == 'Chargeback' || $contributionStatus == 'Cancelled') {
$trxnParams['trxn_date'] = !empty($params['contribution']->cancel_date) ? $params['contribution']->cancel_date : date('YmdHis');
if (isset($params['refund_trxn_id'])) {
// CRM-17751 allow a separate trxn_id for the refund to be passed in via api & form.