change library config

This commit is contained in:
Nathan Coad
2016-07-21 12:07:38 +10:00
parent 28df961b87
commit cab49b68f5
2 changed files with 6 additions and 8 deletions

View File

@@ -44,23 +44,23 @@ function booking_stripeform_form($form, &$form_state) {
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'))));
}
//load the main stripe library
libraries_load('stripe');
//set some values for our internal stripe library to help process the form
$setting = array();
$setting['booking_stripeform'] = array(
'pubkey' => _booking_get_stripe_public_key(),
'form_selector' => str_replace('_', '-', __FUNCTION__),
);
$form['#attached'] = array(
'js' => array(
array('data' => $setting, 'type' => 'setting'),
drupal_get_path('module', 'booking') . '/booking.stripe.js',
//drupal_get_path('module', 'booking') . '/booking.stripe.js',
),
/*
'library' => array(
array('booking', 'stripe'),
array('booking', 'booking-stripe'),
),
*/
);
$form['stripeToken'] = array(