This commit is contained in:
Nathan Coad
2016-07-21 10:35:04 +10:00
parent 2ffa185fb9
commit b594364e0d
2 changed files with 4 additions and 4 deletions

View File

@@ -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);