diff --git a/digitalglarus/models.py b/digitalglarus/models.py index 26ecb4ff..73e04aca 100644 --- a/digitalglarus/models.py +++ b/digitalglarus/models.py @@ -1,4 +1,5 @@ + import calendar from datetime import datetime, date, timedelta from dateutil.relativedelta import relativedelta diff --git a/digitalglarus/static/digitalglarus/js/payment.js b/digitalglarus/static/digitalglarus/js/payment.js index 3179f721..90e922b1 100644 --- a/digitalglarus/static/digitalglarus/js/payment.js +++ b/digitalglarus/static/digitalglarus/js/payment.js @@ -19,6 +19,7 @@ $( document ).ready(function() { } if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) { // Only send the token to relative URLs i.e. locally. + alert("POR AQUI"); xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); } } @@ -33,6 +34,7 @@ $( document ).ready(function() { function submit_payment(e){ $('#billing-form').submit(); + alert("POR AQUI2"); // $form.submit(); } @@ -42,7 +44,7 @@ $( document ).ready(function() { /* If you're using Stripe for payments */ function payWithStripe(e) { - console.log("submiting"); + console.log("submiting33"); e.preventDefault(); if (!$('.agree-terms').is(':checked')){ @@ -53,12 +55,15 @@ $( document ).ready(function() { /* Visual feedback */ $form.find('[type=submit]').html('Validating '); - + alert("POR AQUI3"); + console.log("submiting2"); var PublishableKey = window.stripeKey; + alert(PublishableKey); Stripe.setPublishableKey(PublishableKey); Stripe.card.createToken($form, function stripeResponseHandler(status, response) { if (response.error) { /* Visual feedback */ + alert("POR AQUI32345"); $form.find('[type=submit]').html('Try again'); /* Show Stripe errors on the form */ $form.find('.payment-errors').text(response.error.message); diff --git a/digitalglarus/templates/digitalglarus/booking_payment.html b/digitalglarus/templates/digitalglarus/booking_payment.html index 5c7cd604..f257d1d9 100644 --- a/digitalglarus/templates/digitalglarus/booking_payment.html +++ b/digitalglarus/templates/digitalglarus/booking_payment.html @@ -72,7 +72,7 @@ {% if credit_card_data %}
Still have trouble? Contact us .
+Still have trouble? For technical support Contact us .