X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FPayment.php;h=555c791c2dfd3fe7e6edabb92a889a4d3ef391c0;hb=52817fca33c632c65e52afba8b0848bc065aebd4;hp=bf10d26f1546f9ea5684aede88cae3ca94b23fb1;hpb=5ef139aa041f9ca1e7ebd6d915b0e232ba961526;p=civicrm-core.git diff --git a/api/v3/Payment.php b/api/v3/Payment.php index bf10d26f15..555c791c2d 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) {