Skip to content
Snippets Groups Projects
Commit c4204541 authored by eileen's avatar eileen
Browse files

Accept trxn_id to Payment.get

Alternative to #15166 (incorporates #15229 )
parent 6045f2b7
Branches
Tags
No related merge requests found
......@@ -47,6 +47,9 @@ function civicrm_api3_payment_get($params) {
$limit = CRM_Utils_Array::value('limit', $params['options']);
}
$params['options']['limit'] = 0;
if (isset($params['trxn_id'])) {
$params['financial_trxn_id.trxn_id'] = $params['trxn_id'];
}
$eft = civicrm_api3('EntityFinancialTrxn', 'get', $params);
if (!empty($eft['values'])) {
$eftIds = [];
......@@ -210,6 +213,10 @@ function _civicrm_api3_payment_get_spec(&$params) {
'type' => CRM_Utils_Type::T_INT,
'api.aliases' => ['contribution_id'],
],
'trxn_id' => [
'title' => 'Transaction ID',
'type' => CRM_Utils_Type::T_STRING,
],
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment