* Copyright (C) 2017 Olivier Geffroy * Copyright (C) 2017 Saasprov * Copyright (C) 2018-2022 Thibault FOUCART * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW * * 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 * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/stripe/admin/stripe.php * \ingroup stripe * \brief Page to setup stripe module */ // Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; $servicename = 'Stripe'; // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'paypal', 'paybox', 'stripe')); if (empty($user->admin)) { accessforbidden(); } if (empty($conf->stripe->enabled)) { accessforbidden(); } $action = GETPOST('action', 'aZ09'); /* * Actions */ if ($action == 'setvalue' && $user->admin) { $db->begin(); if (empty($conf->stripeconnect->enabled)) { $result = dolibarr_set_const($db, "STRIPE_TEST_PUBLISHABLE_KEY", GETPOST('STRIPE_TEST_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_SECRET_KEY", GETPOST('STRIPE_TEST_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_ID", GETPOST('STRIPE_TEST_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_KEY", GETPOST('STRIPE_TEST_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_PUBLISHABLE_KEY", GETPOST('STRIPE_LIVE_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_SECRET_KEY", GETPOST('STRIPE_LIVE_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_ID", GETPOST('STRIPE_LIVE_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_KEY", GETPOST('STRIPE_LIVE_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CREDITOR", GETPOST('ONLINE_PAYMENT_CREDITOR', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_PAYMENTS", GETPOSTINT('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_USER_ACCOUNT_FOR_ACTIONS", GETPOSTINT('STRIPE_USER_ACCOUNT_FOR_ACTIONS'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOSTINT('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } if (GETPOSTISSET('STRIPE_LOCATION')) { $result = dolibarr_set_const($db, "STRIPE_LOCATION", GETPOST('STRIPE_LOCATION', 'alpha'), '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++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_FORM", GETPOST('ONLINE_PAYMENT_MESSAGE_FORM', 'restricthtml'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_OK", GETPOST('ONLINE_PAYMENT_MESSAGE_OK', 'restricthtml'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_KO", GETPOST('ONLINE_PAYMENT_MESSAGE_KO', 'restricthtml'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_SENDEMAIL", GETPOST('ONLINE_PAYMENT_SENDEMAIL'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } // Stock decrement //$result = dolibarr_set_const($db, "ONLINE_PAYMENT_WAREHOUSE", (GETPOST('ONLINE_PAYMENT_WAREHOUSE', 'alpha') > 0 ? GETPOST('ONLINE_PAYMENT_WAREHOUSE', 'alpha') : ''), 'chaine', 0, '', $conf->entity); //if (! $result > 0) // $error ++; // Payment token for URL $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN", GETPOST('PAYMENT_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } if (empty($conf->use_javascript_ajax)) { $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity); if (!($result > 0)) { $error++; } } if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); dol_print_error($db); } } if ($action == "setlive") { $liveenable = GETPOSTINT('value'); $res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable, 'yesno', 0, '', $conf->entity); if ($res > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } //TODO: import script for stripe account saving in alone or connect mode for stripe.class.php /* * View */ $form = new Form($db); $formproduct = new FormProduct($db); llxHeader('', $langs->trans("StripeSetup")); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ModuleSetup").' Stripe', $linkback); $head = stripeadmin_prepare_head(); print '
'; print ''; print ''; print dol_get_fiche_head($head, 'stripeaccount', '', -1); $stripearrayofwebhookevents = array('account.updated', 'payout.created', 'payout.paid', 'charge.pending', 'charge.refunded', 'charge.succeeded', 'charge.failed', 'payment_intent.succeeded', 'payment_intent.payment_failed', 'payment_method.attached', 'payment_method.updated', 'payment_method.card_automatically_updated', 'payment_method.detached', 'source.chargeable', 'customer.deleted'); print ''.$langs->trans("StripeDesc")."
\n"; print '
'; print '
'; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; if (empty($conf->stripeconnect->enabled)) { print ''; print ''; print ''; } else { print ''; print ''; } if (empty($conf->stripeconnect->enabled)) { print ''; print ''; print ''; } print '
'.$langs->trans("AccountParameter").''.$langs->trans("Value").'
'; print $langs->trans("StripeLiveEnabled").''; 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 '
'; print ''.$langs->trans("STRIPE_TEST_PUBLISHABLE_KEY").''; print ''; print '
'; print ''.$langs->trans("STRIPE_TEST_SECRET_KEY").''; print ''; print '
'; print ''.$langs->trans("STRIPE_TEST_WEBHOOK_KEY").''; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { print ''; print '
'; } print ''; $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php', 3); $url .= '?test=1'; //global $dolibarr_main_instance_unique_id; //$url .= '&securitykey='.dol_hash('stripeipn-'.$dolibarr_main_instance_unique_id.'-'.$conf->global->STRIPE_TEST_PUBLISHABLE_KEY, 'md5'); $out .= ''; $out .= ajax_autoselect("onlinetestwebhookurl"); print '
'.$out; print '
'; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { if (getDolGlobalString('STRIPE_TEST_WEBHOOK_KEY') && getDolGlobalString('STRIPE_TEST_SECRET_KEY') && getDolGlobalString('STRIPE_TEST_WEBHOOK_ID')) { if (utf8_check($conf->global->STRIPE_TEST_SECRET_KEY)) { try { \Stripe\Stripe::setApiKey($conf->global->STRIPE_TEST_SECRET_KEY); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID); $endpoint->enabled_events = $stripearrayofwebhookevents; if (GETPOST('webhook', 'alpha') == $conf->global->STRIPE_TEST_WEBHOOK_ID) { if (!GETPOST('status', 'alpha')) { $endpoint->disabled = true; } else { $endpoint->disabled = false; } } $endpoint->url = $url; // @phan-suppress-next-line PhanDeprecatedFunction $endpoint->save(); if ($endpoint->status == 'enabled') { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); } } catch (Exception $e) { print $e->getMessage(); } } else { print 'Bad value for the secret key. Reenter and save it again to fix this.'; } } else { print img_picto($langs->trans("Inactive"), 'statut5'); } } print'
'.$langs->trans("StripeConnect").''.$langs->trans("StripeConnect_Mode").'
'; print $langs->trans("STRIPE_APPLICATION_FEE_PLATFORM").' '; print price($conf->global->STRIPE_APPLICATION_FEE_PERCENT); print '% + '; print price($conf->global->STRIPE_APPLICATION_FEE); print ' '.$langs->getCurrencySymbol($conf->currency).' '.$langs->trans("minimum").' '.price($conf->global->STRIPE_APPLICATION_FEE_MINIMAL).' '.$langs->getCurrencySymbol($conf->currency); print '
'; print ''.$langs->trans("STRIPE_LIVE_PUBLISHABLE_KEY").''; print ''; print '
'; print ''.$langs->trans("STRIPE_LIVE_SECRET_KEY").''; print ''; print '
'; print ''.$langs->trans("STRIPE_LIVE_WEBHOOK_KEY").''; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { print ''; print '
'; } print ''; $out = img_picto('', 'globe', 'class="pictofixedwidth"').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php', 3); //global $dolibarr_main_instance_unique_id; //$url .= '?securitykey='.dol_hash('stripeipn-'.$dolibarr_main_instance_unique_id.'-'.$conf->global->STRIPE_LIVE_PUBLISHABLE_KEY, 'md5'); $out .= ''; $out .= ajax_autoselect("onlinelivewebhookurl", '0'); print '
'.$out; print '
'; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { if (getDolGlobalString('STRIPE_LIVE_WEBHOOK_KEY') && getDolGlobalString('STRIPE_LIVE_SECRET_KEY') && getDolGlobalString('STRIPE_LIVE_WEBHOOK_ID')) { if (utf8_check($conf->global->STRIPE_TEST_SECRET_KEY)) { try { \Stripe\Stripe::setApiKey($conf->global->STRIPE_LIVE_SECRET_KEY); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID); $endpoint->enabled_events = $stripearrayofwebhookevents; if (GETPOST('webhook', 'alpha') == $conf->global->STRIPE_LIVE_WEBHOOK_ID) { if (empty(GETPOST('status', 'alpha'))) { $endpoint->disabled = true; } else { $endpoint->disabled = false; } } $endpoint->url = $url; // @phan-suppress-next-line PhanDeprecatedFunction $endpoint->save(); if ($endpoint->status == 'enabled') { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); } } catch (Exception $e) { print $e->getMessage(); } } } else { print img_picto($langs->trans("Inactive"), 'statut5'); } } print '
'; print '
'; print '
'; print '
'; print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; print ''; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // What is this for ? print ''; } // Card Present for Stripe Terminal if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } // Locations for Stripe Terminal if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } print ''; // Activate Klarna if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } // Activate Bancontact if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } // Activate iDEAL if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } // Activate Giropay if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } // Activate Sofort if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current code print ''; } print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("UsageParameter").''.$langs->trans("Value").'
'; print $langs->trans("PublicVendorName").''; print ''; print '   '.$langs->trans("Example").': '.$mysoc->name.''; print '
'; print $langs->trans("StripeUserAccountForActions").''; print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers(getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS'), 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0); print '
'; print $langs->trans("BankAccount").''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); $form->select_comptes(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'), 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print '
'; print $langs->trans("BankAccountForBankTransfer").''; print img_picto('', 'bank_account', 'class="pictofixedwidth"'); $form->select_comptes(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'), 'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0, '', 1); print '
'; print $langs->trans("STRIPE_CARD_PRESENT").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_CARD_PRESENT'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_CARD_PRESENT", $arrval, $conf->global->STRIPE_CARD_PRESENT); } print '
'; print $langs->trans("TERMINAL_LOCATION").''; $service = 'StripeTest'; $servicestatus = 0; if (getDolGlobalString('STRIPE_LIVE') && !GETPOST('forcesandbox', 'alpha')) { $service = 'StripeLive'; $servicestatus = 1; } try { global $stripearrayofkeysbyenv; $site_account = $stripearrayofkeysbyenv[$servicestatus]['secret_key']; if (!empty($site_account)) { \Stripe\Stripe::setApiKey($site_account); } if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { $service = 'StripeLive'; $servicestatus = '1'; } $stripe = new Stripe($db); if (!empty($site_account)) { // If $site_account not defined, then key not set and no way to call API Location $stripeacc = $stripe->getStripeAccount($service); if ($stripeacc) { $locations = \Stripe\Terminal\Location::all('', array("stripe_account" => $stripeacc)); } else { $locations = \Stripe\Terminal\Location::all(); } } } catch (Exception $e) { print $e->getMessage().'
'; } // Define the array $location $location = array(); $location[""] = $langs->trans("NotDefined"); if (!empty($locations)) { foreach ($locations as $tmplocation) { $location[$tmplocation->id] = $tmplocation->display_name; } } print $form->selectarray("STRIPE_LOCATION", $location, getDolGlobalString('STRIPE_LOCATION')); print '
'; print $langs->trans("STRIPE_SEPA_DIRECT_DEBIT").''; 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, getDolGlobalString('STRIPE_SEPA_DIRECT_DEBIT')); } print '
'; print $langs->trans("STRIPE_KLARNA").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_KLARNA'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_KLARNA", $arrval, $conf->global->STRIPE_KLARNA); } print '
'; print $langs->trans("STRIPE_BANCONTACT").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_BANCONTACT'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_BANCONTACT", $arrval, $conf->global->STRIPE_BANCONTACT); } print '   '.$langs->trans("ExampleOnlyForBECustomers").''; print '
'; print $langs->trans("STRIPE_IDEAL").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_IDEAL'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_IDEAL", $arrval, $conf->global->STRIPE_SEPA_DIRECT_DEBIT); } print '   '.$langs->trans("ExampleOnlyForNLCustomers").''; print '
'; print $langs->trans("STRIPE_GIROPAY").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_GIROPAY'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_GIROPAY", $arrval, $conf->global->STRIPE_GIROPAY); } print '   '.$langs->trans("ExampleOnlyForDECustomers").''; print '
'; print $langs->trans("STRIPE_SOFORT").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_SOFORT'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("STRIPE_SOFORT", $arrval, $conf->global->STRIPE_SOFORT); } print '   '.$langs->trans("ExampleOnlyForATBEDEITNLESCustomers").''; print '
'; print $langs->trans("CSSUrlForPaymentForm").''; print ''; print '   '.$langs->trans("Example").': http://mysite/mycss.css'; print '
'; print $langs->trans("MessageForm").''; $doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_FORM', getDolGlobalString("ONLINE_PAYMENT_MESSAGE_FORM"), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_2, '90%'); $doleditor->Create(); print '
'; print $langs->trans("MessageOK").''; $doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_OK', getDolGlobalString("ONLINE_PAYMENT_MESSAGE_OK"), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_2, '90%'); $doleditor->Create(); print '
'; print $langs->trans("MessageKO").''; $doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_KO', getDolGlobalString("ONLINE_PAYMENT_MESSAGE_KO"), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_2, '90%'); $doleditor->Create(); print '
'; print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").''; print img_picto('', 'email', 'class="pictofixedwidth"'); print ''; print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print '
'; print '
'; print '
'; print '
'; print ''; print ''; print ''; print ''; print "\n"; // Payment token for URL print ''; print ''; print '
'.$langs->trans("UrlGenerationParameters").''.$langs->trans("Value").'
'; print $langs->trans("SecurityToken").''; print ''; if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); } if (getDolGlobalString('PAYMENT_SECURITY_ACCEPT_ANY_TOKEN')) { $langs->load("errors"); print img_warning($langs->trans("WarningTheHiddenOptionIsOn", 'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'), '', 'pictowarning marginleftonly'); } print '
'; print $langs->trans("SecurityTokenIsUnique").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE', null, null, 0, 0, 1); } 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 '
'; print '
'; print dol_get_fiche_end(); print $form->buttonsSaveCancel("Save", ''); print '
'; print '

'; $token = ''; include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php'; print info_admin($langs->trans("ExampleOfTestCreditCard", '4242424242424242 (no 3DSecure) or 4000000000003063 (3DSecure required) or 4000002760003184 (3DSecure2 required on all transaction) or 4000003800000446 (3DSecure2 required, the off-session allowed)', '4000000000000101', '4000000000000069', '4000000000000341')); if (getDolGlobalString('STRIPE_SEPA_DIRECT_DEBIT')) { print info_admin($langs->trans("ExampleOfTestBankAcountForSEPA", 'AT611904300234573201 (pending->succeed) or AT861904300235473202 (pending->failed)')); } if (!empty($conf->use_javascript_ajax)) { print "\n".''; } // End of page llxFooter(); $db->close();