Merge pull request #10651 from ptibogxiv/patch-123
Fix servicestatus list of payment stripe
This commit is contained in:
commit
b73d8394dc
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -80,22 +80,29 @@ if ($facid > 0)
|
||||
|
||||
if (! empty($conf->stripe->enabled))
|
||||
{
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = 0;
|
||||
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox', 'alpha'))
|
||||
{
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = 0;
|
||||
}
|
||||
|
||||
$stripe=new Stripe($db);
|
||||
$stripeacc = $stripe->getStripeAccount($service); // Stripe OAuth connect account of dolibarr user (no network access here)
|
||||
access_forbidden();
|
||||
}
|
||||
|
||||
if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))
|
||||
{
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
}
|
||||
$stripeacc = $stripe->getStripeAccount($service);
|
||||
/*if (empty($stripeaccount))
|
||||
{
|
||||
print $langs->trans('ErrorStripeAccountNotDefined');
|
||||
}*/
|
||||
|
||||
// Initialize technical object to manage hooks of paiements. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('paiementcard','globalcard'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user