Fontis_EwayUk - Version 1.0.0

Version Notes

None

Download this release

Release Info

Developer Magento Core Team
Extension Fontis_EwayUk
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Fontis/EwayUk/Block/Failure.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Fontis_EwayUk_Block_Failure extends Mage_Core_Block_Template
22
+ {
23
+ public function getErrorMessage()
24
+ {
25
+ $msg = Mage::getSingleton('checkout/session')->getEwayUkErrorMessage();
26
+ Mage::getSingleton('checkout/session')->unsEwayUkErrorMessage();
27
+ return $msg;
28
+ }
29
+
30
+ public function getContinueShoppingUrl()
31
+ {
32
+ return Mage::getUrl('checkout/cart');
33
+ }
34
+ }
app/code/community/Fontis/EwayUk/Block/Form.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Fontis_EwayUk_Block_Form extends Mage_Payment_Block_Form
22
+ {
23
+ protected function _construct()
24
+ {
25
+ $this->setTemplate('fontis/ewayuk/form.phtml');
26
+ parent::_construct();
27
+ }
28
+ }
app/code/community/Fontis/EwayUk/Helper/Data.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Fontis_EwayUk_Helper_Data extends Mage_Core_Helper_Abstract
22
+ {
23
+
24
+ }
app/code/community/Fontis/EwayUk/Model/Shared.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Fontis_EwayUk_Model_Shared extends Mage_Payment_Model_Method_Abstract
22
+ {
23
+ protected $_code = 'ewayuk';
24
+
25
+ protected $_isGateway = false;
26
+ protected $_canAuthorize = false;
27
+ protected $_canCapture = true;
28
+ protected $_canCapturePartial = false;
29
+ protected $_canRefund = false;
30
+ protected $_canVoid = false;
31
+ protected $_canUseInternal = false;
32
+ protected $_canUseCheckout = true;
33
+ protected $_canUseForMultishipping = false;
34
+
35
+ protected $_formBlockType = 'ewayuk/form';
36
+
37
+ protected $_order;
38
+
39
+ public function getOrder()
40
+ {
41
+ if (!$this->_order) {
42
+ $paymentInfo = $this->getInfoInstance();
43
+ $this->_order = Mage::getModel('sales/order')
44
+ ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
45
+ }
46
+ return $this->_order;
47
+ }
48
+
49
+ public function getCustomerId()
50
+ {
51
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/customer_id');
52
+ }
53
+
54
+ public function getUserName()
55
+ {
56
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/username');
57
+ }
58
+
59
+ public function getStoreInfoByField($field)
60
+ {
61
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/'.$field);
62
+ }
63
+
64
+ public function getRequestUrl()
65
+ {
66
+ return 'https://payment.ewaygateway.com/Request/';
67
+ }
68
+
69
+ public function getResultsUrl()
70
+ {
71
+ return 'https://payment.ewaygateway.com/Result/';
72
+ }
73
+
74
+ /**
75
+ * Get currency that accepted by eWAY account
76
+ *
77
+ * @return string
78
+ */
79
+ public function getAcceptedCurrency()
80
+ {
81
+ return explode( ',', Mage::getStoreConfig('payment/' . $this->getCode() . '/currency') );
82
+ }
83
+
84
+ public function validate()
85
+ {
86
+ parent::validate();
87
+ $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
88
+
89
+ $paymentInfo = $this->getInfoInstance();
90
+ if (!$currency_code && $paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
91
+ $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode();
92
+
93
+ } elseif(!$currency_code) {
94
+ $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode();
95
+ }
96
+
97
+ if( !in_array($currency_code, $this->getAcceptedCurrency()) ) {
98
+ Mage::throwException(Mage::helper('ewayuk')->__('Selected currency code ('.$currency_code.') is not compatabile with eWAY'));
99
+ }
100
+
101
+ return $this;
102
+ }
103
+
104
+ public function getOrderPlaceRedirectUrl()
105
+ {
106
+ return Mage::getUrl('ewayuk/shared/redirect');
107
+ }
108
+
109
+ /**
110
+ * Sends data to eWAY and requests a transaction URI to redirect the customer to.
111
+ */
112
+ public function getTransactionUri()
113
+ {
114
+ $url = $this->getRequestString();
115
+
116
+ $response = null;
117
+ if(extension_loaded('curl')) {
118
+ $ch = curl_init();
119
+ curl_setopt($ch, CURLOPT_URL, $url);
120
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
121
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
122
+ $response = curl_exec($ch);
123
+ curl_close($ch);
124
+
125
+ } elseif(ini_get('allow_url_fopen')) {
126
+ $response = file($url);
127
+ }
128
+
129
+ $xml = simplexml_load_string($response);
130
+ $result = $xml->Result;
131
+
132
+ if($result == 'True') {
133
+ return (string)$xml->URI;
134
+ } else {
135
+ return false;
136
+ }
137
+ }
138
+
139
+ public function getRequestString()
140
+ {
141
+ $billing = $this->getOrder()->getBillingAddress();
142
+ $fields = array();
143
+ $invoiceDesc = '';
144
+ $lengs = 0;
145
+ foreach ($this->getOrder()->getAllItems() as $item) {
146
+ if ($item->getParentItem()) {
147
+ continue;
148
+ }
149
+ if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) {
150
+ break;
151
+ }
152
+ $invoiceDesc .= $item->getName() . ', ';
153
+ }
154
+ $invoiceDesc = Mage::helper('core/string')->substr($invoiceDesc, 0, -2);
155
+
156
+ // Required information
157
+ $fields['CustomerID'] = $this->getCustomerId();
158
+ $fields['UserName'] = $this->getUserName();
159
+ $fields['Amount'] = sprintf("%.02f", $this->getOrder()->getBaseGrandTotal());
160
+ $fields['Currency'] = $this->getOrder()->getBaseCurrencyCode();
161
+ $fields['ReturnURL'] = Mage::getUrl('ewayuk/shared/success', array('_secure' => true));
162
+ $fields['CancelURL'] = Mage::getUrl('ewayuk/shared/failure', array('_secure' => true));
163
+
164
+ // Customer information
165
+ $fields['CustomerFirstName'] = $billing->getFirstname();
166
+ $fields['CustomerLastName'] = $billing->getLastname();
167
+ $fields['CustomerAddress'] = trim(str_replace("\n", ' ', trim(implode(' ', $billing->getStreet()))));
168
+ $fields['CustomerCity'] = $billing->getCity();
169
+ $fields['CustomerState'] = $billing->getRegion();
170
+ $fields['CustomerPostCode'] = $billing->getPostcode();
171
+ $fields['CustomerCountry'] = $billing->getCountryId();
172
+ $fields['CustomerEmail'] = $this->getOrder()->getCustomerEmail();
173
+ $fields['CustomerPhone'] = $billing->getTelephone();
174
+ $fields['InvoiceDescription'] = $invoiceDesc;
175
+ $fields['MerchantReference'] = $this->getOrder()->getRealOrderId();
176
+ $fields['MerchantOption1'] = '';
177
+ $fields['MerchantOption2'] = Mage::helper('core')->encrypt($fields['MerchantReference']);
178
+ $fields['MerchantOption3'] = '';
179
+
180
+ // Store information
181
+ $fields['CompanyName'] = Mage::app()->getStore()->getName();
182
+
183
+ if($title = $this->getStoreInfoByField('store_title')) {
184
+ $fields['PageTitle'] = $title;
185
+ }
186
+
187
+ if($description = $this->getStoreInfoByField('store_description')) {
188
+ $fields['PageDescription'] = $description;
189
+ }
190
+
191
+ if($footer = $this->getStoreInfoByField('store_footer')) {
192
+ $fields['PageFooter'] = $footer;
193
+ }
194
+
195
+ // Process the fields array into something that can be sent via POST
196
+ $request = array();
197
+ foreach ($fields as $key => $value) {
198
+ $request[] = $key . '=' . rawurlencode($value);
199
+ }
200
+
201
+ $url = $this->getRequestUrl() . '?' . implode('&', $request);
202
+
203
+ return $url;
204
+ }
205
+
206
+ /**
207
+ * Get debug flag
208
+ *
209
+ * @return string
210
+ */
211
+ public function getDebug()
212
+ {
213
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/debug_flag');
214
+ }
215
+
216
+ public function capture(Varien_Object $payment, $amount)
217
+ {
218
+ $payment->setStatus(self::STATUS_APPROVED)
219
+ ->setLastTransId($this->getTransactionId());
220
+
221
+ return $this;
222
+ }
223
+
224
+ public function cancel(Varien_Object $payment)
225
+ {
226
+ $payment->setStatus(self::STATUS_DECLINED)
227
+ ->setLastTransId($this->getTransactionId());
228
+
229
+ return $this;
230
+ }
231
+
232
+ /**
233
+ * parse response POST array from gateway page and return payment status
234
+ *
235
+ * @return bool
236
+ */
237
+ public function getResponse($code)
238
+ {
239
+ $url = $this->getResultsUrl() .
240
+ '?CustomerID=' . $this->getCustomerId() .
241
+ '&UserName=' . $this->getUserName() .
242
+ '&AccessPaymentCode=' . $code;
243
+
244
+ $response = null;
245
+ if(extension_loaded('curl')) {
246
+ $ch = curl_init();
247
+ curl_setopt($ch, CURLOPT_URL, $url);
248
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
249
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
250
+ $response = curl_exec($ch);
251
+ curl_close($ch);
252
+
253
+ } elseif(ini_get('allow_url_fopen')) {
254
+ $response = file($url);
255
+ }
256
+
257
+ $xml = simplexml_load_string($response);
258
+ return Mage::helper('core')->xmlToAssoc($xml);
259
+ }
260
+
261
+ }
app/code/community/Fontis/EwayUk/Model/Source/Cctype.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ /**
22
+ * eWAY CC Types Source Model
23
+ */
24
+ class Fontis_EwayUk_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype
25
+ {
26
+ public function getAllowedTypes()
27
+ {
28
+ return array('VI', 'MC', 'AE', 'DICL', 'JCB');
29
+ }
30
+ }
app/code/community/Fontis/EwayUk/controllers/SharedController.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ class Fontis_EwayUk_SharedController extends Mage_Core_Controller_Front_Action
22
+ {
23
+ protected function _expireAjax()
24
+ {
25
+ if (!$this->getCheckout()->getQuote()->hasItems()) {
26
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
27
+ exit;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Get singleton of Checkout Session Model
33
+ *
34
+ * @return Mage_Checkout_Model_Session
35
+ */
36
+ public function getCheckout()
37
+ {
38
+ return Mage::getSingleton('checkout/session');
39
+ }
40
+
41
+ /**
42
+ * when customer select eWay payment method
43
+ */
44
+ public function redirectAction()
45
+ {
46
+ $session = $this->getCheckout();
47
+ $session->setEwayUkQuoteId($session->getQuoteId());
48
+ $session->setEwayUkRealOrderId($session->getLastRealOrderId());
49
+
50
+ $order = Mage::getModel('sales/order');
51
+ $order->loadByIncrementId($session->getLastRealOrderId());
52
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayuk')->__('Customer was redirected to eWAY.'));
53
+ $order->save();
54
+
55
+ $shared = $order->getPayment()->getMethodInstance();
56
+ $url = $shared->getTransactionUri();
57
+
58
+ if($url !== false) {
59
+ $this->getResponse()->setRedirect($url, 302);
60
+ } else {
61
+ $this->_forward('*/*/failure');
62
+ }
63
+
64
+ $session->unsQuoteId();
65
+ }
66
+
67
+ /**
68
+ * eWay returns POST variables to this action
69
+ */
70
+ public function successAction()
71
+ {
72
+ $result = $this->_getPaymentResult();
73
+
74
+ if($result['TrxnStatus'] != 'true') {
75
+ $this->_redirect('checkout/onepage/failure');
76
+
77
+ } else {
78
+
79
+ $session = $this->getCheckout();
80
+
81
+ $session->unsEwayUkRealOrderId();
82
+ $session->setQuoteId($session->getEwayUkQuoteId(true));
83
+ $session->getQuote()->setIsActive(false)->save();
84
+
85
+ $order = Mage::getModel('sales/order');
86
+ $order->load($this->getCheckout()->getLastOrderId());
87
+ if($order->getId()) {
88
+ $order->sendNewOrderEmail();
89
+ }
90
+
91
+ $this->_redirect('checkout/onepage/success');
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Display failure page if error
97
+ *
98
+ */
99
+ public function failureAction()
100
+ {
101
+ $result = $this->_getPaymentResult();
102
+
103
+ $this->getCheckout()->clear();
104
+
105
+ $this->loadLayout();
106
+ $this->renderLayout();
107
+ }
108
+
109
+ /**
110
+ * Checking POST variables.
111
+ * Creating invoice if payment was successfull or cancel order if payment was declined
112
+ */
113
+ protected function _getPaymentResult()
114
+ {
115
+ if (!$this->getRequest()->isPost()) {
116
+ $this->norouteAction();
117
+ return;
118
+ }
119
+
120
+ $accessPaymentCode = $this->getRequest()->getPost('AccessPaymentCode');
121
+ $response = Mage::getModel('ewayuk/shared')->getResponse($accessPaymentCode);
122
+
123
+ $order = Mage::getModel('sales/order');
124
+ $order->loadByIncrementId($response['MerchantReference']);
125
+
126
+ $paymentInst = $order->getPayment()->getMethodInstance();
127
+
128
+ if ($response['TrxnStatus'] == 'true') {
129
+ if ($order->canInvoice()) {
130
+ $invoice = $order->prepareInvoice();
131
+ $invoice->register()->capture();
132
+ Mage::getModel('core/resource_transaction')
133
+ ->addObject($invoice)
134
+ ->addObject($invoice->getOrder())
135
+ ->save();
136
+
137
+ $paymentInst->setTransactionId($response['TrxnNumber']);
138
+ $text = "Customer successfully returned from eWAY.<br />Transaction reference: " . $response['TrxnNumber'] . "<br />Response: " . $response['TrxnResponseMessage'];
139
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayuk')->__($text));
140
+ }
141
+ } else {
142
+ $paymentInst->setTransactionId($response['TrxnNumber']);
143
+ $order->cancel();
144
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayuk')->__('Customer was rejected by eWAY.<br />Response Code: ' . $response['ResponseCode'] . '<br />Response: ' . $response['TrxnResponseMessage']));
145
+ $this->getCheckout()->setEwayUkErrorMessage($response['TrxnResponseMessage']);
146
+ }
147
+
148
+ $order->save();
149
+
150
+ return $response;
151
+ }
152
+ }
app/code/community/Fontis/EwayUk/etc/config.xml ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
15
+ *
16
+ * @category Fontis
17
+ * @package Fontis_EwayUk
18
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Fontis_EwayUk>
25
+ <version>1.0.0</version>
26
+ </Fontis_EwayUk>
27
+ </modules>
28
+ <global>
29
+ <models>
30
+ <ewayuk>
31
+ <class>Fontis_EwayUk_Model</class>
32
+ </ewayuk>
33
+ </models>
34
+ <blocks>
35
+ <ewayuk>
36
+ <class>Fontis_EwayUk_Block</class>
37
+ </ewayuk>
38
+ </blocks>
39
+ <helpers>
40
+ <ewayuk>
41
+ <class>Fontis_EwayUk_Helper</class>
42
+ </ewayuk>
43
+ </helpers>
44
+ <payment>
45
+ <cc>
46
+ <types>
47
+ <JCB>
48
+ <code>JCB</code>
49
+ <name>JCB</name>
50
+ <order>50</order>
51
+ </JCB>
52
+ <DICL>
53
+ <code>DICL</code>
54
+ <name>Diners Club</name>
55
+ <order>60</order>
56
+ </DICL>
57
+ </types>
58
+ </cc>
59
+ </payment>
60
+ </global>
61
+ <frontend>
62
+ <secure_url>
63
+ <ewayuk>/ewayuk/shared</ewayuk>
64
+ </secure_url>
65
+ <routers>
66
+ <ewayuk>
67
+ <use>standard</use>
68
+ <args>
69
+ <module>Fontis_EwayUk</module>
70
+ <frontName>ewayuk</frontName>
71
+ </args>
72
+ </ewayuk>
73
+ </routers>
74
+ <translate>
75
+ <modules>
76
+ <Fontis_EwayUk>
77
+ <files>
78
+ <default>Fontis_EwayUk.csv</default>
79
+ </files>
80
+ </Fontis_EwayUk>
81
+ </modules>
82
+ </translate>
83
+ <layout>
84
+ <updates>
85
+ <ewayuk>
86
+ <file>fontis_ewayuk.xml</file>
87
+ </ewayuk>
88
+ </updates>
89
+ </layout>
90
+ </frontend>
91
+ <adminhtml>
92
+ <translate>
93
+ <modules>
94
+ <Fontis_EwayUk>
95
+ <files>
96
+ <default>Fontis_EwayUk.csv</default>
97
+ </files>
98
+ </Fontis_EwayUk>
99
+ </modules>
100
+ </translate>
101
+ </adminhtml>
102
+ <default>
103
+ <payment>
104
+ <ewayuk>
105
+ <active>0</active>
106
+ <customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
107
+ <username backend_model="adminhtml/system_config_backend_encrypted"/>
108
+ <currency>GBP</currency>
109
+ <model>ewayuk/shared</model>
110
+ <title>Credit Card</title>
111
+ <order_status>processing</order_status>
112
+ <allowspecific>0</allowspecific>
113
+ </ewayuk>
114
+ </payment>
115
+ </default>
116
+ </config>
app/code/community/Fontis/EwayUk/etc/system.xml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
15
+ *
16
+ * @category Fontis
17
+ * @package Fontis_EwayUk
18
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <sections>
24
+ <payment>
25
+ <groups>
26
+ <ewayuk translate="label" module="ewayuk">
27
+ <label>eWAY UK Shared</label>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>205</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>0</show_in_store>
33
+ <fields>
34
+ <active translate="label">
35
+ <label>Enabled</label>
36
+ <frontend_type>select</frontend_type>
37
+ <source_model>adminhtml/system_config_source_yesno</source_model>
38
+ <sort_order>10</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>0</show_in_store>
42
+ </active>
43
+ <title translate="label">
44
+ <label>Title</label>
45
+ <frontend_type>text</frontend_type>
46
+ <sort_order>15</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
+ </title>
51
+ <customer_id translate="label">
52
+ <label>Customer ID</label>
53
+ <frontend_type>text</frontend_type>
54
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
55
+ <sort_order>11</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>0</show_in_store>
59
+ </customer_id>
60
+ <username translate="label">
61
+ <label>Username</label>
62
+ <frontend_type>text</frontend_type>
63
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
64
+ <sort_order>12</sort_order>
65
+ <show_in_default>1</show_in_default>
66
+ <show_in_website>1</show_in_website>
67
+ <show_in_store>0</show_in_store>
68
+ </username>
69
+
70
+ <store_title translate="label">
71
+ <label>Store Title</label>
72
+ <frontend_type>text</frontend_type>
73
+ <sort_order>20</sort_order>
74
+ <show_in_default>1</show_in_default>
75
+ <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
+ <comment>This is displayed on the eWAY hosted page</comment>
78
+ </store_title>
79
+ <store_description translate="label">
80
+ <label>Store Description</label>
81
+ <frontend_type>text</frontend_type>
82
+ <sort_order>21</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ <comment>This is displayed on the eWAY hosted page</comment>
87
+ </store_description>
88
+ <store_footer translate="label">
89
+ <label>Store Footer</label>
90
+ <frontend_type>text</frontend_type>
91
+ <sort_order>22</sort_order>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ <comment>This is displayed on the eWAY hosted page</comment>
96
+ </store_footer>
97
+
98
+ <currency translate="label">
99
+ <label>Accepted currency</label>
100
+ <frontend_type>multiselect</frontend_type>
101
+ <source_model>adminhtml/system_config_source_currency</source_model>
102
+ <sort_order>40</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>0</show_in_store>
106
+ </currency>
107
+
108
+ <order_status translate="label">
109
+ <label>New order status</label>
110
+ <frontend_type>select</frontend_type>
111
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
112
+ <sort_order>70</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>0</show_in_store>
116
+ </order_status>
117
+ <allowspecific translate="label">
118
+ <label>Payment from applicable countries</label>
119
+ <frontend_type>allowspecific</frontend_type>
120
+ <sort_order>80</sort_order>
121
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>1</show_in_website>
124
+ <show_in_store>1</show_in_store>
125
+ </allowspecific>
126
+ <specificcountry translate="label">
127
+ <label>Payment from Specific countries</label>
128
+ <frontend_type>multiselect</frontend_type>
129
+ <sort_order>90</sort_order>
130
+ <source_model>adminhtml/system_config_source_country</source_model>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>1</show_in_store>
134
+ </specificcountry>
135
+ <sort_order translate="label">
136
+ <label>Sort order</label>
137
+ <frontend_type>text</frontend_type>
138
+ <sort_order>100</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>0</show_in_store>
142
+ </sort_order>
143
+ </fields>
144
+ </ewayuk>
145
+ </groups>
146
+ </payment>
147
+ </sections>
148
+ </config>
app/design/adminhtml/default/default/template/fontis/ewayuk/form.phtml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <?php $_code=$this->getMethodCode() ?>
22
+ <script type="text/javascript">
23
+ Validation.creditCartTypes.JCB = [new RegExp('^(35[0-9]{14}|(2131|1800)[0-9]{11})$'), new RegExp('^([0-9]{3})?$'), true];
24
+ Validation.creditCartTypes.DICL = [new RegExp('^((300|305)[0-9]{11}|36[0-9]{12}|55[0-9]{14})$'), new RegExp('^([0-9]{3})?$'), false];
25
+ </script>
26
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
27
+ <li>
28
+ <div class="input-box">
29
+ <label for="<?php echo $_code ?>_cc_owner"><?php echo Mage::helper('payment')->__('Name on Card') ?> <span class="required">*</span></label><br/>
30
+ <input type="text" title="<?php echo Mage::helper('payment')->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->getInfoData('cc_owner') ?>"/>
31
+ </div>
32
+ </li>
33
+ <li>
34
+ <div class="input-box">
35
+ <label for="<?php echo $_code ?>_cc_type"><?php echo Mage::helper('payment')->__('Credit Card Type') ?> <span class="required">*</span></label><br/>
36
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
37
+ <?php $_ccType = $this->getInfoData('cc_type') ?>
38
+ <option value=""></option>
39
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
40
+ <option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
41
+ <?php endforeach ?>
42
+ </select>
43
+ </div>
44
+ </li>
45
+ <li>
46
+ <div class="input-box">
47
+ <label for="<?php echo $_code ?>_cc_number"><?php echo Mage::helper('payment')->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
48
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo Mage::helper('payment')->__('Credit Card Number') ?>" class="input-text validate-cc-number" value="<?php echo $this->getInfoData('cc_number')?>"/>
49
+ </div>
50
+ </li>
51
+ <li>
52
+ <div class="input-box">
53
+ <label for="<?php echo $_code ?>_expiration"><?php echo Mage::helper('payment')->__('Expiration Date') ?> <span class="required">*</span></label><br/>
54
+ <select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
55
+ <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
56
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
57
+ <option value="<?php echo $k ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
58
+ <?php endforeach ?>
59
+ </select>
60
+ <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
61
+ <select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
62
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
63
+ <option value="<?php echo $k ? $k : '' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
64
+ <?php endforeach ?>
65
+ </select>
66
+ </div>
67
+ </li>
68
+ <?php if($this->hasVerification()): ?>
69
+ <li>
70
+ <div class="input-box">
71
+ <label for="<?php echo $_code ?>_cc_cid"><?php echo Mage::helper('payment')->__('Card Verification Number') ?> <span class="required">*</span></label><br/>
72
+ <input type="text" title="<?php echo Mage::helper('payment')->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="<?php echo $this->getInfoData('cc_cid')?>"/>
73
+ </div>
74
+ </li>
75
+ <?php endif; ?>
76
+ </ul>
app/design/adminhtml/default/default/template/fontis/ewayuk/info.phtml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br/>
22
+ <?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
23
+ <?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
24
+ <?php echo Mage::helper('payment')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
app/design/adminhtml/default/default/template/fontis/ewayuk/pdf/info.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
22
+ {{pdf_row_separator}}
23
+ <?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
24
+ {{pdf_row_separator}}
25
+ <?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
26
+ {{pdf_row_separator}}
27
+ <?php echo Mage::helper('payment')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
app/design/frontend/default/default/layout/fontis_ewayuk.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
15
+ *
16
+ * @category Fontis
17
+ * @package Fontis_EwayUk
18
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+
22
+ -->
23
+ <layout version="0.1.0">
24
+
25
+ <ewayuk_shared_failure>
26
+ <reference name="root">
27
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
28
+ </reference>
29
+ <reference name="content">
30
+ <block type="ewayuk/failure" name="ewayuk_shared_failure" template="fontis/ewayuk/failure.phtml">
31
+ </block>
32
+ </reference>
33
+ </ewayuk_shared_failure>
34
+
35
+ </layout>
app/design/frontend/default/default/template/fontis/ewayuk/failure.phtml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <div class="page-head">
22
+ <h3><?php echo $this->__('Error occured') ?></h3>
23
+ </div>
24
+ <p><?php echo $this->getErrorMessage() ?></p>
25
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/default/default/template/fontis/ewayuk/form.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
14
+ *
15
+ * @category Fontis
16
+ * @package Fontis_EwayUk
17
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ ?>
21
+ <fieldset class="form-list">
22
+ <?php $_code=$this->getMethodCode() ?>
23
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
24
+ <li>
25
+ <?php echo $this->__('You will be redirected to eWAY website when you place an order.') ?>
26
+ </li>
27
+ </ul>
28
+ </fieldset>
app/etc/modules/Fontis_EwayUk.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY UK payment gateway
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 you can be sent a copy immediately.
15
+ *
16
+ * @category Fontis
17
+ * @package Fontis_EwayUk
18
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Fontis_EwayUk>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ <depends>
28
+ <Mage_Payment/>
29
+ </depends>
30
+ </Fontis_EwayUk>
31
+ </modules>
32
+ </config>
app/locale/en_US/Fontis_EwayUk.csv ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "API Gateway URL","API Gateway URL"
2
+ "Accepted currency","Accepted currency"
3
+ "Card Verification Number","Card Verification Number"
4
+ "Credit Card Number","Credit Card Number"
5
+ "Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s"
6
+ "Credit Card Type","Credit Card Type"
7
+ "Credit Card Type: %s","Credit Card Type: %s"
8
+ "Credit Card Types","Credit Card Types"
9
+ "Credit Card Verification","Credit Card Verification"
10
+ "Customer ID","Customer ID"
11
+ "Customer successfully returned from eWAY","Customer successfully returned from eWAY"
12
+ "Customer was redirected to eWAY.","Customer was redirected to eWAY."
13
+ "Customer was rejected by eWAY","Customer was rejected by eWAY"
14
+ "Debug Flag","Debug Flag"
15
+ "Enabled","Enabled"
16
+ "Error occured","Error occured"
17
+ "Expiration Date","Expiration Date"
18
+ "Expiration Date: %s/%s","Expiration Date: %s/%s"
19
+ "Name on Card","Name on Card"
20
+ "Name on the Card: %s","Name on the Card: %s"
21
+ "New order status","New order status"
22
+ "Payment from Specific countries","Payment from Specific countries"
23
+ "Payment from applicable countries","Payment from applicable countries"
24
+ "Please <a href=""%s"">continue shopping</a>.","Please <a href=""%s"">continue shopping</a>."
25
+ "Please Select","Please Select"
26
+ "Selected currency code (","Selected currency code ("
27
+ "Sort order","Sort order"
28
+ "There has been an error processing your payment.","There has been an error processing your payment."
29
+ "There has been an error processing your payment. Please try later or contact us for help.","There has been an error processing your payment. Please try later or contact us for help."
30
+ "Title","Title"
31
+ "What is this?","What is this?"
32
+ "You will be redirected to eWAY 3D-Secure in a few seconds.","You will be redirected to eWAY 3D-Secure in a few seconds."
33
+ "You will be redirected to eWAY 3D-Secure website when you place an order.","You will be redirected to eWAY 3D-Secure website when you place an order."
34
+ "You will be redirected to eWAY in a few seconds.","You will be redirected to eWAY in a few seconds."
35
+ "You will be redirected to eWAY website when you place an order.","You will be redirected to eWAY website when you place an order."
36
+ "eWAY 3D-Secure","eWAY 3D-Secure"
37
+ "eWAY Direct","eWAY Direct"
38
+ "eWAY Shared","eWAY Shared"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Fontis_EwayUk</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 3.0)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Adds support for eWAY UK payment gateway.</summary>
10
+ <description>Adds support for eWAY UK payment gateway.</description>
11
+ <notes>None</notes>
12
+ <authors><author><name>Fontis</name><user>auto-converted</user><email>magento@fontis.com.au</email></author></authors>
13
+ <date>2010-05-09</date>
14
+ <time>15:35:36</time>
15
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="ewayuk"><dir name="pdf"><file name="info.phtml" hash="6cd31ebf26501aedd9d10d4417c86784"/></dir><file name="form.phtml" hash="5bc604ac9043fb91bad7506c34d35347"/><file name="info.phtml" hash="7d54cbeef374f9a604168f810313e137"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="fontis_ewayuk.xml" hash="eeb1429bcc22721768c2c7b497f267aa"/></dir><dir name="template"><dir name="fontis"><dir name="ewayuk"><file name="failure.phtml" hash="43b748bdea9e2692ac5ea5e1b7e89c10"/><file name="form.phtml" hash="e945782a404f9b46c08ee8c31a8286e9"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Fontis_EwayUk.csv" hash="608ddd72f698ac44afa8f3a0fc64d5e4"/></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="EwayUk"><dir name="Block"><file name="Failure.php" hash="b1449ddfb586764e607d216713b2175d"/><file name="Form.php" hash="fa55c969076c29be0762bf1d1668a3f7"/></dir><dir name="controllers"><file name="SharedController.php" hash="c877229b5b5b68687951a69eb5cb4885"/></dir><dir name="etc"><file name="config.xml" hash="6be8207fb4c2824290765a0d31496175"/><file name="system.xml" hash="cc9385dede11cb965c4a2578d3566081"/></dir><dir name="Helper"><file name="Data.php" hash="fdd8708dfa86eb06c34ef482348c44ef"/></dir><dir name="Model"><dir name="Source"><file name="Cctype.php" hash="97e81a8d3847be3ec75b279c2d7ef379"/></dir><file name="Shared.php" hash="88719e7239cf0c19f66f720c881603f6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_EwayUk.xml" hash="177f543b4a2a80f068ffbc3f0f203d72"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>