function commerce_stripe_commerce_payment_method_info_alter in Commerce Stripe 7.2
Same name and namespace in other branches
- 7.3 commerce_stripe.module \commerce_stripe_commerce_payment_method_info_alter()
- 7 commerce_stripe.module \commerce_stripe_commerce_payment_method_info_alter()
Implements hook_commerce_payment_method_info_alter().
Displays a warning if Stripe private and public keys are not set and the user has permission to administer payment methods.
File
- ./
commerce_stripe.module, line 351 - 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_commerce_payment_method_info_alter(&$payment_methods) {
if (isset($payment_methods['commerce_stripe'])) {
$settings = _commerce_stripe_load_settings();
if (empty($settings['secret_key']) || empty($settings['public_key'])) {
if (user_access('administer payment methods')) {
drupal_set_message('Stripe secret and public key are required in order to use Stripe payment method. See README.txt for instructions.', 'warning');
}
}
}
}