Skip to content
Snippets Groups Projects
Commit 0b3eb4cd authored by Jamie McClelland's avatar Jamie McClelland Committed by mattwire
Browse files

avoid duplicate charges when pulling from system log.

parent 6a324107
Branches
Tags
1 merge request!1526.6 to master
......@@ -342,8 +342,14 @@ function civicrm_api3_stripe_Listevents($params) {
];
$dao = CRM_Core_DAO::executeQuery($sql, $sql_params);
$seen_charges = [];
while($dao->fetch()) {
$data = civicrm_api3_stripe_listevents_massage_systemlog_json($dao->context);
$charge = $data['data']['object']->charge;
if ($charge && in_array($charge, $seen_charges)) {
continue;
}
$seen_charges[] = $charge;
$data['system_log_id'] = $dao->id;
$data_list['data'][] = $data;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment