28require_once DOL_DOCUMENT_ROOT.
'/includes/stripe/stripe-php/init.php';
29require_once DOL_DOCUMENT_ROOT.
'/includes/stripe/stripe-php/lib/Stripe.php';
33global $stripearrayofkeysbyenv;
35$stripearrayofkeysbyenv = array(
37 "secret_key" => empty($conf->global->STRIPE_TEST_SECRET_KEY) ?
'' : $conf->global->STRIPE_TEST_SECRET_KEY,
38 "publishable_key" => empty($conf->global->STRIPE_TEST_PUBLISHABLE_KEY) ?
'' : $conf->global->STRIPE_TEST_PUBLISHABLE_KEY
41 "secret_key" => empty($conf->global->STRIPE_LIVE_SECRET_KEY) ?
'' : $conf->global->STRIPE_LIVE_SECRET_KEY,
42 "publishable_key" => empty($conf->global->STRIPE_LIVE_PUBLISHABLE_KEY) ?
'' : $conf->global->STRIPE_LIVE_PUBLISHABLE_KEY
46$stripearrayofkeys = array();
47if (empty($conf->global->STRIPE_LIVE) ||
GETPOST(
'forcesandbox',
'alpha')) {
48 $stripearrayofkeys = $stripearrayofkeysbyenv[0];
50 $stripearrayofkeys = $stripearrayofkeysbyenv[1];
53\Stripe\Stripe::setApiKey($stripearrayofkeys[
'secret_key']);
54\Stripe\Stripe::setAppInfo(
"Dolibarr Stripe", DOL_VERSION,
"https://www.dolibarr.org");
55\Stripe\Stripe::setApiVersion(empty($conf->global->STRIPE_FORCE_VERSION) ?
"2020-08-27" : $conf->global->STRIPE_FORCE_VERSION);
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.