From 5c00f6e342d4408e42be3d2ec3f0efd99be83ca3 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 22 Jul 2016 10:26:37 +1000 Subject: [PATCH] js debugging --- booking.stripe.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/booking.stripe.js b/booking.stripe.js index 37e7daa..2ab3390 100644 --- a/booking.stripe.js +++ b/booking.stripe.js @@ -14,8 +14,8 @@ jQuery(document).ready(function($) { $stripeForm.get(0).submit(); } catch(err) { - //console.log([err]); - alert(err); + console.log([err]); + alert(err.message); } // Use the token to create the charge with a server-side script. @@ -35,16 +35,19 @@ jQuery(document).ready(function($) { return; var settings = Drupal.settings.booking_stripe; var $stripeForm = $("#" + settings.form_selector); - alert($(':input[name="description"]', $stripeForm)); + $description = $(':input[name="email"]', $stripeForm).val(); + console.log([$description]); + + //description: $(':input[name="description"]', $stripeForm), + //email: $(':input[name="email"]', $stripeForm), + //amount: $(':input[name="amount"]', $stripeForm), + //alert($(':input[name="description"]', $stripeForm)); handler.open({ name: settings.name, description: currentForm.find('input[name="description"]').val(), - //description: $(':input[name="description"]', $stripeForm), email: currentForm.find('input[name="email"]').val(), - //email: $(':input[name="email"]', $stripeForm), currency: "aud", amount: currentForm.find('input[name="amount"]').val() * 100, - //amount: $(':input[name="amount"]', $stripeForm), zipCode: true, closed: function() { //document.getElementById("booking_stripe_form").submit();