You are here

function commerce_stripe_load_library in Commerce Stripe 7.2

Same name and namespace in other branches
  1. 7.3 commerce_stripe.module \commerce_stripe_load_library()
  2. 7 commerce_stripe.module \commerce_stripe_load_library()

Brings the stripe php client library into scope

5 calls to commerce_stripe_load_library()
commerce_stripe_cardonfile_charge in ./commerce_stripe.module
Card on file callback: background charge payment
commerce_stripe_cardonfile_delete in ./commerce_stripe.module
Card on file callback: deletes the associated customer payment profile.
commerce_stripe_cardonfile_update in ./commerce_stripe.module
Card on file callback: updates the associated customer payment profile.
commerce_stripe_submit_form_submit in ./commerce_stripe.module
Payment method callback: checkout form submission.
_commerce_stripe_create_card in ./commerce_stripe.module

File

./commerce_stripe.module, line 559
This module provides Stripe (http://stripe.com/) payment gateway integration to Commerce. Commerce Stripe offers a PCI-compliant way to process payments straight from you Commerce shop.

Code

function commerce_stripe_load_library() {
  $library = libraries_load('stripe-php');
  if (!$library || empty($library['loaded'])) {
    watchdog('commerce_stripe', 'Failure to load Stripe API PHP Client Library.', array(), WATCHDOG_CRITICAL);
    return FALSE;
  }
  else {
    return TRUE;
  }
}