Fix to avoid stripe live mode beeing disabled when stripeconnect off

This commit is contained in:
Laurent Destailleur 2018-03-13 14:13:32 +01:00
parent 9f07ff0f9b
commit b25f3ba322
4 changed files with 10 additions and 10 deletions

View File

@ -61,7 +61,7 @@ $societestatic = new Societe($db);
$memberstatic = new Adherent($db); $memberstatic = new Adherent($db);
$acc = new Account($db); $acc = new Account($db);
$stripe=new Stripe($db); $stripe=new Stripe($db);
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || empty($conf->global->STRIPECONNECT_LIVE) || GETPOST('forcesandbox','alpha'))) if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
{ {
$service = 'StripeTest'; $service = 'StripeTest';
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Stripe'),'','warning'); dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Stripe'),'','warning');

View File

@ -68,7 +68,7 @@ class ActionsStripeconnect
{ {
global $db,$conf,$user,$langs,$form; global $db,$conf,$user,$langs,$form;
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || empty($conf->global->STRIPECONNECT_LIVE) || GETPOST('forcesandbox','alpha'))) if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
{ {
$service = 'StripeTest'; $service = 'StripeTest';
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Stripe'),'','warning'); dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Stripe'),'','warning');

View File

@ -295,7 +295,7 @@ class Stripe extends CommonObject
if (isset($charge->id)) {} if (isset($charge->id)) {}
} }
if (empty($conf->global->STRIPE_LIVE) || empty($conf->global->STRIPECONNECT_LIVE) || GETPOST('forcesandbox','alpha')) $service = 'StripeTest'; if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')) $service = 'StripeTest';
else $service = 'StripeLive'; else $service = 'StripeLive';
$return->statut = 'success'; $return->statut = 'success';

View File

@ -55,7 +55,7 @@ $societestatic = new societe($db);
$acc = new Account($db); $acc = new Account($db);
$stripe = new Stripe($db); $stripe = new Stripe($db);
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || empty($conf->global->STRIPECONNECT_LIVE) || GETPOST('forcesandbox', 'alpha'))) if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')))
{ {
$service = 'StripeTest'; $service = 'StripeTest';
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');