PEEL Shopping
Open source ecommerce : PEEL Shopping
fonctions.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: fonctions.php 46935 2015-09-18 08:49:48Z gboussin $
14 
32 function getMoneyBookersForm($pay_to_email, $order_id, $lang, $user_id, $user_email, $amount, $currency, $user_firstname, $user_familyname, $user_address, $user_zip, $user_town, $user_country_name, $total_tva, $payment_methods)
33 {
34  $output = '';
35  if (!empty($_SESSION['session_moneybookers_try'])) {
36  $_SESSION['session_moneybookers_try']++;
37  } else {
38  $_SESSION['session_moneybookers_try'] = '1';
39  }
40  $tpl = $GLOBALS['tplEngine']->createTemplate('modules/moneybookers_form.tpl');
41  $tpl->assign('pay_to_email', $pay_to_email);
42  $tpl->assign('order_id', $order_id);
43  $tpl->assign('try', $_SESSION['session_moneybookers_try']);
44  $tpl->assign('return_url', get_url('/modules/moneybookers/ok.php'));
45  $tpl->assign('cancel_url', get_url('/modules/moneybookers/nok.php'));
46  $tpl->assign('status_url', get_url('/modules/moneybookers/ipn.php'));
47  $tpl->assign('lang', $lang);
48  $tpl->assign('user_id', $user_id);
49  $tpl->assign('user_email', $user_email);
50  $tpl->assign('STR_TOTAL_HT', $GLOBALS['STR_TOTAL_HT']);
51  $tpl->assign('amount2', round($amount - $total_tva, 2));
52  $tpl->assign('STR_TAXE', $GLOBALS['STR_TAXE']);
53  $tpl->assign('amount3', round($total_tva, 2));
54  $tpl->assign('amount', round($amount, 2));
55  $tpl->assign('currency', $currency);
56  $tpl->assign('firstname', $user_firstname);
57  $tpl->assign('lastname', $user_familyname);
58  $tpl->assign('address', $user_address);
59  $tpl->assign('postal_code', $user_zip);
60  $tpl->assign('city', $user_town);
61  $tpl->assign('country', get_country_iso_3_letter_code($user_country_name));
62  $tpl->assign('recipient_description', $GLOBALS['site']);
63  $tpl->assign('payment_methods', $payment_methods);
64  $tpl->assign('is_hide_login', strpos($payment_methods, 'WLT') === false);
65  $tpl->assign('STR_MODULE_MONEYBOOKERS_SUBMIT_BUTTON', $GLOBALS['STR_MODULE_MONEYBOOKERS_SUBMIT_BUTTON']);
66  $output .= $tpl->fetch();
67  return $output;
68 }
69 
70 function getErrorText($error_id)
71 {
72  $error_array = array('1' => 'Referred',
73  '2' => 'Invalid Merchant Number',
74  '3' => 'Pick-up card',
75  '4' => 'Authorisation Declined',
76  '5' => 'Other Error',
77  '6' => 'CVV is mandatory, but not set or invalid',
78  '7' => 'Approved authorisation, honour with identification',
79  '8' => 'Delayed Processing',
80  '9' => 'Invalid Transaction',
81  '10' => 'Invalid Currency',
82  '11' => 'Invalid Amount/Available Limit Exceeded/Amount too high',
83  '12' => 'Invalid credit card or bank account ',
84  '13' => 'Invalid Card Issuer',
85  '14' => 'Annulation by client',
86  '15' => 'Duplicate transaction',
87  '16' => 'Acquirer Error',
88  '17' => 'Reversal not processed, matching authorisation not found',
89  '18' => 'File Transfer not available/unsuccessful',
90  '19' => 'Reference number error',
91  '20' => 'Access Denied',
92  '21' => 'File Transfer failed',
93  '22' => 'Format Error',
94  '23' => 'Unknown Acquirer',
95  '24' => 'Card expired',
96  '25' => 'Fraud Suspicion',
97  '26' => 'Security code expired',
98  '27' => 'Requested function not available',
99  '28' => 'Lost/Stolen card',
100  '29' => 'Stolen card, Pick up',
101  '30' => 'Duplicate Authorisation',
102  '31' => 'Limit Exceeded',
103  '32' => 'Invalid Security Code',
104  '33' => 'Unknown or Invalid Card/Bank account',
105  '34' => 'Illegal Transaction',
106  '35' => 'Transaction Not Permitted',
107  '36' => 'Card blocked in local blacklist',
108  '37' => 'Restricted card/bank account',
109  '38' => 'Security Rules Violation',
110  '39' => 'The transaction amount of the referencing transaction is higher than the transaction amount of the original transaction',
111  '40' => 'Transaction frequency limit exceeded, override is possible',
112  '41' => 'Incorrect usage count in the Authorisation System exceeded',
113  '42' => 'Card blocked',
114  '43' => 'Rejected by Credit Card Issuer',
115  '44' => 'Card Issuing Bank or Network is not available',
116  '45' => 'The card type is not processed by the authorisation centre / Authorisation System has determined incorrect Routing',
117  '47' => 'Processing temporarily not possible',
118  '48' => 'Security Breach',
119  '49' => 'Date / time not plausible, trace-no. not increasing',
120  '50' => 'Error in PAC encryption detected',
121  '51' => 'System Error',
122  '52' => 'MB Denied - potential fraud',
123  '53' => 'Mobile verification failed',
124  '54' => 'Failed due to internal security restrictions',
125  '55' => 'Communication or verification problem',
126  '56' => '3D verification failed',
127  '57' => 'AVS check failed',
128  '58' => 'Invalid bank code',
129  '59' => 'Invalid account code',
130  '60' => 'Card not authorised',
131  '61' => 'No credit worthiness',
132  '62' => 'Communication error',
133  '63' => 'Transaction not allowed for cardholder',
134  '64' => 'Invalid Data in Request',
135  '65' => 'Blocked bank code',
136  '66' => 'CVV2/CVC2 Failure',
137  '99' => 'General error');
138  if (isset($error_array[$error_id])) {
139  return $error_array[$error_id];
140  } else {
141  return 'Erreur inconnue';
142  }
143 }
144 
$lang
Definition: spellchecker.php:9
get_country_iso_3_letter_code($country_id_or_name, $guess_if_not_found=true)
get_country_iso_3_letter_code()
Definition: format.php:375
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']
Definition: fonctions.php:19
getMoneyBookersForm($pay_to_email, $order_id, $lang, $user_id, $user_email, $amount, $currency, $user_firstname, $user_familyname, $user_address, $user_zip, $user_town, $user_country_name, $total_tva, $payment_methods)
getMoneyBookersForm()
Definition: fonctions.php:32
$currency
Definition: rpc.php:34
$total_tva
getErrorText($error_id)
Definition: fonctions.php:70
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:31:00 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.