Commit b3ee52b7 authored by mattwire's avatar mattwire
Browse files

Fix missing function when IPN parameters are invalid

parent b4fec98b
...@@ -103,15 +103,15 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN { ...@@ -103,15 +103,15 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
* @param array $parameters * @param array $parameters
*/ */
public function setInputParameters($parameters) { public function setInputParameters($parameters) {
if (!is_object($parameters)) {
$this->exception('Invalid input parameters');
}
// Determine the proper Stripe Processor ID so we can get the secret key // Determine the proper Stripe Processor ID so we can get the secret key
// and initialize Stripe. // and initialize Stripe.
$this->getPaymentProcessor(); $this->getPaymentProcessor();
$this->_paymentProcessor->setAPIParams(); $this->_paymentProcessor->setAPIParams();
if (!is_object($parameters)) {
$this->exception('Invalid input parameters');
}
// Now re-retrieve the data from Stripe to ensure it's legit. // Now re-retrieve the data from Stripe to ensure it's legit.
// Special case if this is the test webhook // Special case if this is the test webhook
if (substr($parameters->id, -15, 15) === '_00000000000000') { if (substr($parameters->id, -15, 15) === '_00000000000000') {
......
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