You are here

function _commerce_stripe_load_settings in Commerce Stripe 7.2

Same name and namespace in other branches
  1. 7.3 commerce_stripe.module \_commerce_stripe_load_settings()
  2. 7 commerce_stripe.module \_commerce_stripe_load_settings()
2 calls to _commerce_stripe_load_settings()
commerce_stripe_commerce_payment_method_info_alter in ./commerce_stripe.module
Implements hook_commerce_payment_method_info_alter().
_commerce_stripe_load_setting in ./commerce_stripe.module

File

./commerce_stripe.module, line 363
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_settings($name = NULL) {
  static $settings = array();
  if (!empty($settings)) {
    return $settings;
  }
  if (commerce_payment_method_load('commerce_stripe') && rules_config_load('commerce_payment_commerce_stripe')) {
    $commerce_stripe_payment_method = commerce_payment_method_instance_load('commerce_stripe|commerce_payment_commerce_stripe');
  }
  if (isset($name) && rules_config_load('commerce_payment_commerce_stripe')) {
    $commerce_stripe_payment_method = commerce_payment_method_instance_load('commerce_stripe|commerce_payment_commerce_stripe');
  }
  if (isset($commerce_stripe_payment_method)) {
    $settings = $commerce_stripe_payment_method['settings'];
  }
  return $settings;
}