From 578bea1aa61fceaf8e513af55a067ef42ecd8b27 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 22 Jul 2016 10:28:59 +1000 Subject: [PATCH] js progress --- booking.stripe.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/booking.stripe.js b/booking.stripe.js index 2ab3390..60bb338 100644 --- a/booking.stripe.js +++ b/booking.stripe.js @@ -35,19 +35,19 @@ jQuery(document).ready(function($) { return; var settings = Drupal.settings.booking_stripe; var $stripeForm = $("#" + settings.form_selector); - $description = $(':input[name="email"]', $stripeForm).val(); + $description = $(':input[name="description"]', $stripeForm).val(); console.log([$description]); - - //description: $(':input[name="description"]', $stripeForm), - //email: $(':input[name="email"]', $stripeForm), - //amount: $(':input[name="amount"]', $stripeForm), + //description: currentForm.find('input[name="description"]').val(), + //email: currentForm.find('input[name="email"]').val(), + //amount: currentForm.find('input[name="amount"]').val() * 100, + //alert($(':input[name="description"]', $stripeForm)); handler.open({ name: settings.name, - description: currentForm.find('input[name="description"]').val(), - email: currentForm.find('input[name="email"]').val(), - currency: "aud", - amount: currentForm.find('input[name="amount"]').val() * 100, + currency: "aud", + description: $(':input[name="description"]', $stripeForm).val(), + email: $(':input[name="email"]', $stripeForm).val(), + amount: $(':input[name="amount"]', $stripeForm).val(), zipCode: true, closed: function() { //document.getElementById("booking_stripe_form").submit();