CityPay_PayLink - Version 1.1.0.0

Version Notes

Public release of payment module for CityPay PayLink.

Download this release

Release Info

Developer CityPay
Extension CityPay_PayLink
Version 1.1.0.0
Comparing to
See all releases


Version 1.1.0.0

app/code/community/CityPay/PayLink/Block/Cancel.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Block_Cancel extends Mage_Core_Block_Template
21
+ {
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('paylink/cancel.phtml');
26
+ }
27
+
28
+ /**
29
+ * Get continue shopping url
30
+ */
31
+ public function getContinueShoppingUrl()
32
+ {
33
+ return Mage::getUrl('*/*/cancel', array('_nosid' => true));
34
+ }
35
+ }
app/code/community/CityPay/PayLink/Block/Failure.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Block_Failure extends Mage_Core_Block_Template
21
+ {
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('paylink/failure.phtml');
26
+ }
27
+
28
+ /**
29
+ * Get continue shopping url
30
+ */
31
+ public function getContinueShoppingUrl()
32
+ {
33
+ return Mage::getUrl('checkout/cart', array('_nosid' => true));
34
+ }
35
+ }
app/code/community/CityPay/PayLink/Block/Form.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+
21
+ class CityPay_PayLink_Block_Form extends Mage_Payment_Block_Form
22
+ {
23
+ protected function _construct()
24
+ {
25
+ parent::_construct();
26
+ $this->setTemplate('paylink/form.phtml');
27
+ }
28
+
29
+ protected function _getConfig()
30
+ {
31
+ return Mage::getSingleton('paylink/config');
32
+ }
33
+ }
app/code/community/CityPay/PayLink/Block/Info.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Block_Info extends Mage_Payment_Block_Info
21
+ {
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('paylink/info.phtml');
26
+ }
27
+
28
+ public function getMethodCode()
29
+ {
30
+ return $this->getInfo()->getMethodInstance()->getCode();
31
+ }
32
+
33
+ public function toPdf()
34
+ {
35
+ $this->setTemplate('paylink/pdf/info.phtml');
36
+ return $this->toHtml();
37
+ }
38
+ }
app/code/community/CityPay/PayLink/Block/Redirect.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Block_Redirect extends Mage_Core_Block_Template
21
+ {
22
+
23
+ /**
24
+ * Return checkout session instance
25
+ *
26
+ * @return Mage_Checkout_Model_Session
27
+ */
28
+ protected function _getCheckout()
29
+ {
30
+ return Mage::getSingleton('checkout/session');
31
+ }
32
+
33
+ /**
34
+ * Return order instance
35
+ *
36
+ * @return Mage_Sales_Model_Order|null
37
+ */
38
+ protected function _getOrder()
39
+ {
40
+ if ($this->getOrder()) {
41
+ return $this->getOrder();
42
+ } elseif ($orderIncrementId = $this->_getCheckout()->getLastRealOrderId()) {
43
+ return Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
44
+ } else {
45
+ return null;
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Get form data
51
+ *
52
+ * @return array
53
+ */
54
+ public function getFormData()
55
+ {
56
+ return $this->_getOrder()->getPayment()->getMethodInstance()->getFormFields();
57
+ }
58
+
59
+ }
app/code/community/CityPay/PayLink/Block/Success.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Block_Success extends Mage_Core_Block_Abstract
21
+ {
22
+ protected function _toHtml()
23
+ {
24
+ $successUrl = Mage::getUrl('*/*/success', array('_nosid' => true));
25
+
26
+ $html = '<html>'
27
+ . '<meta http-equiv="refresh" content="0; URL='.$successUrl.'">'
28
+ . '<body>'
29
+ . '<p>' . $this->__('Your payment has been successfully processed.') . '</p>'
30
+ . '<p>' . $this->__('Please click <a href="%s">here</a> if you are not redirected automatically.', $successUrl) . '</p>'
31
+ . '</body></html>';
32
+
33
+ return $html;
34
+ }
35
+ }
app/code/community/CityPay/PayLink/Helper/Data.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Helper_Data extends Mage_Payment_Helper_Data
21
+ {
22
+ public function getPendingPaymentStatus()
23
+ {
24
+ if (version_compare(Mage::getVersion(), '1.4.0', '<')) {
25
+ return Mage_Sales_Model_Order::STATE_HOLDED;
26
+ }
27
+ return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
28
+ }
29
+ }
app/code/community/CityPay/PayLink/Model/Cc.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Model_Cc extends Mage_Payment_Model_Method_Abstract
21
+ {
22
+ protected $_code = 'paylink_cc';
23
+
24
+ protected $_isGateway = true;
25
+ protected $_canAuthorize = true;
26
+ protected $_canCapture = true;
27
+ protected $_canCapturePartial = false;
28
+ protected $_canRefund = false;
29
+ protected $_canRefundInvoicePartial = false;
30
+ protected $_canVoid = false;
31
+ protected $_canUseInternal = false;
32
+ protected $_canUseCheckout = true;
33
+ protected $_canUseForMultishipping = false;
34
+ protected $_canSaveCc = false;
35
+
36
+ protected $_paymentMethod = 'cc';
37
+ protected $_defaultLocale = 'en';
38
+
39
+ protected $_formBlockType = 'paylink/form';
40
+ protected $_infoBlockType = 'paylink/info';
41
+
42
+ protected $_order;
43
+
44
+ public function matchCurrencyConfig($currencyCode, $conf_num) {
45
+ $conf_code = trim($this->getConfigData('currency'.$conf_num));
46
+ $conf_mid = trim($this->getConfigData('merchant_id'.$conf_num));
47
+ $conf_key = trim($this->getConfigData('licence_key'.$conf_num));
48
+ if (empty($conf_code)) { return null; } // Currency code not configured
49
+ if (empty($conf_mid)) { return null; } // Merchant ID not configured
50
+ if (empty($conf_key)) { return null; } // Licence key not configured
51
+ if (!ctype_digit($conf_mid)) { return null; } // Merchant ID is not numeric
52
+ if (strcasecmp($conf_code,$currencyCode)!=0) { return null; } // Does not match required currency
53
+ return array($conf_mid,$conf_key); // Matched, return merchant ID and licence key
54
+ }
55
+
56
+ public function getCurrencyConfig($currencyCode) {
57
+ for ($conf_num=1;$conf_num<=5;$conf_num++) {
58
+ $conf=$this->matchCurrencyConfig($currencyCode,$conf_num);
59
+ if (is_array($conf) && !empty($conf)) {
60
+ return $conf;
61
+ }
62
+ }
63
+ return null;
64
+ }
65
+
66
+ /* Check if this payment method can be used for the current currency */
67
+ public function canUseForCurrency($currencyCode) {
68
+ $conf=$this->getCurrencyConfig($currencyCode);
69
+ if (is_array($conf) && !empty($conf)) {
70
+ return true;
71
+ }
72
+ return false; // No configured currency matches the required currency
73
+ }
74
+
75
+ protected function _getCheckout() {
76
+ return Mage::getSingleton('checkout/session');
77
+ }
78
+
79
+ public function getOrder() {
80
+ if (!$this->_order) {
81
+ $this->_order = $this->getInfoInstance()->getOrder();
82
+ }
83
+ return $this->_order;
84
+ }
85
+
86
+ public function getOrderPlaceRedirectUrl() {
87
+ return Mage::getUrl('paylink/processing/redirect');
88
+ }
89
+
90
+ public function getPaymentMethodType() {
91
+ return $this->_paymentMethod;
92
+ }
93
+
94
+ private function _buildUrl($part) {
95
+ $url= Mage::getUrl($part,array('_nosid' => true));
96
+ $url = trim(str_replace('&amp;', '&', $url));
97
+ $url = str_replace('192.168.0.61', '213.138.224.57', $url);
98
+ return $url;
99
+ }
100
+
101
+ public function getFormFields() {
102
+ // Use the same number_format code as the rest of Magento to ensure the amount matches
103
+ // the amount shown in the cart (ensure same rounding methods are used etc).
104
+ // Magento uses a fixed value of 2 decimal places.
105
+ // CityPay system requires amount in minor units, to get this from number_format pass both the
106
+ // decimal and thousands seperator as empty strings and then cast the result to an int.
107
+ $price = (int)number_format($this->getOrder()->getGrandTotal(),2,'','');
108
+ $currency = $this->getOrder()->getOrderCurrencyCode();
109
+ $billing = $this->getOrder()->getBillingAddress();
110
+ $conf = $this->getCurrencyConfig($currency);
111
+
112
+ if (is_array($conf) && !empty($conf)) {
113
+ $mid = (int)$conf[0]; // Ensure merchant ID is an int and not a string
114
+ $key = $conf[1];
115
+ } else {
116
+ $message = 'Currency '.$currency.' not configured';
117
+ Mage::throwException($message);
118
+ }
119
+ $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
120
+ if (is_array($locale) && !empty($locale)) {
121
+ $locale = $locale[0];
122
+ } else {
123
+ $locale = $this->getDefaultLocale();
124
+ }
125
+ $order_id = $this->getOrder()->getRealOrderId();
126
+
127
+ // Use product description as transaction description if only 1 item has been
128
+ // ordered, otherwise use the generic pre-configured transaction description.
129
+ $items=$this->getOrder()->getAllVisibleItems();
130
+ $tran_desc='';
131
+ if (count($items)==1) {
132
+ foreach ($items as $item) {
133
+ if ($item->getQtyOrdered()==1) {
134
+ $tran_desc=trim($item->getName());
135
+ }
136
+ }
137
+ }
138
+ if (empty($tran_desc)) {
139
+ $tran_desc = trim($this->getConfigData('tran_desc'));
140
+ if (empty($tran_desc) || (strcasecmp($tran_desc,'Your purchase from StoreName')==0)) {
141
+ $tran_desc = 'Your purchase from '.Mage::app()->getStore()->getName();
142
+ }
143
+ $tran_desc = str_replace('{order}', $order_id, $tran_desc);
144
+ }
145
+
146
+
147
+ $params = array(
148
+ 'merchantid' => $mid,
149
+ 'licenceKey' => $key,
150
+ 'identifier' => $order_id,
151
+ 'amount' => $price,
152
+ //'test' => 'simulator',
153
+ 'test' => ($this->getConfigData('transaction_testmode') == '0') ? 'false' : 'true',
154
+ 'clientVersion' => 'Magento '.Mage::getVersion(),
155
+ 'cardholder' => array(
156
+ 'firstName' => Mage::helper('core')->removeAccents($billing->getFirstname()),
157
+ 'lastName' => Mage::helper('core')->removeAccents($billing->getLastname()),
158
+ 'email' => $this->getOrder()->getCustomerEmail(),
159
+ //'phone' => $billing->getTelephone(),
160
+ 'address' => array (
161
+ 'address1' => Mage::helper('core')->removeAccents($billing->getStreet(1)),
162
+ 'address2' => Mage::helper('core')->removeAccents($billing->getStreet(2)),
163
+ 'address3' => Mage::helper('core')->removeAccents($billing->getCity()),
164
+ 'area' => Mage::helper('core')->removeAccents($billing->getRegion()),
165
+ 'postcode' => $billing->getPostcode(),
166
+ 'country' => $billing->getCountry())
167
+ ),
168
+ 'cart' => array(
169
+ 'productInformation' => $tran_desc),
170
+ 'config' => array(
171
+ 'lockParams' => array('cardholder'),
172
+ 'redirect_params' => false,
173
+ 'postback_policy' => 'sync',
174
+ 'postback' => $this->_buildUrl('paylink/processing/response'),
175
+ 'redirect_success' => $this->_buildUrl('paylink/processing/success'),
176
+ 'redirect_failure' => $this->_buildUrl('paylink/processing/cancel'))
177
+ );
178
+
179
+ $json= json_encode($params);
180
+ $client = new Varien_Http_Client();
181
+ $result = new Varien_Object();
182
+ $client->setUri('https://secure.citypay.com/paylink3/create')
183
+ ->setMethod(Zend_Http_Client::POST)
184
+ ->setConfig(array('timeout'=>30));
185
+ $client->setRawData($json, "application/json;charset=UTF-8");
186
+
187
+ try {
188
+ $response = $client->request();
189
+ $responseBody = $response->getBody();
190
+ } catch (Exception $e) {
191
+ $result->setResponseCode(-1)
192
+ ->setResponseReasonCode($e->getCode())
193
+ ->setResponseReasonText($e->getMessage());
194
+ //Mage::log($result->getData());
195
+ Mage::throwException('Error connecting to PayLink');
196
+ }
197
+
198
+ $results = json_decode($responseBody,true);
199
+ if ($results['result']!=1) {
200
+ Mage::throwException('Invalid response from PayLink');
201
+ }
202
+ $paylink_url=$results['url'];
203
+ if (empty($paylink_url)) {
204
+ Mage::throwException('No URL obtained from PayLink');
205
+ }
206
+ return $paylink_url;
207
+ }
208
+
209
+ public function capture(Varien_Object $payment, $amount) {
210
+ if (!$this->canCapture()) {
211
+ return $this;
212
+ }
213
+
214
+ if (Mage::app()->getRequest()->getParam('transno')) {
215
+ // Capture is being called from inside postback response action
216
+ $payment->setStatus(self::STATUS_APPROVED);
217
+ return $this;
218
+ }
219
+ return $this;
220
+ }
221
+
222
+ public function canEdit () {
223
+ return false;
224
+ }
225
+
226
+ public function canManageBillingAgreements () {
227
+ return false;
228
+ }
229
+
230
+ public function canManageRecurringProfiles () {
231
+ return true;
232
+ }
233
+
234
+ public function canRefund () {
235
+ return false;
236
+ }
237
+
238
+ public function canRefundInvoicePartial() {
239
+ return false;
240
+ }
241
+
242
+ public function canRefundPartialPerInvoice() {
243
+ return $this->canRefundInvoicePartial();
244
+ }
245
+
246
+ public function canCapturePartial() {
247
+ return false;
248
+ }
249
+ }
app/code/community/CityPay/PayLink/Model/Source/RequestType.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_Model_Source_RequestType
21
+ {
22
+ public function toOptionArray()
23
+ {
24
+ return array(
25
+ array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, 'label' => Mage::helper('paylink')->__('PreAuthorisation')),
26
+ array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, 'label' => Mage::helper('paylink')->__('Authorisation')),
27
+ );
28
+ }
29
+ }
app/code/community/CityPay/PayLink/controllers/ProcessingController.php ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category CityPay
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+
20
+ class CityPay_PayLink_ProcessingController extends Mage_Core_Controller_Front_Action
21
+ {
22
+ protected $_successBlockType = 'paylink/success';
23
+ protected $_failureBlockType = 'paylink/failure';
24
+ protected $_cancelBlockType = 'paylink/cancel';
25
+
26
+ protected $_order = NULL;
27
+ protected $_paymentInst = NULL;
28
+
29
+ protected function _getCheckout() {
30
+ return Mage::getSingleton('checkout/session');
31
+ }
32
+
33
+ protected function _getPendingPaymentStatus() {
34
+ return Mage::helper('paylink')->getPendingPaymentStatus();
35
+ }
36
+
37
+ protected function loadOrder($order_id) {
38
+ $this->_order = Mage::getModel('sales/order');
39
+ $this->_order->loadByIncrementId($order_id);
40
+ if (!$this->_order->getId()) {
41
+ Mage::throwException('Order not found');
42
+ }
43
+ $this->_paymentInst = $this->_order->getPayment()->getMethodInstance();
44
+ if (strcasecmp(get_class($this->_paymentInst),'CityPay_PayLink_Model_Cc')!=0) {
45
+ Mage::throwException('Order is not connected to CityPay');
46
+ }
47
+ }
48
+
49
+ public function textlog($text) {
50
+ $text=trim($text);
51
+ $log_fh=fopen('/var/www/log.txt','a');
52
+ fprintf($log_fh,"%s %s\n",date('d/m/Y H:i:s '),$text);
53
+ fclose($log_fh);
54
+ }
55
+
56
+ /* Redirect the customer from the Checkout page to the CityPay PayLink pages */
57
+ public function redirectAction() {
58
+ try {
59
+ $session = $this->_getCheckout();
60
+ $this->loadOrder($session->getLastRealOrderId());
61
+ if ($this->_order->getState() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
62
+ $this->_order->setState(
63
+ Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
64
+ $this->_getPendingPaymentStatus(),
65
+ Mage::helper('paylink')->__('Customer was redirected to CityPay.')
66
+ )->save();
67
+ }
68
+ if ($session->getQuoteId() && $session->getLastSuccessQuoteId()) {
69
+ $session->setCityPayQuoteId($session->getQuoteId());
70
+ $session->setCityPaySuccessQuoteId($session->getLastSuccessQuoteId());
71
+ $session->setCityPayRealOrderId($session->getLastRealOrderId());
72
+ $session->getQuote()->setIsActive(false)->save();
73
+ $session->clear();
74
+ }
75
+ $this->loadLayout();
76
+ $this->renderLayout();
77
+ return;
78
+ } catch (Mage_Core_Exception $e) {
79
+ $this->_getCheckout()->addError($e->getMessage());
80
+ } catch(Exception $e) {
81
+ Mage::logException($e);
82
+ }
83
+ $this->_redirect('checkout/cart');
84
+ }
85
+
86
+ /* Postback handler (not customer return) */
87
+ public function responseAction() {
88
+ try {
89
+ $results = $this->_checkPostbackData();
90
+ if ($results['authorised'] == true) {
91
+ $this->_processSale($results);
92
+ } else {
93
+ // Transaction was not authorised. No action at this time as
94
+ // there could be further attempts. Just pass back a generic 'OK' page
95
+ $this->getResponse()->setBody('<html></html>');
96
+ }
97
+ } catch (Mage_Core_Exception $e) {
98
+ $this->getResponse()->setBody(
99
+ $this->getLayout()
100
+ ->createBlock($this->_failureBlockType)
101
+ ->setOrder($this->_order)
102
+ ->toHtml()
103
+ );
104
+ }
105
+ }
106
+
107
+ protected function _checkPostbackData() {
108
+ // Check request type
109
+ if (!$this->getRequest()->isPost()) {
110
+ Mage::throwException('Wrong request type.');
111
+ }
112
+ // Validate postback request is from CityPay IP
113
+ $helper = Mage::helper('core/http');
114
+ if (method_exists($helper, 'getRemoteAddr')) {
115
+ $remoteAddr = $helper->getRemoteAddr();
116
+ } else {
117
+ $request = $this->getRequest()->getServer();
118
+ $remoteAddr = $request['REMOTE_ADDR'];
119
+ }
120
+ $ip_conf=Mage::getStoreConfig('payment/paylink_cc/server_ip');
121
+ if (empty($ip_conf)) {
122
+ $ip_conf="54.246.184.81, 54.246.184.93, 54.246.184.95";
123
+ }
124
+ if (strcasecmp($ip_conf,'Any')!=0) {
125
+ $connection_allowed=false;
126
+ $ip_list=explode(',',$ip_conf);
127
+ foreach ($ip_list as $ip_check) {
128
+ if (strcmp(trim($ip_check),$remoteAddr)==0) {
129
+ $connection_allowed=true;
130
+ }
131
+ }
132
+ if (!$connection_allowed) {
133
+ Mage::throwException('IP '.$remoteAddr.' can\'t be validated as CityPay.');
134
+ }
135
+ }
136
+ // Check response data - need the raw post data, can't use the processed post value as data is
137
+ // in json format and not name/value pairs
138
+ $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : file_get_contents("php://input");
139
+ if (empty($HTTP_RAW_POST_DATA)) {
140
+ Mage::throwException('Request doesn\'t contain postback data.');
141
+ }
142
+ $results = array_change_key_case(json_decode($HTTP_RAW_POST_DATA,true), CASE_LOWER);
143
+ if (empty($results)) {
144
+ Mage::throwException('Request doesn\'t contain valid JSON data.');
145
+ }
146
+ //$this->textlog(print_r($results,true));
147
+
148
+ // Check order id
149
+ if (empty($results['identifier']) || strlen($results['identifier']) > 50) {
150
+ Mage::throwException('Missing or invalid order ID');
151
+ }
152
+ // Load order for further validation
153
+ $this->loadOrder($results['identifier']);
154
+ $conf=$this->_paymentInst->getCurrencyConfig($results['currency']);
155
+ if (is_array($conf) && !empty($conf)) {
156
+ $mid = (int)$conf[0];
157
+ $key = $conf[1];
158
+ } else {
159
+ Mage::throwException('Order currency not configured');
160
+ }
161
+ $hash_src = $results['authcode'].$results['amount'].$results['errorcode'].$results['merchantid'].
162
+ $results['transno'].$results['identifier'].$key;
163
+
164
+ // Check both the sha1 and sha256 hash values to ensure that results have not
165
+ // been tampered with
166
+ $check=base64_encode(sha1($hash_src,true));
167
+ if (strcmp($results['sha1'],$check)!=0) {
168
+ // Hash check does not match. Data may of been tampered with.
169
+ Mage::throwException('Callback data security check failed (sha1)');
170
+ }
171
+ $check=base64_encode(hash('sha256',$hash_src,true));
172
+ if (strcmp($results['sha256'],$check)!=0) {
173
+ // Hash check does not match. Data may of been tampered with.
174
+ Mage::throwException('Callback data security check failed (sha256)');
175
+ }
176
+ // Postback data is valid
177
+ return $results;
178
+ }
179
+
180
+ protected function _processSale($results) {
181
+ // save transaction information
182
+ $this->_order->getPayment()
183
+ ->setTransactionId($results['transno'])
184
+ ->setLastTransId($results['transno'])
185
+ ->setCcAvsStatus($results['avsresponse']);
186
+
187
+ // Allow transno param to be seen by other parts of the system
188
+ Mage::app()->getRequest()->setParam('transno',$results['transno']);
189
+
190
+ $surcharge=floatval($results['surcharge']);
191
+ $additional_data = $this->_order->getPayment()->getAdditionalData();
192
+ $additional_data .= ($additional_data ? "<br/>\n" : '') . 'Card used: '. $results['maskedpan'];
193
+ if ($surcharge>0) {
194
+ // Surcharge was added. Include in the additional data for the transaction, using the
195
+ // text version sent in the results.
196
+ $additional_data .= "<br/>\nSurcharge: ". $results['surcharge'];
197
+ }
198
+ $this->_order->getPayment()->setAdditionalData($additional_data);
199
+ if ($this->_order->canInvoice()) {
200
+ $invoice = $this->_order->prepareInvoice();
201
+ $invoice->register()->capture();
202
+ Mage::getModel('core/resource_transaction')
203
+ ->addObject($invoice)
204
+ ->addObject($invoice->getOrder())
205
+ ->save();
206
+ }
207
+ $this->_order->addStatusToHistory($this->_paymentInst->getConfigData('order_status'), Mage::helper('paylink')->__('The transaction has been authorised by CityPay.'));
208
+
209
+ $this->_order->sendNewOrderEmail();
210
+ $this->_order->setEmailSent(true);
211
+
212
+ $this->_order->save();
213
+
214
+ $this->getResponse()->setBody(
215
+ $this->getLayout()
216
+ ->createBlock($this->_successBlockType)
217
+ ->setOrder($this->_order)
218
+ ->toHtml()
219
+ );
220
+ }
221
+
222
+ protected function _processCancel($results) {
223
+ // cancel order
224
+ if ($this->_order->canCancel()) {
225
+ $this->_order->cancel();
226
+ $this->_order->addStatusToHistory(Mage_Sales_Model_Order::STATE_CANCELED, Mage::helper('paylink')->__('Payment was canceled'));
227
+ $this->_order->save();
228
+ }
229
+
230
+ $this->getResponse()->setBody(
231
+ $this->getLayout()
232
+ ->createBlock($this->_cancelBlockType)
233
+ ->setOrder($this->_order)
234
+ ->toHtml()
235
+ );
236
+ }
237
+
238
+ /* Customer return actions (after postback phase has been completed) */
239
+ public function successAction() {
240
+ try {
241
+ $session = $this->_getCheckout();
242
+ $session->unsCityPayRealOrderId();
243
+ $session->setQuoteId($session->getCityPayQuoteId(true));
244
+ $session->setLastSuccessQuoteId($session->getCityPaySuccessQuoteId(true));
245
+ $this->_redirect('checkout/onepage/success');
246
+ return;
247
+ } catch (Mage_Core_Exception $e) {
248
+ $this->_getCheckout()->addError($e->getMessage());
249
+ } catch(Exception $e) {
250
+ Mage::logException($e);
251
+ }
252
+ $this->_redirect('checkout/cart');
253
+ }
254
+
255
+ public function cancelAction() {
256
+ // set quote to active
257
+ $session = $this->_getCheckout();
258
+ if ($quoteId = $session->getCityPayQuoteId()) {
259
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
260
+ if ($quote->getId()) {
261
+ $quote->setIsActive(true)->save();
262
+ $session->setQuoteId($quoteId);
263
+ }
264
+ }
265
+ $session->addError(Mage::helper('paylink')->__('The order has been canceled.'));
266
+ $this->_redirect('checkout/cart');
267
+ }
268
+ }
app/code/community/CityPay/PayLink/etc/config.xml ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CityPay
17
+ * @package CityPay_PayLink
18
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
19
+ */
20
+ -->
21
+ <config>
22
+ <modules>
23
+ <CityPay_PayLink>
24
+ <version>0.1.0</version>
25
+ </CityPay_PayLink>
26
+ </modules>
27
+
28
+ <global>
29
+ <models>
30
+ <paylink>
31
+ <class>CityPay_PayLink_Model</class>
32
+ </paylink>
33
+ </models>
34
+ <helpers>
35
+ <paylink>
36
+ <class>CityPay_PayLink_Helper</class>
37
+ </paylink>
38
+ </helpers>
39
+ <resources>
40
+ <paylink_setup>
41
+ <setup>
42
+ <module>CityPay_PayLink</module>
43
+ </setup>
44
+ <connection>
45
+ <use>core_setup</use>
46
+ </connection>
47
+ </paylink_setup>
48
+ <paylink_write>
49
+ <connection>
50
+ <use>core_write</use>
51
+ </connection>
52
+ </paylink_write>
53
+ <paylink_read>
54
+ <connection>
55
+ <use>core_read</use>
56
+ </connection>
57
+ </paylink_read>
58
+ </resources>
59
+ <blocks>
60
+ <paylink><class>CityPay_PayLink_Block</class></paylink>
61
+ </blocks>
62
+ <payment>
63
+ <url>http://www.citypay.com/</url>
64
+ </payment>
65
+ </global>
66
+
67
+ <frontend>
68
+ <secure_url>
69
+ <paylink_processing>/paylink/processing</paylink_processing>
70
+ </secure_url>
71
+ <routers>
72
+ <paylink>
73
+ <use>standard</use>
74
+ <args>
75
+ <module>CityPay_PayLink</module>
76
+ <frontName>paylink</frontName>
77
+ </args>
78
+ </paylink>
79
+ </routers>
80
+ <layout>
81
+ <updates>
82
+ <paylink>
83
+ <file>paylink.xml</file>
84
+ </paylink>
85
+ </updates>
86
+ </layout>
87
+ </frontend>
88
+
89
+ <default>
90
+ <payment>
91
+ <paylink_cc>
92
+ <active>0</active>
93
+ <model>paylink/cc</model>
94
+ <order_status>1</order_status>
95
+ <title>Credit/Debit Card (CityPay)</title>
96
+ <allowspecific>0</allowspecific>
97
+ <transaction_testmode>1</transaction_testmode>
98
+ <order_status>processing</order_status>
99
+ <currency1>GBP</currency1>
100
+ <currency2>EUR</currency2>
101
+ <currency3>USD</currency3>
102
+ <currency4>AUD</currency4>
103
+ <currency5>CAD</currency5>
104
+ <server_ip>54.246.184.81, 54.246.184.93, 54.246.184.95</server_ip>
105
+ <tran_desc>Your order from StoreName</tran_desc>
106
+ </paylink_cc>
107
+ </payment>
108
+ </default>
109
+ </config>
app/code/community/CityPay/PayLink/etc/system.xml ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CityPay
17
+ * @package CityPay_PayLink
18
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
19
+ */
20
+ -->
21
+ <config>
22
+ <sections>
23
+ <payment>
24
+ <groups>
25
+ <paylink_cc translate="label" module="paylink">
26
+ <label>CityPay PayLink</label>
27
+ <frontend_type>text</frontend_type>
28
+ <sort_order>1</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>0</show_in_store>
32
+ <comment><![CDATA[<a href="http://www.citypay.com/" target="_blank">Click here to apply for a CityPay account</a>]]></comment>
33
+ <fields>
34
+ <payselect translate="label">
35
+ <label>Payment selection</label>
36
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
37
+ <sort_order>1</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>0</show_in_store>
41
+ </payselect>
42
+ <active translate="label">
43
+ <label>Enabled</label>
44
+ <frontend_type>select</frontend_type>
45
+ <source_model>adminhtml/system_config_source_yesno</source_model>
46
+ <sort_order>2</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>0</show_in_store>
50
+ </active>
51
+ <title translate="label">
52
+ <label>Title</label>
53
+ <frontend_type>text</frontend_type>
54
+ <sort_order>3</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>0</show_in_store>
58
+ </title>
59
+ <allowspecific translate="label">
60
+ <label>Payment to applicable countries</label>
61
+ <frontend_type>allowspecific</frontend_type>
62
+ <sort_order>4</sort_order>
63
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ </allowspecific>
68
+ <specificcountry translate="label">
69
+ <label>Payment to Specific countries</label>
70
+ <frontend_type>multiselect</frontend_type>
71
+ <sort_order>5</sort_order>
72
+ <source_model>adminhtml/system_config_source_country</source_model>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
+ </specificcountry>
77
+
78
+ <tran_settings translate="label">
79
+ <label>Transaction settings</label>
80
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
81
+ <sort_order>10</sort_order>
82
+ <show_in_default>1</show_in_default>
83
+ <show_in_website>1</show_in_website>
84
+ <show_in_store>0</show_in_store>
85
+ </tran_settings>
86
+
87
+ <tran_desc translate="label">
88
+ <label>Description</label>
89
+ <frontend_type>text</frontend_type>
90
+ <sort_order>11</sort_order>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>1</show_in_website>
93
+ <show_in_store>0</show_in_store>
94
+ </tran_desc>
95
+ <order_status translate="label">
96
+ <label>New order status</label>
97
+ <frontend_type>select</frontend_type>
98
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
99
+ <sort_order>12</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>1</show_in_website>
102
+ <show_in_store>0</show_in_store>
103
+ </order_status>
104
+ <transaction_testmode translate="label">
105
+ <label>Test Mode</label>
106
+ <frontend_type>select</frontend_type>
107
+ <source_model>adminhtml/system_config_source_yesno</source_model>
108
+ <sort_order>13</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>0</show_in_store>
112
+ </transaction_testmode>
113
+
114
+ <heading_currency1 translate="label">
115
+ <label>Account settings</label>
116
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
117
+ <sort_order>20</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <show_in_store>0</show_in_store>
121
+ </heading_currency1>
122
+ <currency1 translate="label">
123
+ <label>Currency</label>
124
+ <frontend_type>select</frontend_type>
125
+ <source_model>adminhtml/system_config_source_currency</source_model>
126
+ <sort_order>21</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_website>1</show_in_website>
129
+ <show_in_store>0</show_in_store>
130
+ </currency1>
131
+ <merchant_id1 translate="label">
132
+ <label>Merchant ID</label>
133
+ <frontend_type>text</frontend_type>
134
+ <sort_order>22</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>1</show_in_website>
137
+ <show_in_store>0</show_in_store>
138
+ </merchant_id1>
139
+ <licence_key1 translate="label">
140
+ <label>Licence Key</label>
141
+ <frontend_type>text</frontend_type>
142
+ <sort_order>23</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>0</show_in_store>
146
+ </licence_key1>
147
+
148
+ <heading_currency2 translate="label">
149
+ <label>Account settings (2nd currency)</label>
150
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
151
+ <sort_order>30</sort_order>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>0</show_in_store>
155
+ </heading_currency2>
156
+ <currency2 translate="label">
157
+ <label>Currency</label>
158
+ <frontend_type>select</frontend_type>
159
+ <source_model>adminhtml/system_config_source_currency</source_model>
160
+ <sort_order>31</sort_order>
161
+ <show_in_default>1</show_in_default>
162
+ <show_in_website>1</show_in_website>
163
+ <show_in_store>0</show_in_store>
164
+ </currency2>
165
+ <merchant_id2 translate="label">
166
+ <label>Merchant ID</label>
167
+ <frontend_type>text</frontend_type>
168
+ <sort_order>32</sort_order>
169
+ <show_in_default>1</show_in_default>
170
+ <show_in_website>1</show_in_website>
171
+ <show_in_store>0</show_in_store>
172
+ </merchant_id2>
173
+ <licence_key2 translate="label">
174
+ <label>Licence Key</label>
175
+ <frontend_type>text</frontend_type>
176
+ <sort_order>33</sort_order>
177
+ <show_in_default>1</show_in_default>
178
+ <show_in_website>1</show_in_website>
179
+ <show_in_store>0</show_in_store>
180
+ </licence_key2>
181
+
182
+ <heading_currency3 translate="label">
183
+ <label>Account settings (3rd currency)</label>
184
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
185
+ <sort_order>40</sort_order>
186
+ <show_in_default>1</show_in_default>
187
+ <show_in_website>1</show_in_website>
188
+ <show_in_store>0</show_in_store>
189
+ </heading_currency3>
190
+ <currency3 translate="label">
191
+ <label>Currency</label>
192
+ <frontend_type>select</frontend_type>
193
+ <source_model>adminhtml/system_config_source_currency</source_model>
194
+ <sort_order>41</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>0</show_in_store>
198
+ </currency3>
199
+ <merchant_id3 translate="label">
200
+ <label>Merchant ID</label>
201
+ <frontend_type>text</frontend_type>
202
+ <sort_order>42</sort_order>
203
+ <show_in_default>1</show_in_default>
204
+ <show_in_website>1</show_in_website>
205
+ <show_in_store>0</show_in_store>
206
+ </merchant_id3>
207
+ <licence_key3 translate="label">
208
+ <label>Licence Key</label>
209
+ <frontend_type>text</frontend_type>
210
+ <sort_order>43</sort_order>
211
+ <show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>0</show_in_store>
214
+ </licence_key3>
215
+
216
+ <heading_currency4 translate="label">
217
+ <label>Account settings (4th currency)</label>
218
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
219
+ <sort_order>50</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>0</show_in_store>
223
+ </heading_currency4>
224
+ <currency4 translate="label">
225
+ <label>Currency</label>
226
+ <frontend_type>select</frontend_type>
227
+ <source_model>adminhtml/system_config_source_currency</source_model>
228
+ <sort_order>51</sort_order>
229
+ <show_in_default>1</show_in_default>
230
+ <show_in_website>1</show_in_website>
231
+ <show_in_store>0</show_in_store>
232
+ </currency4>
233
+ <merchant_id4 translate="label">
234
+ <label>Merchant ID</label>
235
+ <frontend_type>text</frontend_type>
236
+ <sort_order>52</sort_order>
237
+ <show_in_default>1</show_in_default>
238
+ <show_in_website>1</show_in_website>
239
+ <show_in_store>0</show_in_store>
240
+ </merchant_id4>
241
+ <licence_key4 translate="label">
242
+ <label>Licence Key</label>
243
+ <frontend_type>text</frontend_type>
244
+ <sort_order>53</sort_order>
245
+ <show_in_default>1</show_in_default>
246
+ <show_in_website>1</show_in_website>
247
+ <show_in_store>0</show_in_store>
248
+ </licence_key4>
249
+
250
+ <heading_currency5 translate="label">
251
+ <label>Account settings (5th currency)</label>
252
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
253
+ <sort_order>60</sort_order>
254
+ <show_in_default>1</show_in_default>
255
+ <show_in_website>1</show_in_website>
256
+ <show_in_store>0</show_in_store>
257
+ </heading_currency5>
258
+ <currency5 translate="label">
259
+ <label>Currency</label>
260
+ <frontend_type>select</frontend_type>
261
+ <source_model>adminhtml/system_config_source_currency</source_model>
262
+ <sort_order>61</sort_order>
263
+ <show_in_default>1</show_in_default>
264
+ <show_in_website>1</show_in_website>
265
+ <show_in_store>0</show_in_store>
266
+ </currency5>
267
+ <merchant_id5 translate="label">
268
+ <label>Merchant ID</label>
269
+ <frontend_type>text</frontend_type>
270
+ <sort_order>62</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>0</show_in_store>
274
+ </merchant_id5>
275
+ <licence_key5 translate="label">
276
+ <label>Licence Key</label>
277
+ <frontend_type>text</frontend_type>
278
+ <sort_order>63</sort_order>
279
+ <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
+ <show_in_store>0</show_in_store>
282
+ </licence_key5>
283
+
284
+ <heading_postback translate="label">
285
+ <label>Postback filter</label>
286
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
287
+ <sort_order>100</sort_order>
288
+ <show_in_default>1</show_in_default>
289
+ <show_in_website>1</show_in_website>
290
+ <show_in_store>0</show_in_store>
291
+ </heading_postback>
292
+ <server_ip translate="label">
293
+ <label>Server IP list </label>
294
+ <frontend_type>text</frontend_type>
295
+ <sort_order>101</sort_order>
296
+ <show_in_default>1</show_in_default>
297
+ <show_in_website>1</show_in_website>
298
+ <show_in_store>0</show_in_store>
299
+ </server_ip>
300
+ </fields>
301
+ </paylink_cc>
302
+ </groups>
303
+ </payment>
304
+ </sections>
305
+ </config>
app/design/adminhtml/default/default/template/paylink/info.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <?php
21
+ echo $this->getMethod()->getTitle() . '<br/>';
22
+ if ($this->getInfo()->getLastTransId() == '') {
23
+ echo Mage::helper('paylink')->__('Payment has not been processed yet.') . '<br/>';
24
+ } else {
25
+ echo Mage::helper('paylink')->__('CityPay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
26
+ }
27
+ ?>
app/design/adminhtml/default/default/template/paylink/pdf/info.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <?php echo $this->getMethod()->getTitle() ?>
21
+
app/design/frontend/base/default/layout/paylink.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category design_default
17
+ * @package CityPay_PayLink
18
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
19
+ */
20
+
21
+ -->
22
+ <layout version="0.1.0">
23
+ <paylink_processing_failure>
24
+ <reference name="root">
25
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
26
+ </reference>
27
+ <reference name="content">
28
+ <block type="paylink/failure" name="paylink_failure" template="paylink/failure.phtml" />
29
+ </reference>
30
+ </paylink_processing_failure>
31
+ <paylink_processing_redirect>
32
+ <reference name="root">
33
+ <action method="setTemplate"><template>paylink/blank.phtml</template></action>
34
+ </reference>
35
+ <reference name="content">
36
+ <block type="paylink/redirect" name="paylink_redirect" template="paylink/redirect.phtml" />
37
+ </reference>
38
+ </paylink_processing_redirect>
39
+ </layout>
app/design/frontend/base/default/template/paylink/blank.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
21
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
22
+ <head>
23
+ <title>CityPay PayLink</title>
24
+ <style>
25
+ html {
26
+ font-size: 100%; /* IE trick to allow proper resizing of text */
27
+ }
28
+ body {
29
+ margin: 20px 0 0 0;
30
+ text-align: left;
31
+ font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; /* 1em is now 12px at 96ppi. */
32
+ font-size:12px;
33
+ background-color: #ffffff;
34
+ color: #606060;
35
+ }
36
+ </style>
37
+ </head>
38
+ <body><center><?php echo $this->getChildHtml('content') ?></center><br>
39
+ </body>
40
+ </html>
app/design/frontend/base/default/template/paylink/cancel.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <html>
21
+ <meta http-equiv="refresh" content="0; URL=<?php echo $this->getContinueShoppingUrl()?>">
22
+ <body>
23
+ <div class="page-head">
24
+ <h3><?php echo Mage::helper('paylink')->__('Payment was canceled') ?></h3>
25
+ </div>
26
+ <p><?php echo Mage::helper('paylink')->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
27
+ </body>
28
+ </html>
app/design/frontend/base/default/template/paylink/failure.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <html>
21
+ <meta http-equiv="refresh" content="0; URL=<?php echo $this->getContinueShoppingUrl()?>">
22
+ <body>
23
+ <div class="page-head">
24
+ <h3><?php echo Mage::helper('paylink')->__('Error occurred') ?></h3>
25
+ </div>
26
+ <p><?php echo Mage::helper('paylink')->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
27
+ </body>
28
+ </html>
app/design/frontend/base/default/template/paylink/form.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <fieldset class="form-list">
21
+ <?php $_code=$this->getMethodCode() ?>
22
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
23
+ <li>
24
+ <?php echo Mage::helper('paylink')->__('Details will be taken using the CityPay gateway when you place an order.') ?>
25
+ </li>
26
+ </ul>
27
+ </fieldset>
app/design/frontend/base/default/template/paylink/info.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <?php
21
+ echo $this->getMethod()->getTitle() . '<br/>';
22
+ if ($this->getInfo()->getLastTransId() == '') {
23
+ echo '<em>' . Mage::helper('paylink')->__('Details will be taken using the CityPay gateway when you place an order.') . '</em>';
24
+ } else {
25
+ echo Mage::helper('paylink')->__('CityPay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
26
+ }
27
+ ?>
app/design/frontend/base/default/template/paylink/redirect.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category design_default
16
+ * @package CityPay_PayLink
17
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
18
+ */
19
+ ?>
20
+ <b><?php echo Mage::helper('paylink')->__('You will now be transferred to CityPay to complete the transaction.'); ?></b>
21
+ <form name="paylink_form" id="paylink_form" action="<?php echo $this->getFormData();?>" method="GET">
22
+ </form>
23
+
24
+ <script type="text/javascript">
25
+ //<![CDATA[
26
+ var paymentform = document.getElementById('paylink_form');
27
+ window.onload = paymentform.submit();
28
+ //]]>
29
+ </script>
app/etc/modules/CityPay_PayLink.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category CityPay
17
+ * @package CityPay_PayLink
18
+ * @copyright Copyright (c) 2014 CityPay (http://www.citypay.com/)
19
+ */
20
+ -->
21
+ <config>
22
+ <modules>
23
+ <CityPay_PayLink>
24
+ <active>true</active>
25
+ <codePool>community</codePool>
26
+ </CityPay_PayLink>
27
+ </modules>
28
+ </config>
package.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>CityPay_PayLink</name>
4
+ <version>1.1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>CityPay PayLink payment module</summary>
10
+ <description>Take payments using the CityPay PayLink gateway.&#xD;
11
+ &#xD;
12
+ CityPay are a PCI DSS Level 1 certified payment gateway accredited by UK and European Acquiring banks to process credit and debit card transitions.&#xD;
13
+ </description>
14
+ <notes>Public release of payment module for CityPay PayLink.&#xD;
15
+ </notes>
16
+ <authors><author><name>CityPay</name><user>CityPay</user><email>support@citypay.com</email></author></authors>
17
+ <date>2014-04-25</date>
18
+ <time>07:57:04</time>
19
+ <contents><target name="magecommunity"><dir name="CityPay"><dir name="PayLink"><dir name="Block"><file name="Cancel.php" hash="8f2ee8fd97fe192b1c8d8fbb3ad3731c"/><file name="Failure.php" hash="e71ec28b514d92a668e105e8d6f413fc"/><file name="Form.php" hash="c4a2504e23947a4f5a304191f069d959"/><file name="Info.php" hash="e7545ab3bf215627a6da875ae77d1fef"/><file name="Redirect.php" hash="7aac53817a08d06393b87e31c1434681"/><file name="Success.php" hash="489cab28853acb3438922ee12d9460e4"/></dir><dir name="Helper"><file name="Data.php" hash="1f362fcb67704e139c6331810dfecd5f"/></dir><dir name="Model"><file name="Cc.php" hash="9d98292a8bcf6fb227edc5eed02dcc0d"/><dir name="Source"><file name="RequestType.php" hash="697cfc73220222a8cf28128612240375"/></dir></dir><dir name="controllers"><file name="ProcessingController.php" hash="d62464d992ac1890d654804fd00dd1d1"/></dir><dir name="etc"><file name="config.xml" hash="d8e102b039c80ced095303f0275d9184"/><file name="system.xml" hash="98599ce255abd973aa538f26e502807b"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="paylink"><file name="info.phtml" hash="05f4aedb5addd0e95174fbead2bfad94"/><dir name="pdf"><file name="info.phtml" hash="baca1ec6d88eb4357f7b00f2b8e58d61"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="paylink.xml" hash="00675a1467815b7a11f15d7af1b297a4"/></dir><dir name="template"><dir name="paylink"><file name="blank.phtml" hash="18c29ba6bfe6af256e978fdad2fa6043"/><file name="cancel.phtml" hash="22a0148140b82fb50c58031b6807bcb6"/><file name="failure.phtml" hash="9ec6bab2615162b0c6ec2bbec64bff3f"/><file name="form.phtml" hash="f4d6d3ccdb3c059fd56c40779fa6ed96"/><file name="info.phtml" hash="a626432c8e6d5715f79eb4f5807d57f9"/><file name="redirect.phtml" hash="162c786fa5181be41a16530624b175b5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CityPay_PayLink.xml" hash="c03b8aaf72a67543317a733fdac34cd3"/></dir></target></contents>
20
+ <compatible/>
21
+ <dependencies><required><php><min>5.3.2</min><max>6.0.0</max></php></required></dependencies>
22
+ </package>