testing
This commit is contained in:
@@ -169,9 +169,7 @@ function booking_stripeform_validate_form_payment($form, &$form_state) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$path = libraries_get_path('stripe');
|
$path = libraries_get_path('stripe');
|
||||||
//watchdog('booking_debug', 'Loading stripe library from "@info"', array ('@info' => $path . '/lib/Stripe.php'));
|
|
||||||
require_once($path . '/init.php');
|
require_once($path . '/init.php');
|
||||||
//require_once($path . '/lib/Stripe.php');
|
|
||||||
|
|
||||||
\Stripe\Stripe::setApiKey(_booking_get_stripe_private_key());
|
\Stripe\Stripe::setApiKey(_booking_get_stripe_private_key());
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
var stripeResponseHandler = function(status, response) {
|
var stripeResponseHandler = function(status, response) {
|
||||||
var $form = $("#" + Drupal.settings.booking_stripeform.form_selector);
|
var $form = $("#" + Drupal.settings.booking_stripeform.form_selector);
|
||||||
|
alert($form);
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
alert(response.error.message);
|
alert(response.error.message);
|
||||||
} else {
|
} else {
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
var token = response.id;
|
var token = response.id;
|
||||||
// Insert the token into the form so it gets submitted to the server
|
// Insert the token into the form so it gets submitted to the server
|
||||||
$('input[name=stripeToken]', $form).val(token);
|
$('input[name=stripeToken]', $form).val(token);
|
||||||
|
alert(token);
|
||||||
// and submit
|
// and submit
|
||||||
$form.get(0).submit();
|
$form.get(0).submit();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user