Skip to content

Commit

Permalink
Merge pull request #99 from progressivetech/github76
Browse files Browse the repository at this point in the history
issue #76: Handle pay later in civi 4.6 (remove hidden_processor check).
  • Loading branch information
drastik committed Sep 16, 2015
2 parents 6ba9a51 + 9ebbe08 commit 30a8c2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/civicrm_stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 30a8c2b

Please sign in to comment.