|
@@ -3,6 +3,7 @@
|
|
|
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
|
|
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
|
|
|
* Copyright (C) 2018 ptibogxiv <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
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
@@ -77,7 +78,7 @@ if ($action == 'setvalue' && $user->admin)
|
|
|
$result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 'int'), 'chaine', 0, '', $conf->entity);
|
|
|
if (! $result > 0)
|
|
|
$error ++;
|
|
|
- $result = dolibarr_set_const($db, "STRIPE_MINIMAL_3DSECURE", GETPOST('STRIPE_MINIMAL_3DSECURE', 'int'), 'chaine', 0, '', $conf->entity);
|
|
|
+ $result = dolibarr_set_const($db, "STRIPE_MINIMAL_3DSECURE", GETPOST('STRIPE_MINIMAL_3DSECURE', 'int'), 'chaine', 0, '', $conf->entity);
|
|
|
if (! $result > 0)
|
|
|
$error ++;
|
|
|
$result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
|
@@ -120,10 +121,8 @@ if ($action == 'setvalue' && $user->admin)
|
|
|
if ($action=="setlive")
|
|
|
{
|
|
|
$liveenable = GETPOST('value','int');
|
|
|
- $res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable,'yesno',0,'',$conf->entity);
|
|
|
- if (! $res > 0) $error++;
|
|
|
- if (! $error)
|
|
|
- {
|
|
|
+ $res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable, 'yesno', 0, '', $conf->entity);
|
|
|
+ if ($res > 0) {
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
}
|
|
|
else
|