Skip to content
Snippets Groups Projects
Commit ab1d3b80 authored by mattwire's avatar mattwire
Browse files

When form incorrectly submits a one-off for a recur log an error and return a...

When form incorrectly submits a one-off for a recur log an error and return a generic error message (it's a configuration error)
parent 0d0ae1a0
Branches
Tags
No related merge requests found
......@@ -629,6 +629,10 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
// This is where we save the customer card
// @todo For a recurring payment we have to save the card. For a single payment we'd like to develop the
// save card functionality but should not save by default as the customer has not agreed.
if (empty($paymentMethodID)) {
\Civi::log('stripe')->error($this->getLogPrefix() . 'recur payment but missing paymentmethod. Check form config');
throw new PaymentProcessorException('Payment form is not configured correctly!');
}
return $this->doRecurPayment($propertyBag, $amountFormattedForStripe, $stripeCustomer);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment