Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
payment_gateway_sagepay_management.inc
1 <?php
17 require_once SQ_INCLUDE_PATH.'/asset_management.inc';
18 
30 {
31 
32 
38  {
39  $this->Asset_Management($pm);
40 
41  //include the SagePay_Processor class to get its supported card types. With this, we need only 1 place to change the list of supported card types and do not need to include this file in processing stage
42  require_once dirname(__FILE__).'/sagepay_processor.inc';
43  $supported_card_types = SagePay_Processor::getCardTypes();
44  $default_card_types = implode('|', array_keys($supported_card_types));
45 
46  $this->vars = Array(
47  'protocol' => Array(
48  'added' => '0.1',
49  'type' => 'text',
50  'default' => '2.23',
51  'description' => 'The Sage Pay Direct Protocol (2.23 is the version when this payment gateway is created)',
52  ),
53  'vendor' => Array(
54  'added' => '0.1',
55  'type' => 'text',
56  'default' => '',
57  'description' => 'Vendor Login Name that is used to authenticate your site',
58  ),
59  'timeout' => Array(
60  'added' => '0.1',
61  'type' => 'int',
62  'default' => '60',
63  'description' => 'How long to wait for a response, in seconds, before returning an error',
64  'parameters' => Array(
65  'allow_negative' => FALSE,
66  'allow_empty' => FALSE,
67  ),
68  ),
69  'currency' => Array(
70  'added' => '0.1',
71  'type' => 'selection',
72  'default' => 'GBP',
73  'description' => 'The currency used in all the e-commerce transactions',
74  'parameters' => Array(
75  'multiple' => FALSE,
76  'allow_empty' => FALSE,
77  'options' => Array(
78  'GBP' => 'GBP',
79  'AUD' => 'AUD',
80  'USD' => 'USD',
81  'EUR' => 'EUR',
82  'JPY' => 'JPY',
83  'CAD' => 'CAD',
84  ),
85  ),
86  ),
87  'description' => Array(
88  'added' => '0.1',
89  'type' => 'text',
90  'default' => 'The total amount',
91  'description' => 'The free text description of goods or services being purchased',
92  ),
93  'delivery_addr_is_billing_addr' => Array(
94  'added' => '0.1',
95  'type' => 'boolean',
96  'default' => FALSE,
97  'description' => 'The flag to indicate if delivery address is billing address',
98  'parameters' => Array(
99  'allow_empty' => FALSE,
100  ),
101  ),
102  'hide_delivery_addr' => Array(
103  'added' => '0.1',
104  'type' => 'boolean',
105  'default' => FALSE,
106  'description' => 'The flag to indicate if delivery address is hidden',
107  'parameters' => Array(
108  'allow_empty' => FALSE,
109  ),
110  ),
111  'supported_card_types' => Array(
112  'added' => '0.1',
113  'type' => 'selection',
114  'default' => $default_card_types,
115  'description' => 'The card types supported by this payment gateway',
116  'parameters' => Array(
117  'multiple' => TRUE,
118  'allow_empty' => FALSE,
119  'options' => $supported_card_types,
120  ),
121  ),
122  'threeds_enabled' => Array(
123  'added' => '0.1',
124  'type' => 'boolean',
125  'default' => TRUE,
126  'description' => 'The flag to enable 3-D Secure check for the transactions',
127  'parameters' => Array(
128  'allow_empty' => FALSE,
129  ),
130  ),
131  'avscv2_enabled' => Array(
132  'added' => '0.1',
133  'type' => 'boolean',
134  'default' => TRUE,
135  'description' => 'The flag to enable AVS/CV2 check for the transactions',
136  'parameters' => Array(
137  'allow_empty' => FALSE,
138  ),
139  ),
140  'giftaid_var_name' => Array(
141  'added' => '0.1',
142  'type' => 'text',
143  'default' => '',
144  'description' => 'The pass through variable name of Gift Aid',
145  ),
146  'firstname_var_name' => Array(
147  'added' => '0.1',
148  'type' => 'text',
149  'default' => '',
150  'description' => 'The pass through variable name of First Name',
151  ),
152  'surname_var_name' => Array(
153  'added' => '0.1',
154  'type' => 'text',
155  'default' => '',
156  'description' => 'The pass through variable name of Surname',
157  ),
158  'addr1_var_name' => Array(
159  'added' => '0.1',
160  'type' => 'text',
161  'default' => '',
162  'description' => 'The pass through variable name of Address 1',
163  ),
164  'addr2_var_name' => Array(
165  'added' => '0.1',
166  'type' => 'text',
167  'default' => '',
168  'description' => 'The pass through variable name of Address 2',
169  ),
170  'city_var_name' => Array(
171  'added' => '0.1',
172  'type' => 'text',
173  'default' => '',
174  'description' => 'The pass through variable name of City',
175  ),
176  'postcode_var_name' => Array(
177  'added' => '0.1',
178  'type' => 'text',
179  'default' => '',
180  'description' => 'The pass through variable name of Postcode',
181  ),
182  'country_var_name' => Array(
183  'added' => '0.1',
184  'type' => 'text',
185  'default' => '',
186  'description' => 'The pass through variable name of Country',
187  ),
188  'submit_text' => Array(
189  'added' => '0.1',
190  'type' => 'text',
191  'default' => ' Pay ',
192  'description' => 'Submit button text',
193  'is_contextable' => TRUE,
194  ),
195  'reset_text' => Array(
196  'added' => '0.1',
197  'type' => 'text',
198  'default' => 'Reset',
199  'description' => 'Reset button text',
200  'is_contextable' => TRUE,
201  ),
202  'cancel_text' => Array(
203  'added' => '0.1',
204  'type' => 'text',
205  'default' => 'Cancel',
206  'description' => 'Cancel button text',
207  'is_contextable' => TRUE,
208  ),
209  'run_mode' => Array(
210  'added' => '0.1',
211  'type' => 'selection',
212  'default' => 'Simulator',
213  'description' => 'The run mode of this Payment Gateway',
214  'parameters' => Array(
215  'multiple' => FALSE,
216  'allow_empty' => FALSE,
217  'options' => Array(
218  'Simulator' => 'Simulator',
219  'Test' => 'Test',
220  'Live' => 'Live',
221  ),
222  ),
223  ),
224  );
225 
226  }//end constructor
227 
228 
235  function _getFileList()
236  {
237  return Array(
238  'files/loader.js',
239  'files/loader.gif',
240  );
241 
242  }//end _getFileList()
243 
244 
251  function getEventList()
252  {
253  return Array(
254  Array(
255  'event_name' => 'requestKeywords',
256  'broadcast_type_code' => 'content_type',
257  'broadcast_strict_type_code' => FALSE,
258  'options' => Array(
259  'side_of_link' => 'major',
260  'indirect' => TRUE,
261  'is_exclusive' => NULL,
262  'is_dependant' => 1,
263  'value' => '',
264  'link_type' => SQ_LINK_TYPE_2,
265  ),
266  ),
267  );
268 
269  }//end getEventList()
270 
271 
272 }//end class
273 
274 ?>