Merge pull request #157 from levivm/feature/new_digitalglarus

Fixed #2789 #2788  #2790 #2812 #2811
This commit is contained in:
Levi Velázquez 2016-12-20 18:08:01 -05:00 committed by GitHub
commit 272e414b5c
116 changed files with 16319 additions and 75 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -27,22 +27,42 @@ $( document ).ready(function() {
//Acept term and conditions button
var hasCreditcard = window.hasCreditcard;
console.log("has creditcard");
console.log("has creditcard");
console.log("has creditcard");
var submit_form_btn = $('#payment_button');
submit_form_btn.on('click', submit_payment);
var submit_form_btn = $('#payment_button');
submit_form_btn.on('click', submit_payment);
function submit_payment(e){
$('#billing-form').submit();
e.preventDefault();
if (hasCreditcard) {
$('#billing-form').submit();
}
else  {
$('#payment-form').submit();
}
// $form.submit();
}
var $form = $('#payment-form');
$form.submit(payWithStripe);
/* If you're using Stripe for payments */
function payWithStripe(e) {
console.log("submiting");
console.log("token");
console.log("token");
// console.log("token", token);
e.preventDefault();
if (!$('.agree-terms').is(':checked')){