From 8678f7f8ea1134af3714ecd6b3fa60e16569c9ff Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 12 Oct 2017 00:32:47 +0200 Subject: [PATCH 1/4] Remove unused import --- dynamicweb/urls.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index d8fa9903..884c95b4 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -5,16 +5,15 @@ from django.conf.urls.static import static from django.views import i18n, static as static_view from django.conf import settings -from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView +from hosting.views import ( + RailsHostingView, DjangoHostingView, NodeJSHostingView +) from membership import urls as membership_urls from ungleich_page.views import LandingView from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy import debug_toolbar -from django.views.generic import TemplateView - - urlpatterns = [ url(r'^index.html$', LandingView.as_view()), url(r'^open_api/', include('opennebula_api.urls', From 1b14598cc91e558bc2fbf44cd840feceff00d57a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 12 Oct 2017 00:43:55 +0200 Subject: [PATCH 2/4] Create Stripe elements only stripe key is defined --- hosting/static/hosting/js/payment.js | 36 +--------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/hosting/static/hosting/js/payment.js b/hosting/static/hosting/js/payment.js index 6149a30a..52861e02 100644 --- a/hosting/static/hosting/js/payment.js +++ b/hosting/static/hosting/js/payment.js @@ -49,7 +49,7 @@ $(document).ready(function () { var hasCreditcard = window.hasCreditcard || false; - if (!hasCreditcard) { + if (!hasCreditcard && window.stripeKey) { var stripe = Stripe(window.stripeKey); var element_style = { fonts: [{ @@ -88,31 +88,6 @@ $(document).ready(function () { } } }; - var credit_card_cvv_style = { - base: { - iconColor: '#666EE8', - color: '#31325F', - lineHeight: '25px', - fontWeight: 300, - fontFamily: "'lato-regular', sans-serif", - fontSize: '14px', - '::placeholder': { - color: '#555' - } - }, - invalid: { - iconColor: '#eb4d5c', - color: '#eb4d5c', - lineHeight: '25px', - fontWeight: 300, - fontFamily: "'lato-regular', sans-serif", - fontSize: '14px', - '::placeholder': { - color: '#eb4d5c', - fontWeight: 600 - } - } - }; var enter_ccard_text = "Enter your credit card number"; if (typeof window.enter_your_card_text !== 'undefined') { @@ -164,7 +139,6 @@ $(document).ready(function () { function stripeTokenHandler(token) { // Insert the token ID into the form so it gets submitted to the server - var form = document.getElementById('payment-form-new'); $('#id_token').val(token.id); $('#billing-form').submit(); } @@ -227,13 +201,5 @@ $(document).ready(function () { $(element).closest('.form-group').append(error); } }); - // $form.find('[type=submit]').prop('disabled', true); - // var readyInterval = setInterval(function() { - // if (paymentFormReady()) { - // $form.find('[type=submit]').prop('disabled', false); - // clearInterval(readyInterval); - // } - // }, 250); - }); From 859ccd54a6c58dfba3416336321ec2bf5759e57b Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 12 Oct 2017 19:06:26 +0200 Subject: [PATCH 3/4] Remove some more commented code and console logs --- hosting/static/hosting/js/payment.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hosting/static/hosting/js/payment.js b/hosting/static/hosting/js/payment.js index 52861e02..ef59416b 100644 --- a/hosting/static/hosting/js/payment.js +++ b/hosting/static/hosting/js/payment.js @@ -114,8 +114,6 @@ $(document).ready(function () { } }); } - console.log("has creditcard", hasCreditcard); - // hasCreditcard= true; var submit_form_btn = $('#payment_button_with_creditcard'); submit_form_btn.on('click', submit_payment); @@ -123,11 +121,7 @@ $(document).ready(function () { function submit_payment(e) { e.preventDefault(); - console.log("creditcard sdasd"); - // if (hasCreditcard) { $('#billing-form').submit(); - // } - } From 07e67f727a6bfbf415bb74a539683f2835c29ee8 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 12 Oct 2017 19:12:27 +0200 Subject: [PATCH 4/4] Update Changelog --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index cc93fa32..fdcb6053 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +Next release: + * Bugfix: [dcl, hosting] Fix Stripe js error in confirm payment page 1.2.6: 2017-10-10 * Bugfix: [dcl] Refactor and optimize images, links in glasfaser page * Bugfix: [dcl] Fix email not being sent issue