14 if (!defined(
'PAYPAL_SANDBOX')) {
16 define(
'PAYPAL_SANDBOX', !empty(
$GLOBALS[
'site_parameters'][
'paypal_sandbox']));
46 function getPaypalForm($order_id,
$lang, $amount, $currency_code, $user_email, $payment_times = 1, $sTexteLibre =
'', $user_id, $prenom_ship, $nom_ship, $adresse_ship, $zip_ship, $ville_ship, $pays_ship, $telephone_ship, $prenom_bill = null, $nom_bill = null, $adresse_bill = null, $zip_bill = null, $ville_bill = null, $pays_bill = null, $telephone_bill = null)
49 $business =
vb(
$GLOBALS[
'site_parameters'][
'secured_merchant_id']);
50 if(!empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_iframe'])) {
51 $url =
'https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess';
53 $url =
'https://www.sandbox.paypal.com/cgi-bin/webscr';
56 $business =
vb(
$GLOBALS[
'site_parameters'][
'email_paypal']);
57 if (!empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_integral_evolution']) && empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_iframe'])) {
59 $url =
'https://securepayments.paypal.com/cgi-bin/acquiringweb';
60 }
elseif(!empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_integral_evolution']) && !empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_iframe'])) {
61 $url =
'https://securepayments.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess';
63 $url =
'https://www.paypal.com/cgi-bin/webscr';
70 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/paypal_form.tpl');
72 $tpl->assign(
'charset', GENERAL_ENCODING);
74 $tpl->assign(
'enable_paypal_integral_evolution', !empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_integral_evolution']));
76 $tpl->assign(
'enable_paypal_iframe', !empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_iframe']) && !empty(
$GLOBALS[
'site_parameters'][
'enable_paypal_integral_evolution']));
77 $tpl->assign(
'business', $business);
79 $tpl->assign(
'item_number', intval($order_id));
80 $tpl->assign(
'amount', round($amount, 2));
81 $tpl->assign(
'first_name', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $prenom_ship));
82 $tpl->assign(
'last_name', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $nom_ship));
83 $tpl->assign(
'address1',
String::substr(str_replace(array(
"\n",
"\r",
"\r\n"),
"", $adresse_ship), 0, 100));
84 $tpl->assign(
'address2',
String::substr(str_replace(array(
"\n",
"\r",
"\r\n"),
"", $adresse_ship), 100, 100));
85 $tpl->assign(
'zip', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $zip_ship));
86 $tpl->assign(
'city', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $ville_ship));
88 $tpl->assign(
'prenom_bill', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $prenom_bill));
89 $tpl->assign(
'nom_bill', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $nom_bill));
90 $tpl->assign(
'adresse1_bill',
String::substr(str_replace(array(
"\n",
"\r",
"\r\n"),
"", $adresse_bill), 0, 100));
91 $tpl->assign(
'adresse2_bill',
String::substr(str_replace(array(
"\n",
"\r",
"\r\n"),
"", $adresse_bill), 100, 100));
92 $tpl->assign(
'zip_bill', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $zip_bill));
93 $tpl->assign(
'ville_bill', str_replace(array(
"\n",
"\r",
"\r\n"),
"", $ville_bill));
95 $tpl->assign(
'return',
$GLOBALS[
'wwwroot'] .
'/modules/paypal/ok.php?id=' . $order_id);
96 $tpl->assign(
'cancel_return',
$GLOBALS[
'wwwroot'] .
'/modules/paypal/nok.php?id=' . $order_id);
97 $tpl->assign(
'notify_url', get_url(
'/modules/paypal/ipn.php'));
98 $tpl->assign(
'currency_code', $currency_code);
100 $tpl->assign(
'email', $user_email);
101 $tpl->assign(
'paypal_bouton_src',
$GLOBALS[
'STR_MODULE_PAYPAL_BOUTON']);
102 $tpl->assign(
'paypal_button_alt',
$GLOBALS[
'STR_MODULE_PAYPAL_BUTTON_ALT']);
103 $tpl->assign(
'additional_fields',
vb(
$GLOBALS[
'site_parameters'][
'paypal_additional_fields']));
105 $form =
$tpl->fetch();
static strtoupper($string)
Returns string with all alphabetic characters converted to uppercase.
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
if(!defined('IN_PEEL')) $GLOBALS['page_types_array']
if(!defined('PAYPAL_SANDBOX')) getPaypalForm($order_id, $lang, $amount, $currency_code, $user_email, $payment_times=1, $sTexteLibre= '', $user_id, $prenom_ship, $nom_ship, $adresse_ship, $zip_ship, $ville_ship, $pays_ship, $telephone_ship, $prenom_bill=null, $nom_bill=null, $adresse_bill=null, $zip_bill=null, $ville_bill=null, $pays_bill=null, $telephone_bill=null)
Génère le formulaire de paiement Paypal.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.