VirtualPayer_FdmsEMEAconnect - Version 1.0.0

Version Notes

Free and fully tested First Data Merchant Solutions Hosted Payment Page module.

Download this release

Release Info

Developer VirtualPayer
Extension VirtualPayer_FdmsEMEAconnect
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (30) hide show
  1. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect.php +12 -0
  2. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect/Grid.php +115 -0
  3. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Error.php +29 -0
  4. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Form.php +27 -0
  5. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Redirect.php +279 -0
  6. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Success.php +30 -0
  7. app/code/local/VirtualPayer/FdmsEMEAconnect/Helper/Data.php +56 -0
  8. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/FdmsEMEAconnect.php +10 -0
  9. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect.php +9 -0
  10. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect/Collection.php +10 -0
  11. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Redirect.php +284 -0
  12. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Setup.php +38 -0
  13. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/Cctype.php +23 -0
  14. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/Currency.php +34 -0
  15. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/OrderStatus.php +27 -0
  16. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentAction.php +34 -0
  17. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentMode.php +30 -0
  18. app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/Adminhtml/FdmsEMEAconnectController.php +271 -0
  19. app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/RedirectController.php +131 -0
  20. app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/ResponseController.php +65 -0
  21. app/code/local/VirtualPayer/FdmsEMEAconnect/etc/config.xml +172 -0
  22. app/code/local/VirtualPayer/FdmsEMEAconnect/etc/system.xml +143 -0
  23. app/code/local/VirtualPayer/FdmsEMEAconnect/sql/fdmsemeaconnect_setup/mysql4-install-0.1.0.php +41 -0
  24. app/design/adminhtml/default/default/layout/fdmsemeaconnect.xml +8 -0
  25. app/design/frontend/base/default/layout/fdmsemeaconnect.xml +21 -0
  26. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/failure.phtml +9 -0
  27. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/form.phtml +13 -0
  28. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/success.phtml +9 -0
  29. app/etc/modules/VirtualPayer_FdmsEMEAconnect.xml +29 -0
  30. package.xml +18 -0
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_fdmsemeaconnect';
7
+ $this->_blockGroup = 'fdmsemeaconnect';
8
+ $this->_headerText = Mage::helper('fdmsemeaconnect')->__('First Data Merchant Solution Transactions');
9
+ parent::__construct();
10
+ $this->_removeButton('add');
11
+ }
12
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect/Grid.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('fdmsconnectGrid');
9
+ $this->setDefaultSort('timestamp');
10
+ $this->setDefaultDir('DESC');
11
+ $this->setSaveParametersInSession(true);
12
+ }
13
+
14
+ protected function _prepareCollection()
15
+ {
16
+ $collection = Mage::getModel('fdsmemeaconnect/fdsmemeaconnect')->getCollection();
17
+ $this->setCollection($collection);
18
+ return parent::_prepareCollection();
19
+ }
20
+
21
+ /**
22
+ * Return Current work store
23
+ *
24
+ * @return Mage_Core_Model_Store
25
+ */
26
+ protected function _getStore()
27
+ {
28
+ return Mage::app()->getStore();
29
+ }
30
+
31
+ protected function _prepareColumns()
32
+ {
33
+
34
+ $this->addColumn('order_id', array(
35
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Order ID'),
36
+ 'index' => 'order_id',
37
+ ));
38
+
39
+ $this->addColumn('timestamp', array(
40
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Timestamp'),
41
+ 'type' => 'datetime',
42
+ 'index' => 'timestamp',
43
+ ));
44
+
45
+
46
+ $this->addColumn('oid', array(
47
+ 'header' => Mage::helper('fdsmemeaconnect')->__('fdsmemeaconnect Order ID'),
48
+ 'index' => 'oid',
49
+ ));
50
+
51
+ $this->addColumn('status', array(
52
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Status'),
53
+ 'index' => 'status',
54
+ 'width' => '50px',
55
+
56
+ ));
57
+
58
+ $this->addColumn('fail_reason', array(
59
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Fail Reason'),
60
+ 'index' => 'fail_reason',
61
+ ));
62
+
63
+ $this->addColumn('cardnumber', array(
64
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Card Number'),
65
+ 'index' => 'cardnumber',
66
+ ));
67
+
68
+ $this->addColumn('currency', array(
69
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Currency'),
70
+ 'index' => 'currency',
71
+ 'width' => '50px',
72
+ ));
73
+
74
+ $this->addColumn('refnumber', array(
75
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Referance Number'),
76
+ 'index' => 'refnumber',
77
+ ));
78
+
79
+ $this->addColumn('chargetotal', array(
80
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Amount'),
81
+ 'index' => 'chargetotal',
82
+ ));
83
+
84
+ $this->addColumn('paymentMethod', array(
85
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Payment Method'),
86
+ 'index' => 'paymentMethod',
87
+ ));
88
+
89
+ $this->addColumn('processor_response_code', array(
90
+ 'header' => Mage::helper('fdsmemeaconnect')->__('Response Code'),
91
+ 'index' => 'processor_response_code',
92
+ ));
93
+
94
+
95
+
96
+ $this->addExportType('*/*/exportCsv', Mage::helper('fdsmemeaconnect')->__('CSV'));
97
+ $this->addExportType('*/*/exportXml', Mage::helper('fdsmemeaconnect')->__('XML'));
98
+
99
+ return parent::_prepareColumns();
100
+ }
101
+
102
+ protected function _prepareMassaction()
103
+ {
104
+ $this->setMassactionIdField('fdsmemeaconnect_id');
105
+ $this->getMassactionBlock()->setFormFieldName('fdsmemeaconnect');
106
+
107
+ return $this;
108
+ }
109
+
110
+ public function getRowUrl($row)
111
+ {
112
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
113
+ }
114
+
115
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Error.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Error extends Mage_Core_Block_Abstract
18
+ {
19
+ /**
20
+ * @return string
21
+ */
22
+ protected function _toHtml()
23
+ {
24
+ $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsemeaconnect/redirect/failure' . '"</script>';
25
+ return $html;
26
+ }
27
+ }
28
+
29
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Form.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Form extends Mage_Payment_Block_Form
18
+ {
19
+ /**
20
+ * @return void
21
+ */
22
+ protected function _construct()
23
+ {
24
+ $this->setTemplate('fdmsemeaconnect/redirect/form.phtml');
25
+ parent::_construct();
26
+ }
27
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Redirect.php ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Block_Abstract
18
+ {
19
+ /**
20
+ * @return string
21
+ */
22
+ protected function _toHtml()
23
+ {
24
+ $currency_map = array (
25
+ 'ADP' => 20,
26
+ 'AED' => 784,
27
+ 'AFN' => 971,
28
+ 'ALL' => 8,
29
+ 'AMD' => 51,
30
+ 'ANG' => 532,
31
+ 'AOA' => 973,
32
+ 'ARS' => 32,
33
+ 'ATS' => 40,
34
+ 'AUD' => 36,
35
+ 'AWG' => 533,
36
+ 'AZN' => 31,
37
+ 'BAM' => 977,
38
+ 'BBD' => 52,
39
+ 'BDT' => 50,
40
+ 'BEF' => 56,
41
+ 'BGL' => 100,
42
+ 'BGN' => 975,
43
+ 'BHD' => 48,
44
+ 'BIF' => 108,
45
+ 'BMD' => 60,
46
+ 'BND' => 96,
47
+ 'BOB' => 68,
48
+ 'BOV' => 984,
49
+ 'BRL' => 986,
50
+ 'BSD' => 44,
51
+ 'BTN' => 64,
52
+ 'BWP' => 72,
53
+ 'BYR' => 974,
54
+ 'BZD' => 84,
55
+ 'CAD' => 124,
56
+ 'CDF' => 976,
57
+ 'CHF' => 756,
58
+ 'CLF' => 990,
59
+ 'CLP' => 152,
60
+ 'CNY' => 156,
61
+ 'COP' => 170,
62
+ 'CRC' => 188,
63
+ 'CSD' => 891,
64
+ 'CUP' => 192,
65
+ 'CVE' => 132,
66
+ 'CZK' => 203,
67
+ 'DEM' => 280,
68
+ 'DJF' => 262,
69
+ 'DKK' => 208,
70
+ 'DOP' => 214,
71
+ 'DZD' => 12,
72
+ 'EEK' => 233,
73
+ 'EGP' => 818,
74
+ 'ERN' => 232,
75
+ 'ESP' => 724,
76
+ 'ETB' => 230,
77
+ 'EUR' => 978,
78
+ 'FIM' => 246,
79
+ 'FJD' => 242,
80
+ 'FKP' => 238,
81
+ 'FRF' => 250,
82
+ 'GBP' => 826,
83
+ 'GEL' => 981,
84
+ 'GHC' => 288,
85
+ 'GIP' => 292,
86
+ 'GMD' => 270,
87
+ 'GNF' => 324,
88
+ 'GRD' => 300,
89
+ 'GTQ' => 320,
90
+ 'GWP' => 624,
91
+ 'GYD' => 328,
92
+ 'HKD' => 344,
93
+ 'HNL' => 340,
94
+ 'HRK' => 191,
95
+ 'HTG' => 332,
96
+ 'HUF' => 348,
97
+ 'IDR' => 360,
98
+ 'IEP' => 372,
99
+ 'ILS' => 376,
100
+ 'INR' => 356,
101
+ 'IQD' => 368,
102
+ 'IRR' => 364,
103
+ 'ISK' => 352,
104
+ 'ITL' => 380,
105
+ 'JMD' => 388,
106
+ 'JOD' => 400,
107
+ 'JPY' => 392,
108
+ 'KES' => 404,
109
+ 'KGS' => 417,
110
+ 'KHR' => 116,
111
+ 'KMF' => 174,
112
+ 'KPW' => 408,
113
+ 'KRW' => 410,
114
+ 'KWD' => 414,
115
+ 'KYD' => 136,
116
+ 'KZT' => 398,
117
+ 'LAK' => 418,
118
+ 'LBP' => 422,
119
+ 'LKR' => 144,
120
+ 'LRD' => 430,
121
+ 'LTL' => 440,
122
+ 'LUF' => 442,
123
+ 'LVL' => 428,
124
+ 'LYD' => 434,
125
+ 'MAD' => 504,
126
+ 'MDL' => 498,
127
+ 'MGF' => 450,
128
+ 'MKD' => 807,
129
+ 'MMK' => 104,
130
+ 'MNT' => 496,
131
+ 'MOP' => 446,
132
+ 'MRO' => 478,
133
+ 'MTL' => 470,
134
+ 'MUR' => 480,
135
+ 'MVR' => 462,
136
+ 'MWK' => 454,
137
+ 'MXN' => 484,
138
+ 'MXV' => 979,
139
+ 'MYR' => 458,
140
+ 'MZM' => 508,
141
+ 'NAD' => 516,
142
+ 'NGN' => 566,
143
+ 'NIO' => 558,
144
+ 'NLG' => 528,
145
+ 'NOK' => 578,
146
+ 'NPR' => 524,
147
+ 'NZD' => 554,
148
+ 'OMR' => 512,
149
+ 'PAB' => 590,
150
+ 'PEN' => 604,
151
+ 'PGK' => 598,
152
+ 'PHP' => 608,
153
+ 'PKR' => 586,
154
+ 'PLN' => 985,
155
+ 'PTE' => 620,
156
+ 'PYG' => 600,
157
+ 'QAR' => 634,
158
+ 'ROL' => 642,
159
+ 'RUB' => 643,
160
+ 'RUR' => 810,
161
+ 'RWF' => 646,
162
+ 'SAR' => 682,
163
+ 'SBD' => 90,
164
+ 'SCR' => 690,
165
+ 'SDD' => 736,
166
+ 'SDG' => 938,
167
+ 'SEK' => 752,
168
+ 'SGD' => 702,
169
+ 'SHP' => 654,
170
+ 'SIT' => 705,
171
+ 'SKK' => 703,
172
+ 'SLL' => 694,
173
+ 'SOS' => 706,
174
+ 'SRG' => 740,
175
+ 'STD' => 678,
176
+ 'SVC' => 222,
177
+ 'SYP' => 760,
178
+ 'SZL' => 748,
179
+ 'THB' => 764,
180
+ 'TJS' => 972,
181
+ 'TMM' => 795,
182
+ 'TND' => 788,
183
+ 'TOP' => 776,
184
+ 'TRY' => 949,
185
+ 'TTD' => 780,
186
+ 'TWD' => 901,
187
+ 'TZS' => 834,
188
+ 'UAH' => 980,
189
+ 'UGX' => 800,
190
+ 'USD' => 840,
191
+ 'USN' => 997,
192
+ 'USS' => 998,
193
+ 'UYU' => 858,
194
+ 'UZS' => 860,
195
+ 'VEB' => 862,
196
+ 'VEF' => 937,
197
+ 'VND' => 704,
198
+ 'VUV' => 548,
199
+ 'WST' => 882,
200
+ 'XAF' => 950,
201
+ 'XCD' => 951,
202
+ 'XOF' => 952,
203
+ 'XPF' => 953,
204
+ 'YER' => 886,
205
+ 'ZAR' => 710,
206
+ 'ZMK' => 894,
207
+ 'ZWD' => 716
208
+ );
209
+
210
+ $timestamp = $orderid = $currency = $sha1hash = '';
211
+
212
+
213
+ $redirect = Mage::getModel('fdmsemeaconnect/redirect');
214
+
215
+ $dateTime = date("Y:m:d-H:i:s");
216
+ $timestamp = strftime("%Y%m%d%H%M%S");
217
+
218
+ $gateway= $redirect->getFdmsConnectUrl();
219
+ if($redirect->getConfigData('test'))
220
+ $gateway = $redirect->getFdmsConnectTestUrl();
221
+
222
+ $form = new Varien_Data_Form();
223
+ $form->setAction($gateway)
224
+ ->setId('fdmsemeaconnect_redirect_checkout')
225
+ ->setName('fdmsemeaconnect_redirect_checkout')
226
+ ->setMethod('POST')
227
+ ->setUseContainer(true);
228
+
229
+
230
+ $orderid = $redirect->getCheckout()->getLastRealOrderId();
231
+ $order = Mage::getModel('sales/order');
232
+ $order->loadByIncrementId($orderid);
233
+
234
+ if($redirect->getConfigData('currency') == 'display'){
235
+ $currency = $redirect->getQuote()->getStore()->getCurrentCurrency();
236
+ $amount = $order->getGrandTotal();
237
+ }else{
238
+ $currency = $order->getBaseCurrencyCode();
239
+ $amount = $order->getBaseGrandTotal();
240
+ }
241
+ $currency=$currency_map[$currency];
242
+
243
+ $storeid = $redirect->getConfigData('storeid');
244
+ $secret = $redirect->getConfigData('sharedsecret');
245
+
246
+
247
+ $stringToHash = $storeid . $dateTime . $amount . $currency . $secret;
248
+ $ascii = bin2hex($stringToHash);
249
+ $sha1hash = sha1($ascii);
250
+
251
+
252
+ $form->addField('txntype', 'hidden', array('name'=>'txntype', 'value'=>'sale'));
253
+ $form->addField('oid', 'hidden', array('name'=>'oid', 'value'=>$orderid));
254
+ $form->addField('timezone', 'hidden', array('name'=>'timezone', 'value'=>date(T)));
255
+ $form->addField('txndatetime', 'hidden', array('name'=>'txndatetime', 'value'=>$dateTime));
256
+ $form->addField('hash', 'hidden', array('name'=>'hash', 'value'=>$sha1hash));
257
+ $form->addField('storename', 'hidden', array('name'=>'storename', 'value'=>$storeid));
258
+ $form->addField('mode', 'hidden', array('name'=>'mode', 'value'=>'payonly'));
259
+ $form->addField('responseSuccessURL', 'hidden', array('name'=>'responseSuccessURL', 'value'=>$redirect->getSuccessUrl()));
260
+ $form->addField('responseFailURL', 'hidden', array('name'=>'responseFailURL', 'value'=>$redirect->getCancelUrl()));
261
+ $form->addField('chargetotal', 'hidden', array('name'=>'chargetotal', 'value'=>$amount));
262
+ $form->addField('currency', 'hidden', array('name'=>'currency', 'value'=>$currency));
263
+
264
+ $html = '<html><body>';
265
+ $html.= Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_redirect')->toHtml();
266
+ $html.= $form->toHtml();
267
+ $html.= '<script type="text/javascript">document.getElementById("fdmsemeaconnect_redirect_checkout").submit();</script>';
268
+ $html.= '</body></html>';
269
+
270
+
271
+
272
+
273
+ if($redirect->getConfigData('debug')){
274
+ Mage::log($html);
275
+ }
276
+
277
+ return $html;
278
+ }
279
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Redirect/Success.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Success extends Mage_Core_Block_Abstract
18
+ {
19
+ /**
20
+ * @return string
21
+ */
22
+ protected function _toHtml()
23
+ {
24
+ $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsemeaconnect/redirect/success' . '"</script>';
25
+
26
+ return $html;
27
+ }
28
+ }
29
+
30
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/Helper/Data.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Helper_Data extends Mage_Core_Helper_Abstract
18
+ {
19
+
20
+ /**
21
+ * @param $orderIncrementId
22
+ * @return string
23
+ */
24
+ public function createInvoice(string $orderIncrementId){
25
+ $_order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
26
+
27
+ if($_order->canInvoice()) {
28
+ $invoiceId = Mage::getModel('sales/order_invoice_api')->create($_order->getIncrementId(), array(), 'Invoice Created', true, true);
29
+
30
+ $invoice = Mage::getModel('sales/order_invoice_api')->capture($invoiceId);
31
+ }
32
+ }
33
+
34
+ public function getDateFromTimestamp($timestamp){
35
+ $year = substr($timestamp, 0, 4);
36
+ $month = substr($timestamp, 4, 2);
37
+ $day = substr($timestamp, 6, 2);
38
+ $hour = substr($timestamp, 8, 2);
39
+ $minutes = substr($timestamp, 10, 2);
40
+ $seconds = substr($timestamp, 12, 2);
41
+ $date = $year . '-' . $month . '-' . $day . ' ' . $hour . ':' . $minutes . ':' . $seconds;
42
+ Mage::log($date);
43
+ return strtotime($date);
44
+ }
45
+
46
+ public function getCustomerMessage($block, $order, $response){
47
+ $variables = array();
48
+ $variables['order'] = $order;
49
+ $variables['response'] = $response;
50
+ $filter = Mage::getModel('core/email_template_filter');
51
+ $filter->setVariables($variables);
52
+ return $filter->filter($block->toHtml());
53
+ }
54
+ }
55
+
56
+
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/FdmsEMEAconnect.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Model_FdmsEMEAconnect extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('fdmsemeaconnect/fdmsemeaconnect');
9
+ }
10
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Model_Mysql4_FdmsEMEAconnect extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ $this->_init('fdmsemeaconnect/fdmsemeaconnect', 'fdmsemeaconnect_id');
8
+ }
9
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Model_Mysql4_FdmsEMEAconnect_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('fdmsemeaconnect/fdmsemeaconnect');
9
+ }
10
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Redirect.php ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Method_Abstract{
18
+
19
+ protected $_code = 'fdmsemeaconnect';
20
+ protected $_formBlockType = 'fdmsemeaconnect/redirect_form';
21
+ protected $_allowCurrencyCode = array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD','USD');
22
+
23
+ /**
24
+ * @param $data
25
+ * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
26
+ */
27
+ public function assignData($data)
28
+ {
29
+ if (!($data instanceof Varien_Object)) {
30
+ $data = new Varien_Object($data);
31
+ }
32
+ $info = $this->getInfoInstance();
33
+ $info->setCcType($data->getAmex());
34
+
35
+ return $this;
36
+ }
37
+
38
+ /**
39
+ * Get checkout session namespace
40
+ *
41
+ * @return Mage_Checkout_Model_Session
42
+ */
43
+ public function getCheckout()
44
+ {
45
+ return Mage::getSingleton('checkout/session');
46
+ }
47
+
48
+ /**
49
+ * Get current quote
50
+ *
51
+ * @return Mage_Sales_Model_Quote
52
+ */
53
+ public function getQuote()
54
+ {
55
+ return $this->getCheckout()->getQuote();
56
+ }
57
+
58
+ /**
59
+ * Using internal pages for input payment data
60
+ *
61
+ * @return bool
62
+ */
63
+ public function canUseInternal()
64
+ {
65
+ return false;
66
+ }
67
+
68
+ /**
69
+ * Using for multiple shipping address
70
+ *
71
+ * @return bool
72
+ */
73
+ public function canUseForMultishipping()
74
+ {
75
+ return false;
76
+ }
77
+
78
+ public function createFormBlock($name)
79
+ {
80
+ $block = $this->getLayout()->createBlock('fdmsemeaconnect/redirect_form', $name)
81
+ ->setMethod('fdmsemeaconnect_redirect')
82
+ ->setPayment($this->getPayment())
83
+ ->setTemplate('fdmsemeaconnect/redirect/form.phtml');
84
+
85
+ return $block;
86
+ }
87
+
88
+ /**
89
+ * Validate the currency code is available to use for FdmsConnect or not
90
+ *
91
+ * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
92
+ */
93
+
94
+ public function validate()
95
+ {
96
+ parent::validate();
97
+ $currency_code = $this->getQuote()->getBaseCurrencyCode();
98
+ if (!in_array($currency_code,$this->_allowCurrencyCode)) {
99
+ }
100
+ return $this;
101
+ }
102
+
103
+ /**
104
+ * @param Mage_Sales_Model_Order_Payment $payment
105
+ * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
106
+ */
107
+ public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
108
+ {
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * @param Mage_Sales_Model_Invoice_Payment $payment
114
+ * @return void
115
+ */
116
+ public function onInvoiceCreate(Mage_Sales_Model_Invoice_Payment $payment)
117
+ {
118
+
119
+ }
120
+
121
+ /**
122
+ * @return bool
123
+ */
124
+ public function canCapture()
125
+ {
126
+ return true;
127
+ }
128
+
129
+ /**
130
+ * @return string
131
+ */
132
+ public function getOrderPlaceRedirectUrl()
133
+ {
134
+ return Mage::getUrl('fdmsemeaconnect/redirect/', array('_secure' => true));
135
+ }
136
+
137
+
138
+ /**
139
+ * @return string
140
+ */
141
+ public function getSuccessUrl(){
142
+ return Mage::getUrl('fdmsemeaconnect/response/');
143
+ }
144
+
145
+ /**
146
+ * @return string
147
+ */
148
+ public function getCancelUrl(){
149
+ return Mage::getUrl('fdmsemeaconnect/redirect/cancel');
150
+ }
151
+
152
+ /**
153
+ * @return string
154
+ */
155
+ public function getFdmsConnectUrl(){
156
+ $url = "https://www.ipg-online.com/connect/gateway/processing";
157
+ return $url;
158
+ }
159
+
160
+ public function getFdmsConnectTestUrl(){
161
+ $url = "https://test.ipg-online.com/connect/gateway/processing";
162
+ return $url;
163
+ }
164
+
165
+ /**
166
+ * @return bool
167
+ */
168
+ public function isInitializeNeeded()
169
+ {
170
+ return true;
171
+ }
172
+
173
+ /**
174
+ * @param $paymentAction
175
+ * @param $stateObject
176
+ * @return void
177
+ */
178
+ public function initialize($paymentAction, $stateObject)
179
+ {
180
+ $state = "Fdm Redirect Connect Processing";
181
+ $stateObject->setState($state);
182
+ $stateObject->setIsNotified(false);
183
+ }
184
+
185
+ /**
186
+ * @return bool
187
+ */
188
+ public function processRedirectResponse($post){
189
+ Mage::log($post);
190
+ $this->saveFdmsEMEAconnectTransaction($post);
191
+
192
+ $timestamp = $post['tdate'];
193
+ $result = $post['processor_response_code'];
194
+ $orderid = $post['oid'];
195
+ $message = $post['status'];
196
+ $authcode = $post['terminal_id'];
197
+ $pasref = $post['refnumber'];
198
+ $fdmsemeaconnectsha1 = $post['response_hash'];
199
+
200
+ $redirect = Mage::getModel('fdmsemeaconnect/redirect');
201
+ $storeid = $redirect->getConfigData('storeid');
202
+ $secret = $redirect->getConfigData('sharedsecret');
203
+
204
+ $tmp = "$timestamp.$storeid.$orderid.$result.$message.$pasref.$authcode";
205
+ $sha1hash = sha1($tmp);
206
+ $tmp = "$sha1hash.$secret";
207
+ $sha1hash = sha1($tmp);
208
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderid);
209
+
210
+ $session = Mage::getSingleton('checkout/session');
211
+ $session->setOrderId($orderid);
212
+
213
+ if ($result != "00" && $message != 'APPROVED') {
214
+ if ($order->getId()) {
215
+ $order->cancel();
216
+ $order->addStatusToHistory('cancelled', $post['fail_reason'], false);
217
+ $order->save();
218
+ }
219
+ return false;
220
+ }else{
221
+ if ($result == "00" || $message == 'APPROVED') {
222
+ if ($order->getId()) {
223
+ $order->addStatusToHistory('processing', 'Payment Successful: ' . $result . ': ' . $message, false);
224
+ $order->addStatusToHistory('processing', 'Authorisation Code: ' . $authcode, false);
225
+ $order->sendNewOrderEmail();
226
+ $order->setEmailSent(true);
227
+
228
+ $session->setLastSuccessQuoteId($order->getId());
229
+ $session->setLastQuoteId($order->getId());
230
+ $session->setLastOrderId($order->getId());
231
+
232
+ $order->save();
233
+ }
234
+ if($redirect->getConfigData('capture')){
235
+ Mage::helper('fdmsemeaconnect')->createInvoice($orderid);
236
+ }
237
+ return true;
238
+ }else{
239
+ $session->addError('There was a problem completing your order. Please try again');
240
+ if ($order->getId()) {
241
+ $order->addStatusToHistory('cancelled', $result . ': ' . $message, false);
242
+ $order->cancel();
243
+ }
244
+ $order->save();
245
+ return false;
246
+ }
247
+ }
248
+ }
249
+
250
+ public function savefdmsemeaconnectTransaction($post){
251
+ $fdmsemeaconnect = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
252
+
253
+ try{
254
+ $fdmsemeaconnect->setOrderId($post['oid'])
255
+ ->setTimestamp(Mage::helper('fdmsemeaconnect')->getDateFromTimestamp($post['txndatetime']))
256
+ ->setTerminalid($post['terminal_id'])
257
+ ->setExpmonth($post['expmonth'])
258
+ ->setStatus($post['status'])
259
+ ->setFailreason($post['fail_reason'])
260
+ ->setOid($post['oid'])
261
+ ->setCurrency($post['currency'])
262
+ ->setProcessorresponsecode($post['processor_response_code'])
263
+ ->setApprovalcode($post['approval_code'])
264
+ ->setExpyear($post['expyear'])
265
+ ->setRefnumber($post['refnumber'])
266
+ ->setCcbrand($post['ccbrand'])
267
+ ->setCccountry($post['cccountry'])
268
+ ->setTimezone($post['timezone'])
269
+ ->setChargetotal($post['chargetotal'])
270
+ ->setTxntype($post['txntype'])
271
+ ->setCcbin($post['ccbin'])
272
+ ->setTdate($post['tdate'])
273
+ ->setTxndate_processed($post['txndate_processed'])
274
+ ->setFailrc($post['fail_rc'])
275
+ ->setResponsehash($post['response_hash'])
276
+ ->setPaymentMethod($post['paymentMethod'])
277
+ ->save();
278
+ }catch(Exception $e){
279
+ Mage::logException($e);
280
+ }
281
+ }
282
+ }
283
+
284
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Setup.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Model_Setup extends Mage_Eav_Model_Entity_Setup
4
+ {
5
+
6
+ public function createStaticBlocks(){
7
+ $error = Mage::getModel('cms/block');
8
+ $error->setTitle('FdmsEMEAconnect Error Message')
9
+ ->setIdentifier('fdmsemeaconnect_error')
10
+ ->setContent('{{var response.message}}')
11
+ ->setCreationTime(date('Y-m-d H:i:s'))
12
+ ->setUpdateTime(date('Y-m-d H:i:s'))
13
+ ->setIsActive(1)
14
+ ->setStores(0)
15
+ ->save();
16
+
17
+ $success = Mage::getModel('cms/block');
18
+ $success->setTitle('FdmsEMEAconnect Success Message')
19
+ ->setIdentifier('fdmsemeaconnect_success')
20
+ ->setContent('{{var response.message}}')
21
+ ->setCreationTime(date('Y-m-d H:i:s'))
22
+ ->setUpdateTime(date('Y-m-d H:i:s'))
23
+ ->setIsActive(1)
24
+ ->setStores(0)
25
+ ->save();
26
+
27
+ $redirect = Mage::getModel('cms/block');
28
+ $redirect->setTitle('FdmsEMEAconnect Redirect Message')
29
+ ->setIdentifier('fdmsemeaconnect_redirect')
30
+ ->setContent('You will be redirected to FdmsEMEAconnect in a few seconds.')
31
+ ->setCreationTime(date('Y-m-d H:i:s'))
32
+ ->setUpdateTime(date('Y-m-d H:i:s'))
33
+ ->setIsActive(1)
34
+ ->setStores(0)
35
+ ->save();
36
+ }
37
+
38
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/Cctype.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype
18
+ {
19
+ public function getAllowedTypes()
20
+ {
21
+ return array('VI', 'MC', 'AE');
22
+ }
23
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/Currency.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Source_Currency
18
+ {
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array(
23
+ 'value' => 'base',
24
+ 'label' => Mage::helper('fdmsemeaconnect')->__('Use Base Currency')
25
+ ),
26
+ array(
27
+ 'value' => 'display',
28
+ 'label' => Mage::helper('fdmsemeaconnect')->__('Use Display Currency')
29
+ ),
30
+ );
31
+ }
32
+ }
33
+
34
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/OrderStatus.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Source_OrderStatus{
18
+
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array('value' => 'canceled', 'label' => Mage::helper('fdmsemeaconnect')->__('Canceled')),
23
+ array('value' => 'pending', 'label' => Mage::helper('fdmsemeaconnect')->__('Pending')),
24
+ array('value' => 'processing', 'label' => Mage::helper('fdmsemeaconnect')->__('Processing')),
25
+ );
26
+ }
27
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentAction.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Source_PaymentAction
18
+ {
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array(
23
+ 'value' => Mage_FdmsEMEAconnect_Model_Redirect::ACTION_AUTHORIZE,
24
+ 'label' => Mage::helper('fdmsemeaconnect')->__('Defer Settlement')
25
+ ),
26
+ array(
27
+ 'value' => Mage_FdmsEMEAconnect_Model_Redirect::ACTION_AUTHORIZE_CAPTURE,
28
+ 'label' => Mage::helper('fdmsemeaconnect')->__('Settle Immediately')
29
+ ),
30
+ );
31
+ }
32
+ }
33
+
34
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentMode.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_Model_Source_PaymentMode
18
+ {
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array(
23
+ 'value' => 'fdmsemeaconnect/redirect',
24
+ 'label' => Mage::helper('fdmsemeaconnect')->__('Redirect')
25
+ ),
26
+ );
27
+ }
28
+ }
29
+
30
+ ?>
app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/Adminhtml/FdmsEMEAconnectController.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+
6
+ protected function _initAction() {
7
+ $this->loadLayout()
8
+ ->_setActiveMenu('fdmsemeaconnect/items')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Fdms Connect Transactions Manager'), Mage::helper('adminhtml')->__('Fdms Connect Transactions Manager'));
10
+
11
+ return $this;
12
+ }
13
+
14
+ public function indexAction() {
15
+ $this->_initAction()
16
+ ->renderLayout();
17
+ }
18
+
19
+ public function editAction() {
20
+ $id = $this->getRequest()->getParam('id');
21
+ $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->load($id);
22
+
23
+ if ($model->getId() || $id == 0) {
24
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
25
+ if (!empty($data)) {
26
+ $model->setData($data);
27
+ }
28
+
29
+ Mage::register('fdmsemeaconnect_data', $model);
30
+
31
+ $this->loadLayout();
32
+ $this->_setActiveMenu('fdmsemeaconnect/items');
33
+
34
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'), Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'));
35
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code News'), Mage::helper('adminhtml')->__('Code News'));
36
+
37
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
38
+
39
+ $this->_addContent($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_edit'))
40
+ ->_addLeft($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_edit_tabs'));
41
+
42
+ $this->renderLayout();
43
+ } else {
44
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsemeaconnect')->__('Code does not exist'));
45
+ $this->_redirect('*/*/');
46
+ }
47
+ }
48
+
49
+ public function newAction() {
50
+ $this->_forward('edit');
51
+ }
52
+
53
+ public function uploadAction() {
54
+ $this->loadLayout();
55
+ $this->_setActiveMenu('fdmsemeaconnect/items');
56
+
57
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'), Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'));
58
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code Import'), Mage::helper('adminhtml')->__('Code Import'));
59
+
60
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
61
+
62
+ $this->_addContent($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_import'))
63
+ ->_addLeft($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_import_tabs'));
64
+
65
+ $this->renderLayout();
66
+ }
67
+
68
+ public function importCSV(){
69
+ try {
70
+ $uploader = new Varien_File_Uploader('filename');
71
+ $uploader->setAllowedExtensions(array('csv'));
72
+ $uploader->setAllowRenameFiles(false);
73
+ $uploader->setFilesDispersion(false);
74
+
75
+ $path = Mage::getBaseDir('media') . DS ;
76
+ $uploader->save($path, $_FILES['filename']['name'] );
77
+
78
+ $row = 1;
79
+ if (($handle = fopen($path . $_FILES['filename']['name'], "r")) !== FALSE) {
80
+ while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
81
+ if($row == 1){
82
+ $num = count($data);
83
+ $headings = array();
84
+ for ($c=0; $c < $num; $c++) {
85
+ $headings[$c] = $data[$c];
86
+ }
87
+ $row++;
88
+ continue;
89
+ }else{
90
+ $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
91
+ $row++;
92
+ $num = count($data);
93
+ for ($c=0; $c < $num; $c++) {
94
+ $model->setData($headings[$c], $data[$c]);
95
+ }
96
+ $model->save();
97
+ }
98
+ }
99
+ fclose($handle);
100
+ }else{
101
+ Mage::throwException('File Not Found');
102
+ }
103
+
104
+ } catch (Exception $e) {
105
+ Mage::throwException($e->getMessage());
106
+ }
107
+ }
108
+
109
+ public function saveAction() {
110
+ if ($data = $this->getRequest()->getPost()) {
111
+
112
+ if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
113
+ $this->importCSV();
114
+ $this->_redirect('*/*/');
115
+ return;
116
+ }
117
+
118
+ $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
119
+ $model->setData($data)
120
+ ->setId($this->getRequest()->getParam('id'));
121
+
122
+ try {
123
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
124
+ $model->setCreatedTime(now())
125
+ ->setUpdateTime(now());
126
+ } else {
127
+ $model->setUpdateTime(now());
128
+ }
129
+
130
+ $model->save();
131
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('fdmsemeaconnect')->__('Code was successfully saved'));
132
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
133
+
134
+ if ($this->getRequest()->getParam('back')) {
135
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
136
+ return;
137
+ }
138
+ $this->_redirect('*/*/');
139
+ return;
140
+ } catch (Exception $e) {
141
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
142
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
143
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
144
+ return;
145
+ }
146
+ }
147
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsemeaconnect')->__('Unable to find code to save'));
148
+ $this->_redirect('*/*/');
149
+ }
150
+
151
+ public function deleteAction() {
152
+ if( $this->getRequest()->getParam('id') > 0 ) {
153
+ try {
154
+ $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
155
+
156
+ $model->setId($this->getRequest()->getParam('id'))
157
+ ->delete();
158
+
159
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Code was successfully deleted'));
160
+ $this->_redirect('*/*/');
161
+ } catch (Exception $e) {
162
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
163
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
164
+ }
165
+ }
166
+ $this->_redirect('*/*/');
167
+ }
168
+
169
+ public function massDeleteAction() {
170
+ $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
171
+ if(!is_array($fdmsconnectIds)) {
172
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select code(s)'));
173
+ } else {
174
+ try {
175
+ foreach ($fdmsconnectIds as $fdmsconnectId) {
176
+ $fdmsemeaconnect = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->load($fdmsconnectId);
177
+ $fdmsemeaconnect->delete();
178
+ }
179
+ Mage::getSingleton('adminhtml/session')->addSuccess(
180
+ Mage::helper('adminhtml')->__(
181
+ 'Total of %d code(s) were successfully deleted', count($fdmsconnectIds)
182
+ )
183
+ );
184
+ } catch (Exception $e) {
185
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
186
+ }
187
+ }
188
+ $this->_redirect('*/*/index');
189
+ }
190
+
191
+ public function massStatusAction()
192
+ {
193
+ $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
194
+ if(!is_array($fdmsconnectIds)) {
195
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
196
+ } else {
197
+ try {
198
+ foreach ($fdmsconnectIds as $fdmsconnectId) {
199
+ $fdmsemeaconnect = Mage::getSingleton('fdmsemeaconnect/fdmsemeaconnect')
200
+ ->load($fdmsconnectId)
201
+ ->setStatus($this->getRequest()->getParam('status'))
202
+ ->setIsMassupdate(true)
203
+ ->save();
204
+ }
205
+ $this->_getSession()->addSuccess(
206
+ $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectIds))
207
+ );
208
+ } catch (Exception $e) {
209
+ $this->_getSession()->addError($e->getMessage());
210
+ }
211
+ }
212
+ $this->_redirect('*/*/index');
213
+ }
214
+
215
+ public function massAssignAction(){
216
+ $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
217
+ if(!is_array($fdmsconnectIds)) {
218
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
219
+ } else {
220
+ try {
221
+ foreach ($fdmsconnectIds as $fdmsconnectId) {
222
+ $fdmsemeaconnect = Mage::getSingleton('fdmsemeaconnect/fdmsemeaconnect')
223
+ ->load($fdmsconnectId)
224
+ ->setAgentId($this->getRequest()->getParam('agent_id'))
225
+ ->setIsMassupdate(true)
226
+ ->save();
227
+ }
228
+ $this->_getSession()->addSuccess(
229
+ $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectIds))
230
+ );
231
+ } catch (Exception $e) {
232
+ $this->_getSession()->addError($e->getMessage());
233
+ }
234
+ }
235
+ $this->_redirect('*/*/index');
236
+ }
237
+
238
+ public function exportCsvAction()
239
+ {
240
+ $fileName = 'fdmsemeaconnect.csv';
241
+ $content = $this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_grid')
242
+ ->getCsv();
243
+
244
+ $this->_sendUploadResponse($fileName, $content);
245
+ }
246
+
247
+ public function exportXmlAction()
248
+ {
249
+ $fileName = 'fdmsemeaconnect.xml';
250
+ $content = $this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_grid')
251
+ ->getXml();
252
+
253
+ $this->_sendUploadResponse($fileName, $content);
254
+ }
255
+
256
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
257
+ {
258
+ $response = $this->getResponse();
259
+ $response->setHeader('HTTP/1.1 200 OK','');
260
+ $response->setHeader('Pragma', 'public', true);
261
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
262
+ $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
263
+ $response->setHeader('Last-Modified', date('r'));
264
+ $response->setHeader('Accept-Ranges', 'bytes');
265
+ $response->setHeader('Content-Length', strlen($content));
266
+ $response->setHeader('Content-type', $contentType);
267
+ $response->setBody($content);
268
+ $response->sendResponse();
269
+ die;
270
+ }
271
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/RedirectController.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ /**
20
+ * Order instance
21
+ */
22
+ protected $_order;
23
+
24
+ /**
25
+ * Get one page checkout model
26
+ *
27
+ * @return Mage_Checkout_Model_Type_Onepage
28
+ */
29
+ public function getOnepage()
30
+ {
31
+ return Mage::getSingleton('checkout/type_onepage');
32
+ }
33
+
34
+ /**
35
+ * Get order
36
+ *
37
+ * @param none
38
+ * @return Mage_Sales_Model_Order
39
+ */
40
+ public function getOrder()
41
+ {
42
+ if ($this->_order == null) {
43
+ }
44
+ return $this->_order;
45
+ }
46
+
47
+ /**
48
+ * Get singleton with First Data EMEA Connect Redirect order transaction information
49
+ *
50
+ * @return Mage_FdmsEMEAconnect_Model_Redirect
51
+ */
52
+ public function getRedirect()
53
+ {
54
+ return Mage::getSingleton('fdmsemeaconnect/redirect');
55
+ }
56
+
57
+ /**
58
+ * @return void
59
+ */
60
+ public function indexAction()
61
+ {
62
+ $session = Mage::getSingleton('checkout/session');
63
+ $session->setFdmsEMEAconnectQuoteId($session->getQuoteId());
64
+ $session->unsQuoteId();
65
+
66
+ $this->loadLayout();
67
+ $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('fdmsemeaconnect/redirect_redirect'));
68
+ $this->renderLayout();
69
+
70
+ }
71
+
72
+ /**
73
+ * @return void
74
+ */
75
+ public function cancelAction()
76
+ {
77
+ $session = Mage::getSingleton('checkout/session');
78
+
79
+ // cancel order
80
+ if ($session->getLastRealOrderId()) {
81
+ $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
82
+ if ($order->getId()) {
83
+ $session->addNotice($this->__('Your order with First Data Merchant Solutions has been cancelled.'));
84
+ $order->cancel()->save();
85
+ }
86
+ }
87
+
88
+ $this->_redirect('checkout/cart');
89
+ }
90
+
91
+ /**
92
+ * Order success action
93
+ */
94
+ public function successAction()
95
+ {
96
+ $session = $this->getOnepage()->getCheckout();
97
+ if (!$session->getLastSuccessQuoteId()) {
98
+ $this->_redirect('checkout/cart');
99
+ return;
100
+ }
101
+
102
+ $lastQuoteId = $session->getLastQuoteId();
103
+ $lastOrderId = $session->getLastOrderId();
104
+ $lastRecurringProfiles = $session->getLastRecurringProfileIds();
105
+ if (!$lastQuoteId || (!$lastOrderId && empty($lastRecurringProfiles))) {
106
+ $this->_redirect('checkout/cart');
107
+ return;
108
+ }
109
+
110
+ $session->clear();
111
+ $this->loadLayout();
112
+ $this->_initLayoutMessages('checkout/session');
113
+ Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)));
114
+ $this->renderLayout();
115
+ }
116
+
117
+ public function failureAction()
118
+ {
119
+ $lastQuoteId = $this->getOnepage()->getCheckout()->getLastQuoteId();
120
+ $lastOrderId = $this->getOnepage()->getCheckout()->getLastOrderId();
121
+
122
+ if (!$lastQuoteId || !$lastOrderId) {
123
+ $this->_redirect('checkout/cart');
124
+ return;
125
+ }
126
+
127
+ $this->loadLayout();
128
+ $this->renderLayout();
129
+ }
130
+
131
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/ResponseController.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * VirtualPayer_FdmsEMEAconnect extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category VirtualPayer
13
+ * @package VirtualPayer_FdmsEMEAconnect
14
+ * @copyright Copyright (c) 2016 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class VirtualPayer_FdmsEMEAconnect_ResponseController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ /**
20
+ * @return void
21
+ */
22
+ public function indexAction()
23
+ {
24
+ $session = Mage::getSingleton('checkout/session');
25
+ $post = $this->getRequest()->getPost();
26
+
27
+ if($post){
28
+ if (isset($post['oid'])) {
29
+ if(Mage::getModel('fdmsemeaconnect/redirect')->processRedirectResponse($post)){
30
+ $session->setQuoteId($session->getFdmsEMEAconnectRedirectQuoteId());
31
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsemeaconnect/redirect_success')->toHtml());
32
+ }else{
33
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsemeaconnect/redirect_error')->toHtml());
34
+ }
35
+ }
36
+ }else{
37
+ //set the quote as inactive after back from First Data EMEA
38
+ $session->getQuote()->setIsActive(false)->save();
39
+ $this->_redirect('checkout/onepage/success', array('_secure'=>true));
40
+ }
41
+ }
42
+
43
+ /**
44
+ * @return
45
+ */
46
+ public function failureAction(){
47
+ $session = Mage::getSingleton('checkout/session');
48
+ $lastQuoteId = $session->getLastQuoteId();
49
+ $lastOrderId = $session->getLastOrderId();
50
+
51
+ if (!$lastQuoteId || !$lastOrderId) {
52
+ $this->_redirect('checkout/cart');
53
+ return;
54
+ }
55
+
56
+ $order = Mage::getModel('sales/order')->loadByAttribute('entity_id', $lastOrderId);
57
+
58
+ if ($order->getId()) {
59
+ $order->addStatusToHistory('canceled', $session->getErrorMessage())->save();
60
+ }
61
+
62
+ $this->_redirect('checkout/onepage/failure');
63
+ return;
64
+ }
65
+ }
app/code/local/VirtualPayer/FdmsEMEAconnect/etc/config.xml ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * VirtualPayer_FdmsEMEAconnect extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category VirtualPayer
14
+ * @package VirtualPayer_FdmsEMEAconnect
15
+ * @copyright Copyright (c) 2016 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <VirtualPayer_FdmsEMEAconnect>
22
+ <version>1.0.0</version>
23
+ </VirtualPayer_FdmsEMEAconnect>
24
+ </modules>
25
+ <global>
26
+ <models>
27
+ <fdmsemeaconnect>
28
+ <class>VirtualPayer_FdmsEMEAconnect_Model</class>
29
+ <resourceModel>fdmsemeaconnect_mysql4</resourceModel>
30
+ </fdmsemeaconnect>
31
+ <fdmsemeaconnect_mysql4>
32
+ <class>VirtualPayer_FdmsEMEAconnect_Model_Mysql4</class>
33
+ <entities>
34
+ <fdmsemeaconnect>
35
+ <table>fdmsemeaconnect</table>
36
+ </fdmsemeaconnect>
37
+ </entities>
38
+ </fdmsemeaconnect_mysql4>
39
+ </models>
40
+ <blocks>
41
+ <fdmsemeaconnect>
42
+ <class>VirtualPayer_FdmsEMEAconnect_Block</class>
43
+ </fdmsemeaconnect>
44
+ </blocks>
45
+ <helpers>
46
+ <fdmsemeaconnect>
47
+ <class>VirtualPayer_FdmsEMEAconnect_Helper</class>
48
+ </fdmsemeaconnect>
49
+ </helpers>
50
+ <resources>
51
+ <fdmsemeaconnect_setup>
52
+ <setup>
53
+ <module>VirtualPayer_FdmsEMEAconnect</module>
54
+ <class>VirtualPayer_FdmsEMEAconnect_Model_Setup</class>
55
+ </setup>
56
+ <connection>
57
+ <use>core_setup</use>
58
+ </connection>
59
+ </fdmsemeaconnect_setup>
60
+ <fdmsemeaconnect_write>
61
+ <connection>
62
+ <use>core_write</use>
63
+ </connection>
64
+ </fdmsemeaconnect_write>
65
+ <fdmsemeaconnect_read>
66
+ <connection>
67
+ <use>core_read</use>
68
+ </connection>
69
+ </fdmsemeaconnect_read>
70
+ </resources>
71
+ <payment>
72
+ <cc>
73
+ <types>
74
+ <VI>
75
+ <code>VI</code>
76
+ <name>Visa</name>
77
+ <order>0</order>
78
+ </VI>
79
+ <MC>
80
+ <code>MC</code>
81
+ <name>MasterCard</name>
82
+ <order>100</order>
83
+ </MC>
84
+ <AM>
85
+ <code>AM</code>
86
+ <name>American Express</name>
87
+ <order>200</order>
88
+ </AM>
89
+ </types>
90
+ </cc>
91
+ </payment>
92
+ </global>
93
+ <frontend>
94
+ <routers>
95
+ <fdmsemeaconnect>
96
+ <use>standard</use>
97
+ <args>
98
+ <module>VirtualPayer_FdmsEMEAconnect</module>
99
+ <frontName>fdmsemeaconnect</frontName>
100
+ </args>
101
+ </fdmsemeaconnect>
102
+ </routers>
103
+
104
+ <layout>
105
+ <updates>
106
+ <fdmsemeaconnect>
107
+ <file>fdmsemeaconnect.xml</file>
108
+ </fdmsemeaconnect>
109
+ </updates>
110
+ </layout>
111
+ </frontend>
112
+
113
+ <adminhtml>
114
+ <!--<routers>
115
+ <fdmsemeaconnect>
116
+ <use>admin</use>
117
+ <args>
118
+ <module>VirtualPayer_FdmsEMEAconnect</module>
119
+ <frontName>fdmsemeaconnect</frontName>
120
+ </args>
121
+ </fdmsemeaconnect>
122
+ </routers>-->
123
+ <menu>
124
+ <sales module="sales">
125
+ <children>
126
+ <fdmsemeaconnect module="fdmsemeaconnect">
127
+ <title>FDMS Connect Transactions</title>
128
+ <sort_order>300</sort_order>
129
+ <action>fdmsemeaconnect/adminhtml_fdmsemeaconnect</action>
130
+ </fdmsemeaconnect>
131
+ </children>
132
+ </sales>
133
+ </menu>
134
+ <acl>
135
+ <resources>
136
+ <all>
137
+ <title>Allow Everything</title>
138
+ </all>
139
+ <admin>
140
+ <children>
141
+ <sales>
142
+ <children>
143
+ <fdmsemeaconnect>
144
+ <title>FDMS Connect Transactions</title>
145
+ <sort_order>10</sort_order>
146
+ </fdmsemeaconnect>
147
+ </children>
148
+ </sales>
149
+ </children>
150
+ </admin>
151
+ </resources>
152
+ </acl>
153
+ <layout>
154
+ <updates>
155
+ <fdmsemeaconnect>
156
+ <file>fdmsemeaconnect.xml</file>
157
+ </fdmsemeaconnect>
158
+ </updates>
159
+ </layout>
160
+ </adminhtml>
161
+ <default>
162
+ <payment>
163
+ <fdmsemeaconnect>
164
+ <active>0</active>
165
+ <title>First Data EMEA Connect Payment Gateway</title>
166
+ <model>fdmsemeaconnect/redirect</model>
167
+ <order_status>processing</order_status>
168
+ <payment_action>authorize</payment_action>
169
+ </fdmsemeaconnect>
170
+ </payment>
171
+ </default>
172
+ </config>
app/code/local/VirtualPayer/FdmsEMEAconnect/etc/system.xml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * VirtualPayer_FdmsEMEAconnect extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category VirtualPayer
14
+ * @package VirtualPayer_FdmsEMEAconnect
15
+ * @copyright Copyright (c) 2016 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <sections>
21
+ <payment>
22
+ <groups>
23
+ <fdmsemeaconnect translate="label" module="paygate">
24
+ <label>First Data EMEA Connect</label>
25
+ <sort_order>670</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <fields>
30
+ <active translate="label">
31
+ <label>Enabled</label>
32
+ <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_yesno</source_model>
34
+ <sort_order>10</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ </active>
39
+ <title translate="label">
40
+ <label>Title</label>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>20</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ <validate>required-entry</validate>
47
+ <comment>Appears in the checkout and in emails sent to the customer.</comment>
48
+ <depends>
49
+ <active>1</active>
50
+ </depends>
51
+ </title>
52
+ <model translate="label">
53
+ <label>Payment Gateway Mode</label>
54
+ <frontend_type>select</frontend_type>
55
+ <source_model>fdmsemeaconnect/source_paymentMode</source_model>
56
+ <sort_order>25</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>1</show_in_store>
60
+ <comment>For PCI DSS related reasons, please contact First Data or developer for other Payment Modes.</comment>
61
+ <depends>
62
+ <active>1</active>
63
+ </depends>
64
+ </model>
65
+ <storeid translate="label">
66
+ <label>Store ID</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>40</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <validate>required-entry</validate>
73
+ <depends>
74
+ <active>1</active>
75
+ </depends>
76
+ </storeid>
77
+ <sharedsecret translate="label">
78
+ <label>Shared Secret</label>
79
+ <frontend_type>password</frontend_type>
80
+ <sort_order>50</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ <validate>required-entry</validate>
85
+ <depends>
86
+ <active>1</active>
87
+ </depends>
88
+ </sharedsecret>
89
+ <order_status translate="label">
90
+ <label>New order status</label>
91
+ <frontend_type>select</frontend_type>
92
+ <source_model>fdmsemeaconnect/source_orderStatus</source_model>
93
+ <sort_order>80</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>1</show_in_store>
97
+ <depends>
98
+ <active>1</active>
99
+ </depends>
100
+ </order_status>
101
+ <currency translate="label">
102
+ <label>Transaction Currency</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>fdmsemeaconnect/source_currency</source_model>
105
+ <sort_order>95</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ <depends>
110
+ <active>1</active>
111
+ </depends>
112
+ </currency>
113
+ <test translate="label">
114
+ <label>Test Environment</label>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>adminhtml/system_config_source_yesno</source_model>
117
+ <sort_order>100</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <show_in_store>1</show_in_store>
121
+ <depends>
122
+ <active>1</active>
123
+ </depends>
124
+ </test>
125
+ <debug translate="label">
126
+ <label>Debug</label>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>110</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ <comment>Logs requests to and responses from FdmsConnect to /var/log.system.log provided that logging is enabled.</comment>
134
+ <depends>
135
+ <active>1</active>
136
+ </depends>
137
+ </debug>
138
+ </fields>
139
+ </fdmsemeaconnect>
140
+ </groups>
141
+ </payment>
142
+ </sections>
143
+ </config>
app/code/local/VirtualPayer/FdmsEMEAconnect/sql/fdmsemeaconnect_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('fdmsemeaconnect')};
10
+ CREATE TABLE {$this->getTable('fdmsemeaconnect')} (
11
+ `fdmsemeaconnect_id` int(11) unsigned NOT NULL auto_increment,
12
+ `order_id` varchar(255) NOT NULL default '',
13
+ `timestamp` datetime NULL,
14
+ `terminal_id` varchar(255) NOT NULL default '',
15
+ `oid` varchar(255) NOT NULL default '',
16
+ `status` varchar(255) NOT NULL default '',
17
+ `fail_reason` varchar(255) NOT NULL default '',
18
+ `fail_rc` varchar(255) NOT NULL default '',
19
+ `approval_code` varchar(255) NOT NULL default '',
20
+ `processor_response_code` varchar(255) NOT NULL default '',
21
+ `cardnumber` varchar(255) NOT NULL default '',
22
+ `currency` varchar(255) NOT NULL default '',
23
+ `ccbin` varchar(255) NOT NULL default '',
24
+ `tdate` date NULL,
25
+ `txndate_processed` varchar(255) NOT NULL default '',
26
+ `expyear` varchar(255) NOT NULL default '',
27
+ `expmonth` varchar(255) NOT NULL default '',
28
+ `refnumber` varchar(255) NOT NULL default '',
29
+ `ccbrand` varchar(255) NOT NULL default '',
30
+ `cccountry` varchar(255) NOT NULL default '',
31
+ `chargetotal` varchar(255) NOT NULL default '',
32
+ `txntype` varchar(255) NOT NULL default '',
33
+ `response_hash` varchar(255) NOT NULL default '',
34
+ `paymentMethod` varchar(2) NOT NULL default '',
35
+ PRIMARY KEY (`fdmsemeaconnect_id`)
36
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
+
38
+ ");
39
+
40
+ $installer->endSetup();
41
+
app/design/adminhtml/default/default/layout/fdmsemeaconnect.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <fdmsemeaconnect_adminhtml_fdmsemeaconnect_index>
4
+ <reference name="content">
5
+ <block type="fdmsemeaconnect/adminhtml_fdmsemeaconnect" name="fdmsemeaconnect" />
6
+ </reference>
7
+ </fdmsemeaconnect_adminhtml_fdmsemeaconnect_index>
8
+ </layout>
app/design/frontend/base/default/layout/fdmsemeaconnect.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout version="0.1.0">
2
+ <fdmsemeaconnect_redirect_success>
3
+ <reference name="root">
4
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
5
+ </reference>
6
+
7
+ <reference name="content">
8
+ <block type="core/template" name="fdmsemeaconnect.redirect.success" template="fdmsemeaconnect/redirect/success.phtml" />
9
+ </reference>
10
+ </fdmsemeaconnect_redirect_success>
11
+
12
+ <fdmsemeaconnect_redirect_failure>
13
+ <reference name="root">
14
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
15
+ </reference>
16
+
17
+ <reference name="content">
18
+ <block type="core/template" name="fdmsemeaconnect.redirect.failure" template="fdmsemeaconnect/redirect/failure.phtml" />
19
+ </reference>
20
+ </fdmsemeaconnect_redirect_failure>
21
+ </layout>
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/failure.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_error');
4
+
5
+ $html = Mage::helper('fdmsemeaconnect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
+
7
+ echo $html;
8
+
9
+ ?>
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/form.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ ?>
4
+ <fieldset class="form-list">
5
+ <?php $_code=$this->getMethodCode() ?>
6
+
7
+ <?php $redirect = Mage::getModel('fdmsemeaconnect/redirect'); ?>
8
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
9
+ <li>
10
+ <?php echo $this->__('You will be redirected to First Data secured hosted pages.') ?>
11
+ </li>
12
+ </ul>
13
+ </fieldset>
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/success.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_success');
4
+
5
+ $html = Mage::helper('fdmsemeaconnect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
+
7
+ echo $html;
8
+
9
+ ?>
app/etc/modules/VirtualPayer_FdmsEMEAconnect.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * VirtualPayer_FdmsEMEAconnect extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category VirtualPayer
14
+ * @package VirtualPayer_FdmsEMEAconnect
15
+ * @copyright Copyright (c) 2016 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <VirtualPayer_FdmsEMEAconnect>
22
+ <active>true</active>
23
+ <codePool>local</codePool>
24
+ <depends>
25
+ <Mage_Payment />
26
+ </depends>
27
+ </VirtualPayer_FdmsEMEAconnect>
28
+ </modules>
29
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>VirtualPayer_FdmsEMEAconnect</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This extension offers a convenient way to accept online payments via the First Data Merchant Solutions Connect Internet Payment Gateway</summary>
10
+ <description>This First Data Merchant Solutions (FDMS) Europe Middle East Africa (EMEA) Connect Redirect extention integrates with your webshop to process transactions via the First Data EMEA Internet Payment Gateway (IPG).</description>
11
+ <notes>Free and fully tested First Data Merchant Solutions Hosted Payment Page module.</notes>
12
+ <authors><author><name>Bright Ocansey</name><user>VirtualPayer</user><email>support@virtualpayer.com</email></author></authors>
13
+ <date>2016-01-29</date>
14
+ <time>11:49:13</time>
15
+ <contents><target name="magelocal"><dir name="VirtualPayer"><dir name="FdmsEMEAconnect"><dir name="Block"><dir name="Adminhtml"><dir name="FdmsEMEAconnect"><file name="Grid.php" hash="3054cef4d955b987324f0dbdc527769f"/></dir><file name="FdmsEMEAconnect.php" hash="0df406a345c877d7ad688d062b99eda2"/></dir><dir name="Redirect"><file name="Error.php" hash="81da65837c1d74bf4128f8a054a0a8a6"/><file name="Form.php" hash="696f9eb442f76cd555a94f76778db0de"/><file name="Redirect.php" hash="4b7ae1b02c71d9a7fc8d10f40028426d"/><file name="Success.php" hash="a8093fe0332695013153e1b218706656"/></dir></dir><dir name="Helper"><file name="Data.php" hash="043c176d8e3c89ec8037f775f083a69b"/></dir><dir name="Model"><file name="FdmsEMEAconnect.php" hash="127f4e9d8a56619fe5b4671c8135e15b"/><dir name="Mysql4"><dir name="FdmsEMEAconnect"><file name="Collection.php" hash="0fa15b94757bb7ed9c634bf9b5b12687"/></dir><file name="FdmsEMEAconnect.php" hash="7b2332cf845281c677e995919ecfa92f"/></dir><file name="Redirect.php" hash="64267a5cc1157d28a2701b3951f0c8c9"/><file name="Setup.php" hash="173f155639cd3d78b78556f9ea2ff6f9"/><dir name="Source"><file name="Cctype.php" hash="a50073d7dd258fb8233070d72ae0ce17"/><file name="Currency.php" hash="8a2e2a01372c5b5ae8bb2ceb5c5eba00"/><file name="OrderStatus.php" hash="1a8e01e0fb20e2e3fa9836d80d403165"/><file name="PaymentAction.php" hash="900e5c3cce51048e1185f7a6539fd1aa"/><file name="PaymentMode.php" hash="60b0bdf140dfd3b7340702c227c5e785"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FdmsEMEAconnectController.php" hash="b274a89c07370e49e9e14733e3d69798"/></dir><file name="RedirectController.php" hash="1a448122b40bb506e4227cc1eade45b5"/><file name="ResponseController.php" hash="1433370829adbcd3b2d01758eba1aff0"/></dir><dir name="etc"><file name="config.xml" hash="34f5f815ba66cdffd3535b52ab733269"/><file name="system.xml" hash="dbdc829f452652360ab0b851d9ed4956"/></dir><dir name="sql"><dir name="fdmsemeaconnect_setup"><file name="mysql4-install-0.1.0.php" hash="6b7e37d15d26296d6939acb578c7b35a"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fdmsemeaconnect.xml" hash="b4f0b7d6ebfd8865d5927a94c64343d5"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fdmsemeaconnect.xml" hash="cdd2bae0c9998ab792af562a66da824c"/></dir><dir name="template"><dir name="fdmsemeaconnect"><dir name="redirect"><file name="failure.phtml" hash="8d0098aec62b5e9fb5643b3a575b6d01"/><file name="form.phtml" hash="50d75f2eab794ee2b7d1c985313db3bc"/><file name="success.phtml" hash="bd869cdf0c1dcae3932d46fd4382ebaf"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="VirtualPayer_FdmsEMEAconnect.xml" hash="28859fd69cad1546fbe687c65a635587"/></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>