Fontis_EwayAu - Version 1.0.0

Version Notes

None.

Download this release

Release Info

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


Version 1.0.0

Files changed (36) hide show
  1. app/code/community/Fontis/EwayAu/Block/Form.php +31 -0
  2. app/code/community/Fontis/EwayAu/Block/Info.php +37 -0
  3. app/code/community/Fontis/EwayAu/Block/Secure/Failure.php +42 -0
  4. app/code/community/Fontis/EwayAu/Block/Secure/Form.php +30 -0
  5. app/code/community/Fontis/EwayAu/Block/Secure/Redirect.php +46 -0
  6. app/code/community/Fontis/EwayAu/Block/Shared/Failure.php +44 -0
  7. app/code/community/Fontis/EwayAu/Block/Shared/Form.php +30 -0
  8. app/code/community/Fontis/EwayAu/Block/Shared/Redirect.php +47 -0
  9. app/code/community/Fontis/EwayAu/Controller/Abstract.php +167 -0
  10. app/code/community/Fontis/EwayAu/Helper/Data.php +26 -0
  11. app/code/community/Fontis/EwayAu/Model/Api/Debug.php +29 -0
  12. app/code/community/Fontis/EwayAu/Model/Direct.php +278 -0
  13. app/code/community/Fontis/EwayAu/Model/Mysql4/Api/Debug.php +29 -0
  14. app/code/community/Fontis/EwayAu/Model/Mysql4/Api/Debug/Collection.php +29 -0
  15. app/code/community/Fontis/EwayAu/Model/Mysql4/Setup.php +26 -0
  16. app/code/community/Fontis/EwayAu/Model/Secure.php +43 -0
  17. app/code/community/Fontis/EwayAu/Model/Shared.php +241 -0
  18. app/code/community/Fontis/EwayAu/Model/Source/Cctype.php +29 -0
  19. app/code/community/Fontis/EwayAu/controllers/SecureController.php +29 -0
  20. app/code/community/Fontis/EwayAu/controllers/SharedController.php +26 -0
  21. app/code/community/Fontis/EwayAu/etc/config.xml +160 -0
  22. app/code/community/Fontis/EwayAu/etc/system.xml +340 -0
  23. app/code/community/Fontis/EwayAu/sql/eway_setup/mysql4-install-0.1.0.php +41 -0
  24. app/design/adminhtml/default/default/template/fontis/ewayau/form.phtml +78 -0
  25. app/design/adminhtml/default/default/template/fontis/ewayau/info.phtml +26 -0
  26. app/design/adminhtml/default/default/template/fontis/ewayau/pdf/info.phtml +29 -0
  27. app/design/frontend/default/default/layout/fontis_ewayau.xml +45 -0
  28. app/design/frontend/default/default/template/fontis/ewayau/form.phtml +86 -0
  29. app/design/frontend/default/default/template/fontis/ewayau/info.phtml +30 -0
  30. app/design/frontend/default/default/template/fontis/ewayau/secure/failure.phtml +27 -0
  31. app/design/frontend/default/default/template/fontis/ewayau/secure/form.phtml +30 -0
  32. app/design/frontend/default/default/template/fontis/ewayau/shared/failure.phtml +27 -0
  33. app/design/frontend/default/default/template/fontis/ewayau/shared/form.phtml +30 -0
  34. app/etc/modules/Fontis_EwayAu.xml +34 -0
  35. app/locale/en_US/Fontis_EwayAu.csv +38 -0
  36. package.xml +18 -0
app/code/community/Fontis/EwayAu/Block/Form.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Form extends Mage_Payment_Block_Form_Cc
24
+ {
25
+ protected function _construct()
26
+ {
27
+ parent::_construct();
28
+ $this->setTemplate('fontis/ewayau/form.phtml');
29
+ }
30
+
31
+ }
app/code/community/Fontis/EwayAu/Block/Info.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Info extends Mage_Payment_Block_Info_Cc
24
+ {
25
+ protected function _construct()
26
+ {
27
+ parent::_construct();
28
+ $this->setTemplate('fontis/ewayau/info.phtml');
29
+ }
30
+
31
+ public function toPdf()
32
+ {
33
+ $this->setTemplate('fontis/ewayau/pdf/info.phtml');
34
+ return $this->toHtml();
35
+ }
36
+
37
+ }
app/code/community/Fontis/EwayAu/Block/Secure/Failure.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Secure_Failure extends Mage_Core_Block_Template
24
+ {
25
+ /**
26
+ * Return Error message
27
+ *
28
+ * @return string
29
+ */
30
+ public function getErrorMessage ()
31
+ {
32
+ return Mage::getSingleton('checkout/session')->getEwayErrorMessage();
33
+ }
34
+
35
+ /**
36
+ * Get continue shopping url
37
+ */
38
+ public function getContinueShoppingUrl()
39
+ {
40
+ return Mage::getUrl('checkout/cart');
41
+ }
42
+ }
app/code/community/Fontis/EwayAu/Block/Secure/Form.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Secure_Form extends Mage_Payment_Block_Form
24
+ {
25
+ protected function _construct()
26
+ {
27
+ $this->setTemplate('fontis/ewayau/secure/form.phtml');
28
+ parent::_construct();
29
+ }
30
+ }
app/code/community/Fontis/EwayAu/Block/Secure/Redirect.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Secure_Redirect extends Mage_Core_Block_Abstract
24
+ {
25
+ protected function _toHtml()
26
+ {
27
+ $secure = $this->getOrder()->getPayment()->getMethodInstance();
28
+
29
+ $form = new Varien_Data_Form();
30
+ $form->setAction($secure->getEwaySecureUrl())
31
+ ->setId('ewayau_secure_checkout')
32
+ ->setName('ewayau_secure_checkout')
33
+ ->setMethod('POST')
34
+ ->setUseContainer(true);
35
+ foreach ($secure->getFormFields() as $field=>$value) {
36
+ $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
37
+ }
38
+ $html = '<html><body>';
39
+ $html.= $this->__('You will be redirected to eWAY 3D-Secure in a few seconds.');
40
+ $html.= $form->toHtml();
41
+ $html.= '<script type="text/javascript">document.getElementById("ewayau_secure_checkout").submit();</script>';
42
+ $html.= '</body></html>';
43
+
44
+ return $html;
45
+ }
46
+ }
app/code/community/Fontis/EwayAu/Block/Shared/Failure.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Shared_Failure extends Mage_Core_Block_Template
24
+ {
25
+ /**
26
+ * Return Error message
27
+ *
28
+ * @return string
29
+ */
30
+ public function getErrorMessage ()
31
+ {
32
+ $msg = Mage::getSingleton('checkout/session')->getEwayErrorMessage();
33
+ Mage::getSingleton('checkout/session')->unsEwayErrorMessage();
34
+ return $msg;
35
+ }
36
+
37
+ /**
38
+ * Get continue shopping url
39
+ */
40
+ public function getContinueShoppingUrl()
41
+ {
42
+ return Mage::getUrl('checkout/cart');
43
+ }
44
+ }
app/code/community/Fontis/EwayAu/Block/Shared/Form.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Shared_Form extends Mage_Payment_Block_Form
24
+ {
25
+ protected function _construct()
26
+ {
27
+ $this->setTemplate('fontis/ewayau/shared/form.phtml');
28
+ parent::_construct();
29
+ }
30
+ }
app/code/community/Fontis/EwayAu/Block/Shared/Redirect.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Block_Shared_Redirect extends Mage_Core_Block_Abstract
24
+ {
25
+ protected function _toHtml()
26
+ {
27
+ $shared = $this->getOrder()->getPayment()->getMethodInstance();
28
+
29
+ $form = new Varien_Data_Form();
30
+ $form->setAction($shared->getEwaySharedUrl())
31
+ ->setId('ewayau_shared_checkout')
32
+ ->setName('ewayau_shared_checkout')
33
+ ->setMethod('POST')
34
+ ->setUseContainer(true);
35
+ foreach ($shared->getFormFields() as $field=>$value) {
36
+ $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
37
+ }
38
+
39
+ $html = '<html><body>';
40
+ $html.= $this->__('You will be redirected to eWAY in a few seconds.');
41
+ $html.= $form->toHtml();
42
+ $html.= '<script type="text/javascript">document.getElementById("ewayau_shared_checkout").submit();</script>';
43
+ $html.= '</body></html>';
44
+
45
+ return $html;
46
+ }
47
+ }
app/code/community/Fontis/EwayAu/Controller/Abstract.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ abstract class Fontis_EwayAu_Controller_Abstract extends Mage_Core_Controller_Front_Action
24
+ {
25
+ protected function _expireAjax()
26
+ {
27
+ if (!$this->getCheckout()->getQuote()->hasItems()) {
28
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
29
+ exit;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Redirect Block
35
+ * need to be redeclared
36
+ */
37
+ protected $_redirectBlockType;
38
+
39
+ /**
40
+ * Get singleton of Checkout Session Model
41
+ *
42
+ * @return Mage_Checkout_Model_Session
43
+ */
44
+ public function getCheckout()
45
+ {
46
+ return Mage::getSingleton('checkout/session');
47
+ }
48
+
49
+ /**
50
+ * when customer select eWay payment method
51
+ */
52
+ public function redirectAction()
53
+ {
54
+ $session = $this->getCheckout();
55
+ $session->setEwayQuoteId($session->getQuoteId());
56
+ $session->setEwayRealOrderId($session->getLastRealOrderId());
57
+
58
+ $order = Mage::getModel('sales/order');
59
+ $order->loadByIncrementId($session->getLastRealOrderId());
60
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayau')->__('Customer was redirected to eWAY.'));
61
+ $order->save();
62
+
63
+ $this->getResponse()->setBody(
64
+ $this->getLayout()
65
+ ->createBlock($this->_redirectBlockType)
66
+ ->setOrder($order)
67
+ ->toHtml()
68
+ );
69
+
70
+ $session->unsQuoteId();
71
+ }
72
+
73
+ /**
74
+ * eWay returns POST variables to this action
75
+ */
76
+ public function successAction()
77
+ {
78
+ $status = $this->_checkReturnedPost();
79
+
80
+ $session = $this->getCheckout();
81
+
82
+ $session->unsEwayRealOrderId();
83
+ $session->setQuoteId($session->getEwayQuoteId(true));
84
+ $session->getQuote()->setIsActive(false)->save();
85
+
86
+ $order = Mage::getModel('sales/order');
87
+ $order->load($this->getCheckout()->getLastOrderId());
88
+ if($order->getId()) {
89
+ $order->sendNewOrderEmail();
90
+ }
91
+
92
+ if ($status) {
93
+ $this->_redirect('checkout/onepage/success');
94
+ } else {
95
+ $this->_redirect('*/*/failure');
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Display failure page if error
101
+ *
102
+ */
103
+ public function failureAction()
104
+ {
105
+ if (!$this->getCheckout()->getEwayErrorMessage()) {
106
+ $this->norouteAction();
107
+ return;
108
+ }
109
+
110
+ $this->getCheckout()->clear();
111
+
112
+ $this->loadLayout();
113
+ $this->renderLayout();
114
+ }
115
+
116
+ /**
117
+ * Checking POST variables.
118
+ * Creating invoice if payment was successfull or cancel order if payment was declined
119
+ */
120
+ protected function _checkReturnedPost()
121
+ {
122
+ if (!$this->getRequest()->isPost()) {
123
+ $this->norouteAction();
124
+ return;
125
+ }
126
+ $status = true;
127
+ $response = $this->getRequest()->getPost();
128
+
129
+ if ($this->getCheckout()->getEwayRealOrderId() != $response['ewayTrxnNumber'] ||
130
+ $this->getCheckout()->getEwayRealOrderId() != Mage::helper('core')->decrypt($response['eWAYoption2'])) {
131
+ $this->norouteAction();
132
+ return;
133
+ }
134
+
135
+ $order = Mage::getModel('sales/order');
136
+ $order->loadByIncrementId($response['ewayTrxnNumber']);
137
+
138
+ $paymentInst = $order->getPayment()->getMethodInstance();
139
+ $paymentInst->setResponse($response);
140
+
141
+ if ($paymentInst->parseResponse()) {
142
+
143
+ if ($order->canInvoice()) {
144
+ $invoice = $order->prepareInvoice();
145
+ $invoice->register()->capture();
146
+ Mage::getModel('core/resource_transaction')
147
+ ->addObject($invoice)
148
+ ->addObject($invoice->getOrder())
149
+ ->save();
150
+
151
+ $paymentInst->setTransactionId($response['ewayTrxnReference']);
152
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayau')->__('Customer successfully returned from eWAY'));
153
+ }
154
+ } else {
155
+ $paymentInst->setTransactionId($response['ewayTrxnReference']);
156
+ $order->cancel();
157
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('ewayau')->__('Customer was rejected by eWAY'));
158
+ $status = false;
159
+ $this->getCheckout()->setEwayErrorMessage($response['eWAYresponseText']);
160
+ }
161
+
162
+ $order->save();
163
+
164
+ return $status;
165
+ }
166
+
167
+ }
app/code/community/Fontis/EwayAu/Helper/Data.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Helper_Data extends Mage_Core_Helper_Abstract
24
+ {
25
+
26
+ }
app/code/community/Fontis/EwayAu/Model/Api/Debug.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Api_Debug extends Mage_Core_Model_Abstract
24
+ {
25
+ protected function _construct()
26
+ {
27
+ $this->_init('ewayau/api_debug');
28
+ }
29
+ }
app/code/community/Fontis/EwayAu/Model/Direct.php ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Direct extends Mage_Payment_Model_Method_Cc
24
+ {
25
+ protected $_code = 'ewayau_direct';
26
+
27
+ protected $_isGateway = true;
28
+ protected $_canAuthorize = false;
29
+ protected $_canCapture = true;
30
+ protected $_canCapturePartial = false;
31
+ protected $_canRefund = false;
32
+ protected $_canVoid = false;
33
+ protected $_canUseInternal = true;
34
+ protected $_canUseCheckout = true;
35
+ protected $_canUseForMultishipping = true;
36
+ protected $_canSaveCc = true;
37
+
38
+ protected $_formBlockType = 'ewayau/form';
39
+ protected $_infoBlockType = 'ewayau/info';
40
+
41
+ /**
42
+ * Get debug flag
43
+ *
44
+ * @return string
45
+ */
46
+ public function getDebug()
47
+ {
48
+ return Mage::getStoreConfig('payment/ewayau_direct/debug_flag');
49
+ }
50
+
51
+ /**
52
+ * Get flag to use CCV or not
53
+ *
54
+ * @return string
55
+ */
56
+ public function getUseccv()
57
+ {
58
+ return Mage::getStoreConfig('payment/ewayau_direct/useccv');
59
+ }
60
+
61
+ /**
62
+ * Get api url of eWAY Direct payment
63
+ *
64
+ * @return string
65
+ */
66
+ public function getApiGatewayUrl()
67
+ {
68
+ $value = Mage::getStoreConfig('payment/ewayau_direct/api_url');
69
+ if (!$value || $value === false) {
70
+ return 'https://www.eway.com.au/gateway/xmlpayment.asp';
71
+ }
72
+ return $value;
73
+ }
74
+
75
+ /**
76
+ * Get Customer Id
77
+ *
78
+ * @return string
79
+ */
80
+ public function getCustomerId()
81
+ {
82
+ return Mage::getStoreConfig('payment/ewayau_direct/customer_id');
83
+ }
84
+
85
+ /**
86
+ * Get currency that accepted by eWAY account
87
+ *
88
+ * @return string
89
+ */
90
+ public function getAcceptedCurrency()
91
+ {
92
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency');
93
+ }
94
+
95
+ public function validate()
96
+ {
97
+ parent::validate();
98
+ $paymentInfo = $this->getInfoInstance();
99
+ if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
100
+ $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode();
101
+ } else {
102
+ $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode();
103
+ }
104
+ if ($currency_code != $this->getAcceptedCurrency()) {
105
+ Mage::throwException(Mage::helper('ewayau')->__('Selected currency code ('.$currency_code.') is not compatabile with eWAY'));
106
+ }
107
+ return $this;
108
+ }
109
+
110
+ public function capture(Varien_Object $payment, $amount)
111
+ {
112
+ $this->setAmount($amount)
113
+ ->setPayment($payment);
114
+
115
+ $result = $this->callDoDirectPayment($payment)!==false;
116
+
117
+ if ($result) {
118
+ $payment->setStatus(self::STATUS_APPROVED)
119
+ ->setLastTransId($this->getTransactionId());
120
+ } else {
121
+ $e = $this->getError();
122
+ if (isset($e['message'])) {
123
+ $message = Mage::helper('ewayau')->__('There has been an error processing your payment.') . $e['message'];
124
+ } else {
125
+ $message = Mage::helper('ewayau')->__('There has been an error processing your payment. Please try later or contact us for help.');
126
+ }
127
+ Mage::throwException($message);
128
+ }
129
+ return $this;
130
+ }
131
+
132
+ public function cancel(Varien_Object $payment)
133
+ {
134
+ $payment->setStatus(self::STATUS_DECLINED);
135
+ return $this;
136
+ }
137
+
138
+ /**
139
+ * prepare params to send to gateway
140
+ *
141
+ * @return bool | array
142
+ */
143
+ public function callDoDirectPayment()
144
+ {
145
+ $payment = $this->getPayment();
146
+ $billing = $payment->getOrder()->getBillingAddress();
147
+
148
+ $invoiceDesc = '';
149
+ $lengs = 0;
150
+ foreach ($payment->getOrder()->getAllItems() as $item) {
151
+ if ($item->getParentItem()) {
152
+ continue;
153
+ }
154
+ if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) {
155
+ break;
156
+ }
157
+ $invoiceDesc .= $item->getName() . ', ';
158
+ }
159
+ $invoiceDesc = Mage::helper('core/string')->substr($invoiceDesc, 0, -2);
160
+
161
+ $address = clone $billing;
162
+ $address->unsFirstname();
163
+ $address->unsLastname();
164
+ $address->unsPostcode();
165
+ $formatedAddress = '';
166
+ $tmpAddress = explode(' ', str_replace("\n", ' ', trim($address->format('text'))));
167
+ foreach ($tmpAddress as $part) {
168
+ if (strlen($part) > 0) $formatedAddress .= $part . ' ';
169
+ }
170
+ // $this->getQuote()->reserveOrderId();
171
+ $xml = "<ewaygateway>";
172
+ $xml .= "<ewayCustomerID>" . $this->getCustomerId() . "</ewayCustomerID>";
173
+ $xml .= "<ewayTotalAmount>" . ($this->getAmount()*100) . "</ewayTotalAmount>";
174
+ $xml .= "<ewayCardHoldersName>" . htmlentities(trim($payment->getCcOwner()), ENT_QUOTES, 'UTF-8') . "</ewayCardHoldersName>";
175
+ $xml .= "<ewayCardNumber>" . $payment->getCcNumber() . "</ewayCardNumber>";
176
+ $xml .= "<ewayCardExpiryMonth>" . $payment->getCcExpMonth() . "</ewayCardExpiryMonth>";
177
+ $xml .= "<ewayCardExpiryYear>" . $payment->getCcExpYear() . "</ewayCardExpiryYear>";
178
+ $xml .= "<ewayTrxnNumber>" . '' . "</ewayTrxnNumber>";
179
+ $xml .= "<ewayCustomerInvoiceDescription>" . htmlentities(trim($invoiceDesc), ENT_QUOTES, 'UTF-8') . "</ewayCustomerInvoiceDescription>";
180
+ $xml .= "<ewayCustomerFirstName>" . htmlentities(trim($billing->getFirstname()), ENT_QUOTES, 'UTF-8') . "</ewayCustomerFirstName>";
181
+ $xml .= "<ewayCustomerLastName>" . htmlentities(trim($billing->getLastname()), ENT_QUOTES, 'UTF-8') . "</ewayCustomerLastName>";
182
+ $xml .= "<ewayCustomerEmail>" . htmlentities(trim($payment->getOrder()->getCustomerEmail()), ENT_QUOTES, 'UTF-8') . "</ewayCustomerEmail>";
183
+ $xml .= "<ewayCustomerAddress>" . htmlentities(trim($formatedAddress), ENT_QUOTES, 'UTF-8') . "</ewayCustomerAddress>";
184
+ $xml .= "<ewayCustomerPostcode>" . htmlentities(trim($billing->getPostcode()), ENT_QUOTES, 'UTF-8') . "</ewayCustomerPostcode>";
185
+ // $xml .= "<ewayCustomerInvoiceRef>" . $this->getQuote()->getReservedOrderId() . "</ewayCustomerInvoiceRef>";
186
+ $xml .= "<ewayCustomerInvoiceRef>" . '' . "</ewayCustomerInvoiceRef>";
187
+
188
+ if ($this->getUseccv()) {
189
+ $xml .= "<ewayCVN>" . $payment->getCcCid() . "</ewayCVN>";
190
+ }
191
+
192
+ $xml .= "<ewayOption1>" . '' . "</ewayOption1>";
193
+ $xml .= "<ewayOption2>" . '' . "</ewayOption2>";
194
+ $xml .= "<ewayOption3>" . '' . "</ewayOption3>";
195
+ $xml .= "</ewaygateway>";
196
+
197
+ $resultArr = $this->call($xml);
198
+
199
+ if ($resultArr === false) {
200
+ return false;
201
+ }
202
+
203
+ $this->setTransactionId($resultArr['ewayTrxnNumber']);
204
+
205
+ return $resultArr;
206
+ }
207
+
208
+ /**
209
+ * Send params to gateway
210
+ *
211
+ * @param string $xml
212
+ * @return bool | array
213
+ */
214
+ public function call($xml)
215
+ {
216
+ if ($this->getDebug()) {
217
+ $debug = Mage::getModel('ewayau/api_debug')
218
+ ->setRequestBody($xml)
219
+ ->save();
220
+ }
221
+
222
+ $http = new Varien_Http_Adapter_Curl();
223
+ $config = array('timeout' => 30);
224
+
225
+ $http->setConfig($config);
226
+ $http->write(Zend_Http_Client::POST, $this->getApiGatewayUrl(), '1.1', array(), $xml);
227
+ $response = $http->read();
228
+
229
+ $response = preg_split('/^\r?$/m', $response, 2);
230
+ $response = trim($response[1]);
231
+
232
+ if ($this->getDebug()) {
233
+ $debug->setResponseBody($response)->save();
234
+ }
235
+
236
+ if ($http->getErrno()) {
237
+ $http->close();
238
+ $this->setError(array(
239
+ 'message' => $http->getError()
240
+ ));
241
+ return false;
242
+ }
243
+ $http->close();
244
+
245
+ $parsedResArr = $this->parseXmlResponse($response);
246
+
247
+ if ($parsedResArr['ewayTrxnStatus'] == 'True') {
248
+ $this->unsError();
249
+ return $parsedResArr;
250
+ }
251
+
252
+ if (isset($parsedResArr['ewayTrxnError'])) {
253
+ $this->setError(array(
254
+ 'message' => $parsedResArr['ewayTrxnError']
255
+ ));
256
+ }
257
+
258
+ return false;
259
+ }
260
+
261
+ /**
262
+ * parse response of gateway
263
+ *
264
+ * @param string $xmlResponse
265
+ * @return array
266
+ */
267
+ public function parseXmlResponse($xmlResponse)
268
+ {
269
+ $xmlObj = simplexml_load_string($xmlResponse);
270
+ $newResArr = array();
271
+ foreach ($xmlObj as $key => $val) {
272
+ $newResArr[$key] = (string)$val;
273
+ }
274
+
275
+ return $newResArr;
276
+ }
277
+
278
+ }
app/code/community/Fontis/EwayAu/Model/Mysql4/Api/Debug.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
24
+ {
25
+ protected function _construct()
26
+ {
27
+ $this->_init('ewayau/api_debug', 'debug_id');
28
+ }
29
+ }
app/code/community/Fontis/EwayAu/Model/Mysql4/Api/Debug/Collection.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
24
+ {
25
+ protected function _construct()
26
+ {
27
+ $this->_init('ewayau/api_debug');
28
+ }
29
+ }
app/code/community/Fontis/EwayAu/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup
24
+ {
25
+
26
+ }
app/code/community/Fontis/EwayAu/Model/Secure.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Secure extends Fontis_EwayAu_Model_Shared
24
+ {
25
+ protected $_code = 'ewayau_secure';
26
+
27
+ protected $_formBlockType = 'ewayau/secure_form';
28
+ protected $_paymentMethod = 'secure';
29
+
30
+ /**
31
+ * Get url of eWAY 3D-Secure Payment
32
+ *
33
+ * @return string
34
+ */
35
+ public function getEwaySecureUrl()
36
+ {
37
+ if (!$url = Mage::getStoreConfig('payment/' . $this->getCode() . '/api_url')) {
38
+ $url = 'https://www.eway.com.au/gateway_3d/payment.asp';
39
+ }
40
+ return $url;
41
+ }
42
+
43
+ }
app/code/community/Fontis/EwayAu/Model/Shared.php ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Shared extends Mage_Payment_Model_Method_Abstract
24
+ {
25
+ protected $_code = 'ewayau_shared';
26
+
27
+ protected $_isGateway = false;
28
+ protected $_canAuthorize = false;
29
+ protected $_canCapture = true;
30
+ protected $_canCapturePartial = false;
31
+ protected $_canRefund = false;
32
+ protected $_canVoid = false;
33
+ protected $_canUseInternal = false;
34
+ protected $_canUseCheckout = true;
35
+ protected $_canUseForMultishipping = false;
36
+
37
+ protected $_formBlockType = 'ewayau/shared_form';
38
+ protected $_paymentMethod = 'shared';
39
+
40
+ protected $_order;
41
+
42
+ /**
43
+ * Get order model
44
+ *
45
+ * @return Mage_Sales_Model_Order
46
+ */
47
+ public function getOrder()
48
+ {
49
+ if (!$this->_order) {
50
+ $paymentInfo = $this->getInfoInstance();
51
+ $this->_order = Mage::getModel('sales/order')
52
+ ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
53
+ }
54
+ return $this->_order;
55
+ }
56
+
57
+ /**
58
+ * Get Customer Id
59
+ *
60
+ * @return string
61
+ */
62
+ public function getCustomerId()
63
+ {
64
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/customer_id');
65
+ }
66
+
67
+ /**
68
+ * Get currency that accepted by eWAY account
69
+ *
70
+ * @return string
71
+ */
72
+ public function getAcceptedCurrency()
73
+ {
74
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency');
75
+ }
76
+
77
+ public function validate()
78
+ {
79
+ parent::validate();
80
+ $paymentInfo = $this->getInfoInstance();
81
+ if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
82
+ $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode();
83
+ } else {
84
+ $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode();
85
+ }
86
+ if ($currency_code != $this->getAcceptedCurrency()) {
87
+ Mage::throwException(Mage::helper('ewayau')->__('Selected currency code ('.$currency_code.') is not compatabile with eWAY'));
88
+ }
89
+ return $this;
90
+ }
91
+
92
+ public function getOrderPlaceRedirectUrl()
93
+ {
94
+ return Mage::getUrl('ewayau/' . $this->_paymentMethod . '/redirect');
95
+ }
96
+
97
+ /**
98
+ * prepare params array to send it to gateway page via POST
99
+ *
100
+ * @return array
101
+ */
102
+ public function getFormFields()
103
+ {
104
+ $billing = $this->getOrder()->getBillingAddress();
105
+ $fieldsArr = array();
106
+ $invoiceDesc = '';
107
+ $lengs = 0;
108
+ foreach ($this->getOrder()->getAllItems() as $item) {
109
+ if ($item->getParentItem()) {
110
+ continue;
111
+ }
112
+ if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) {
113
+ break;
114
+ }
115
+ $invoiceDesc .= $item->getName() . ', ';
116
+ }
117
+ $invoiceDesc = Mage::helper('core/string')->substr($invoiceDesc, 0, -2);
118
+
119
+ $address = clone $billing;
120
+ $address->unsFirstname();
121
+ $address->unsLastname();
122
+ $address->unsPostcode();
123
+ $formatedAddress = '';
124
+ $tmpAddress = explode(' ', str_replace("\n", ' ', trim($address->format('text'))));
125
+ foreach ($tmpAddress as $part) {
126
+ if (strlen($part) > 0) $formatedAddress .= $part . ' ';
127
+ }
128
+ $paymentInfo = $this->getInfoInstance();
129
+ $fieldsArr['ewayCustomerID'] = $this->getCustomerId();
130
+ $fieldsArr['ewayTotalAmount'] = ($this->getOrder()->getBaseGrandTotal()*100);
131
+ $fieldsArr['ewayCustomerFirstName'] = $billing->getFirstname();
132
+ $fieldsArr['ewayCustomerLastName'] = $billing->getLastname();
133
+ $fieldsArr['ewayCustomerEmail'] = $this->getOrder()->getCustomerEmail();
134
+ $fieldsArr['ewayCustomerAddress'] = trim($formatedAddress);
135
+ $fieldsArr['ewayCustomerPostcode'] = $billing->getPostcode();
136
+ // $fieldsArr['ewayCustomerInvoiceRef'] = '';
137
+ $fieldsArr['ewayCustomerInvoiceDescription'] = $invoiceDesc;
138
+ $fieldsArr['eWAYSiteTitle '] = Mage::app()->getStore()->getName();
139
+ $fieldsArr['eWAYAutoRedirect'] = 1;
140
+ $fieldsArr['ewayURL'] = Mage::getUrl('eway/' . $this->_paymentMethod . '/success', array('_secure' => true));
141
+ $fieldsArr['eWAYTrxnNumber'] = $paymentInfo->getOrder()->getRealOrderId();
142
+ $fieldsArr['ewayOption1'] = '';
143
+ $fieldsArr['ewayOption2'] = Mage::helper('core')->encrypt($fieldsArr['eWAYTrxnNumber']);
144
+ $fieldsArr['ewayOption3'] = '';
145
+
146
+ $request = '';
147
+ foreach ($fieldsArr as $k=>$v) {
148
+ $request .= '<' . $k . '>' . $v . '</' . $k . '>';
149
+ }
150
+
151
+ if ($this->getDebug()) {
152
+ $debug = Mage::getModel('eway/api_debug')
153
+ ->setRequestBody($request)
154
+ ->save();
155
+ $fieldsArr['ewayOption1'] = $debug->getId();
156
+ }
157
+
158
+ return $fieldsArr;
159
+ }
160
+
161
+ /**
162
+ * Get url of eWAY Shared Payment
163
+ *
164
+ * @return string
165
+ */
166
+ public function getEwaySharedUrl()
167
+ {
168
+ if (!$url = Mage::getStoreConfig('payment/ewayau_shared/api_url')) {
169
+ $url = 'https://www.eway.com.au/gateway/payment.asp';
170
+ }
171
+ return $url;
172
+ }
173
+
174
+ /**
175
+ * Get debug flag
176
+ *
177
+ * @return string
178
+ */
179
+ public function getDebug()
180
+ {
181
+ return Mage::getStoreConfig('payment/' . $this->getCode() . '/debug_flag');
182
+ }
183
+
184
+ public function capture(Varien_Object $payment, $amount)
185
+ {
186
+ $payment->setStatus(self::STATUS_APPROVED)
187
+ ->setLastTransId($this->getTransactionId());
188
+
189
+ return $this;
190
+ }
191
+
192
+ public function cancel(Varien_Object $payment)
193
+ {
194
+ $payment->setStatus(self::STATUS_DECLINED)
195
+ ->setLastTransId($this->getTransactionId());
196
+
197
+ return $this;
198
+ }
199
+
200
+ /**
201
+ * parse response POST array from gateway page and return payment status
202
+ *
203
+ * @return bool
204
+ */
205
+ public function parseResponse()
206
+ {
207
+ $response = $this->getResponse();
208
+
209
+ if ($this->getDebug()) {
210
+ $debug = Mage::getModel('ewayau/api_debug')
211
+ ->load($response['eWAYoption1'])
212
+ ->setResponseBody(print_r($response, 1))
213
+ ->save();
214
+ }
215
+
216
+ if ($response['ewayTrxnStatus'] == 'True') {
217
+ return true;
218
+ }
219
+ return false;
220
+ }
221
+
222
+ /**
223
+ * Return redirect block type
224
+ *
225
+ * @return string
226
+ */
227
+ public function getRedirectBlockType()
228
+ {
229
+ return $this->_redirectBlockType;
230
+ }
231
+
232
+ /**
233
+ * Return payment method type string
234
+ *
235
+ * @return string
236
+ */
237
+ public function getPaymentMethodType()
238
+ {
239
+ return $this->_paymentMethod;
240
+ }
241
+ }
app/code/community/Fontis/EwayAu/Model/Source/Cctype.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype
24
+ {
25
+ public function getAllowedTypes()
26
+ {
27
+ return array('VI', 'MC', 'AE', 'DICL', 'JCB');
28
+ }
29
+ }
app/code/community/Fontis/EwayAu/controllers/SecureController.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ /*
24
+ * eWAY 3D-Secure Checkout Controller
25
+ */
26
+ class Fontis_EwayAu_SecureController extends Fontis_EwayAu_Controller_Abstract
27
+ {
28
+ protected $_redirectBlockType = 'ewayau/secure_redirect';
29
+ }
app/code/community/Fontis/EwayAu/controllers/SharedController.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Fontis_EwayAu_SharedController extends Fontis_EwayAu_Controller_Abstract
24
+ {
25
+ protected $_redirectBlockType = 'ewayau/shared_redirect';
26
+ }
app/code/community/Fontis/EwayAu/etc/config.xml ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY Australia payment gatewayau
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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
17
+ *
18
+ * @category Fontis
19
+ * @package Fontis_EwayAu
20
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <modules>
26
+ <Fontis_EwayAu>
27
+ <version>1.0.0</version>
28
+ </Fontis_EwayAu>
29
+ </modules>
30
+ <global>
31
+ <models>
32
+ <ewayau>
33
+ <class>Fontis_EwayAu_Model</class>
34
+ <resourceModel>ewayau_mysql4</resourceModel>
35
+ </ewayau>
36
+ <ewayau_mysql4>
37
+ <class>Fontis_EwayAu_Model_Mysql4</class>
38
+ <entities>
39
+ <api_debug><table>fontis_ewayau_api_debug</table></api_debug>
40
+ </entities>
41
+ </ewayau_mysql4>
42
+ </models>
43
+ <helpers>
44
+ <ewayau>
45
+ <class>Fontis_EwayAu_Helper</class>
46
+ </ewayau>
47
+ </helpers>
48
+ <resources>
49
+ <ewayau_setup>
50
+ <setup>
51
+ <module>Fontis_EwayAu</module>
52
+ <class>Fontis_EwayAu_Model_Mysql4_Setup</class>
53
+ </setup>
54
+ <connection>
55
+ <use>core_setup</use>
56
+ </connection>
57
+ </ewayau_setup>
58
+ <ewayau_write>
59
+ <connection>
60
+ <use>core_write</use>
61
+ </connection>
62
+ </ewayau_write>
63
+ <ewayau_read>
64
+ <connection>
65
+ <use>core_read</use>
66
+ </connection>
67
+ </ewayau_read>
68
+ </resources>
69
+ <blocks>
70
+ <ewayau><class>Fontis_EwayAu_Block</class></ewayau>
71
+ </blocks>
72
+ <payment>
73
+ <cc>
74
+ <types>
75
+ <JCB>
76
+ <code>JCB</code>
77
+ <name>JCB</name>
78
+ <order>50</order>
79
+ </JCB>
80
+ <DICL>
81
+ <code>DICL</code>
82
+ <name>Diners Club</name>
83
+ <order>60</order>
84
+ </DICL>
85
+ </types>
86
+ </cc>
87
+ </payment>
88
+ </global>
89
+ <frontend>
90
+ <secure_url>
91
+ <ewayau_shared>/ewayau/shared</ewayau_shared>
92
+ </secure_url>
93
+ <routers>
94
+ <ewayau>
95
+ <use>standard</use>
96
+ <args>
97
+ <module>Fontis_EwayAu</module>
98
+ <frontName>ewayau</frontName>
99
+ </args>
100
+ </ewayau>
101
+ </routers>
102
+ <translate>
103
+ <modules>
104
+ <Fontis_EwayAu>
105
+ <files>
106
+ <default>Fontis_EwayAu.csv</default>
107
+ </files>
108
+ </Fontis_EwayAu>
109
+ </modules>
110
+ </translate>
111
+ <layout>
112
+ <updates>
113
+ <ewayau>
114
+ <file>fontis_ewayau.xml</file>
115
+ </ewayau>
116
+ </updates>
117
+ </layout>
118
+ </frontend>
119
+ <adminhtml>
120
+ <translate>
121
+ <modules>
122
+ <Fontis_EwayAu>
123
+ <files>
124
+ <default>Fontis_EwayAu.csv</default>
125
+ </files>
126
+ </Fontis_EwayAu>
127
+ </modules>
128
+ </translate>
129
+ </adminhtml>
130
+ <default>
131
+ <payment>
132
+ <ewayau_direct>
133
+ <customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
134
+ <currency>AUD</currency>
135
+ <payment_action>authorize_capture</payment_action>
136
+ <model>ewayau/direct</model>
137
+ <title>eWAY Direct</title>
138
+ <order_status>processing</order_status>
139
+ <cctypes>AE,VI,MC,DICL,JCB</cctypes>
140
+ <allowspecific>0</allowspecific>
141
+ </ewayau_direct>
142
+ <ewayau_shared>
143
+ <customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
144
+ <currency>AUD</currency>
145
+ <model>ewayau/shared</model>
146
+ <title>eWAY Shared</title>
147
+ <order_status>processing</order_status>
148
+ <allowspecific>0</allowspecific>
149
+ </ewayau_shared>
150
+ <ewayau_secure>
151
+ <customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
152
+ <currency>AUD</currency>
153
+ <model>ewayau/secure</model>
154
+ <title>eWAY 3D-Secure</title>
155
+ <order_status>processing</order_status>
156
+ <allowspecific>0</allowspecific>
157
+ </ewayau_secure>
158
+ </payment>
159
+ </default>
160
+ </config>
app/code/community/Fontis/EwayAu/etc/system.xml ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY Australia payment gatewayau
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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
17
+ *
18
+ * @category Fontis
19
+ * @package Fontis_EwayAu
20
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <sections>
26
+ <payment>
27
+ <groups>
28
+ <ewayau_direct translate="label" module="ewayau">
29
+ <label>eWAY AU Direct</label>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>201</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>0</show_in_store>
35
+ <fields>
36
+ <active translate="label">
37
+ <label>Enabled</label>
38
+ <frontend_type>select</frontend_type>
39
+ <source_model>adminhtml/system_config_source_yesno</source_model>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>0</show_in_store>
44
+ </active>
45
+ <title translate="label">
46
+ <label>Title</label>
47
+ <frontend_type>text</frontend_type>
48
+ <sort_order>2</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>0</show_in_store>
52
+ </title>
53
+ <customer_id translate="label">
54
+ <label>Customer ID</label>
55
+ <frontend_type>text</frontend_type>
56
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
57
+ <sort_order>3</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>0</show_in_store>
61
+ </customer_id>
62
+ <currency translate="label">
63
+ <label>Accepted currency</label>
64
+ <frontend_type>select</frontend_type>
65
+ <source_model>adminhtml/system_config_source_currency</source_model>
66
+ <sort_order>4</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>0</show_in_store>
70
+ </currency>
71
+ <api_url translate="label">
72
+ <label>API Gateway URL</label>
73
+ <frontend_type>text</frontend_type>
74
+ <sort_order>5</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>0</show_in_store>
78
+ </api_url>
79
+ <debug_flag translate="label">
80
+ <label>Debug Flag</label>
81
+ <frontend_type>select</frontend_type>
82
+ <source_model>adminhtml/system_config_source_yesno</source_model>
83
+ <sort_order>6</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>0</show_in_store>
87
+ </debug_flag>
88
+ <order_status translate="label">
89
+ <label>New order status</label>
90
+ <frontend_type>select</frontend_type>
91
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
92
+ <sort_order>7</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>0</show_in_store>
96
+ </order_status>
97
+ <cctypes translate="label">
98
+ <label>Credit Card Types</label>
99
+ <frontend_type>multiselect</frontend_type>
100
+ <source_model>ewayau/source_cctype</source_model>
101
+ <sort_order>8</sort_order>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>0</show_in_store>
105
+ </cctypes>
106
+ <useccv translate="label">
107
+ <label>Credit Card Verification</label>
108
+ <frontend_type>select</frontend_type>
109
+ <source_model>adminhtml/system_config_source_yesno</source_model>
110
+ <sort_order>9</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>0</show_in_store>
114
+ </useccv>
115
+ <allowspecific translate="label">
116
+ <label>Payment from applicable countries</label>
117
+ <frontend_type>allowspecific</frontend_type>
118
+ <sort_order>10</sort_order>
119
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ </allowspecific>
124
+ <specificcountry translate="label">
125
+ <label>Payment from Specific countries</label>
126
+ <frontend_type>multiselect</frontend_type>
127
+ <sort_order>11</sort_order>
128
+ <source_model>adminhtml/system_config_source_country</source_model>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>1</show_in_store>
132
+ </specificcountry>
133
+ <sort_order translate="label">
134
+ <label>Sort order</label>
135
+ <frontend_type>text</frontend_type>
136
+ <sort_order>12</sort_order>
137
+ <show_in_default>1</show_in_default>
138
+ <show_in_website>1</show_in_website>
139
+ <show_in_store>0</show_in_store>
140
+ </sort_order>
141
+ </fields>
142
+ </ewayau_direct>
143
+ <ewayau_shared translate="label" module="ewayau">
144
+ <label>eWAY AU Shared</label>
145
+ <frontend_type>text</frontend_type>
146
+ <sort_order>202</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>0</show_in_store>
150
+ <fields>
151
+ <active translate="label">
152
+ <label>Enabled</label>
153
+ <frontend_type>select</frontend_type>
154
+ <source_model>adminhtml/system_config_source_yesno</source_model>
155
+ <sort_order>1</sort_order>
156
+ <show_in_default>1</show_in_default>
157
+ <show_in_website>1</show_in_website>
158
+ <show_in_store>0</show_in_store>
159
+ </active>
160
+ <title translate="label">
161
+ <label>Title</label>
162
+ <frontend_type>text</frontend_type>
163
+ <sort_order>2</sort_order>
164
+ <show_in_default>1</show_in_default>
165
+ <show_in_website>1</show_in_website>
166
+ <show_in_store>0</show_in_store>
167
+ </title>
168
+ <customer_id translate="label">
169
+ <label>Customer ID</label>
170
+ <frontend_type>text</frontend_type>
171
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
172
+ <sort_order>3</sort_order>
173
+ <show_in_default>1</show_in_default>
174
+ <show_in_website>1</show_in_website>
175
+ <show_in_store>0</show_in_store>
176
+ </customer_id>
177
+ <currency translate="label">
178
+ <label>Accepted currency</label>
179
+ <frontend_type>select</frontend_type>
180
+ <source_model>adminhtml/system_config_source_currency</source_model>
181
+ <sort_order>4</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>0</show_in_store>
185
+ </currency>
186
+ <api_url translate="label">
187
+ <label>API Gateway URL</label>
188
+ <frontend_type>text</frontend_type>
189
+ <sort_order>5</sort_order>
190
+ <show_in_default>1</show_in_default>
191
+ <show_in_website>1</show_in_website>
192
+ <show_in_store>0</show_in_store>
193
+ </api_url>
194
+ <debug_flag translate="label">
195
+ <label>Debug Flag</label>
196
+ <frontend_type>select</frontend_type>
197
+ <source_model>adminhtml/system_config_source_yesno</source_model>
198
+ <sort_order>6</sort_order>
199
+ <show_in_default>1</show_in_default>
200
+ <show_in_website>1</show_in_website>
201
+ <show_in_store>0</show_in_store>
202
+ </debug_flag>
203
+ <order_status translate="label">
204
+ <label>New order status</label>
205
+ <frontend_type>select</frontend_type>
206
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
207
+ <sort_order>7</sort_order>
208
+ <show_in_default>1</show_in_default>
209
+ <show_in_website>1</show_in_website>
210
+ <show_in_store>0</show_in_store>
211
+ </order_status>
212
+ <allowspecific translate="label">
213
+ <label>Payment from applicable countries</label>
214
+ <frontend_type>allowspecific</frontend_type>
215
+ <sort_order>8</sort_order>
216
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
217
+ <show_in_default>1</show_in_default>
218
+ <show_in_website>1</show_in_website>
219
+ <show_in_store>1</show_in_store>
220
+ </allowspecific>
221
+ <specificcountry translate="label">
222
+ <label>Payment from Specific countries</label>
223
+ <frontend_type>multiselect</frontend_type>
224
+ <sort_order>9</sort_order>
225
+ <source_model>adminhtml/system_config_source_country</source_model>
226
+ <show_in_default>1</show_in_default>
227
+ <show_in_website>1</show_in_website>
228
+ <show_in_store>1</show_in_store>
229
+ </specificcountry>
230
+ <sort_order translate="label">
231
+ <label>Sort order</label>
232
+ <frontend_type>text</frontend_type>
233
+ <sort_order>10</sort_order>
234
+ <show_in_default>1</show_in_default>
235
+ <show_in_website>1</show_in_website>
236
+ <show_in_store>0</show_in_store>
237
+ </sort_order>
238
+ </fields>
239
+ </ewayau_shared>
240
+ <ewayau_secure translate="label" module="ewayau">
241
+ <label>eWAY AU 3D-Secure</label>
242
+ <frontend_type>text</frontend_type>
243
+ <sort_order>203</sort_order>
244
+ <show_in_default>1</show_in_default>
245
+ <show_in_website>1</show_in_website>
246
+ <show_in_store>0</show_in_store>
247
+ <fields>
248
+ <active translate="label">
249
+ <label>Enabled</label>
250
+ <frontend_type>select</frontend_type>
251
+ <source_model>adminhtml/system_config_source_yesno</source_model>
252
+ <sort_order>1</sort_order>
253
+ <show_in_default>1</show_in_default>
254
+ <show_in_website>1</show_in_website>
255
+ <show_in_store>0</show_in_store>
256
+ </active>
257
+ <title translate="label">
258
+ <label>Title</label>
259
+ <frontend_type>text</frontend_type>
260
+ <sort_order>2</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>1</show_in_website>
263
+ <show_in_store>0</show_in_store>
264
+ </title>
265
+ <customer_id translate="label">
266
+ <label>Customer ID</label>
267
+ <frontend_type>text</frontend_type>
268
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
269
+ <sort_order>3</sort_order>
270
+ <show_in_default>1</show_in_default>
271
+ <show_in_website>1</show_in_website>
272
+ <show_in_store>0</show_in_store>
273
+ </customer_id>
274
+ <currency translate="label">
275
+ <label>Accepted currency</label>
276
+ <frontend_type>select</frontend_type>
277
+ <source_model>adminhtml/system_config_source_currency</source_model>
278
+ <sort_order>4</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
+ </currency>
283
+ <api_url translate="label">
284
+ <label>API Gateway URL</label>
285
+ <frontend_type>text</frontend_type>
286
+ <sort_order>5</sort_order>
287
+ <show_in_default>1</show_in_default>
288
+ <show_in_website>1</show_in_website>
289
+ <show_in_store>0</show_in_store>
290
+ </api_url>
291
+ <debug_flag translate="label">
292
+ <label>Debug Flag</label>
293
+ <frontend_type>select</frontend_type>
294
+ <source_model>adminhtml/system_config_source_yesno</source_model>
295
+ <sort_order>6</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
+ </debug_flag>
300
+ <order_status translate="label">
301
+ <label>New order status</label>
302
+ <frontend_type>select</frontend_type>
303
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
304
+ <sort_order>7</sort_order>
305
+ <show_in_default>1</show_in_default>
306
+ <show_in_website>1</show_in_website>
307
+ <show_in_store>0</show_in_store>
308
+ </order_status>
309
+ <allowspecific translate="label">
310
+ <label>Payment from applicable countries</label>
311
+ <frontend_type>allowspecific</frontend_type>
312
+ <sort_order>8</sort_order>
313
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
314
+ <show_in_default>1</show_in_default>
315
+ <show_in_website>1</show_in_website>
316
+ <show_in_store>1</show_in_store>
317
+ </allowspecific>
318
+ <specificcountry translate="label">
319
+ <label>Payment from Specific countries</label>
320
+ <frontend_type>multiselect</frontend_type>
321
+ <sort_order>9</sort_order>
322
+ <source_model>adminhtml/system_config_source_country</source_model>
323
+ <show_in_default>1</show_in_default>
324
+ <show_in_website>1</show_in_website>
325
+ <show_in_store>1</show_in_store>
326
+ </specificcountry>
327
+ <sort_order translate="label">
328
+ <label>Sort order</label>
329
+ <frontend_type>text</frontend_type>
330
+ <sort_order>10</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>0</show_in_store>
334
+ </sort_order>
335
+ </fields>
336
+ </ewayau_secure>
337
+ </groups>
338
+ </payment>
339
+ </sections>
340
+ </config>
app/code/community/Fontis/EwayAu/sql/eway_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ $installer = $this;
24
+
25
+ $installer->startSetup();
26
+
27
+ $installer->run("
28
+
29
+ -- DROP TABLE IF EXISTS `{$this->getTable('ewayau/api_debug')}`;
30
+ CREATE TABLE `{$this->getTable('eway/api_debug')}` (
31
+ `debug_id` int(10) unsigned NOT NULL auto_increment,
32
+ `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
33
+ `request_body` text,
34
+ `response_body` text,
35
+ PRIMARY KEY (`debug_id`),
36
+ KEY `debug_at` (`debug_at`)
37
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
38
+
39
+ ");
40
+
41
+ $installer->endSetup();
app/design/adminhtml/default/default/template/fontis/ewayau/form.phtml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php $_code=$this->getMethodCode() ?>
24
+ <script type="text/javascript">
25
+ Validation.creditCartTypes.JCB = [new RegExp('^(35[0-9]{14}|(2131|1800)[0-9]{11})$'), new RegExp('^([0-9]{3})?$'), true];
26
+ Validation.creditCartTypes.DICL = [new RegExp('^((300|305)[0-9]{11}|36[0-9]{12}|55[0-9]{14})$'), new RegExp('^([0-9]{3})?$'), false];
27
+ </script>
28
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
29
+ <li>
30
+ <div class="input-box">
31
+ <label for="<?php echo $_code ?>_cc_owner"><?php echo Mage::helper('payment')->__('Name on Card') ?> <span class="required">*</span></label><br/>
32
+ <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') ?>"/>
33
+ </div>
34
+ </li>
35
+ <li>
36
+ <div class="input-box">
37
+ <label for="<?php echo $_code ?>_cc_type"><?php echo Mage::helper('payment')->__('Credit Card Type') ?> <span class="required">*</span></label><br/>
38
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
39
+ <?php $_ccType = $this->getInfoData('cc_type') ?>
40
+ <option value=""></option>
41
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
42
+ <option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
43
+ <?php endforeach ?>
44
+ </select>
45
+ </div>
46
+ </li>
47
+ <li>
48
+ <div class="input-box">
49
+ <label for="<?php echo $_code ?>_cc_number"><?php echo Mage::helper('payment')->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
50
+ <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')?>"/>
51
+ </div>
52
+ </li>
53
+ <li>
54
+ <div class="input-box">
55
+ <label for="<?php echo $_code ?>_expiration"><?php echo Mage::helper('payment')->__('Expiration Date') ?> <span class="required">*</span></label><br/>
56
+ <select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
57
+ <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
58
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
59
+ <option value="<?php echo $k ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
60
+ <?php endforeach ?>
61
+ </select>
62
+ <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
63
+ <select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
64
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
65
+ <option value="<?php echo $k ? $k : '' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
66
+ <?php endforeach ?>
67
+ </select>
68
+ </div>
69
+ </li>
70
+ <?php if($this->hasVerification()): ?>
71
+ <li>
72
+ <div class="input-box">
73
+ <label for="<?php echo $_code ?>_cc_cid"><?php echo Mage::helper('payment')->__('Card Verification Number') ?> <span class="required">*</span></label><br/>
74
+ <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')?>"/>
75
+ </div>
76
+ </li>
77
+ <?php endif; ?>
78
+ </ul>
app/design/adminhtml/default/default/template/fontis/ewayau/info.phtml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br/>
24
+ <?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
25
+ <?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
26
+ <?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/ewayau/pdf/info.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
24
+ {{pdf_row_separator}}
25
+ <?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
26
+ {{pdf_row_separator}}
27
+ <?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
28
+ {{pdf_row_separator}}
29
+ <?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_ewayau.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
17
+ *
18
+ * @category Fontis
19
+ * @package Fontis_EwayAu
20
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+
25
+ <layout version="0.1.0">
26
+
27
+ <ewayau_shared_failure>
28
+ <reference name="root">
29
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
30
+ </reference>
31
+ <reference name="content">
32
+ <block type="ewayau/shared_failure" name="ewayau_shared_failure" template="fontis/ewayau/shared/failure.phtml"></block>
33
+ </reference>
34
+ </ewayau_shared_failure>
35
+
36
+ <ewayau_secure_failure>
37
+ <reference name="root">
38
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
39
+ </reference>
40
+ <reference name="content">
41
+ <block type="ewayau/secure_failure" name="ewayau_secure_failure" template="fontis/ewayau/secure/failure.phtml"></block>
42
+ </reference>
43
+ </ewayau_secure_failure>
44
+
45
+ </layout>
app/design/frontend/default/default/template/fontis/ewayau/form.phtml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <script type="text/javascript">
24
+ Validation.creditCartTypes.JCB = [new RegExp('^(35[0-9]{14}|(2131|1800)[0-9]{11})$'), new RegExp('^([0-9]{3})?$'), true];
25
+ Validation.creditCartTypes.DICL = [new RegExp('^((300|305)[0-9]{11}|36[0-9]{12}|55[0-9]{14})$'), new RegExp('^([0-9]{3})?$'), false];
26
+ </script>
27
+ <fieldset class="form-list">
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
30
+ <li>
31
+ <div class="input-box">
32
+ <label for="<?php echo $_code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
33
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
34
+ </div>
35
+ </li>
36
+ <li>
37
+ <div class="input-box">
38
+ <label for="<?php echo $_code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
39
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
40
+ <option value="">--<?php echo $this->__('Please Select') ?>--</option>
41
+ <?php $_ccType = $this->getInfoData('cc_type') ?>
42
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
43
+ <option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
44
+ <?php endforeach ?>
45
+ </select>
46
+ </div>
47
+ </li>
48
+ <li>
49
+ <div class="input-box">
50
+ <label for="<?php echo $_code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
51
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
52
+ </div>
53
+ </li>
54
+ <li>
55
+ <div class="input-box">
56
+ <label for="<?php echo $_code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
57
+ <div class="v-fix">
58
+ <select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
59
+ <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
60
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
61
+ <option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
62
+ <?php endforeach ?>
63
+ </select>
64
+ </div>
65
+ <div class="v-fix" style="padding-left:5px;">
66
+ <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
67
+ <select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
68
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
69
+ <option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
70
+ <?php endforeach ?>
71
+ </select>
72
+ </div>
73
+ </div>
74
+ </li>
75
+ <?php if($this->hasVerification()): ?>
76
+ <li>
77
+ <div class="input-box">
78
+ <label for="<?php echo $_code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
79
+ <div class="v-fix"><input type="text" title="<?php echo $this->__('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="" /></div>
80
+ &nbsp;
81
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
82
+ </div>
83
+ </li>
84
+ <?php endif; ?>
85
+ </ul>
86
+ </fieldset>
app/design/frontend/default/default/template/fontis/ewayau/info.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php if($_info = $this->getInfo()): ?>
24
+ <?php echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br />
25
+ <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
26
+ <?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br />
27
+ <?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
28
+ <?php else: ?>
29
+
30
+ <?php endif; ?>
app/design/frontend/default/default/template/fontis/ewayau/secure/failure.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <div class="page-head">
24
+ <h3><?php echo $this->__('Error occured') ?></h3>
25
+ </div>
26
+ <p><?php echo $this->getErrorMessage() ?>.</p>
27
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/default/default/template/fontis/ewayau/secure/form.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <fieldset class="form-list">
24
+ <?php $_code=$this->getMethodCode() ?>
25
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
26
+ <li>
27
+ <?php echo $this->__('You will be redirected to eWAY 3D-Secure website when you place an order.') ?>
28
+ </li>
29
+ </ul>
30
+ </fieldset>
app/design/frontend/default/default/template/fontis/ewayau/shared/failure.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <div class="page-head">
24
+ <h3><?php echo $this->__('Error occured') ?></h3>
25
+ </div>
26
+ <p><?php echo $this->getErrorMessage() ?>.</p>
27
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/default/default/template/fontis/ewayau/shared/form.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
16
+ *
17
+ * @category Fontis
18
+ * @package Fontis_EwayAu
19
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <fieldset class="form-list">
24
+ <?php $_code=$this->getMethodCode() ?>
25
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
26
+ <li>
27
+ <?php echo $this->__('You will be redirected to eWAY website when you place an order.') ?>
28
+ </li>
29
+ </ul>
30
+ </fieldset>
app/etc/modules/Fontis_EwayAu.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Fontis eWAY Australia 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
+ * Original code copyright (c) 2008 Irubin Consulting Inc. DBA Varien
17
+ *
18
+ * @category Fontis
19
+ * @package Fontis_EwayAu
20
+ * @copyright Copyright (c) 2010 Fontis (http://www.fontis.com.au)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ */
23
+ -->
24
+ <config>
25
+ <modules>
26
+ <Fontis_EwayAu>
27
+ <active>true</active>
28
+ <codePool>community</codePool>
29
+ <depends>
30
+ <Mage_Payment/>
31
+ </depends>
32
+ </Fontis_EwayAu>
33
+ </modules>
34
+ </config>
app/locale/en_US/Fontis_EwayAu.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_EwayAu</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 Australia payment gateway.</summary>
10
+ <description>Adds support for eWAY Australia 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-21</date>
14
+ <time>00:00:38</time>
15
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="fontis"><dir name="ewayau"><dir name="pdf"><file name="info.phtml" hash="4af2178c2597fb9645442a3e25aaec0d"/></dir><file name="form.phtml" hash="560fb4bde178d6071edb58ca8da7be61"/><file name="info.phtml" hash="70998eb775ca3db6848e71e44f9e3ccf"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="fontis_ewayau.xml" hash="172b8e1cf5eb3c5fb76bee136c2532d3"/></dir><dir name="template"><dir name="fontis"><dir name="ewayau"><dir name="secure"><file name="failure.phtml" hash="16b3993f65964ef354fa56b929fde8ff"/><file name="form.phtml" hash="4f7e50698632a9e851b5504d7a5293ab"/></dir><dir name="shared"><file name="failure.phtml" hash="16b3993f65964ef354fa56b929fde8ff"/><file name="form.phtml" hash="1edf93ecf67b311794a66436ec7fa405"/></dir><file name="form.phtml" hash="eacb3d88b9b23a153564938b5433ab30"/><file name="info.phtml" hash="62a92278d0b6f8428ce98bf7462b92d8"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Fontis_EwayAu.csv" hash="608ddd72f698ac44afa8f3a0fc64d5e4"/></dir></target><target name="magecommunity"><dir name="Fontis"><dir name="EwayAu"><dir name="Block"><dir name="Secure"><file name="Failure.php" hash="81239ec03651c413019b74728015fdef"/><file name="Form.php" hash="03c69b7ae6b2de88c0e5614a8964b0e9"/><file name="Redirect.php" hash="cbf5d2ad7be4ca20c29f56bd4da5190f"/></dir><dir name="Shared"><file name="Failure.php" hash="90206554eee87c71a5efe4b00c14b1f8"/><file name="Form.php" hash="02b4b632a9063a71a9171575a368754f"/><file name="Redirect.php" hash="953202851c147cee5d5934d322588bd3"/></dir><file name="Form.php" hash="133c34887c1fd3fde5f292da3fec0075"/><file name="Info.php" hash="921f99f190b16cd954ff8e50f2ec2abc"/></dir><dir name="Controller"><file name="Abstract.php" hash="9450b7873c77d62cf9baf725508c9182"/></dir><dir name="controllers"><file name="SecureController.php" hash="ea61b5af1e0cbb6216443feabe6c156d"/><file name="SharedController.php" hash="2ad74a3707d4fef5b35493bf5f3f439b"/></dir><dir name="etc"><file name="config.xml" hash="87a2d99b83ca0a7ba36ca9e282652aa7"/><file name="system.xml" hash="47c5a48201c7ad7fdcd836f7c81b1f82"/></dir><dir name="Helper"><file name="Data.php" hash="6ff5a560ca051ac3deb6ea9131932ced"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="143fc4b1591c973dc419958445dc225a"/></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="59e4d78d2af03c3f3d92bd7bcf0b753a"/></dir><file name="Debug.php" hash="cff6b00cbcbe47917c6f1956765b5795"/></dir><file name="Setup.php" hash="08053b999f75fecfd3e27db40a60f29b"/></dir><dir name="Source"><file name="Cctype.php" hash="0b9e6f233db3e53312e148d3916cfdc8"/></dir><file name="Direct.php" hash="c795d5518c3d61861bbdd999f1e097b1"/><file name="Secure.php" hash="b14c8e1826f7b4b9134e75b8586260b0"/><file name="Shared.php" hash="a1c4451b38ef57c375bec64df6776997"/></dir><dir name="sql"><dir name="eway_setup"><file name="mysql4-install-0.1.0.php" hash="dde471943fc7320ab041f3e4f321aa8a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fontis_EwayAu.xml" hash="484ebceaa067cdfa240eeda9f675256d"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>