From a8d3db6b0bedae431ef988257f0c0ff704886d4f Mon Sep 17 00:00:00 2001
From: Matthew Wire <mjw@mjwconsult.co.uk>
Date: Tue, 4 Apr 2017 21:47:11 +0100
Subject: [PATCH] Add another form which is valid for paymentprocessor

---
 CRM/Core/Payment/Stripe.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php
index 68c5407d..ae6858b0 100644
--- a/CRM/Core/Payment/Stripe.php
+++ b/CRM/Core/Payment/Stripe.php
@@ -279,7 +279,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
     }
     // Determine if we are dealing with a webform in CiviCRM 4.7.  Those don't have a
     //  _paymentProcessors array and only have one payprocesssor.
-    if (get_class($form) == 'CRM_Financial_Form_Payment') {
+    if (in_array(get_class($form), array('CRM_Financial_Form_Payment', 'CRM_Contribute_Form_Contribution'))) {
       return $stripe_ppid = $form->_paymentProcessor['id'];
     }
     else {
-- 
GitLab