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';
49$langs->loadLangs(array(
'admin',
'other',
'paypal',
'paybox',
'stripe'));
51if (empty($user->admin)) {
54if (empty(
$conf->stripe->enabled)) {
58$action =
GETPOST(
'action',
'aZ09');
66if ($action ==
'setvalue' && $user->admin) {
69 if (empty(
$conf->stripeconnect->enabled)) {
104 if (!($result > 0)) {
108 if (!($result > 0)) {
112 if (!($result > 0)) {
116 if (!($result > 0)) {
119 if (GETPOSTISSET(
'STRIPE_LOCATION')) {
126 if (!($result > 0)) {
129 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_FORM",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_FORM',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
130 if (!($result > 0)) {
133 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_OK",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_OK',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
134 if (!($result > 0)) {
137 $result =
dolibarr_set_const($db,
"ONLINE_PAYMENT_MESSAGE_KO",
GETPOST(
'ONLINE_PAYMENT_MESSAGE_KO',
'restricthtml'),
'chaine', 0,
'',
$conf->entity);
138 if (!($result > 0)) {
142 if (!($result > 0)) {
152 if (!($result > 0)) {
155 if (empty(
$conf->use_javascript_ajax)) {
156 $result =
dolibarr_set_const($db,
"PAYMENT_SECURITY_TOKEN_UNIQUE",
GETPOST(
'PAYMENT_SECURITY_TOKEN_UNIQUE',
'alpha'),
'chaine', 0,
'',
$conf->entity);
157 if (!($result > 0)) {
171if ($action ==
"setlive") {
187$form =
new Form($db);
190llxHeader(
'', $langs->trans(
"StripeSetup"));
192$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
197print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
198print
'<input type="hidden" name="token" value="'.newToken().
'">';
199print
'<input type="hidden" name="action" value="setvalue">';
203$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');
205print
'<span class="opacitymedium">'.$langs->trans(
"StripeDesc").
"</span><br>\n";
209print
'<div class="div-table-responsive-no-min">';
210print
'<table class="noborder centpercent">';
211print
'<tr class="liste_titre">';
212print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
213print
'<td>'.$langs->trans(
"Value").
'</td>';
217print
'<tr class="oddeven">';
219print $langs->trans(
"StripeLiveEnabled").
'</td><td>';
220if (
$conf->use_javascript_ajax) {
221 print ajax_constantonoff(
'STRIPE_LIVE');
223 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
224 print $form->selectarray(
"STRIPE_LIVE", $arrval,
$conf->global->STRIPE_LIVE);
226print
'</td><td></td></tr>';
228if (empty(
$conf->stripeconnect->enabled)) {
229 print
'<tr class="oddeven"><td>';
230 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_TEST_PUBLISHABLE_KEY").
'</span></td><td>';
231 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="' .
getDolGlobalString(
'STRIPE_TEST_PUBLISHABLE_KEY').
'" placeholder="'.$langs->trans(
"Example").
': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx">';
232 print
'</td><td></td></tr>';
234 print
'<tr class="oddeven"><td>';
235 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"STRIPE_TEST_SECRET_KEY").
'</span></td><td>';
236 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="' .
getDolGlobalString(
'STRIPE_TEST_SECRET_KEY').
'" placeholder="'.$langs->trans(
"Example").
': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx">';
237 print
'</td><td></td></tr>';
239 print
'<tr class="oddeven"><td>';
240 print
'<span class="titlefield">'.$langs->trans(
"STRIPE_TEST_WEBHOOK_KEY").
'</span></td><td>';
242 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_ID" value="'.getDolGlobalString(
'STRIPE_TEST_WEBHOOK_ID').
'" placeholder="'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx">';
245 print
'<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.getDolGlobalString(
'STRIPE_TEST_WEBHOOK_KEY').
'" placeholder="'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">';
246 $out =
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForTestWebhook").
'</span> ';
251 $out .=
'<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
259 \Stripe\Stripe::setApiKey(
$conf->global->STRIPE_TEST_SECRET_KEY);
260 $endpoint = \Stripe\WebhookEndpoint::retrieve(
$conf->global->STRIPE_TEST_WEBHOOK_ID);
261 $endpoint->enabled_events = $stripearrayofwebhookevents;
262 if (
GETPOST(
'webhook',
'alpha') ==
$conf->global->STRIPE_TEST_WEBHOOK_ID) {
263 if (!
GETPOST(
'status',
'alpha')) {
264 $endpoint->disabled =
true;
266 $endpoint->disabled =
false;
269 $endpoint->url = $url;
273 if ($endpoint->status ==
'enabled') {
274 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
275 print
img_picto($langs->trans(
"Activated"),
'switch_on');
277 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
278 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
281 print $e->getMessage();
284 print
'Bad value for the secret key. Reenter and save it again to fix this.';
287 print
img_picto($langs->trans(
"Inactive"),
'statut5');
292 print
'<tr class="oddeven"><td>'.$langs->trans(
"StripeConnect").
'</td>';
293 print
'<td><b>'.$langs->trans(
"StripeConnect_Mode").
'</b><br>';
294 print $langs->trans(
"STRIPE_APPLICATION_FEE_PLATFORM").
' ';
295 print
price(
$conf->global->STRIPE_APPLICATION_FEE_PERCENT);
297 print
price(
$conf->global->STRIPE_APPLICATION_FEE);
298 print
' '.$langs->getCurrencySymbol(
$conf->currency).
' '.$langs->trans(
"minimum").
' '.
price(
$conf->global->STRIPE_APPLICATION_FEE_MINIMAL).
' '.$langs->getCurrencySymbol(
$conf->currency);
299 print
'</td><td></td></tr>';
302if (empty(
$conf->stripeconnect->enabled)) {
303 print
'<tr class="oddeven"><td>';
304 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_PUBLISHABLE_KEY").
'</span></td><td>';
305 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_PUBLISHABLE_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_PUBLISHABLE_KEY').
'" placeholder="'.$langs->trans(
"Example").
': pk_live_xxxxxxxxxxxxxxxxxxxxxxxx">';
306 print
'</td><td></td></tr>';
308 print
'<tr class="oddeven"><td>';
309 print
'<span class="fieldrequired">'.$langs->trans(
"STRIPE_LIVE_SECRET_KEY").
'</span></td><td>';
310 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_SECRET_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_SECRET_KEY').
'" placeholder="'.$langs->trans(
"Example").
': sk_live_xxxxxxxxxxxxxxxxxxxxxxxx">';
311 print
'</td><td></td></tr>';
313 print
'<tr class="oddeven"><td>';
314 print
'<span class="titlefield">'.$langs->trans(
"STRIPE_LIVE_WEBHOOK_KEY").
'</span></td><td>';
316 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_ID" value="'.getDolGlobalString(
'STRIPE_LIVE_WEBHOOK_ID').
'" placeholder="'.$langs->trans(
"Example").
': we_xxxxxxxxxxxxxxxxxxxxxxxx">';
319 print
'<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.getDolGlobalString(
'STRIPE_LIVE_WEBHOOK_KEY').
'" placeholder="'.$langs->trans(
"Example").
': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">';
320 $out =
img_picto(
'',
'globe',
'class="pictofixedwidth"').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForLiveWebhook").
'</span> ';
324 $out .=
'<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.
'" disabled>';
332 \Stripe\Stripe::setApiKey(
$conf->global->STRIPE_LIVE_SECRET_KEY);
333 $endpoint = \Stripe\WebhookEndpoint::retrieve(
$conf->global->STRIPE_LIVE_WEBHOOK_ID);
334 $endpoint->enabled_events = $stripearrayofwebhookevents;
335 if (
GETPOST(
'webhook',
'alpha') ==
$conf->global->STRIPE_LIVE_WEBHOOK_ID) {
336 if (empty(
GETPOST(
'status',
'alpha'))) {
337 $endpoint->disabled =
true;
339 $endpoint->disabled =
false;
342 $endpoint->url = $url;
345 if ($endpoint->status ==
'enabled') {
346 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=0">';
347 print
img_picto($langs->trans(
"Activated"),
'switch_on');
349 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=ipn&webhook='.$endpoint->id.
'&status=1">';
350 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
353 print $e->getMessage();
357 print
img_picto($langs->trans(
"Inactive"),
'statut5');
369print
'<div class="div-table-responsive-no-min">';
370print
'<table class="noborder centpercent">';
371print
'<tr class="liste_titre">';
372print
'<td>'.$langs->trans(
"UsageParameter").
'</td>';
373print
'<td>'.$langs->trans(
"Value").
'</td>';
376print
'<tr class="oddeven"><td>';
377print $langs->trans(
"PublicVendorName").
'</td><td>';
378print
'<input class="minwidth300" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.getDolGlobalString(
'ONLINE_PAYMENT_CREDITOR').
'">';
379print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': '.$mysoc->name.
'</span>';
382print
'<tr class="oddeven"><td>';
383print $langs->trans(
"BankAccount").
'</td><td>';
384print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
385$form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'),
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0,
'', 1);
390print
'<tr class="oddeven"><td>';
391print $langs->trans(
"StripeAutoRecordPayout").
'</td><td>';
392if (
$conf->use_javascript_ajax) {
393 print ajax_constantonoff(
'STRIPE_AUTO_RECORD_PAYOUT', array(),
null, 0, 0, 1);
395 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
396 print $form->selectarray(
"STRIPE_AUTO_RECORD_PAYOUT", $arrval,
getDolGlobalInt(
'STRIPE_AUTO_RECORD_PAYOUT'));
401 print
'<tr class="oddeven"><td>';
402 print $langs->trans(
"StripeUserAccountForActions").
'</td><td>';
403 print
img_picto(
'',
'user',
'class="pictofixedwidth"').$form->select_dolusers(
getDolGlobalString(
'STRIPE_USER_ACCOUNT_FOR_ACTIONS'),
'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
406 print
'<tr class="oddeven"><td>';
407 print $langs->trans(
"BankAccountForBankTransfer").
'</td><td>';
408 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
409 $form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'),
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0,
'', 1);
415 print
'<tr class="oddeven"><td>';
416 print $langs->trans(
"STRIPE_CARD_PRESENT").
'</td><td>';
417 if (
$conf->use_javascript_ajax) {
418 print ajax_constantonoff(
'STRIPE_CARD_PRESENT');
420 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
421 print $form->selectarray(
"STRIPE_CARD_PRESENT", $arrval,
$conf->global->STRIPE_CARD_PRESENT);
428 print
'<tr class="oddeven"><td>';
429 print $langs->trans(
"TERMINAL_LOCATION").
'</td><td>';
430 $service =
'StripeTest';
433 $service =
'StripeLive';
438 global $stripearrayofkeysbyenv;
439 $site_account = $stripearrayofkeysbyenv[$servicestatus][
'secret_key'];
440 if (!empty($site_account)) {
441 \Stripe\Stripe::setApiKey($site_account);
444 $service =
'StripeTest';
445 $servicestatus =
'0';
446 dol_htmloutput_mesg($langs->trans(
'YouAreCurrentlyInSandboxMode',
'Stripe'), [],
'warning');
448 $service =
'StripeLive';
449 $servicestatus =
'1';
451 $stripe =
new Stripe($db);
452 if (!empty($site_account)) {
454 $stripeacc = $stripe->getStripeAccount($service);
456 $locations = \Stripe\Terminal\Location::all(
'', array(
"stripe_account" => $stripeacc));
458 $locations = \Stripe\Terminal\Location::all();
462 print $e->getMessage().
'<br>';
467 $location[
""] = $langs->trans(
"NotDefined");
468 if (!empty($locations)) {
469 foreach ($locations as $tmplocation) {
470 $location[$tmplocation->id] = $tmplocation->display_name;
474 print $form->selectarray(
"STRIPE_LOCATION", $location,
getDolGlobalString(
'STRIPE_LOCATION'));
478print
'<tr class="oddeven"><td>';
479print $langs->trans(
"STRIPE_SEPA_DIRECT_DEBIT").
'</td><td>';
480if (
$conf->use_javascript_ajax) {
481 print ajax_constantonoff(
'STRIPE_SEPA_DIRECT_DEBIT');
483 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
484 print $form->selectarray(
"STRIPE_SEPA_DIRECT_DEBIT", $arrval,
getDolGlobalString(
'STRIPE_SEPA_DIRECT_DEBIT'));
491 print
'<tr class="oddeven"><td>';
492 print $langs->trans(
"STRIPE_KLARNA").
'</td><td>';
493 if (
$conf->use_javascript_ajax) {
494 print ajax_constantonoff(
'STRIPE_KLARNA');
496 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
497 print $form->selectarray(
"STRIPE_KLARNA", $arrval,
$conf->global->STRIPE_KLARNA);
504 print
'<tr class="oddeven"><td>';
505 print $langs->trans(
"STRIPE_BANCONTACT").
'</td><td>';
506 if (
$conf->use_javascript_ajax) {
507 print ajax_constantonoff(
'STRIPE_BANCONTACT');
509 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
510 print $form->selectarray(
"STRIPE_BANCONTACT", $arrval,
$conf->global->STRIPE_BANCONTACT);
512 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForBECustomers").
'</span>';
518 print
'<tr class="oddeven"><td>';
519 print $langs->trans(
"STRIPE_IDEAL").
'</td><td>';
520 if (
$conf->use_javascript_ajax) {
521 print ajax_constantonoff(
'STRIPE_IDEAL');
523 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
524 print $form->selectarray(
"STRIPE_IDEAL", $arrval,
$conf->global->STRIPE_SEPA_DIRECT_DEBIT);
526 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForNLCustomers").
'</span>';
532 print
'<tr class="oddeven"><td>';
533 print $langs->trans(
"STRIPE_GIROPAY").
'</td><td>';
534 if (
$conf->use_javascript_ajax) {
535 print ajax_constantonoff(
'STRIPE_GIROPAY');
537 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
538 print $form->selectarray(
"STRIPE_GIROPAY", $arrval,
$conf->global->STRIPE_GIROPAY);
540 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForDECustomers").
'</span>';
546 print
'<tr class="oddeven"><td>';
547 print $langs->trans(
"STRIPE_SOFORT").
'</td><td>';
548 if (
$conf->use_javascript_ajax) {
549 print ajax_constantonoff(
'STRIPE_SOFORT');
551 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
552 print $form->selectarray(
"STRIPE_SOFORT", $arrval,
$conf->global->STRIPE_SOFORT);
554 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForATBEDEITNLESCustomers").
'</span>';
558print
'<tr class="oddeven"><td>';
559print $langs->trans(
"CSSUrlForPaymentForm").
'</td><td>';
560print
'<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'">';
561print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': http://mysite/mycss.css</span>';
564print
'<tr class="oddeven"><td>';
565print $langs->trans(
"MessageForm").
'</td><td>';
566$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_FORM',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_FORM"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
570print
'<tr class="oddeven"><td>';
571print $langs->trans(
"MessageOK").
'</td><td>';
572$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_OK',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_OK"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
576print
'<tr class="oddeven"><td>';
577print $langs->trans(
"MessageKO").
'</td><td>';
578$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_KO',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_KO"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
582print
'<tr class="oddeven"><td>';
583print $langs->trans(
"ONLINE_PAYMENT_SENDEMAIL").
'</td><td>';
584print
img_picto(
'',
'email',
'class="pictofixedwidth"');
585print
'<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_SENDEMAIL').
'">';
586print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
594print
'<div class="div-table-responsive-no-min">';
595print
'<table class="noborder centpercent">';
597print
'<tr class="liste_titre">';
598print
'<td>'.$langs->trans(
"UrlGenerationParameters").
'</td>';
599print
'<td>'.$langs->trans(
"Value").
'</td>';
603print
'<tr class="oddeven"><td>';
604print $langs->trans(
"SecurityToken").
'</td><td>';
605print
'<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="' .
getDolGlobalString(
'PAYMENT_SECURITY_TOKEN').
'">';
606if (!empty(
$conf->use_javascript_ajax)) {
607 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
610 $langs->load(
"errors");
611 print
img_warning($langs->trans(
"WarningTheHiddenOptionIsOn",
'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'),
'',
'pictowarning marginleftonly');
615print
'<tr class="oddeven"><td>';
616print $langs->trans(
"SecurityTokenIsUnique").
'</td><td>';
617if (
$conf->use_javascript_ajax) {
618 print ajax_constantonoff(
'PAYMENT_SECURITY_TOKEN_UNIQUE', array(),
null, 0, 0, 1);
620 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
621 print $form->selectarray(
"PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval,
$conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
630print $form->buttonsSaveCancel(
"Save",
'');
639include DOL_DOCUMENT_ROOT.
'/core/tpl/onlinepaymentlinks.tpl.php';
641print
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'));
644 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'));
649if (!empty(
$conf->use_javascript_ajax)) {
650 print
"\n".
'<script type="text/javascript">';
651 print
'$(document).ready(function () {
653 $("#apidoca").click(function() {
654 console.log("We click on apidoca show/hide");
656 $("#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 extends 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)
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.