add code to handle stripe fees
This commit is contained in:
@@ -7,32 +7,23 @@ jQuery(document).ready(function($) {
|
||||
locale: 'auto',
|
||||
token: function(token) {
|
||||
try {
|
||||
//var $token_id = $(':input[name="token_id"]', $stripeForm);
|
||||
//var $token_email = $(':input[name="token_email"]', $stripeForm);
|
||||
// Use the token to create the charge with a server-side script.
|
||||
// You can access the token ID with `token.id`
|
||||
$(':input[name="token_id"]', $stripeForm).val(token.id);
|
||||
$(':input[name="token_email"]', $stripeForm).val(token.email);
|
||||
$stripeForm.get(0).submit();
|
||||
}
|
||||
catch(err) {
|
||||
console.log([err]);
|
||||
alert(err.message);
|
||||
console.log([err]);
|
||||
alert(err.message);
|
||||
}
|
||||
|
||||
// Use the token to create the charge with a server-side script.
|
||||
// You can access the token ID with `token.id`
|
||||
//if (currentForm === undefined)
|
||||
// return;
|
||||
//currentForm.find('input[name="token_id"]').val(token.id);
|
||||
//currentForm.find('input[name="token_email"]').val(token.email);
|
||||
//currentForm.submit();
|
||||
}
|
||||
});
|
||||
//var currentForm = undefined;
|
||||
|
||||
$('.form-submit').click(function (e) {
|
||||
currentForm = $(this).closest('form');
|
||||
if (currentForm === undefined)
|
||||
return;
|
||||
//currentForm = $(this).closest('form');
|
||||
//if (currentForm === undefined)
|
||||
// return;
|
||||
var settings = Drupal.settings.booking_stripe;
|
||||
var $stripeForm = $("#" + settings.form_selector);
|
||||
//$description = $(':input[name="description"]', $stripeForm).val();
|
||||
|
Reference in New Issue
Block a user