function tg_stripe_live in Stripe 7
Returns TRUE if we detected test mode.
Detects whether we are test or live by examining secret key.
2 calls to tg_stripe_live()
- stripe_customer_install in stripe_customer/
stripe_customer.install - Try to import any existing customer_ids from other Stripe modules.
- stripe_customer_livemode in stripe_customer/
stripe_customer.module - Check for our current Stripe Live mode, and then return an int value that the Database API can use.
File
- ./
stripe.module, line 313 - stripe.module Drupal hooks used for integrating the Stripe service.
Code
function tg_stripe_live() {
// Now that test mode radios are removed, figure it out based on our secret.
$secret = variable_get('stripe_secret');
if (substr($secret, 0, 7) == 'sk_live') {
return TRUE;
}
return FALSE;
}