30require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/stripe/lib/stripe.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/stripe/class/stripe.class.php';
37$servicename =
'Stripe';
38$listofsupportedhooks = array(
'payment_intent.payment_failed',
'payment_intent.succeeded');
40$listofsupportedhooks[] =
'charge.dispute.closed';
41$listofsupportedhooks[] =
'charge.dispute.created';
42$listofsupportedhooks[] =
'charge.dispute.funds_withdrawn';
45 $listofsupportedhooks[] =
'payout.create';
46 $listofsupportedhooks[] =
'payout.paid';
59$langs->loadLangs(array(
'admin',
'other',
'paypal',
'paybox',
'stripe'));
61if (empty($user->admin)) {
64if (empty(
$conf->stripe->enabled)) {
68$action =
GETPOST(
'action',
'aZ09');
76if ($action ==
'setvalue' && $user->admin) {
79 if (empty(
$conf->stripeconnect->enabled)) {
101 if (!($result > 0)) {
105 if (!($result > 0)) {
109 if (!($result > 0)) {
114 if (!($result > 0)) {
118 if (!($result > 0)) {
122 if (!($result > 0)) {
126 if (!($result > 0)) {
129 if (GETPOSTISSET(
'STRIPE_LOCATION')) {
136 if (!($result > 0)) {
139 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_FORM",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_FORM',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
140 if (!($result > 0)) {
143 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_OK",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_OK',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
144 if (!($result > 0)) {
147 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_KO",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_KO',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
148 if (!($result > 0)) {
152 if (!($result > 0)) {
162 if (!($result > 0)) {
165 if (empty(
$conf->use_javascript_ajax)) {
166 $result =
dolibarr_set_const($db,
"PAYMENT_SECURITY_TOKEN_UNIQUE",
GETPOST(
'PAYMENT_SECURITY_TOKEN_UNIQUE',
'alpha'),
'chaine', 0,
'',
$conf->entity);
167 if (!($result > 0)) {
181if ($action ==
"setlive") {
197$form =
new Form($db);
200llxHeader(
'', $langs->trans(
"StripeSetup"));
202$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
207print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
208print
'<input type="hidden" name="token" value="'.newToken().
'">';
209print
'<input type="hidden" name="action" value="setvalue">';
213$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');
215print
'<span class="opacitymedium">'.$langs->trans(
"StripeDesc").
"</span><br>\n";
219print
'<div class="div-table-responsive-no-min">';
220print
'<table class="noborder centpercent">';
221print
'<tr class="liste_titre">';
222print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
227print
'<tr class="oddeven">';
229print $langs->trans(
"StripeLiveEnabled").
'</td><td>';
230if (
$conf->use_javascript_ajax) {
231 print ajax_constantonoff(
'STRIPE_LIVE');
233 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
234 print $form->selectarray(
"STRIPE_LIVE", $arrval,
$conf->global->STRIPE_LIVE);
236print
'</td><td></td></tr>';
238if (empty(
$conf->stripeconnect->enabled)) {
239 print
'<tr class="oddeven"><td>';
240 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_TEST_PUBLISHABLE_KEY").
'</span></td><td>';
241 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="' .
getDolGlobalString(
'STRIPE_TEST_PUBLISHABLE_KEY').
'" placeholder="'.$langs->trans(
"Example").
': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx">';
242 print
'</td><td></td></tr>';
244 print
'<tr class="oddeven"><td>';
245 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"STRIPE_TEST_SECRET_KEY").
'</span></td><td>';
246 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="' .
getDolGlobalString(
'STRIPE_TEST_SECRET_KEY').
'" placeholder="'.$langs->trans(
"Example").
': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx">';
247 print
'</td><td></td></tr>';
249 print
'<tr class="oddeven"><td>';
250 print
'<span class="titlefield">'.$langs->trans(
"STRIPE_TEST_WEBHOOK_KEY").
'</span></td><td>';
252 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_ID" value="'.getDolGlobalString(
'STRIPE_TEST_WEBHOOK_ID').
'" placeholder="'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx">';
255 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.getDolGlobalString(
'STRIPE_TEST_WEBHOOK_KEY').
'" placeholder="'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">';
256 $out =
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForTestWebhook").
'</span> ';
261 $out .=
'<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
264 print $form->textwithpicto(
'', $langs->trans(
'ListOfSupportedHooksToActivate').
':<br><br>'.implode(
'<br>', $listofsupportedhooks), 1,
'help',
'valignmiddle', 0, 3,
'webhookscodetest');
271 $endpoint = \Stripe\WebhookEndpoint::retrieve(
getDolGlobalString(
'STRIPE_TEST_WEBHOOK_ID'));
272 $endpoint->enabled_events = $stripearrayofwebhookevents;
274 if (!
GETPOST(
'status',
'alpha')) {
275 $endpoint->disabled =
true;
277 $endpoint->disabled =
false;
280 $endpoint->url = $url;
284 if ($endpoint->status ==
'enabled') {
285 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
286 print
img_picto($langs->trans(
"Activated"),
'switch_on');
288 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
289 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
292 print $e->getMessage();
295 print
'Bad value for the secret key. Reenter and save it again to fix this.';
298 print
img_picto($langs->trans(
"Inactive"),
'statut5');
303 print
'<tr class="oddeven"><td>'.$langs->trans(
"StripeConnect").
'</td>';
304 print
'<td><b>'.$langs->trans(
"StripeConnect_Mode").
'</b><br>';
305 print $langs->trans(
"STRIPE_APPLICATION_FEE_PLATFORM").
' ';
309 print
' '.$langs->getCurrencySymbol(
$conf->currency).
' '.$langs->trans(
"minimum").
' '.
price(
getDolGlobalString(
'STRIPE_APPLICATION_FEE_MINIMAL')).
' '.$langs->getCurrencySymbol(
$conf->currency);
310 print
'</td><td></td></tr>';
313if (empty(
$conf->stripeconnect->enabled)) {
314 print
'<tr class="oddeven"><td>';
315 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_PUBLISHABLE_KEY").
'</span></td><td>';
316 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_PUBLISHABLE_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_PUBLISHABLE_KEY').
'" placeholder="'.$langs->trans(
"Example").
': pk_live_xxxxxxxxxxxxxxxxxxxxxxxx">';
317 print
'</td><td></td></tr>';
319 print
'<tr class="oddeven"><td>';
320 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_SECRET_KEY").
'</span></td><td>';
321 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_SECRET_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_SECRET_KEY').
'" placeholder="'.$langs->trans(
"Example").
': sk_live_xxxxxxxxxxxxxxxxxxxxxxxx">';
322 print
'</td><td></td></tr>';
324 print
'<tr class="oddeven"><td>';
325 print
'<span class="titlefield">'.$langs->trans(
"STRIPE_LIVE_WEBHOOK_KEY").
'</span></td><td>';
327 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_ID" value="'.getDolGlobalString(
'STRIPE_LIVE_WEBHOOK_ID').
'" placeholder="'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx">';
330 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_WEBHOOK_KEY').
'" placeholder="'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">';
331 $out =
img_picto(
'',
'globe',
'class="pictofixedwidth"').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForLiveWebhook").
'</span> ';
335 $out .=
'<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
338 print $form->textwithpicto(
'', $langs->trans(
'ListOfSupportedHooksToActivate').
':<br><br>'.implode(
'<br>', $listofsupportedhooks), 1,
'help',
'valignmiddle', 0, 3,
'webhookscodeprod');
345 $endpoint = \Stripe\WebhookEndpoint::retrieve(
getDolGlobalString(
'STRIPE_LIVE_WEBHOOK_ID'));
346 $endpoint->enabled_events = $stripearrayofwebhookevents;
348 if (empty(
GETPOST(
'status',
'alpha'))) {
349 $endpoint->disabled =
true;
351 $endpoint->disabled =
false;
354 $endpoint->url = $url;
357 if ($endpoint->status ==
'enabled') {
358 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
359 print
img_picto($langs->trans(
"Activated"),
'switch_on');
361 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
362 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
365 print $e->getMessage();
369 print
img_picto($langs->trans(
"Inactive"),
'statut5');
381print
'<div class="div-table-responsive-no-min">';
382print
'<table class="noborder centpercent">';
383print
'<tr class="liste_titre">';
384print
'<td>'.$langs->trans(
"UsageParameter").
'</td>';
388print
'<tr class="oddeven"><td>';
389print $langs->trans(
"PublicVendorName").
'</td><td>';
390print
'<input class="minwidth300" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.getDolGlobalString(
'ONLINE_PAYMENT_CREDITOR').
'">';
391print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': '.$mysoc->name.
'</span>';
394print
'<tr class="oddeven"><td>';
395print $langs->trans(
"BankAccount").
'</td><td>';
396print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
397$form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'),
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0,
'', 1);
404print
'<tr class="oddeven"><td>';
405print $langs->trans(
"StripeAutoRecordPayout").
'</td><td>';
406if (
$conf->use_javascript_ajax) {
407 print ajax_constantonoff(
'STRIPE_AUTO_RECORD_PAYOUT', array(),
null, 0, 0, 1);
409 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
410 print $form->selectarray(
"STRIPE_AUTO_RECORD_PAYOUT", $arrval,
getDolGlobalInt(
'STRIPE_AUTO_RECORD_PAYOUT'));
415 print
'<tr class="oddeven"><td>';
416 print $langs->trans(
"StripeUserAccountForActions").
'</td><td>';
417 print
img_picto(
'',
'user',
'class="pictofixedwidth"').$form->select_dolusers(
getDolGlobalString(
'STRIPE_USER_ACCOUNT_FOR_ACTIONS'),
'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
420 print
'<tr class="oddeven"><td>';
421 print $langs->trans(
"BankAccountForBankTransfer").
'</td><td>';
422 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
423 $form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'),
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0,
'', 1);
429 print
'<tr class="oddeven"><td>';
430 print $langs->trans(
"STRIPE_CARD_PRESENT").
'</td><td>';
431 if (
$conf->use_javascript_ajax) {
432 print ajax_constantonoff(
'STRIPE_CARD_PRESENT');
434 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
435 print $form->selectarray(
"STRIPE_CARD_PRESENT", $arrval,
$conf->global->STRIPE_CARD_PRESENT);
442 print
'<tr class="oddeven"><td>';
443 print $langs->trans(
"TERMINAL_LOCATION").
'</td><td>';
444 $service =
'StripeTest';
447 $service =
'StripeLive';
452 global $stripearrayofkeysbyenv;
453 $site_account = $stripearrayofkeysbyenv[$servicestatus][
'secret_key'];
454 if (!empty($site_account)) {
455 \Stripe\Stripe::setApiKey($site_account);
458 $service =
'StripeTest';
459 $servicestatus =
'0';
460 dol_htmloutput_mesg($langs->trans(
'YouAreCurrentlyInSandboxMode',
'Stripe'), [],
'warning');
462 $service =
'StripeLive';
463 $servicestatus =
'1';
465 $stripe =
new Stripe($db);
466 if (!empty($site_account)) {
468 $stripeacc = $stripe->getStripeAccount($service);
470 $locations = \Stripe\Terminal\Location::all(
null, array(
"stripe_account" => $stripeacc));
472 $locations = \Stripe\Terminal\Location::all();
476 print $e->getMessage().
'<br>';
481 $location[
""] = $langs->trans(
"NotDefined");
482 if (!empty($locations)) {
483 foreach ($locations as $tmplocation) {
484 $location[$tmplocation->id] = $tmplocation->display_name;
488 print $form->selectarray(
"STRIPE_LOCATION", $location,
getDolGlobalString(
'STRIPE_LOCATION'));
492print
'<tr class="oddeven"><td>';
493print $langs->trans(
"STRIPE_SEPA_DIRECT_DEBIT").
'</td><td>';
494if (
$conf->use_javascript_ajax) {
495 print ajax_constantonoff(
'STRIPE_SEPA_DIRECT_DEBIT');
497 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
498 print $form->selectarray(
"STRIPE_SEPA_DIRECT_DEBIT", $arrval,
getDolGlobalString(
'STRIPE_SEPA_DIRECT_DEBIT'));
505 print
'<tr class="oddeven"><td>';
506 print $langs->trans(
"STRIPE_KLARNA").
'</td><td>';
507 if (
$conf->use_javascript_ajax) {
508 print ajax_constantonoff(
'STRIPE_KLARNA');
510 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
511 print $form->selectarray(
"STRIPE_KLARNA", $arrval,
$conf->global->STRIPE_KLARNA);
518 print
'<tr class="oddeven"><td>';
519 print $langs->trans(
"STRIPE_BANCONTACT").
'</td><td>';
520 if (
$conf->use_javascript_ajax) {
521 print ajax_constantonoff(
'STRIPE_BANCONTACT');
523 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
524 print $form->selectarray(
"STRIPE_BANCONTACT", $arrval,
$conf->global->STRIPE_BANCONTACT);
526 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForBECustomers").
'</span>';
532 print
'<tr class="oddeven"><td>';
533 print $langs->trans(
"STRIPE_IDEAL").
'</td><td>';
534 if (
$conf->use_javascript_ajax) {
535 print ajax_constantonoff(
'STRIPE_IDEAL');
537 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
538 print $form->selectarray(
"STRIPE_IDEAL", $arrval,
$conf->global->STRIPE_SEPA_DIRECT_DEBIT);
540 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForNLCustomers").
'</span>';
546 print
'<tr class="oddeven"><td>';
547 print $langs->trans(
"STRIPE_GIROPAY").
'</td><td>';
548 if (
$conf->use_javascript_ajax) {
549 print ajax_constantonoff(
'STRIPE_GIROPAY');
551 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
552 print $form->selectarray(
"STRIPE_GIROPAY", $arrval,
$conf->global->STRIPE_GIROPAY);
554 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForDECustomers").
'</span>';
560 print
'<tr class="oddeven"><td>';
561 print $langs->trans(
"STRIPE_SOFORT").
'</td><td>';
562 if (
$conf->use_javascript_ajax) {
563 print ajax_constantonoff(
'STRIPE_SOFORT');
565 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
566 print $form->selectarray(
"STRIPE_SOFORT", $arrval,
$conf->global->STRIPE_SOFORT);
568 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForATBEDEITNLESCustomers").
'</span>';
572print
'<tr class="oddeven"><td>';
573print $langs->trans(
"CSSUrlForPaymentForm").
'</td><td>';
574print
'<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'">';
575print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': http://mysite/mycss.css</span>';
578print
'<tr class="oddeven"><td>';
579print $langs->trans(
"MessageForm").
'</td><td>';
580$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_FORM',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_FORM"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
584print
'<tr class="oddeven"><td>';
585print $langs->trans(
"MessageOK").
'</td><td>';
586$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_OK',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_OK"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
590print
'<tr class="oddeven"><td>';
591print $langs->trans(
"MessageKO").
'</td><td>';
592$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_KO',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_KO"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
596print
'<tr class="oddeven"><td>';
597print $langs->trans(
"ONLINE_PAYMENT_SENDEMAIL").
'</td><td>';
598print
img_picto(
'',
'email',
'class="pictofixedwidth"');
599print
'<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_SENDEMAIL').
'">';
600print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
608print
'<div class="div-table-responsive-no-min">';
609print
'<table class="noborder centpercent">';
611print
'<tr class="liste_titre">';
612print
'<td>'.$langs->trans(
"UrlGenerationParameters").
'</td>';
613print
'<td>'.$langs->trans(
"Value").
'</td>';
617print
'<tr class="oddeven"><td>';
618print $langs->trans(
"SecurityToken").
'</td><td>';
619print
'<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="' .
getDolGlobalString(
'PAYMENT_SECURITY_TOKEN').
'">';
620if (!empty(
$conf->use_javascript_ajax)) {
621 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
624 $langs->load(
"errors");
625 print
img_warning($langs->trans(
"WarningTheHiddenOptionIsOn",
'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'),
'',
'pictowarning marginleftonly');
629print
'<tr class="oddeven"><td>';
630print $langs->trans(
"SecurityTokenIsUnique").
'</td><td>';
631if (
$conf->use_javascript_ajax) {
632 print ajax_constantonoff(
'PAYMENT_SECURITY_TOKEN_UNIQUE', array(),
null, 0, 0, 1);
634 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
635 print $form->selectarray(
"PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval,
$conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
644print $form->buttonsSaveCancel(
"Save",
'');
653include DOL_DOCUMENT_ROOT.
'/core/tpl/onlinepaymentlinks.tpl.php';
655print
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').
'. '.$langs->trans(
'SeeAlso',
'https://docs.stripe.com/testing?testing-method=card-numbers'));
658 print
info_admin($langs->trans(
"ExampleOfTestBankAcountForSEPA",
'AT611904300234573201 (pending->succeed) or AT861904300235473202 (pending->failed)').
'. '.$langs->trans(
'SeeAlso',
'https://docs.stripe.com/testing?payment-method=sepa-direct-debit'));
663if (!empty(
$conf->use_javascript_ajax)) {
664 print
"\n".
'<script type="text/javascript">';
665 print
'$(document).ready(function () {
667 $("#apidoca").click(function() {
668 console.log("We click on apidoca show/hide");
670 $("#apidoca").hide();
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage a WYSIWYG editor.
Stripe class @TODO No reason to extend CommonObject.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
ajax_autoselect($htmlname, $addlink='', $textonlink='Link')
Make content of an input box selected when we click into input field.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_htmloutput_mesg($mesgstring='', $mesgarray=array(), $style='ok', $keepembedded=0)
Print formatted messages to output (Used to show messages on html output).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
utf8_check($str)
Check if a string is in UTF8.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
stripeadmin_prepare_head()
Define head array for tabs of stripe tools setup pages.