$eftParams = [
'entity_table' => 'civicrm_contribution',
'financial_trxn_id' => $params['id'],
+ 'return' => ['entity', 'amount', 'entity_id', 'financial_trxn_id.check_number'],
];
$entity = civicrm_api3('EntityFinancialTrxn', 'getsingle', $eftParams);
'contribution_id' => $entity['entity_id'],
'trxn_date' => $params['trxn_date'] ?? 'now',
'cancelled_payment_id' => $params['id'],
+ 'check_number' => $entity['financial_trxn_id.check_number'] ?? NULL,
];
foreach (['trxn_id', 'payment_instrument_id'] as $permittedParam) {
}
}
}
- if (!empty($params['payment_processor'])) {
- // I can't find evidence this is passed in - I was gonna just remove it but decided to deprecate as I see getToFinancialAccount
- // also anticipates it.
- CRM_Core_Error::deprecatedFunctionWarning('passing payment_processor is deprecated - use payment_processor_id');
- $params['payment_processor_id'] = $params['payment_processor'];
- }
// Check if it is an update
if (!empty($params['id'])) {
$amount = $params['total_amount'];
'description' => ts('Transaction id supplied by external processor. This may not be unique.'),
'type' => CRM_Utils_Type::T_STRING,
],
+ 'order_reference' => [
+ 'title' => ts('Order Reference'),
+ 'description' => ts('Payment Processor external order reference'),
+ 'type' => CRM_Utils_Type::T_STRING,
+ ],
'trxn_date' => [
'title' => ts('Payment Date'),
'type' => CRM_Utils_Type::T_TIMESTAMP,