diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php
index 68c5407d7e1b981ed93b38b30cc9a0df797ddb8f..ae6858b0b9f74385281c15bb272c4e5d1ce97e0f 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 {