Skip to content
Snippets Groups Projects
Commit 3949e171 authored by mattwire's avatar mattwire
Browse files

Set cancel_date/cancel_reason for failed contribution. Don't update receive_date

parent fdb60a32
Branches
Tags
No related merge requests found
......@@ -255,10 +255,9 @@ class CRM_Core_Payment_StripeIPN {
// If this contribution is Pending, set it to Failed.
$params = [
'contribution_id' => $this->contribution['id'],
'trxn_date' => $this->receive_date,
'cancel_reason' => $this->retrieve('failure_message', 'String'),
'trxn_id' => $this->charge_id,
'order_reference' => $this->invoice_id,
'cancel_date' => $this->receive_date,
'cancel_reason' => $this->retrieve('failure_message', 'String'),
];
$this->updateContributionFailed($params);
}
......@@ -287,10 +286,9 @@ class CRM_Core_Payment_StripeIPN {
}
$params = [
'contribution_id' => $this->contribution['id'],
'trxn_date' => $this->receive_date,
'cancel_reason' => $this->retrieve('failure_message', 'String'),
'trxn_id' => $this->charge_id,
'order_reference' => $this->invoice_id ?? $this->charge_id,
'cancel_date' => $this->receive_date,
'cancel_reason' => $this->retrieve('failure_message', 'String'),
];
$this->updateContributionFailed($params);
return TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment