NEW options for alternative method
payment request api (ex apple pay) and sepa direct debit
This commit is contained in:
parent
9298143f9d
commit
d3627c1438
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* 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-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
|
||||
@ -78,9 +78,6 @@ 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);
|
||||
if (! $result > 0)
|
||||
$error ++;
|
||||
$result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
if (! $result > 0)
|
||||
$error ++;
|
||||
@ -166,17 +163,11 @@ print "</tr>\n";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="titlefield">';
|
||||
print $langs->trans("StripeLiveEnabled").'</td><td>';
|
||||
if (!empty($conf->global->STRIPE_LIVE))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setlive&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setlive&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STRIPE_LIVE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("STRIPE_LIVE", $arrval, $conf->global->STRIPE_LIVE);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -272,16 +263,36 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ?
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Minimal amount for force 3Dsecure if it's optionnal
|
||||
// Activate Payment Request API
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||
{
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("STRIPE_PAYMENT_REQUEST_API").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STRIPE_PAYMENT_REQUEST_API');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("STRIPE_PAYMENT_REQUEST_API", $arrval, $conf->global->STRIPE_PAYMENT_REQUEST_API);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Activate SEPA DIRECT_DEBIT
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||
{
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("STRIPE_MINIMAL_3DSECURE").'</td><td>';
|
||||
print '<input class="flat" name="STRIPE_MINIMAL_3DSECURE" size="3" value="' .$conf->global->STRIPE_MINIMAL_3DSECURE . '">'.$langs->getCurrencySymbol($conf->currency).'</td></tr>';
|
||||
print $langs->trans("STRIPE_SEPA_DIRECT_DEBIT").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('STRIPE_SEPA_DIRECT_DEBIT');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("STRIPE_SEPA_DIRECT_DEBIT", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Warehouse for automatic decrement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ?
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment
|
||||
{
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ONLINE_PAYMENT_WAREHOUSE").'</td><td>';
|
||||
@ -329,7 +340,12 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("SecurityTokenIsUnique").'</td><td>';
|
||||
print $form->selectyesno("PAYMENT_SECURITY_TOKEN_UNIQUE", (empty($conf->global->PAYMENT_SECURITY_TOKEN)?0:$conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE), 1);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user