diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php index 4f3a33391d6aec77175d5992c898e7683ecf8912..d54049d353c0ee37d6ae099181d936f3a68ad60b 100644 --- a/CRM/Core/Payment/Stripe.php +++ b/CRM/Core/Payment/Stripe.php @@ -480,6 +480,19 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment { * @throws \Civi\Payment\Exception\PaymentProcessorException */ public function doPayment(&$propertyBag, $component = 'contribute') { + + // If we have a $0 amount, skip call to processor and set payment_status to Completed. + // https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L1362 + if ($propertyBag['amount'] == 0) { + $result = [ + 'payment_status_id' => CRM_Core_PseudoConstant::getKey( + 'CRM_Contribute_BAO_Contribution', + 'contribution_status_id', 'Completed' + ) + ]; + return $result; + } + /* @var \Civi\Payment\PropertyBag $propertyBag */ $propertyBag = \Civi\Payment\PropertyBag::cast($propertyBag); $propertyBag = $this->beginDoPayment($propertyBag);