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(
"StripeUserAccountForActions").
'</td><td>';
384print
img_picto(
'',
'user',
'class="pictofixedwidth"').$form->select_dolusers(
getDolGlobalString(
'STRIPE_USER_ACCOUNT_FOR_ACTIONS'),
'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
387print
'<tr class="oddeven"><td>';
388print $langs->trans(
"BankAccount").
'</td><td>';
389print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
390$form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'),
'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0,
'', 1);
394 print
'<tr class="oddeven"><td>';
395 print $langs->trans(
"BankAccountForBankTransfer").
'</td><td>';
396 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
397 $form->select_comptes(
getDolGlobalString(
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS'),
'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0,
'', 1);
403 print
'<tr class="oddeven"><td>';
404 print $langs->trans(
"STRIPE_CARD_PRESENT").
'</td><td>';
405 if (
$conf->use_javascript_ajax) {
406 print ajax_constantonoff(
'STRIPE_CARD_PRESENT');
408 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
409 print $form->selectarray(
"STRIPE_CARD_PRESENT", $arrval,
$conf->global->STRIPE_CARD_PRESENT);
416 print
'<tr class="oddeven"><td>';
417 print $langs->trans(
"TERMINAL_LOCATION").
'</td><td>';
418 $service =
'StripeTest';
421 $service =
'StripeLive';
426 global $stripearrayofkeysbyenv;
427 $site_account = $stripearrayofkeysbyenv[$servicestatus][
'secret_key'];
428 if (!empty($site_account)) {
429 \Stripe\Stripe::setApiKey($site_account);
432 $service =
'StripeTest';
433 $servicestatus =
'0';
434 dol_htmloutput_mesg($langs->trans(
'YouAreCurrentlyInSandboxMode',
'Stripe'), [],
'warning');
436 $service =
'StripeLive';
437 $servicestatus =
'1';
439 $stripe =
new Stripe($db);
440 if (!empty($site_account)) {
442 $stripeacc = $stripe->getStripeAccount($service);
444 $locations = \Stripe\Terminal\Location::all(
'', array(
"stripe_account" => $stripeacc));
446 $locations = \Stripe\Terminal\Location::all();
450 print $e->getMessage().
'<br>';
455 $location[
""] = $langs->trans(
"NotDefined");
456 if (!empty($locations)) {
457 foreach ($locations as $tmplocation) {
458 $location[$tmplocation->id] = $tmplocation->display_name;
462 print $form->selectarray(
"STRIPE_LOCATION", $location,
getDolGlobalString(
'STRIPE_LOCATION'));
466print
'<tr class="oddeven"><td>';
467print $langs->trans(
"STRIPE_SEPA_DIRECT_DEBIT").
'</td><td>';
468if (
$conf->use_javascript_ajax) {
469 print ajax_constantonoff(
'STRIPE_SEPA_DIRECT_DEBIT');
471 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
472 print $form->selectarray(
"STRIPE_SEPA_DIRECT_DEBIT", $arrval,
getDolGlobalString(
'STRIPE_SEPA_DIRECT_DEBIT'));
479 print
'<tr class="oddeven"><td>';
480 print $langs->trans(
"STRIPE_KLARNA").
'</td><td>';
481 if (
$conf->use_javascript_ajax) {
482 print ajax_constantonoff(
'STRIPE_KLARNA');
484 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
485 print $form->selectarray(
"STRIPE_KLARNA", $arrval,
$conf->global->STRIPE_KLARNA);
492 print
'<tr class="oddeven"><td>';
493 print $langs->trans(
"STRIPE_BANCONTACT").
'</td><td>';
494 if (
$conf->use_javascript_ajax) {
495 print ajax_constantonoff(
'STRIPE_BANCONTACT');
497 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
498 print $form->selectarray(
"STRIPE_BANCONTACT", $arrval,
$conf->global->STRIPE_BANCONTACT);
500 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForBECustomers").
'</span>';
506 print
'<tr class="oddeven"><td>';
507 print $langs->trans(
"STRIPE_IDEAL").
'</td><td>';
508 if (
$conf->use_javascript_ajax) {
509 print ajax_constantonoff(
'STRIPE_IDEAL');
511 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
512 print $form->selectarray(
"STRIPE_IDEAL", $arrval,
$conf->global->STRIPE_SEPA_DIRECT_DEBIT);
514 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForNLCustomers").
'</span>';
520 print
'<tr class="oddeven"><td>';
521 print $langs->trans(
"STRIPE_GIROPAY").
'</td><td>';
522 if (
$conf->use_javascript_ajax) {
523 print ajax_constantonoff(
'STRIPE_GIROPAY');
525 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
526 print $form->selectarray(
"STRIPE_GIROPAY", $arrval,
$conf->global->STRIPE_GIROPAY);
528 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForDECustomers").
'</span>';
534 print
'<tr class="oddeven"><td>';
535 print $langs->trans(
"STRIPE_SOFORT").
'</td><td>';
536 if (
$conf->use_javascript_ajax) {
537 print ajax_constantonoff(
'STRIPE_SOFORT');
539 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
540 print $form->selectarray(
"STRIPE_SOFORT", $arrval,
$conf->global->STRIPE_SOFORT);
542 print
' <span class="opacitymedium">'.$langs->trans(
"ExampleOnlyForATBEDEITNLESCustomers").
'</span>';
546print
'<tr class="oddeven"><td>';
547print $langs->trans(
"CSSUrlForPaymentForm").
'</td><td>';
548print
'<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'">';
549print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': http://mysite/mycss.css</span>';
552print
'<tr class="oddeven"><td>';
553print $langs->trans(
"MessageForm").
'</td><td>';
554$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_FORM',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_FORM"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
558print
'<tr class="oddeven"><td>';
559print $langs->trans(
"MessageOK").
'</td><td>';
560$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_OK',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_OK"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
564print
'<tr class="oddeven"><td>';
565print $langs->trans(
"MessageKO").
'</td><td>';
566$doleditor =
new DolEditor(
'ONLINE_PAYMENT_MESSAGE_KO',
getDolGlobalString(
"ONLINE_PAYMENT_MESSAGE_KO"),
'', 100,
'dolibarr_details',
'In',
false,
true,
true, ROWS_2,
'90%');
570print
'<tr class="oddeven"><td>';
571print $langs->trans(
"ONLINE_PAYMENT_SENDEMAIL").
'</td><td>';
572print
img_picto(
'',
'email',
'class="pictofixedwidth"');
573print
'<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="' .
getDolGlobalString(
'ONLINE_PAYMENT_SENDEMAIL').
'">';
574print
' <span class="opacitymedium">'.$langs->trans(
"Example").
': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
582print
'<div class="div-table-responsive-no-min">';
583print
'<table class="noborder centpercent">';
585print
'<tr class="liste_titre">';
586print
'<td>'.$langs->trans(
"UrlGenerationParameters").
'</td>';
587print
'<td>'.$langs->trans(
"Value").
'</td>';
591print
'<tr class="oddeven"><td>';
592print $langs->trans(
"SecurityToken").
'</td><td>';
593print
'<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="' .
getDolGlobalString(
'PAYMENT_SECURITY_TOKEN').
'">';
594if (!empty(
$conf->use_javascript_ajax)) {
595 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token" class="linkobject"');
598 $langs->load(
"errors");
599 print
img_warning($langs->trans(
"WarningTheHiddenOptionIsOn",
'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'),
'',
'pictowarning marginleftonly');
603print
'<tr class="oddeven"><td>';
604print $langs->trans(
"SecurityTokenIsUnique").
'</td><td>';
605if (
$conf->use_javascript_ajax) {
606 print ajax_constantonoff(
'PAYMENT_SECURITY_TOKEN_UNIQUE', array(),
null, 0, 0, 1);
608 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
609 print $form->selectarray(
"PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval,
$conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
618print $form->buttonsSaveCancel(
"Save",
'');
627include DOL_DOCUMENT_ROOT.
'/core/tpl/onlinepaymentlinks.tpl.php';
629print
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'));
632 print
info_admin($langs->trans(
"ExampleOfTestBankAcountForSEPA",
'AT611904300234573201 (pending->succeed) or AT861904300235473202 (pending->failed)'));
637if (!empty(
$conf->use_javascript_ajax)) {
638 print
"\n".
'<script type="text/javascript">';
639 print
'$(document).ready(function () {
641 $("#apidoca").click(function() {
642 console.log("We click on apidoca show/hide");
644 $("#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).
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_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.