Commit 4bb4b8af authored by mattwire's avatar mattwire
Browse files

Improve webhookEventNotMatched hook for contribution_not_found so we can...

Improve webhookEventNotMatched hook for contribution_not_found so we can return a contribution to use
parent e3f6f8db
......@@ -733,11 +733,17 @@ class CRM_Core_Payment_StripeIPN {
$message = $this->_paymentProcessor->getPaymentProcessorLabel() . 'No matching contributions for event ' . $this->getEventID();
Civi::log()->debug($message);
}
CRM_Mjwshared_Hook::webhookEventNotMatched('stripe', $this, 'contribution_not_found');
return FALSE;
$result = NULL;
CRM_Mjwshared_Hook::webhookEventNotMatched('stripe', $this, 'contribution_not_found', $result);
if (empty($result['contribution'])) {
return FALSE;
}
$this->contribution = $result['contribution'];
}
else {
$this->contribution = $contribution['values'][$contribution['id']];
}
$this->contribution = $contribution['values'][$contribution['id']];
return TRUE;
}
......
Supports Markdown
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