Fix to avoid stripe live mode beeing disabled when stripeconnect off
This commit is contained in:
parent
9f07ff0f9b
commit
b25f3ba322
@ -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');
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
@ -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';
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user