Skip to content
Snippets Groups Projects
Commit 1b664d15 authored by Peter Hartmann's avatar Peter Hartmann
Browse files

multiple payment options Civi 4.6

parent 82600fc7
Branches
Tags
No related merge requests found
......@@ -157,8 +157,9 @@
// Handle multiple payment options and Stripe not being chosen.
if ($form.find(".crm-section.payment_processor-section").length > 0) {
if ($form.find('input[name="payment_processor_id"]:checked').length) {
processorId=$form.find('input[name="payment_processor_id"]:checked').val();
// Support for CiviCRM 4.6 and 4.7 multiple payment options
if (($form.find('input[name="payment_processor"]:checked').length) || ($form.find('input[name="payment_processor_id"]:checked').length)) {
processorId = $form.find(('input[name="payment_processor"]:checked')||('input[name="payment_processor_id"]:checked').val());
if (!($form.find('input[name="stripe_token"]').length) || ($('#stripe-id').length && $('#stripe-id').val() != processorId)) {
return true;
}
......@@ -170,7 +171,8 @@
}
// Handle pay later (option value '0' in payment_processor radio group).
if ($form.find('input[name="payment_processor_id"]:checked').length && !parseInt($form.find('input[name="payment_processor_id"]:checked').val())) {
if (($form.find('input[name="payment_processor"]:checked').length && !parseInt($form.find('input[name="payment_processor"]:checked').val()))
|| ($form.find('input[name="payment_processor_id"]:checked').length && !parseInt($form.find('input[name="payment_processor_id"]:checked').val()))) {
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment