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