From 9ebbe08d4624003d5f15ba145dc7b2d3715c85a1 Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 16 Sep 2015 12:05:21 -0400 Subject: [PATCH] issue #76: handle pay later in civi 4.6 Due to changes in CiviCRM you can no longer count on hidden_processor field being present. See https://issues.civicrm.org/jira/browse/CRM-15743 --- js/civicrm_stripe.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index ddc4cdf..9f068c6 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -146,15 +146,16 @@ // Handle multiple payment options and Stripe not being chosen. if ($form.find(".crm-section.payment_processor-section").length > 0) { - if (!($form.find('input[name="hidden_processor"]').length > 0)) { - return true; - } if ($form.find('input[name="payment_processor"]:checked').length) { processorId=$form.find('input[name="payment_processor"]:checked').val(); if (!($form.find('input[name="stripe_token"]').length) || ($('#stripe-id').length && $('#stripe-id').val() != processorId)) { return true; } } + else { + // No payment processor is checked. + return true; + } } // Handle pay later (option value '0' in payment_processor radio group)