Commit d640e71d authored by mattwire's avatar mattwire

If we don't have a recurring contribution for subscription ID don't throw...

If we don't have a recurring contribution for subscription ID don't throw exception - it's probably a subscription that was recorded outside of CiviCRM so we ignore and return 200 OK to keep webhook happy
parent 3f97c257
......@@ -447,7 +447,11 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
$this->contribution_recur_id = $contributionRecur['id'];
}
catch (Exception $e) {
$this->exception('Cannot find recurring contribution for subscription ID: ' . $this->subscription_id . '. ' . $e->getMessage());
if ((bool)\Civi::settings()->get('stripe_ipndebug')) {
$message = $this->_paymentProcessor->getPaymentProcessorLabel() . ': ' . CRM_Stripe_Api::getParam('id', $this->_inputParameters) . ': Cannot find recurring contribution for subscription ID: ' . $this->subscription_id;
Civi::log()->debug($message);
}
return FALSE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment