Skip to content

Instantly share code, notes, and snippets.

View daino92's full-sized avatar
🎯
Focusing

Dionysis Kalepanagos daino92

🎯
Focusing
  • Pireaus University of Applied Sciences
  • Athens, Greece
View GitHub Profile
@daino92
daino92 / JS Stripe Handler
Created September 11, 2017 08:43
JS Stripe Handler
var public_key = $("#pk").val();
Stripe.setPublishableKey(public_key);
var $form = $('#checkout-form'); //Grab the form
$form.submit(function(event){
$('charge-error').addClass('hidden');
$form.find('button').prop('disabled', true);
Stripe.card.createToken({