Skip to content
Snippets Groups Projects
Commit 2be227c6 authored by capo's avatar capo Committed by mattwire
Browse files

Call IPN->main() from inside a try catch to allow loops

parent a09be1f5
No related branches found
No related tags found
1 merge request!96Stripe131 API to handle paymentintents
......@@ -97,7 +97,12 @@ function civicrm_api3_stripe_Ipn($params) {
// CRM_Core_Payment::handlePaymentMethod
$_GET['processor_id'] = $ppid;
$ipnClass = new CRM_Core_Payment_StripeIPN($object);
$ipnClass->main();
$ipnClass->setExceptionMode(FALSE);
try {
$ipnClass->main();
} catch(Throwable $e) {
return civicrm_api3_create_error($e->getMessage());
}
if ($params['noreceipt'] == 1) {
$ipnClass->setSendEmailReceipt(0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment