19if (empty($conf) || !is_object($conf)) {
20 print
"Error, template page can't be called as URL";
24require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
26print
'<!-- BEGIN PHP TEMPLATE ONLINEPAYMENTLINKS -->';
29print
'<u>'.$langs->trans(
"FollowingUrlAreAvailableToMakePayments").
':</u><br><br>';
30print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).
':</span><br>';
31print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'free').
"</strong><br><br>\n";
33if (isModEnabled(
'commande')) {
34 print
'<div id="order"></div>';
35 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnOrder", $servicename).
':</span><br>';
36 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'order').
"</strong><br>\n";
38 $langs->load(
"orders");
39 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#order" method="POST">';
40 print
'<input type="hidden" name="token" value="'.newToken().
'">';
42 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Order")).
': ';
43 print
'<input type="text class="flat" id="generate_order_ref" name="generate_order_ref" value="'.GETPOST(
'generate_order_ref',
'alpha').
'" size="10">';
44 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
45 if (
GETPOST(
'generate_order_ref',
'alpha')) {
46 $url = getOnlinePaymentUrl(0,
'order',
GETPOST(
'generate_order_ref',
'alpha'));
47 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
49 print
'"></div>'.
"\n";
55if (isModEnabled(
'facture')) {
56 print
'<div id="invoice"></div>';
57 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnInvoice", $servicename).
':</span><br>';
58 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'invoice').
"</strong><br>\n";
60 $langs->load(
"bills");
61 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#invoice" method="POST">';
62 print
'<input type="hidden" name="token" value="'.newToken().
'">';
64 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Invoice")).
': ';
65 print
'<input type="text class="flat" id="generate_invoice_ref" name="generate_invoice_ref" value="'.GETPOST(
'generate_invoice_ref',
'alpha').
'" size="10">';
66 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
67 if (
GETPOST(
'generate_invoice_ref',
'alpha')) {
68 $url = getOnlinePaymentUrl(0,
'invoice',
GETPOST(
'generate_invoice_ref',
'alpha'));
69 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
71 print
'"></div>'.
"\n";
77if (isModEnabled(
'contrat')) {
78 print
'<div id="contractline"></div>';
79 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnContractLine", $servicename).
':</span><br>';
80 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'contractline').
"</strong><br>\n";
82 $langs->load(
"contracts");
83 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#contractline" method="POST">';
84 print
'<input type="hidden" name="token" value="'.newToken().
'">';
86 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"ContractLine")).
': ';
87 print
'<input type="text class="flat" id="generate_contract_ref" name="generate_contract_ref" value="'.GETPOST(
'generate_contract_ref',
'alpha').
'" size="10">';
88 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
89 if (
GETPOST(
'generate_contract_ref')) {
90 $url = getOnlinePaymentUrl(0,
'contractline',
GETPOST(
'generate_contract_ref',
'alpha'));
91 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
93 print
'"></div>'.
"\n";
99if (isModEnabled(
'adherent')) {
100 print
'<div id="membersubscription"></div>';
101 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).
':</span><br>';
102 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'membersubscription').
"</strong><br>\n";
104 $langs->load(
"members");
105 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#membersubscription" method="POST">';
106 print
'<input type="hidden" name="token" value="'.newToken().
'">';
108 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Member")).
': ';
109 print
'<input type="text class="flat" id="generate_member_ref" name="generate_member_ref" value="'.GETPOST(
'generate_member_ref',
'alpha').
'" size="10">';
110 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
111 if (
GETPOST(
'generate_member_ref')) {
112 $url = getOnlinePaymentUrl(0,
'membersubscription',
GETPOST(
'generate_member_ref',
'alpha'));
113 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
115 print
'"></div>'.
"\n";
121if (isModEnabled(
'don')) {
122 print
'<div id="donation"></div>';
123 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnDonation", $servicename).
':</span><br>';
124 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'donation').
"</strong><br>\n";
126 $langs->load(
"members");
127 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#donation" method="POST">';
128 print
'<input type="hidden" name="token" value="'.newToken().
'">';
130 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Don")).
': ';
131 print
'<input type="text class="flat" id="generate_donation_ref" name="generate_donation_ref" value="'.GETPOST(
'generate_donation_ref',
'alpha').
'" size="10">';
132 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
133 if (
GETPOST(
'generate_donation_ref')) {
134 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
135 $url = getOnlinePaymentUrl(0,
'donation',
GETPOST(
'generate_donation_ref',
'alpha'));
137 print
'"></div>'.
"\n";
144$constname =
'PAYMENT_SECURITY_TOKEN';
147include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
150print
info_admin($langs->trans(
"YouCanAddTagOnUrl"));
152print
'<!-- END PHP TEMPLATE ONLINEPAYMENTLINKS -->';
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Ouput javacript to autoset a generated password using default module into a HTML element.