diff --git a/booking.module b/booking.module index 6654ef1..43c192f 100644 --- a/booking.module +++ b/booking.module @@ -248,7 +248,8 @@ function booking_menu() { // @todo remove this after testing $items['stripetest'] = array( 'title' => $bookingTitle . ' Stripe Test', - 'page callback' => 'booking_stripeform_form', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('booking_stripeform_form'), 'access arguments' => array('access booking form'), 'type' => MENU_NORMAL_ITEM, ); diff --git a/booking.stripe.inc b/booking.stripe.inc index 7b139f0..144e1e6 100644 --- a/booking.stripe.inc +++ b/booking.stripe.inc @@ -34,9 +34,8 @@ function _booking_get_stripe_private_key() { * Sample Stripe Form. */ function booking_stripeform_form($form, &$form_state) { - // Let's make sure you have the stripe library installed. - if($path = libraries_get_path('stripe-php-latest')) { + if($path = libraries_get_path('stripe')) { if(!is_file($path . '/lib/Stripe.php')) { form_set_error('form', t('You need to install the stripe library from !link before you can use this form.', array('!link' => l('here', 'https://stripe.com/docs/libraries')))); } @@ -167,7 +166,7 @@ function booking_stripeform_validate_form_payment($form, &$form_state) { if($errors = form_get_errors()) { return; } - $path = libraries_get_path('stripe-php-latest'); + $path = libraries_get_path('stripe'); require_once($path . '/lib/Stripe.php'); Stripe::setApiKey(STRIPEFORM_PRIVATE_KEY);