24 print
"Error, template page can't be called as URL";
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
30print
'<!-- BEGIN PHP TEMPLATE ONLINEPAYMENTLINKS -->';
33print
'<u>'.$langs->trans(
"FollowingUrlAreAvailableToMakePayments").
':</u><br><br>';
34print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).
':</span><br>';
35print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'free').
"</strong><br><br>\n";
37if (isModEnabled(
'order')) {
38 print
'<div id="order"></div>';
39 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnOrder", $servicename).
':</span><br>';
40 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'order').
"</strong><br>\n";
42 $langs->load(
"orders");
43 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#order" method="POST">';
44 print
'<input type="hidden" name="token" value="'.newToken().
'">';
46 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Order")).
': ';
47 print
'<input type="text class="flat" id="generate_order_ref" name="generate_order_ref" value="'.GETPOST(
'generate_order_ref',
'alpha').
'" size="10">';
48 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
49 if (
GETPOST(
'generate_order_ref',
'alpha')) {
50 $url = getOnlinePaymentUrl(0,
'order',
GETPOST(
'generate_order_ref',
'alpha'));
51 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
53 print
'"></div>'.
"\n";
59if (isModEnabled(
'invoice')) {
60 print
'<div id="invoice"></div>';
61 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnInvoice", $servicename).
':</span><br>';
62 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'invoice').
"</strong><br>\n";
64 $langs->load(
"bills");
65 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#invoice" method="POST">';
66 print
'<input type="hidden" name="token" value="'.newToken().
'">';
68 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Invoice")).
': ';
69 print
'<input type="text class="flat" id="generate_invoice_ref" name="generate_invoice_ref" value="'.GETPOST(
'generate_invoice_ref',
'alpha').
'" size="10">';
70 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
71 if (
GETPOST(
'generate_invoice_ref',
'alpha')) {
72 $url = getOnlinePaymentUrl(0,
'invoice',
GETPOST(
'generate_invoice_ref',
'alpha'));
73 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
75 print
'"></div>'.
"\n";
81if (isModEnabled(
'contract')) {
82 print
'<div id="contractline"></div>';
83 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnContractLine", $servicename).
':</span><br>';
84 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'contractline').
"</strong><br>\n";
86 $langs->load(
"contracts");
87 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#contractline" method="POST">';
88 print
'<input type="hidden" name="token" value="'.newToken().
'">';
90 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"ContractLine")).
': ';
91 print
'<input type="text class="flat" id="generate_contract_ref" name="generate_contract_ref" value="'.GETPOST(
'generate_contract_ref',
'alpha').
'" size="10">';
92 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
93 if (
GETPOST(
'generate_contract_ref')) {
94 $url = getOnlinePaymentUrl(0,
'contractline',
GETPOST(
'generate_contract_ref',
'alpha'));
95 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
97 print
'"></div>'.
"\n";
103if (isModEnabled(
'member')) {
104 print
'<div id="membersubscription"></div>';
105 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).
':</span><br>';
106 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'membersubscription').
"</strong><br>\n";
108 $langs->load(
"members");
109 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#membersubscription" method="POST">';
110 print
'<input type="hidden" name="token" value="'.newToken().
'">';
112 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Member")).
': ';
113 print
'<input type="text class="flat" id="generate_member_ref" name="generate_member_ref" value="'.GETPOST(
'generate_member_ref',
'alpha').
'" size="10">';
114 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
115 if (
GETPOST(
'generate_member_ref')) {
116 $url = getOnlinePaymentUrl(0,
'membersubscription',
GETPOST(
'generate_member_ref',
'alpha'));
117 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
119 print
'"></div>'.
"\n";
125if (isModEnabled(
'don')) {
126 print
'<div id="donation"></div>';
127 print
img_picto(
'',
'globe').
' <span class="opacitymedium">'.$langs->trans(
"ToOfferALinkForOnlinePaymentOnDonation", $servicename).
':</span><br>';
128 print
'<strong class="wordbreak">'.getOnlinePaymentUrl(1,
'donation').
"</strong><br>\n";
130 $langs->load(
"members");
131 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#donation" method="POST">';
132 print
'<input type="hidden" name="token" value="'.newToken().
'">';
134 print $langs->trans(
"EnterRefToBuildUrl", $langs->transnoentitiesnoconv(
"Don")).
': ';
135 print
'<input type="text class="flat" id="generate_donation_ref" name="generate_donation_ref" value="'.GETPOST(
'generate_donation_ref',
'alpha').
'" size="10">';
136 print
'<input type="submit" class="none reposition button smallpaddingimp" value="'.$langs->trans(
"GetSecuredUrl").
'">';
137 if (
GETPOST(
'generate_donation_ref')) {
138 print
'<div class="urllink"><input type="text" class="wordbreak quatrevingtpercent" value="';
139 $url = getOnlinePaymentUrl(0,
'donation',
GETPOST(
'generate_donation_ref',
'alpha'));
141 print
'"></div>'.
"\n";
148$constname =
'PAYMENT_SECURITY_TOKEN';
151include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
154print
info_admin($langs->trans(
"YouCanAddTagOnUrl"));
156if (isModEnabled(
'website')) {
157 print
info_admin($langs->trans(
"YouCanEmbedOnWebsite"));
160print
'<!-- END PHP TEMPLATE ONLINEPAYMENTLINKS -->';
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $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.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Output javascript to autoset a generated password using default module into a HTML element.