$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) {
'type' => 'Text',
],
],
+ 'order_reference' => [
+ 'name' => 'order_reference',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => 'Order Reference',
+ 'description' => 'Payment Processor external order reference',
+ 'maxlength' => 255,
+ 'size' => 25,
+ 'where' => 'civicrm_financial_trxn.order_reference',
+ 'table_name' => 'civicrm_financial_trxn',
+ 'entity' => 'FinancialTrxn',
+ 'bao' => 'CRM_Financial_DAO_FinancialTrxn',
+ 'localizable' => 0,
+ 'html' => [
+ 'type' => 'Text',
+ ],
+ ],
'check_number' => [
'name' => 'check_number',
'type' => CRM_Utils_Type::T_STRING,