js dev
This commit is contained in:
@@ -7,10 +7,10 @@ jQuery(document).ready(function($) {
|
|||||||
locale: 'auto',
|
locale: 'auto',
|
||||||
token: function(token) {
|
token: function(token) {
|
||||||
try {
|
try {
|
||||||
var $token_id = $(':input[name="token_id"]', $stripeForm);
|
//var $token_id = $(':input[name="token_id"]', $stripeForm);
|
||||||
var $token_email = $(':input[name="token_email"]', $stripeForm);
|
//var $token_email = $(':input[name="token_email"]', $stripeForm);
|
||||||
$token_id.val(token.id);
|
$(':input[name="token_id"]', $stripeForm).val(token.id);
|
||||||
$token_email.val(token.email);
|
$(':input[name="token_email"]', $stripeForm).val(token.email);
|
||||||
$stripeForm.get(0).submit();
|
$stripeForm.get(0).submit();
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
@@ -35,19 +35,18 @@ jQuery(document).ready(function($) {
|
|||||||
return;
|
return;
|
||||||
var settings = Drupal.settings.booking_stripe;
|
var settings = Drupal.settings.booking_stripe;
|
||||||
var $stripeForm = $("#" + settings.form_selector);
|
var $stripeForm = $("#" + settings.form_selector);
|
||||||
$description = $(':input[name="description"]', $stripeForm).val();
|
//$description = $(':input[name="description"]', $stripeForm).val();
|
||||||
console.log([$description]);
|
//console.log([$description]);
|
||||||
//description: currentForm.find('input[name="description"]').val(),
|
//description: currentForm.find('input[name="description"]').val(),
|
||||||
//email: currentForm.find('input[name="email"]').val(),
|
//email: currentForm.find('input[name="email"]').val(),
|
||||||
//amount: currentForm.find('input[name="amount"]').val() * 100,
|
//amount: currentForm.find('input[name="amount"]').val() * 100,
|
||||||
|
|
||||||
//alert($(':input[name="description"]', $stripeForm));
|
//alert($(':input[name="description"]', $stripeForm));
|
||||||
handler.open({
|
handler.open({
|
||||||
name: settings.name,
|
name: settings.name,
|
||||||
currency: "aud",
|
currency: "aud",
|
||||||
description: $(':input[name="description"]', $stripeForm).val(),
|
description: $(':input[name="description"]', $stripeForm).val(),
|
||||||
email: $(':input[name="email"]', $stripeForm).val(),
|
email: $(':input[name="email"]', $stripeForm).val(),
|
||||||
amount: $(':input[name="amount"]', $stripeForm).val(),
|
amount: $(':input[name="amount"]', $stripeForm).val() * 100,
|
||||||
zipCode: true,
|
zipCode: true,
|
||||||
closed: function() {
|
closed: function() {
|
||||||
//document.getElementById("booking_stripe_form").submit();
|
//document.getElementById("booking_stripe_form").submit();
|
||||||
|
Reference in New Issue
Block a user