X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FPayment.php;h=437d0e5a4e5769dbe0aefdc39197790e4ea9531e;hb=fde268badf7c4489ef5a703a1659b29481f02a33;hp=bf10d26f1546f9ea5684aede88cae3ca94b23fb1;hpb=6f4ad200d1c99a1205b297638a3dcedb09ad3e6e;p=civicrm-core.git diff --git a/api/v3/Payment.php b/api/v3/Payment.php index bf10d26f15..437d0e5a4e 100644 --- a/api/v3/Payment.php +++ b/api/v3/Payment.php @@ -94,6 +94,7 @@ function civicrm_api3_payment_cancel($params) { $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); @@ -102,6 +103,7 @@ function civicrm_api3_payment_cancel($params) { '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) { @@ -133,12 +135,6 @@ function civicrm_api3_payment_create($params) { } } } - 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']; @@ -348,6 +344,11 @@ function _civicrm_api3_payment_get_spec(&$params) { '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,