NEW introduce stripeconnect mode
This commit is contained in:
parent
212dc9bca1
commit
fcf7d8f162
@ -33,6 +33,15 @@ global $conf;
|
||||
//use \includes\stripe as stripe;
|
||||
$stripe = array();
|
||||
|
||||
if ((empty($conf->global->STRIPECONNECT_LIVE) && ! (empty($conf->stripeconnect->enabled))) || GETPOST('forcesandbox','alpha'))
|
||||
{
|
||||
$stripe = array(
|
||||
"secret_key" => $conf->global->STRIPE_TEST_SECRET_KEY,
|
||||
"publishable_key" => $conf->global->STRIPE_TEST_PUBLISHABLE_KEY
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))
|
||||
{
|
||||
$stripe = array(
|
||||
@ -47,8 +56,13 @@ else
|
||||
"publishable_key" => $conf->global->STRIPE_LIVE_PUBLISHABLE_KEY
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT."/includes/stripe/lib/Stripe.php";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
|
||||
\Stripe\Stripe::setApiKey($stripe['secret_key']);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
|
||||
\Stripe\Stripe::setAppInfo("Stripe", "dolibarr version", "https://www.dolibarr.org"); // add dolibarr version
|
||||
|
||||
Loading…
Reference in New Issue
Block a user