Skip to content
Snippets Groups Projects
Commit 269e9371 authored by mattwire's avatar mattwire Committed by mattwire
Browse files

Fix #125 Thousands of failed/spam transactions for charge.failed webhook

parent 5bf3108b
No related branches found
No related tags found
1 merge request!786.3
......@@ -237,6 +237,12 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
// One-time donation and per invoice payment.
case 'charge.failed':
// If we don't have a customer_id we can't do anything with it!
// It's quite likely to be a fraudulent/spam so we ignore.
if (empty(CRM_Stripe_Api::getObjectParam('customer_id', $this->_inputParameters->data->object))) {
return TRUE;
}
$this->setInfo();
$params = [
'id' => $this->contribution['id'],
......
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