Skip to content
Snippets Groups Projects
Commit 3fd0ab8f authored by mattwire's avatar mattwire
Browse files

Add better return messages for webhook success

parent 5140e082
No related branches found
No related tags found
1 merge request!217Implement Stripe Checkout (with support for SEPA and ACH)
...@@ -355,12 +355,12 @@ class Events { ...@@ -355,12 +355,12 @@ class Events {
'total_amount' => $refundParams['total_amount'], 'total_amount' => $refundParams['total_amount'],
]); ]);
if (!empty($refundPayment['count'])) { if (!empty($refundPayment['count'])) {
$return->message = 'OK - refund already recorded'; $return->message = 'OK - refund already recorded. Contribution ID: ' . $contribution['id'];
$return->ok = TRUE; $return->ok = TRUE;
} }
else { else {
$this->updateContributionRefund($refundParams); $this->updateContributionRefund($refundParams);
$return->message = 'OK - refund recorded'; $return->message = 'OK - refund recorded. Contribution ID: ' . $contribution['id'];
$return->ok = TRUE; $return->ok = TRUE;
} }
$lock->release(); $lock->release();
...@@ -530,6 +530,7 @@ class Events { ...@@ -530,6 +530,7 @@ class Events {
$lock->release(); $lock->release();
$this->handleInstallmentsForSubscription($subscriptionID, $contributionRecur['id']); $this->handleInstallmentsForSubscription($subscriptionID, $contributionRecur['id']);
$return->message = __FUNCTION__ . ' contributionID: ' . $contribution['id'];
$return->ok = TRUE; $return->ok = TRUE;
return $return; return $return;
} }
...@@ -589,6 +590,7 @@ class Events { ...@@ -589,6 +590,7 @@ class Events {
'trxn_id' => $invoiceID, 'trxn_id' => $invoiceID,
]); ]);
} }
$return->message = __FUNCTION__ . ' contributionID: ' . $contribution['id'];
$return->ok = TRUE; $return->ok = TRUE;
return $return; return $return;
} }
...@@ -650,6 +652,7 @@ class Events { ...@@ -650,6 +652,7 @@ class Events {
]; ];
$this->updateContributionFailed($params); $this->updateContributionFailed($params);
} }
$return->message = __FUNCTION__ . ' contributionID: ' . $contribution['id'];
$return->ok = TRUE; $return->ok = TRUE;
return $return; return $return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment