VirtualPayer_FdmsEMEAconnect - Version 1.0.1

Version Notes

Camel casing changed from previous version.

Download this release

Release Info

Developer VirtualPayer
Extension VirtualPayer_FdmsEMEAconnect
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (43) hide show
  1. app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect.php +0 -12
  2. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/FdmsEMEAconnect.php +0 -10
  3. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect.php +0 -9
  4. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect/Collection.php +0 -10
  5. app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentAction.php +0 -34
  6. app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/ResponseController.php +0 -65
  7. app/code/local/VirtualPayer/FdmsEMEAconnect/etc/config.xml +0 -172
  8. app/code/local/Virtualpayer/Fdmsconnectredirect/Block/Adminhtml/Fdmsconnectredirect.php +12 -0
  9. app/code/local/{VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect/Block/Adminhtml/Fdmsconnectredirect}/Grid.php +17 -17
  10. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Error.php +6 -6
  11. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Form.php +6 -6
  12. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Redirect.php +11 -11
  13. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Success.php +6 -6
  14. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Helper/Data.php +5 -5
  15. app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Fdmsconnectredirect.php +10 -0
  16. app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Mysql4/Fdmsconnectredirect.php +9 -0
  17. app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Mysql4/Fdmsconnectredirect/Collection.php +25 -0
  18. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Redirect.php +26 -26
  19. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Setup.php +8 -8
  20. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/Cctype.php +5 -5
  21. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/Currency.php +7 -7
  22. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/OrderStatus.php +8 -8
  23. app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Source/PaymentAction.php +34 -0
  24. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/PaymentMode.php +7 -7
  25. app/code/local/{VirtualPayer/FdmsEMEAconnect/controllers/Adminhtml/FdmsEMEAconnectController.php → Virtualpayer/Fdmsconnectredirect/controllers/Adminhtml/FdmsconnectredirectController.php} +41 -41
  26. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/controllers/RedirectController.php +26 -29
  27. app/code/local/Virtualpayer/Fdmsconnectredirect/controllers/ResponseController.php +92 -0
  28. app/code/local/Virtualpayer/Fdmsconnectredirect/etc/config.xml +163 -0
  29. app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/etc/system.xml +11 -11
  30. app/code/local/Virtualpayer/Fdmsconnectredirect/etc/system.xml~ +143 -0
  31. app/code/local/{VirtualPayer/FdmsEMEAconnect/sql/fdmsemeaconnect_setup → Virtualpayer/Fdmsconnectredirect/sql/fdmsconnectredirect_setup}/mysql4-install-0.1.0.php +4 -4
  32. app/design/adminhtml/default/default/layout/fdmsconnectredirect.xml +8 -0
  33. app/design/adminhtml/default/default/layout/fdmsemeaconnect.xml +0 -8
  34. app/design/frontend/base/default/layout/fdmsconnectredirect.xml +22 -0
  35. app/design/frontend/base/default/layout/fdmsemeaconnect.xml +0 -21
  36. app/design/frontend/base/default/template/fdmsconnectredirect/redirect/failure.phtml +9 -0
  37. app/design/frontend/base/default/template/fdmsconnectredirect/redirect/form.phtml +13 -0
  38. app/design/frontend/base/default/template/fdmsconnectredirect/redirect/success.phtml +9 -0
  39. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/failure.phtml +0 -9
  40. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/form.phtml +0 -13
  41. app/design/frontend/base/default/template/fdmsemeaconnect/redirect/success.phtml +0 -9
  42. app/etc/modules/{VirtualPayer_FdmsEMEAconnect.xml → Virtualpayer_Fdmsconnectredirect.xml} +4 -4
  43. package.xml +10 -10
app/code/local/VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect extends Mage_Adminhtml_Block_Widget_Grid_Container
3
- {
4
- public function __construct()
5
- {
6
- $this->_controller = 'adminhtml_fdmsemeaconnect';
7
- $this->_blockGroup = 'fdmsemeaconnect';
8
- $this->_headerText = Mage::helper('fdmsemeaconnect')->__('First Data Merchant Solution Transactions');
9
- parent::__construct();
10
- $this->_removeButton('add');
11
- }
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/FdmsEMEAconnect.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- class VirtualPayer_FdmsEMEAconnect_Model_FdmsEMEAconnect extends Mage_Core_Model_Abstract
4
- {
5
- public function _construct()
6
- {
7
- parent::_construct();
8
- $this->_init('fdmsemeaconnect/fdmsemeaconnect');
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- class VirtualPayer_FdmsEMEAconnect_Model_Mysql4_FdmsEMEAconnect extends Mage_Core_Model_Mysql4_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('fdmsemeaconnect/fdmsemeaconnect', 'fdmsemeaconnect_id');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Mysql4/FdmsEMEAconnect/Collection.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- class VirtualPayer_FdmsEMEAconnect_Model_Mysql4_FdmsEMEAconnect_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
- {
5
- public function _construct()
6
- {
7
- parent::_construct();
8
- $this->_init('fdmsemeaconnect/fdmsemeaconnect');
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/Model/Source/PaymentAction.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
- /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Source_PaymentAction
18
- {
19
- public function toOptionArray()
20
- {
21
- return array(
22
- array(
23
- 'value' => Mage_FdmsEMEAconnect_Model_Redirect::ACTION_AUTHORIZE,
24
- 'label' => Mage::helper('fdmsemeaconnect')->__('Defer Settlement')
25
- ),
26
- array(
27
- 'value' => Mage_FdmsEMEAconnect_Model_Redirect::ACTION_AUTHORIZE_CAPTURE,
28
- 'label' => Mage::helper('fdmsemeaconnect')->__('Settle Immediately')
29
- ),
30
- );
31
- }
32
- }
33
-
34
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/controllers/ResponseController.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
- /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- class VirtualPayer_FdmsEMEAconnect_ResponseController extends Mage_Core_Controller_Front_Action
18
- {
19
- /**
20
- * @return void
21
- */
22
- public function indexAction()
23
- {
24
- $session = Mage::getSingleton('checkout/session');
25
- $post = $this->getRequest()->getPost();
26
-
27
- if($post){
28
- if (isset($post['oid'])) {
29
- if(Mage::getModel('fdmsemeaconnect/redirect')->processRedirectResponse($post)){
30
- $session->setQuoteId($session->getFdmsEMEAconnectRedirectQuoteId());
31
- $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsemeaconnect/redirect_success')->toHtml());
32
- }else{
33
- $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsemeaconnect/redirect_error')->toHtml());
34
- }
35
- }
36
- }else{
37
- //set the quote as inactive after back from First Data EMEA
38
- $session->getQuote()->setIsActive(false)->save();
39
- $this->_redirect('checkout/onepage/success', array('_secure'=>true));
40
- }
41
- }
42
-
43
- /**
44
- * @return
45
- */
46
- public function failureAction(){
47
- $session = Mage::getSingleton('checkout/session');
48
- $lastQuoteId = $session->getLastQuoteId();
49
- $lastOrderId = $session->getLastOrderId();
50
-
51
- if (!$lastQuoteId || !$lastOrderId) {
52
- $this->_redirect('checkout/cart');
53
- return;
54
- }
55
-
56
- $order = Mage::getModel('sales/order')->loadByAttribute('entity_id', $lastOrderId);
57
-
58
- if ($order->getId()) {
59
- $order->addStatusToHistory('canceled', $session->getErrorMessage())->save();
60
- }
61
-
62
- $this->_redirect('checkout/onepage/failure');
63
- return;
64
- }
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/VirtualPayer/FdmsEMEAconnect/etc/config.xml DELETED
@@ -1,172 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * VirtualPayer_FdmsEMEAconnect extension
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- *
13
- * @category VirtualPayer
14
- * @package VirtualPayer_FdmsEMEAconnect
15
- * @copyright Copyright (c) 2016 VirtualPayer
16
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
- */
18
- -->
19
- <config>
20
- <modules>
21
- <VirtualPayer_FdmsEMEAconnect>
22
- <version>1.0.0</version>
23
- </VirtualPayer_FdmsEMEAconnect>
24
- </modules>
25
- <global>
26
- <models>
27
- <fdmsemeaconnect>
28
- <class>VirtualPayer_FdmsEMEAconnect_Model</class>
29
- <resourceModel>fdmsemeaconnect_mysql4</resourceModel>
30
- </fdmsemeaconnect>
31
- <fdmsemeaconnect_mysql4>
32
- <class>VirtualPayer_FdmsEMEAconnect_Model_Mysql4</class>
33
- <entities>
34
- <fdmsemeaconnect>
35
- <table>fdmsemeaconnect</table>
36
- </fdmsemeaconnect>
37
- </entities>
38
- </fdmsemeaconnect_mysql4>
39
- </models>
40
- <blocks>
41
- <fdmsemeaconnect>
42
- <class>VirtualPayer_FdmsEMEAconnect_Block</class>
43
- </fdmsemeaconnect>
44
- </blocks>
45
- <helpers>
46
- <fdmsemeaconnect>
47
- <class>VirtualPayer_FdmsEMEAconnect_Helper</class>
48
- </fdmsemeaconnect>
49
- </helpers>
50
- <resources>
51
- <fdmsemeaconnect_setup>
52
- <setup>
53
- <module>VirtualPayer_FdmsEMEAconnect</module>
54
- <class>VirtualPayer_FdmsEMEAconnect_Model_Setup</class>
55
- </setup>
56
- <connection>
57
- <use>core_setup</use>
58
- </connection>
59
- </fdmsemeaconnect_setup>
60
- <fdmsemeaconnect_write>
61
- <connection>
62
- <use>core_write</use>
63
- </connection>
64
- </fdmsemeaconnect_write>
65
- <fdmsemeaconnect_read>
66
- <connection>
67
- <use>core_read</use>
68
- </connection>
69
- </fdmsemeaconnect_read>
70
- </resources>
71
- <payment>
72
- <cc>
73
- <types>
74
- <VI>
75
- <code>VI</code>
76
- <name>Visa</name>
77
- <order>0</order>
78
- </VI>
79
- <MC>
80
- <code>MC</code>
81
- <name>MasterCard</name>
82
- <order>100</order>
83
- </MC>
84
- <AM>
85
- <code>AM</code>
86
- <name>American Express</name>
87
- <order>200</order>
88
- </AM>
89
- </types>
90
- </cc>
91
- </payment>
92
- </global>
93
- <frontend>
94
- <routers>
95
- <fdmsemeaconnect>
96
- <use>standard</use>
97
- <args>
98
- <module>VirtualPayer_FdmsEMEAconnect</module>
99
- <frontName>fdmsemeaconnect</frontName>
100
- </args>
101
- </fdmsemeaconnect>
102
- </routers>
103
-
104
- <layout>
105
- <updates>
106
- <fdmsemeaconnect>
107
- <file>fdmsemeaconnect.xml</file>
108
- </fdmsemeaconnect>
109
- </updates>
110
- </layout>
111
- </frontend>
112
-
113
- <adminhtml>
114
- <!--<routers>
115
- <fdmsemeaconnect>
116
- <use>admin</use>
117
- <args>
118
- <module>VirtualPayer_FdmsEMEAconnect</module>
119
- <frontName>fdmsemeaconnect</frontName>
120
- </args>
121
- </fdmsemeaconnect>
122
- </routers>-->
123
- <menu>
124
- <sales module="sales">
125
- <children>
126
- <fdmsemeaconnect module="fdmsemeaconnect">
127
- <title>FDMS Connect Transactions</title>
128
- <sort_order>300</sort_order>
129
- <action>fdmsemeaconnect/adminhtml_fdmsemeaconnect</action>
130
- </fdmsemeaconnect>
131
- </children>
132
- </sales>
133
- </menu>
134
- <acl>
135
- <resources>
136
- <all>
137
- <title>Allow Everything</title>
138
- </all>
139
- <admin>
140
- <children>
141
- <sales>
142
- <children>
143
- <fdmsemeaconnect>
144
- <title>FDMS Connect Transactions</title>
145
- <sort_order>10</sort_order>
146
- </fdmsemeaconnect>
147
- </children>
148
- </sales>
149
- </children>
150
- </admin>
151
- </resources>
152
- </acl>
153
- <layout>
154
- <updates>
155
- <fdmsemeaconnect>
156
- <file>fdmsemeaconnect.xml</file>
157
- </fdmsemeaconnect>
158
- </updates>
159
- </layout>
160
- </adminhtml>
161
- <default>
162
- <payment>
163
- <fdmsemeaconnect>
164
- <active>0</active>
165
- <title>First Data EMEA Connect Payment Gateway</title>
166
- <model>fdmsemeaconnect/redirect</model>
167
- <order_status>processing</order_status>
168
- <payment_action>authorize</payment_action>
169
- </fdmsemeaconnect>
170
- </payment>
171
- </default>
172
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Virtualpayer/Fdmsconnectredirect/Block/Adminhtml/Fdmsconnectredirect.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Virtualpayer_Fdmsconnectredirect_Block_Adminhtml_Fdmsconnectredirect extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_fdmsconnectredirect';
7
+ $this->_blockGroup = 'fdmsconnectredirect';
8
+ $this->_headerText = Mage::helper('fdmsconnectredirect')->__('First Data Merchant Solution Transactions');
9
+ parent::__construct();
10
+ $this->_removeButton('add');
11
+ }
12
+ }
app/code/local/{VirtualPayer/FdmsEMEAconnect/Block/Adminhtml/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect/Block/Adminhtml/Fdmsconnectredirect}/Grid.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
  {
5
  public function __construct()
6
  {
@@ -13,7 +13,7 @@ class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect_Grid extends
13
 
14
  protected function _prepareCollection()
15
  {
16
- $collection = Mage::getModel('fdsmemeaconnect/fdsmemeaconnect')->getCollection();
17
  $this->setCollection($collection);
18
  return parent::_prepareCollection();
19
  }
@@ -32,77 +32,77 @@ class VirtualPayer_FdmsEMEAconnect_Block_Adminhtml_FdmsEMEAconnect_Grid extends
32
  {
33
 
34
  $this->addColumn('order_id', array(
35
- 'header' => Mage::helper('fdsmemeaconnect')->__('Order ID'),
36
  'index' => 'order_id',
37
  ));
38
 
39
  $this->addColumn('timestamp', array(
40
- 'header' => Mage::helper('fdsmemeaconnect')->__('Timestamp'),
41
  'type' => 'datetime',
42
  'index' => 'timestamp',
43
  ));
44
 
45
 
46
  $this->addColumn('oid', array(
47
- 'header' => Mage::helper('fdsmemeaconnect')->__('fdsmemeaconnect Order ID'),
48
  'index' => 'oid',
49
  ));
50
 
51
  $this->addColumn('status', array(
52
- 'header' => Mage::helper('fdsmemeaconnect')->__('Status'),
53
  'index' => 'status',
54
  'width' => '50px',
55
 
56
  ));
57
 
58
  $this->addColumn('fail_reason', array(
59
- 'header' => Mage::helper('fdsmemeaconnect')->__('Fail Reason'),
60
  'index' => 'fail_reason',
61
  ));
62
 
63
  $this->addColumn('cardnumber', array(
64
- 'header' => Mage::helper('fdsmemeaconnect')->__('Card Number'),
65
  'index' => 'cardnumber',
66
  ));
67
 
68
  $this->addColumn('currency', array(
69
- 'header' => Mage::helper('fdsmemeaconnect')->__('Currency'),
70
  'index' => 'currency',
71
  'width' => '50px',
72
  ));
73
 
74
  $this->addColumn('refnumber', array(
75
- 'header' => Mage::helper('fdsmemeaconnect')->__('Referance Number'),
76
  'index' => 'refnumber',
77
  ));
78
 
79
  $this->addColumn('chargetotal', array(
80
- 'header' => Mage::helper('fdsmemeaconnect')->__('Amount'),
81
  'index' => 'chargetotal',
82
  ));
83
 
84
  $this->addColumn('paymentMethod', array(
85
- 'header' => Mage::helper('fdsmemeaconnect')->__('Payment Method'),
86
  'index' => 'paymentMethod',
87
  ));
88
 
89
  $this->addColumn('processor_response_code', array(
90
- 'header' => Mage::helper('fdsmemeaconnect')->__('Response Code'),
91
  'index' => 'processor_response_code',
92
  ));
93
 
94
 
95
 
96
- $this->addExportType('*/*/exportCsv', Mage::helper('fdsmemeaconnect')->__('CSV'));
97
- $this->addExportType('*/*/exportXml', Mage::helper('fdsmemeaconnect')->__('XML'));
98
 
99
  return parent::_prepareColumns();
100
  }
101
 
102
  protected function _prepareMassaction()
103
  {
104
- $this->setMassactionIdField('fdsmemeaconnect_id');
105
- $this->getMassactionBlock()->setFormFieldName('fdsmemeaconnect');
106
 
107
  return $this;
108
  }
1
  <?php
2
 
3
+ class Virtualpayer_Fdmsconnectredirect_Block_Adminhtml_Fdmsconnectredirect_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
  {
5
  public function __construct()
6
  {
13
 
14
  protected function _prepareCollection()
15
  {
16
+ $collection = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect')->getCollection();
17
  $this->setCollection($collection);
18
  return parent::_prepareCollection();
19
  }
32
  {
33
 
34
  $this->addColumn('order_id', array(
35
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Order ID'),
36
  'index' => 'order_id',
37
  ));
38
 
39
  $this->addColumn('timestamp', array(
40
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Timestamp'),
41
  'type' => 'datetime',
42
  'index' => 'timestamp',
43
  ));
44
 
45
 
46
  $this->addColumn('oid', array(
47
+ 'header' => Mage::helper('fdmsconnectredirect')->__('fdmsconnectredirect Order ID'),
48
  'index' => 'oid',
49
  ));
50
 
51
  $this->addColumn('status', array(
52
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Status'),
53
  'index' => 'status',
54
  'width' => '50px',
55
 
56
  ));
57
 
58
  $this->addColumn('fail_reason', array(
59
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Fail Reason'),
60
  'index' => 'fail_reason',
61
  ));
62
 
63
  $this->addColumn('cardnumber', array(
64
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Card Number'),
65
  'index' => 'cardnumber',
66
  ));
67
 
68
  $this->addColumn('currency', array(
69
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Currency'),
70
  'index' => 'currency',
71
  'width' => '50px',
72
  ));
73
 
74
  $this->addColumn('refnumber', array(
75
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Referance Number'),
76
  'index' => 'refnumber',
77
  ));
78
 
79
  $this->addColumn('chargetotal', array(
80
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Amount'),
81
  'index' => 'chargetotal',
82
  ));
83
 
84
  $this->addColumn('paymentMethod', array(
85
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Payment Method'),
86
  'index' => 'paymentMethod',
87
  ));
88
 
89
  $this->addColumn('processor_response_code', array(
90
+ 'header' => Mage::helper('fdmsconnectredirect')->__('Response Code'),
91
  'index' => 'processor_response_code',
92
  ));
93
 
94
 
95
 
96
+ $this->addExportType('*/*/exportCsv', Mage::helper('fdmsconnectredirect')->__('CSV'));
97
+ $this->addExportType('*/*/exportXml', Mage::helper('fdmsconnectredirect')->__('XML'));
98
 
99
  return parent::_prepareColumns();
100
  }
101
 
102
  protected function _prepareMassaction()
103
  {
104
+ $this->setMassactionIdField('fdmsconnectredirect_id');
105
+ $this->getMassactionBlock()->setFormFieldName('fdmsconnectredirect');
106
 
107
  return $this;
108
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Error.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,19 +9,19 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Error extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
21
  */
22
  protected function _toHtml()
23
  {
24
- $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsemeaconnect/redirect/failure' . '"</script>';
25
  return $html;
26
  }
27
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Block_Redirect_Error extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
21
  */
22
  protected function _toHtml()
23
  {
24
+ $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsconnectredirect/redirect/failure' . '"</script>';
25
  return $html;
26
  }
27
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Form.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,19 +9,19 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Form extends Mage_Payment_Block_Form
18
  {
19
  /**
20
  * @return void
21
  */
22
  protected function _construct()
23
  {
24
- $this->setTemplate('fdmsemeaconnect/redirect/form.phtml');
25
  parent::_construct();
26
  }
27
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Block_Redirect_Form extends Mage_Payment_Block_Form
18
  {
19
  /**
20
  * @return void
21
  */
22
  protected function _construct()
23
  {
24
+ $this->setTemplate('fdmsconnectredirect/redirect/form.phtml');
25
  parent::_construct();
26
  }
27
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Redirect.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,12 +9,12 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
@@ -210,7 +210,7 @@ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Blo
210
  $timestamp = $orderid = $currency = $sha1hash = '';
211
 
212
 
213
- $redirect = Mage::getModel('fdmsemeaconnect/redirect');
214
 
215
  $dateTime = date("Y:m:d-H:i:s");
216
  $timestamp = strftime("%Y%m%d%H%M%S");
@@ -221,8 +221,8 @@ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Blo
221
 
222
  $form = new Varien_Data_Form();
223
  $form->setAction($gateway)
224
- ->setId('fdmsemeaconnect_redirect_checkout')
225
- ->setName('fdmsemeaconnect_redirect_checkout')
226
  ->setMethod('POST')
227
  ->setUseContainer(true);
228
 
@@ -251,7 +251,7 @@ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Blo
251
 
252
  $form->addField('txntype', 'hidden', array('name'=>'txntype', 'value'=>'sale'));
253
  $form->addField('oid', 'hidden', array('name'=>'oid', 'value'=>$orderid));
254
- $form->addField('timezone', 'hidden', array('name'=>'timezone', 'value'=>date(T)));
255
  $form->addField('txndatetime', 'hidden', array('name'=>'txndatetime', 'value'=>$dateTime));
256
  $form->addField('hash', 'hidden', array('name'=>'hash', 'value'=>$sha1hash));
257
  $form->addField('storename', 'hidden', array('name'=>'storename', 'value'=>$storeid));
@@ -262,9 +262,9 @@ class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Redirect extends Mage_Core_Blo
262
  $form->addField('currency', 'hidden', array('name'=>'currency', 'value'=>$currency));
263
 
264
  $html = '<html><body>';
265
- $html.= Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_redirect')->toHtml();
266
  $html.= $form->toHtml();
267
- $html.= '<script type="text/javascript">document.getElementById("fdmsemeaconnect_redirect_checkout").submit();</script>';
268
  $html.= '</body></html>';
269
 
270
 
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Block_Redirect_Redirect extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
210
  $timestamp = $orderid = $currency = $sha1hash = '';
211
 
212
 
213
+ $redirect = Mage::getModel('fdmsconnectredirect/redirect');
214
 
215
  $dateTime = date("Y:m:d-H:i:s");
216
  $timestamp = strftime("%Y%m%d%H%M%S");
221
 
222
  $form = new Varien_Data_Form();
223
  $form->setAction($gateway)
224
+ ->setId('fdmsconnectredirect_redirect_checkout')
225
+ ->setName('fdmsconnectredirect_redirect_checkout')
226
  ->setMethod('POST')
227
  ->setUseContainer(true);
228
 
251
 
252
  $form->addField('txntype', 'hidden', array('name'=>'txntype', 'value'=>'sale'));
253
  $form->addField('oid', 'hidden', array('name'=>'oid', 'value'=>$orderid));
254
+ $form->addField('timezone', 'hidden', array('name'=>'timezone', 'value'=>date('T')));
255
  $form->addField('txndatetime', 'hidden', array('name'=>'txndatetime', 'value'=>$dateTime));
256
  $form->addField('hash', 'hidden', array('name'=>'hash', 'value'=>$sha1hash));
257
  $form->addField('storename', 'hidden', array('name'=>'storename', 'value'=>$storeid));
262
  $form->addField('currency', 'hidden', array('name'=>'currency', 'value'=>$currency));
263
 
264
  $html = '<html><body>';
265
+ $html.= Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsconnectredirect_redirect')->toHtml();
266
  $html.= $form->toHtml();
267
+ $html.= '<script type="text/javascript">document.getElementById("fdmsconnectredirect_redirect_checkout").submit();</script>';
268
  $html.= '</body></html>';
269
 
270
 
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Block/Redirect/Success.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,19 +9,19 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Block_Redirect_Success extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
21
  */
22
  protected function _toHtml()
23
  {
24
- $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsemeaconnect/redirect/success' . '"</script>';
25
 
26
  return $html;
27
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Block_Redirect_Success extends Mage_Core_Block_Abstract
18
  {
19
  /**
20
  * @return string
21
  */
22
  protected function _toHtml()
23
  {
24
+ $html = '<script type="text/javascript">window.location = "' . Mage::getBaseUrl() . 'fdmsconnectredirect/redirect/success' . '"</script>';
25
 
26
  return $html;
27
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Helper/Data.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,12 +9,12 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Helper_Data extends Mage_Core_Helper_Abstract
18
  {
19
 
20
  /**
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Helper_Data extends Mage_Core_Helper_Abstract
18
  {
19
 
20
  /**
app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Fdmsconnectredirect.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class VirtualPayer_Fdmsconnectredirect_Model_Fdmsconnectredirect extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('fdmsconnectredirect/fdmsconnectredirect');
9
+ }
10
+ }
app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Mysql4/Fdmsconnectredirect.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Virtualpayer_Fdmsconnectredirect_Model_Mysql4_Fdmsconnectredirect extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ $this->_init('fdmsconnectredirect/fdmsconnectredirect', 'fdmsconnectredirect_id');
8
+ }
9
+ }
app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Mysql4/Fdmsconnectredirect/Collection.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Virtualpayer_Fdmsconnectredirect Plugin
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Virtualpayer
14
+ * @package Virtualpayer_Fdmsconnectredirect
15
+ * @copyright Copyright (c) 2013 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ class Virtualpayer_Fdmsconnectredirect_Model_Mysql4_Fdmsconnectredirect_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
19
+ {
20
+ public function _construct()
21
+ {
22
+ parent::_construct();
23
+ $this->_init('fdmsconnectredirect/fdmsconnectredirect');
24
+ }
25
+ }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Redirect.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,20 +9,20 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Method_Abstract{
18
 
19
- protected $_code = 'fdmsemeaconnect';
20
- protected $_formBlockType = 'fdmsemeaconnect/redirect_form';
21
  protected $_allowCurrencyCode = array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD','USD');
22
 
23
  /**
24
  * @param $data
25
- * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
26
  */
27
  public function assignData($data)
28
  {
@@ -77,10 +77,10 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
77
 
78
  public function createFormBlock($name)
79
  {
80
- $block = $this->getLayout()->createBlock('fdmsemeaconnect/redirect_form', $name)
81
- ->setMethod('fdmsemeaconnect_redirect')
82
  ->setPayment($this->getPayment())
83
- ->setTemplate('fdmsemeaconnect/redirect/form.phtml');
84
 
85
  return $block;
86
  }
@@ -88,7 +88,7 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
88
  /**
89
  * Validate the currency code is available to use for FdmsConnect or not
90
  *
91
- * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
92
  */
93
 
94
  public function validate()
@@ -102,7 +102,7 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
102
 
103
  /**
104
  * @param Mage_Sales_Model_Order_Payment $payment
105
- * @return VirtualPayer_FdmsEMEAconnect_Model_Redirect
106
  */
107
  public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
108
  {
@@ -131,7 +131,7 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
131
  */
132
  public function getOrderPlaceRedirectUrl()
133
  {
134
- return Mage::getUrl('fdmsemeaconnect/redirect/', array('_secure' => true));
135
  }
136
 
137
 
@@ -139,14 +139,14 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
139
  * @return string
140
  */
141
  public function getSuccessUrl(){
142
- return Mage::getUrl('fdmsemeaconnect/response/');
143
  }
144
 
145
  /**
146
  * @return string
147
  */
148
  public function getCancelUrl(){
149
- return Mage::getUrl('fdmsemeaconnect/redirect/cancel');
150
  }
151
 
152
  /**
@@ -177,7 +177,7 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
177
  */
178
  public function initialize($paymentAction, $stateObject)
179
  {
180
- $state = "Fdm Redirect Connect Processing";
181
  $stateObject->setState($state);
182
  $stateObject->setIsNotified(false);
183
  }
@@ -187,7 +187,7 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
187
  */
188
  public function processRedirectResponse($post){
189
  Mage::log($post);
190
- $this->saveFdmsEMEAconnectTransaction($post);
191
 
192
  $timestamp = $post['tdate'];
193
  $result = $post['processor_response_code'];
@@ -195,9 +195,9 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
195
  $message = $post['status'];
196
  $authcode = $post['terminal_id'];
197
  $pasref = $post['refnumber'];
198
- $fdmsemeaconnectsha1 = $post['response_hash'];
199
 
200
- $redirect = Mage::getModel('fdmsemeaconnect/redirect');
201
  $storeid = $redirect->getConfigData('storeid');
202
  $secret = $redirect->getConfigData('sharedsecret');
203
 
@@ -232,11 +232,11 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
232
  $order->save();
233
  }
234
  if($redirect->getConfigData('capture')){
235
- Mage::helper('fdmsemeaconnect')->createInvoice($orderid);
236
  }
237
  return true;
238
  }else{
239
- $session->addError('There was a problem completing your order. Please try again');
240
  if ($order->getId()) {
241
  $order->addStatusToHistory('cancelled', $result . ': ' . $message, false);
242
  $order->cancel();
@@ -247,12 +247,12 @@ class VirtualPayer_FdmsEMEAconnect_Model_Redirect extends Mage_Payment_Model_Met
247
  }
248
  }
249
 
250
- public function savefdmsemeaconnectTransaction($post){
251
- $fdmsemeaconnect = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
252
 
253
  try{
254
- $fdmsemeaconnect->setOrderId($post['oid'])
255
- ->setTimestamp(Mage::helper('fdmsemeaconnect')->getDateFromTimestamp($post['txndatetime']))
256
  ->setTerminalid($post['terminal_id'])
257
  ->setExpmonth($post['expmonth'])
258
  ->setStatus($post['status'])
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Redirect extends Mage_Payment_Model_Method_Abstract{
18
 
19
+ protected $_code = 'fdmsconnectredirect';
20
+ protected $_formBlockType = 'fdmsconnectredirect/redirect_form';
21
  protected $_allowCurrencyCode = array('AUD', 'CAD', 'CHF', 'CZK', 'DKK', 'EUR', 'GBP', 'HKD', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD','USD');
22
 
23
  /**
24
  * @param $data
25
+ * @return VirtualPayer_Fdmsconnectredirect_Model_Redirect
26
  */
27
  public function assignData($data)
28
  {
77
 
78
  public function createFormBlock($name)
79
  {
80
+ $block = $this->getLayout()->createBlock('fdmsconnectredirect/redirect_form', $name)
81
+ ->setMethod('fdmsconnectredirect_redirect')
82
  ->setPayment($this->getPayment())
83
+ ->setTemplate('fdmsconnectredirect/redirect/form.phtml');
84
 
85
  return $block;
86
  }
88
  /**
89
  * Validate the currency code is available to use for FdmsConnect or not
90
  *
91
+ * @return VirtualPayer_Fdmsconnectredirect_Model_Redirect
92
  */
93
 
94
  public function validate()
102
 
103
  /**
104
  * @param Mage_Sales_Model_Order_Payment $payment
105
+ * @return VirtualPayer_Fdmsconnectredirect_Model_Redirect
106
  */
107
  public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
108
  {
131
  */
132
  public function getOrderPlaceRedirectUrl()
133
  {
134
+ return Mage::getUrl('fdmsconnectredirect/redirect/', array('_secure' => true));
135
  }
136
 
137
 
139
  * @return string
140
  */
141
  public function getSuccessUrl(){
142
+ return Mage::getUrl('fdmsconnectredirect/redirect/success');
143
  }
144
 
145
  /**
146
  * @return string
147
  */
148
  public function getCancelUrl(){
149
+ return Mage::getUrl('fdmsconnectredirect/redirect/cancel');
150
  }
151
 
152
  /**
177
  */
178
  public function initialize($paymentAction, $stateObject)
179
  {
180
+ $state = "Fdms Redirect Connect Processing";
181
  $stateObject->setState($state);
182
  $stateObject->setIsNotified(false);
183
  }
187
  */
188
  public function processRedirectResponse($post){
189
  Mage::log($post);
190
+ $this->saveFdmsconnectredirectTransaction($post);
191
 
192
  $timestamp = $post['tdate'];
193
  $result = $post['processor_response_code'];
195
  $message = $post['status'];
196
  $authcode = $post['terminal_id'];
197
  $pasref = $post['refnumber'];
198
+ $fdmsconnectredirectsha1 = $post['response_hash'];
199
 
200
+ $redirect = Mage::getModel('fdmsconnectredirect/redirect');
201
  $storeid = $redirect->getConfigData('storeid');
202
  $secret = $redirect->getConfigData('sharedsecret');
203
 
232
  $order->save();
233
  }
234
  if($redirect->getConfigData('capture')){
235
+ Mage::helper('fdmsconnectredirect')->createInvoice($orderid);
236
  }
237
  return true;
238
  }else{
239
+ $session->addError('There was a problem completing your order. Please try again or call merchant');
240
  if ($order->getId()) {
241
  $order->addStatusToHistory('cancelled', $result . ': ' . $message, false);
242
  $order->cancel();
247
  }
248
  }
249
 
250
+ public function saveFdmsconnectredirectTransaction($post){
251
+ $fdmsconnectredirect = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect');
252
 
253
  try{
254
+ $fdmsconnectredirect->setOrderId($post['oid'])
255
+ ->setTimestamp(Mage::helper('fdmsconnectredirect')->getDateFromTimestamp($post['txndatetime']))
256
  ->setTerminalid($post['terminal_id'])
257
  ->setExpmonth($post['expmonth'])
258
  ->setStatus($post['status'])
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Setup.php RENAMED
@@ -1,12 +1,12 @@
1
  <?php
2
 
3
- class VirtualPayer_FdmsEMEAconnect_Model_Setup extends Mage_Eav_Model_Entity_Setup
4
  {
5
 
6
  public function createStaticBlocks(){
7
  $error = Mage::getModel('cms/block');
8
- $error->setTitle('FdmsEMEAconnect Error Message')
9
- ->setIdentifier('fdmsemeaconnect_error')
10
  ->setContent('{{var response.message}}')
11
  ->setCreationTime(date('Y-m-d H:i:s'))
12
  ->setUpdateTime(date('Y-m-d H:i:s'))
@@ -15,8 +15,8 @@ class VirtualPayer_FdmsEMEAconnect_Model_Setup extends Mage_Eav_Model_Entity_Set
15
  ->save();
16
 
17
  $success = Mage::getModel('cms/block');
18
- $success->setTitle('FdmsEMEAconnect Success Message')
19
- ->setIdentifier('fdmsemeaconnect_success')
20
  ->setContent('{{var response.message}}')
21
  ->setCreationTime(date('Y-m-d H:i:s'))
22
  ->setUpdateTime(date('Y-m-d H:i:s'))
@@ -25,9 +25,9 @@ class VirtualPayer_FdmsEMEAconnect_Model_Setup extends Mage_Eav_Model_Entity_Set
25
  ->save();
26
 
27
  $redirect = Mage::getModel('cms/block');
28
- $redirect->setTitle('FdmsEMEAconnect Redirect Message')
29
- ->setIdentifier('fdmsemeaconnect_redirect')
30
- ->setContent('You will be redirected to FdmsEMEAconnect in a few seconds.')
31
  ->setCreationTime(date('Y-m-d H:i:s'))
32
  ->setUpdateTime(date('Y-m-d H:i:s'))
33
  ->setIsActive(1)
1
  <?php
2
 
3
+ class Virtualpayer_Fdmsconnectredirect_Model_Setup extends Mage_Eav_Model_Entity_Setup
4
  {
5
 
6
  public function createStaticBlocks(){
7
  $error = Mage::getModel('cms/block');
8
+ $error->setTitle('Fdmsconnectredirect Error Message')
9
+ ->setIdentifier('fdmsconnectredirect_error')
10
  ->setContent('{{var response.message}}')
11
  ->setCreationTime(date('Y-m-d H:i:s'))
12
  ->setUpdateTime(date('Y-m-d H:i:s'))
15
  ->save();
16
 
17
  $success = Mage::getModel('cms/block');
18
+ $success->setTitle('Fdmsconnectredirect Success Message')
19
+ ->setIdentifier('fdmsconnectredirect_success')
20
  ->setContent('{{var response.message}}')
21
  ->setCreationTime(date('Y-m-d H:i:s'))
22
  ->setUpdateTime(date('Y-m-d H:i:s'))
25
  ->save();
26
 
27
  $redirect = Mage::getModel('cms/block');
28
+ $redirect->setTitle('Fdmsconnectredirect Redirect Message')
29
+ ->setIdentifier('fdmsconnectredirect_redirect')
30
+ ->setContent('You will be redirected to First Data in a few seconds.')
31
  ->setCreationTime(date('Y-m-d H:i:s'))
32
  ->setUpdateTime(date('Y-m-d H:i:s'))
33
  ->setIsActive(1)
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/Cctype.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,12 +9,12 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype
18
  {
19
  public function getAllowedTypes()
20
  {
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype
18
  {
19
  public function getAllowedTypes()
20
  {
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/Currency.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,23 +9,23 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Source_Currency
18
  {
19
  public function toOptionArray()
20
  {
21
  return array(
22
  array(
23
  'value' => 'base',
24
- 'label' => Mage::helper('fdmsemeaconnect')->__('Use Base Currency')
25
  ),
26
  array(
27
  'value' => 'display',
28
- 'label' => Mage::helper('fdmsemeaconnect')->__('Use Display Currency')
29
  ),
30
  );
31
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Source_Currency
18
  {
19
  public function toOptionArray()
20
  {
21
  return array(
22
  array(
23
  'value' => 'base',
24
+ 'label' => Mage::helper('fdmsconnectredirect')->__('Use Base Currency')
25
  ),
26
  array(
27
  'value' => 'display',
28
+ 'label' => Mage::helper('fdmsconnectredirect')->__('Use Display Currency')
29
  ),
30
  );
31
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/OrderStatus.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,19 +9,19 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Source_OrderStatus{
18
 
19
  public function toOptionArray()
20
  {
21
  return array(
22
- array('value' => 'canceled', 'label' => Mage::helper('fdmsemeaconnect')->__('Canceled')),
23
- array('value' => 'pending', 'label' => Mage::helper('fdmsemeaconnect')->__('Pending')),
24
- array('value' => 'processing', 'label' => Mage::helper('fdmsemeaconnect')->__('Processing')),
25
  );
26
  }
27
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Source_OrderStatus{
18
 
19
  public function toOptionArray()
20
  {
21
  return array(
22
+ array('value' => 'canceled', 'label' => Mage::helper('fdmsconnectredirect')->__('Canceled')),
23
+ array('value' => 'pending', 'label' => Mage::helper('fdmsconnectredirect')->__('Pending')),
24
+ array('value' => 'processing', 'label' => Mage::helper('fdmsconnectredirect')->__('Processing')),
25
  );
26
  }
27
  }
app/code/local/Virtualpayer/Fdmsconnectredirect/Model/Source/PaymentAction.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Source_PaymentAction
18
+ {
19
+ public function toOptionArray()
20
+ {
21
+ return array(
22
+ array(
23
+ 'value' => Mage_Fdmsconnectredirect_Model_Redirect::ACTION_AUTHORIZE,
24
+ 'label' => Mage::helper('fdmsconnectredirect')->__('Defer Settlement')
25
+ ),
26
+ array(
27
+ 'value' => Mage_Fdmsconnectredirect_Model_Redirect::ACTION_AUTHORIZE_CAPTURE,
28
+ 'label' => Mage::helper('fdmsconnectredirect')->__('Settle Immediately')
29
+ ),
30
+ );
31
+ }
32
+ }
33
+
34
+ ?>
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/Model/Source/PaymentMode.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,19 +9,19 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_Model_Source_PaymentMode
18
  {
19
  public function toOptionArray()
20
  {
21
  return array(
22
  array(
23
- 'value' => 'fdmsemeaconnect/redirect',
24
- 'label' => Mage::helper('fdmsemeaconnect')->__('Redirect')
25
  ),
26
  );
27
  }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_Model_Source_PaymentMode
18
  {
19
  public function toOptionArray()
20
  {
21
  return array(
22
  array(
23
+ 'value' => 'fdmsconnectredirect/redirect',
24
+ 'label' => Mage::helper('fdmsconnectredirect')->__('Redirect')
25
  ),
26
  );
27
  }
app/code/local/{VirtualPayer/FdmsEMEAconnect/controllers/Adminhtml/FdmsEMEAconnectController.php → Virtualpayer/Fdmsconnectredirect/controllers/Adminhtml/FdmsconnectredirectController.php} RENAMED
@@ -1,12 +1,12 @@
1
  <?php
2
 
3
- class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends Mage_Adminhtml_Controller_Action
4
  {
5
 
6
  protected function _initAction() {
7
  $this->loadLayout()
8
- ->_setActiveMenu('fdmsemeaconnect/items')
9
- ->_addBreadcrumb(Mage::helper('adminhtml')->__('Fdms Connect Transactions Manager'), Mage::helper('adminhtml')->__('Fdms Connect Transactions Manager'));
10
 
11
  return $this;
12
  }
@@ -18,7 +18,7 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
18
 
19
  public function editAction() {
20
  $id = $this->getRequest()->getParam('id');
21
- $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->load($id);
22
 
23
  if ($model->getId() || $id == 0) {
24
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
@@ -26,22 +26,22 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
26
  $model->setData($data);
27
  }
28
 
29
- Mage::register('fdmsemeaconnect_data', $model);
30
 
31
  $this->loadLayout();
32
- $this->_setActiveMenu('fdmsemeaconnect/items');
33
 
34
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'), Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'));
35
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code News'), Mage::helper('adminhtml')->__('Code News'));
36
 
37
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
38
 
39
- $this->_addContent($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_edit'))
40
- ->_addLeft($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_edit_tabs'));
41
 
42
  $this->renderLayout();
43
  } else {
44
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsemeaconnect')->__('Code does not exist'));
45
  $this->_redirect('*/*/');
46
  }
47
  }
@@ -52,15 +52,15 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
52
 
53
  public function uploadAction() {
54
  $this->loadLayout();
55
- $this->_setActiveMenu('fdmsemeaconnect/items');
56
 
57
- $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'), Mage::helper('adminhtml')->__('fdmsemeaconnect Manager'));
58
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code Import'), Mage::helper('adminhtml')->__('Code Import'));
59
 
60
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
61
 
62
- $this->_addContent($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_import'))
63
- ->_addLeft($this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_import_tabs'));
64
 
65
  $this->renderLayout();
66
  }
@@ -87,7 +87,7 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
87
  $row++;
88
  continue;
89
  }else{
90
- $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
91
  $row++;
92
  $num = count($data);
93
  for ($c=0; $c < $num; $c++) {
@@ -115,7 +115,7 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
115
  return;
116
  }
117
 
118
- $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
119
  $model->setData($data)
120
  ->setId($this->getRequest()->getParam('id'));
121
 
@@ -128,7 +128,7 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
128
  }
129
 
130
  $model->save();
131
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('fdmsemeaconnect')->__('Code was successfully saved'));
132
  Mage::getSingleton('adminhtml/session')->setFormData(false);
133
 
134
  if ($this->getRequest()->getParam('back')) {
@@ -144,14 +144,14 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
144
  return;
145
  }
146
  }
147
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsemeaconnect')->__('Unable to find code to save'));
148
  $this->_redirect('*/*/');
149
  }
150
 
151
  public function deleteAction() {
152
  if( $this->getRequest()->getParam('id') > 0 ) {
153
  try {
154
- $model = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect');
155
 
156
  $model->setId($this->getRequest()->getParam('id'))
157
  ->delete();
@@ -167,18 +167,18 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
167
  }
168
 
169
  public function massDeleteAction() {
170
- $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
171
- if(!is_array($fdmsconnectIds)) {
172
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select code(s)'));
173
  } else {
174
  try {
175
- foreach ($fdmsconnectIds as $fdmsconnectId) {
176
- $fdmsemeaconnect = Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->load($fdmsconnectId);
177
- $fdmsemeaconnect->delete();
178
  }
179
  Mage::getSingleton('adminhtml/session')->addSuccess(
180
  Mage::helper('adminhtml')->__(
181
- 'Total of %d code(s) were successfully deleted', count($fdmsconnectIds)
182
  )
183
  );
184
  } catch (Exception $e) {
@@ -190,20 +190,20 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
190
 
191
  public function massStatusAction()
192
  {
193
- $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
194
- if(!is_array($fdmsconnectIds)) {
195
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
196
  } else {
197
  try {
198
- foreach ($fdmsconnectIds as $fdmsconnectId) {
199
- $fdmsemeaconnect = Mage::getSingleton('fdmsemeaconnect/fdmsemeaconnect')
200
- ->load($fdmsconnectId)
201
  ->setStatus($this->getRequest()->getParam('status'))
202
  ->setIsMassupdate(true)
203
  ->save();
204
  }
205
  $this->_getSession()->addSuccess(
206
- $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectIds))
207
  );
208
  } catch (Exception $e) {
209
  $this->_getSession()->addError($e->getMessage());
@@ -213,20 +213,20 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
213
  }
214
 
215
  public function massAssignAction(){
216
- $fdmsconnectIds = $this->getRequest()->getParam('fdmsemeaconnect');
217
- if(!is_array($fdmsconnectIds)) {
218
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
219
  } else {
220
  try {
221
- foreach ($fdmsconnectIds as $fdmsconnectId) {
222
- $fdmsemeaconnect = Mage::getSingleton('fdmsemeaconnect/fdmsemeaconnect')
223
- ->load($fdmsconnectId)
224
  ->setAgentId($this->getRequest()->getParam('agent_id'))
225
  ->setIsMassupdate(true)
226
  ->save();
227
  }
228
  $this->_getSession()->addSuccess(
229
- $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectIds))
230
  );
231
  } catch (Exception $e) {
232
  $this->_getSession()->addError($e->getMessage());
@@ -237,8 +237,8 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
237
 
238
  public function exportCsvAction()
239
  {
240
- $fileName = 'fdmsemeaconnect.csv';
241
- $content = $this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_grid')
242
  ->getCsv();
243
 
244
  $this->_sendUploadResponse($fileName, $content);
@@ -246,8 +246,8 @@ class VirtualPayer_FdmsEMEAconnect_Adminhtml_FdmsEMEAconnectController extends M
246
 
247
  public function exportXmlAction()
248
  {
249
- $fileName = 'fdmsemeaconnect.xml';
250
- $content = $this->getLayout()->createBlock('fdmsemeaconnect/adminhtml_fdmsemeaconnect_grid')
251
  ->getXml();
252
 
253
  $this->_sendUploadResponse($fileName, $content);
1
  <?php
2
 
3
+ class Virtualpayer_Fdmsconnectredirect_Adminhtml_FdmsconnectredirectController extends Mage_Adminhtml_Controller_Action
4
  {
5
 
6
  protected function _initAction() {
7
  $this->loadLayout()
8
+ ->_setActiveMenu('fdmsconnectredirect/items')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Fdmsconnect Transactions Manager'), Mage::helper('adminhtml')->__('Fdmsconnect Transactions Manager'));
10
 
11
  return $this;
12
  }
18
 
19
  public function editAction() {
20
  $id = $this->getRequest()->getParam('id');
21
+ $model = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect')->load($id);
22
 
23
  if ($model->getId() || $id == 0) {
24
  $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
26
  $model->setData($data);
27
  }
28
 
29
+ Mage::register('fdmsconnectredirect_data', $model);
30
 
31
  $this->loadLayout();
32
+ $this->_setActiveMenu('fdmsconnectredirect/items');
33
 
34
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsconnectredirect Manager'), Mage::helper('adminhtml')->__('fdmsconnectredirect Manager'));
35
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code News'), Mage::helper('adminhtml')->__('Code News'));
36
 
37
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
38
 
39
+ $this->_addContent($this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_edit'))
40
+ ->_addLeft($this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_edit_tabs'));
41
 
42
  $this->renderLayout();
43
  } else {
44
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsconnectredirect')->__('Code does not exist'));
45
  $this->_redirect('*/*/');
46
  }
47
  }
52
 
53
  public function uploadAction() {
54
  $this->loadLayout();
55
+ $this->_setActiveMenu('fdmsconnectredirect/items');
56
 
57
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('fdmsconnectredirect Manager'), Mage::helper('adminhtml')->__('fdmsconnectredirect Manager'));
58
  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Code Import'), Mage::helper('adminhtml')->__('Code Import'));
59
 
60
  $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
61
 
62
+ $this->_addContent($this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_import'))
63
+ ->_addLeft($this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_import_tabs'));
64
 
65
  $this->renderLayout();
66
  }
87
  $row++;
88
  continue;
89
  }else{
90
+ $model = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect');
91
  $row++;
92
  $num = count($data);
93
  for ($c=0; $c < $num; $c++) {
115
  return;
116
  }
117
 
118
+ $model = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect');
119
  $model->setData($data)
120
  ->setId($this->getRequest()->getParam('id'));
121
 
128
  }
129
 
130
  $model->save();
131
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('fdmsconnectredirect')->__('Code was successfully saved'));
132
  Mage::getSingleton('adminhtml/session')->setFormData(false);
133
 
134
  if ($this->getRequest()->getParam('back')) {
144
  return;
145
  }
146
  }
147
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fdmsconnectredirect')->__('Unable to find code to save'));
148
  $this->_redirect('*/*/');
149
  }
150
 
151
  public function deleteAction() {
152
  if( $this->getRequest()->getParam('id') > 0 ) {
153
  try {
154
+ $model = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect');
155
 
156
  $model->setId($this->getRequest()->getParam('id'))
157
  ->delete();
167
  }
168
 
169
  public function massDeleteAction() {
170
+ $fdmsconnectredirectIds = $this->getRequest()->getParam('fdmsconnectredirect');
171
+ if(!is_array($fdmsconnectredirectIds)) {
172
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select code(s)'));
173
  } else {
174
  try {
175
+ foreach ($fdmsconnectredirectIds as $fdmsconnectredirectId) {
176
+ $fdmsconnectredirect = Mage::getModel('fdmsconnectredirect/fdmsconnectredirect')->load($fdmsconnectredirectId);
177
+ $fdmsconnectredirect->delete();
178
  }
179
  Mage::getSingleton('adminhtml/session')->addSuccess(
180
  Mage::helper('adminhtml')->__(
181
+ 'Total of %d code(s) were successfully deleted', count($fdmsconnectredirectIds)
182
  )
183
  );
184
  } catch (Exception $e) {
190
 
191
  public function massStatusAction()
192
  {
193
+ $fdmsconnectredirectIds = $this->getRequest()->getParam('fdmsconnectredirect');
194
+ if(!is_array($fdmsconnectredirectIds)) {
195
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
196
  } else {
197
  try {
198
+ foreach ($fdmsconnectredirectIds as $fdmsconnectredirectId) {
199
+ $fdmsconnectredirect = Mage::getSingleton('fdmsconnectredirect/fdmsconnectredirect')
200
+ ->load($fdmsconnectredirectId)
201
  ->setStatus($this->getRequest()->getParam('status'))
202
  ->setIsMassupdate(true)
203
  ->save();
204
  }
205
  $this->_getSession()->addSuccess(
206
+ $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectredirectIds))
207
  );
208
  } catch (Exception $e) {
209
  $this->_getSession()->addError($e->getMessage());
213
  }
214
 
215
  public function massAssignAction(){
216
+ $fdmsconnectredirectIds = $this->getRequest()->getParam('fdmsconnectredirect');
217
+ if(!is_array($fdmsconnectredirectIds)) {
218
  Mage::getSingleton('adminhtml/session')->addError($this->__('Please select code(s)'));
219
  } else {
220
  try {
221
+ foreach ($fdmsconnectredirectIds as $fdmsconnectredirectId) {
222
+ $fdmsconnectredirect = Mage::getSingleton('fdmsconnectredirect/fdmsconnectredirect')
223
+ ->load($fdmsconnectredirectId)
224
  ->setAgentId($this->getRequest()->getParam('agent_id'))
225
  ->setIsMassupdate(true)
226
  ->save();
227
  }
228
  $this->_getSession()->addSuccess(
229
+ $this->__('Total of %d code(s) were successfully updated', count($fdmsconnectredirectIds))
230
  );
231
  } catch (Exception $e) {
232
  $this->_getSession()->addError($e->getMessage());
237
 
238
  public function exportCsvAction()
239
  {
240
+ $fileName = 'fdmsconnectredirect.csv';
241
+ $content = $this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_grid')
242
  ->getCsv();
243
 
244
  $this->_sendUploadResponse($fileName, $content);
246
 
247
  public function exportXmlAction()
248
  {
249
+ $fileName = 'fdmsconnectredirect.xml';
250
+ $content = $this->getLayout()->createBlock('fdmsconnectredirect/adminhtml_fdmsconnectredirect_grid')
251
  ->getXml();
252
 
253
  $this->_sendUploadResponse($fileName, $content);
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/controllers/RedirectController.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * VirtualPayer_FdmsEMEAconnect extension
4
  *
5
  * NOTICE OF LICENSE
6
  *
@@ -9,12 +9,12 @@
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
- * @category VirtualPayer
13
- * @package VirtualPayer_FdmsEMEAconnect
14
- * @copyright Copyright (c) 2016 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
- class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controller_Front_Action
18
  {
19
  /**
20
  * Order instance
@@ -47,11 +47,11 @@ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controll
47
  /**
48
  * Get singleton with First Data EMEA Connect Redirect order transaction information
49
  *
50
- * @return Mage_FdmsEMEAconnect_Model_Redirect
51
  */
52
  public function getRedirect()
53
  {
54
- return Mage::getSingleton('fdmsemeaconnect/redirect');
55
  }
56
 
57
  /**
@@ -60,13 +60,12 @@ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controll
60
  public function indexAction()
61
  {
62
  $session = Mage::getSingleton('checkout/session');
63
- $session->setFdmsEMEAconnectQuoteId($session->getQuoteId());
64
  $session->unsQuoteId();
65
 
66
  $this->loadLayout();
67
- $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('fdmsemeaconnect/redirect_redirect'));
68
  $this->renderLayout();
69
-
70
  }
71
 
72
  /**
@@ -80,7 +79,7 @@ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controll
80
  if ($session->getLastRealOrderId()) {
81
  $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
82
  if ($order->getId()) {
83
- $session->addNotice($this->__('Your order with First Data Merchant Solutions has been cancelled.'));
84
  $order->cancel()->save();
85
  }
86
  }
@@ -93,25 +92,23 @@ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controll
93
  */
94
  public function successAction()
95
  {
96
- $session = $this->getOnepage()->getCheckout();
97
- if (!$session->getLastSuccessQuoteId()) {
98
- $this->_redirect('checkout/cart');
99
- return;
100
- }
101
 
102
- $lastQuoteId = $session->getLastQuoteId();
103
- $lastOrderId = $session->getLastOrderId();
104
- $lastRecurringProfiles = $session->getLastRecurringProfileIds();
105
- if (!$lastQuoteId || (!$lastOrderId && empty($lastRecurringProfiles))) {
106
- $this->_redirect('checkout/cart');
107
- return;
 
 
 
 
 
 
 
108
  }
109
-
110
- $session->clear();
111
- $this->loadLayout();
112
- $this->_initLayoutMessages('checkout/session');
113
- Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)));
114
- $this->renderLayout();
115
  }
116
 
117
  public function failureAction()
@@ -128,4 +125,4 @@ class VirtualPayer_FdmsEMEAconnect_RedirectController extends Mage_Core_Controll
128
  $this->renderLayout();
129
  }
130
 
131
- }
1
  <?php
2
  /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
  *
5
  * NOTICE OF LICENSE
6
  *
9
  * It is also available through the world-wide-web at this URL:
10
  * http://opensource.org/licenses/osl-3.0.php
11
  *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
+ class Virtualpayer_Fdmsconnectredirect_RedirectController extends Mage_Core_Controller_Front_Action
18
  {
19
  /**
20
  * Order instance
47
  /**
48
  * Get singleton with First Data EMEA Connect Redirect order transaction information
49
  *
50
+ * @return Mage_Fdmsconnectredirect_Model_Redirect
51
  */
52
  public function getRedirect()
53
  {
54
+ return Mage::getSingleton('fdmsconnectredirect/redirect');
55
  }
56
 
57
  /**
60
  public function indexAction()
61
  {
62
  $session = Mage::getSingleton('checkout/session');
63
+ $session->setFdmsconnectredirectRedirectQuoteId($session->getQuoteId());
64
  $session->unsQuoteId();
65
 
66
  $this->loadLayout();
67
+ $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('fdmsconnectredirect/redirect_redirect'));
68
  $this->renderLayout();
 
69
  }
70
 
71
  /**
79
  if ($session->getLastRealOrderId()) {
80
  $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
81
  if ($order->getId()) {
82
+ $session->addNotice($this->__('Your order has been declined. Please try again; if error persist then contact us.'));
83
  $order->cancel()->save();
84
  }
85
  }
92
  */
93
  public function successAction()
94
  {
95
+ $session = Mage::getSingleton('checkout/session');
96
+ $post = $this->getRequest()->getPost();
 
 
 
97
 
98
+ if($post){
99
+ if (isset($post['oid'])) {
100
+ if(Mage::getModel('fdmsconnectredirect/redirect')->processRedirectResponse($post)){
101
+ $session->setQuoteId($session->getFdmsconnectredirectRedirectQuoteId());
102
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsconnectredirect/redirect_success')->toHtml());
103
+ }else{
104
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsconnectredirect/redirect_error')->toHtml());
105
+ }
106
+ }
107
+ }else{
108
+ //set the quote as inactive after back from Payment Gateway
109
+ $session->getQuote()->setIsActive(false)->save();
110
+ $this->_redirect('checkout/onepage/success', array('_secure'=>true));
111
  }
 
 
 
 
 
 
112
  }
113
 
114
  public function failureAction()
125
  $this->renderLayout();
126
  }
127
 
128
+ }
app/code/local/Virtualpayer/Fdmsconnectredirect/controllers/ResponseController.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Virtualpayer_Fdmsconnectredirect Plugin
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Virtualpayer
13
+ * @package Virtualpayer_Fdmsconnectredirect
14
+ * @copyright Copyright (c) 2013 VirtualPayer
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+ class Virtualpayer_Fdmsconnectredirect_ResponseController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ /**
20
+ * @return void
21
+ */
22
+ public function indexAction()
23
+ {
24
+ $session = Mage::getSingleton('checkout/session');
25
+ $post = $this->getRequest()->getPost();
26
+
27
+ if($post){
28
+ if (isset($post['oid'])) {
29
+ if(Mage::getModel('fdmsconnectredirect/redirect')->processRedirectResponse($post)){
30
+ $session->setQuoteId($session->getFdmsconnectredirectRedirectQuoteId());
31
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsconnectredirect/redirect_success')->toHtml());
32
+ }else{
33
+ $this->getResponse()->setBody($this->getLayout()->createBlock('fdmsconnectredirect/redirect_error')->toHtml());
34
+ }
35
+ }
36
+ }else{
37
+ //set the quote as inactive after back from First Data
38
+ $session->getQuote()->setIsActive(false)->save();
39
+ $this->_redirect('checkout/onepage/success', array('_secure'=>true));
40
+ }
41
+ }
42
+
43
+ /**
44
+ * @return
45
+ */
46
+
47
+ public function successAction()
48
+ {
49
+ $session = $this->getOnepage()->getCheckout();
50
+ if (!$session->getLastSuccessQuoteId()) {
51
+ $this->_redirect('checkout/cart');
52
+ return;
53
+ }
54
+
55
+ $lastQuoteId = $session->getLastQuoteId();
56
+ $lastOrderId = $session->getLastOrderId();
57
+ $lastRecurringProfiles = $session->getLastRecurringProfileIds();
58
+ if (!$lastQuoteId || (!$lastOrderId && empty($lastRecurringProfiles))) {
59
+ $this->_redirect('checkout/cart');
60
+ return;
61
+ }
62
+
63
+ $session->clear();
64
+ $this->loadLayout();
65
+ $this->_initLayoutMessages('checkout/session');
66
+ Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)));
67
+ $this->renderLayout();
68
+ var_dump($this->getLayout()->getUpdate()->getHandles());
69
+ }
70
+ /**
71
+ * @return
72
+ */
73
+ public function failureAction(){
74
+ $session = Mage::getSingleton('checkout/session');
75
+ $lastQuoteId = $session->getLastQuoteId();
76
+ $lastOrderId = $session->getLastOrderId();
77
+
78
+ if (!$lastQuoteId || !$lastOrderId) {
79
+ $this->_redirect('checkout/cart');
80
+ return;
81
+ }
82
+
83
+ $order = Mage::getModel('sales/order')->loadByAttribute('entity_id', $lastOrderId);
84
+
85
+ if ($order->getId()) {
86
+ $order->addStatusToHistory('canceled', $session->getErrorMessage())->save();
87
+ }
88
+
89
+ $this->_redirect('checkout/onepage/failure');
90
+ return;
91
+ }
92
+ }
app/code/local/Virtualpayer/Fdmsconnectredirect/etc/config.xml ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Virtualpayer_Fdmsconnectredirectredirect Plugin
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Virtualpayer
14
+ * @package Virtualpayer_Fdmsconnectredirectredirect
15
+ * @copyright Copyright (c) 2013 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <Virtualpayer_Fdmsconnectredirect>
22
+ <version>1.0.1</version>
23
+ </Virtualpayer_Fdmsconnectredirect>
24
+ </modules>
25
+ <global>
26
+ <models>
27
+ <fdmsconnectredirect>
28
+ <class>Virtualpayer_Fdmsconnectredirect_Model</class>
29
+ <resourceModel>fdmsconnectredirect_mysql4</resourceModel>
30
+ </fdmsconnectredirect>
31
+ <fdmsconnectredirect_mysql4>
32
+ <class>Virtualpayer_Fdmsconnectredirect_Model_Mysql4</class>
33
+ <entities>
34
+ <fdmsconnectredirect>
35
+ <table>fdmsconnectredirect</table>
36
+ </fdmsconnectredirect>
37
+ </entities>
38
+ </fdmsconnectredirect_mysql4>
39
+ </models>
40
+ <blocks>
41
+ <fdmsconnectredirect>
42
+ <class>Virtualpayer_Fdmsconnectredirect_Block</class>
43
+ </fdmsconnectredirect>
44
+ </blocks>
45
+ <helpers>
46
+ <fdmsconnectredirect>
47
+ <class>Virtualpayer_Fdmsconnectredirect_Helper</class>
48
+ </fdmsconnectredirect>
49
+ </helpers>
50
+ <resources>
51
+ <fdmsconnectredirect_setup>
52
+ <setup>
53
+ <module>Virtualpayer_Fdmsconnectredirect</module>
54
+ <class>Virtualpayer_Fdmsconnectredirect_Model_Setup</class>
55
+ </setup>
56
+ <connection>
57
+ <use>core_setup</use>
58
+ </connection>
59
+ </fdmsconnectredirect_setup>
60
+ <fdmsconnectredirect_write>
61
+ <connection>
62
+ <use>core_write</use>
63
+ </connection>
64
+ </fdmsconnectredirect_write>
65
+ <fdmsconnectredirect_read>
66
+ <connection>
67
+ <use>core_read</use>
68
+ </connection>
69
+ </fdmsconnectredirect_read>
70
+ </resources>
71
+ <payment>
72
+ <cc>
73
+ <types>
74
+ <VI>
75
+ <code>VI</code>
76
+ <name>Visa</name>
77
+ <order>0</order>
78
+ </VI>
79
+ <MC>
80
+ <code>MC</code>
81
+ <name>MasterCard</name>
82
+ <order>100</order>
83
+ </MC>
84
+ <AM>
85
+ <code>AM</code>
86
+ <name>American Express</name>
87
+ <order>200</order>
88
+ </AM>
89
+ </types>
90
+ </cc>
91
+ </payment>
92
+ </global>
93
+ <frontend>
94
+ <routers>
95
+ <fdmsconnectredirect>
96
+ <use>standard</use>
97
+ <args>
98
+ <module>Virtualpayer_Fdmsconnectredirect</module>
99
+ <frontName>fdmsconnectredirect</frontName>
100
+ </args>
101
+ </fdmsconnectredirect>
102
+ </routers>
103
+
104
+ <layout>
105
+ <updates>
106
+ <fdmsconnectredirect>
107
+ <file>fdmsconnectredirect.xml</file>
108
+ </fdmsconnectredirect>
109
+ </updates>
110
+ </layout>
111
+ </frontend>
112
+
113
+ <adminhtml>
114
+ <menu>
115
+ <sales module="sales">
116
+ <children>
117
+ <fdmsconnectredirect module="fdmsconnectredirect">
118
+ <title>Fdmsconnectredirect Transactions</title>
119
+ <sort_order>300</sort_order>
120
+ <action>fdmsconnectredirect/adminhtml_fdmsconnectredirect</action>
121
+ </fdmsconnectredirect>
122
+ </children>
123
+ </sales>
124
+ </menu>
125
+ <acl>
126
+ <resources>
127
+ <all>
128
+ <title>Allow Everything</title>
129
+ </all>
130
+ <admin>
131
+ <children>
132
+ <sales>
133
+ <children>
134
+ <fdmsconnectredirect>
135
+ <title>First Data Connect Transactions</title>
136
+ <sort_order>10</sort_order>
137
+ </fdmsconnectredirect>
138
+ </children>
139
+ </sales>
140
+ </children>
141
+ </admin>
142
+ </resources>
143
+ </acl>
144
+ <layout>
145
+ <updates>
146
+ <fdmsconnectredirect>
147
+ <file>fdmsconnectredirect.xml</file>
148
+ </fdmsconnectredirect>
149
+ </updates>
150
+ </layout>
151
+ </adminhtml>
152
+ <default>
153
+ <payment>
154
+ <fdmsconnectredirect>
155
+ <active>0</active>
156
+ <title>First Data EMEA Connect Payment Gateway</title>
157
+ <model>fdmsconnectredirect/redirect</model>
158
+ <order_status>processing</order_status>
159
+ <payment_action>authorize</payment_action>
160
+ </fdmsconnectredirect>
161
+ </payment>
162
+ </default>
163
+ </config>
app/code/local/{VirtualPayer/FdmsEMEAconnect → Virtualpayer/Fdmsconnectredirect}/etc/system.xml RENAMED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * VirtualPayer_FdmsEMEAconnect extension
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -10,9 +10,9 @@
10
  * It is also available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
- * @category VirtualPayer
14
- * @package VirtualPayer_FdmsEMEAconnect
15
- * @copyright Copyright (c) 2016 VirtualPayer
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -20,7 +20,7 @@
20
  <sections>
21
  <payment>
22
  <groups>
23
- <fdmsemeaconnect translate="label" module="paygate">
24
  <label>First Data EMEA Connect</label>
25
  <sort_order>670</sort_order>
26
  <show_in_default>1</show_in_default>
@@ -52,7 +52,7 @@
52
  <model translate="label">
53
  <label>Payment Gateway Mode</label>
54
  <frontend_type>select</frontend_type>
55
- <source_model>fdmsemeaconnect/source_paymentMode</source_model>
56
  <sort_order>25</sort_order>
57
  <show_in_default>1</show_in_default>
58
  <show_in_website>1</show_in_website>
@@ -89,7 +89,7 @@
89
  <order_status translate="label">
90
  <label>New order status</label>
91
  <frontend_type>select</frontend_type>
92
- <source_model>fdmsemeaconnect/source_orderStatus</source_model>
93
  <sort_order>80</sort_order>
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
@@ -101,7 +101,7 @@
101
  <currency translate="label">
102
  <label>Transaction Currency</label>
103
  <frontend_type>select</frontend_type>
104
- <source_model>fdmsemeaconnect/source_currency</source_model>
105
  <sort_order>95</sort_order>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>1</show_in_website>
@@ -130,14 +130,14 @@
130
  <show_in_default>1</show_in_default>
131
  <show_in_website>1</show_in_website>
132
  <show_in_store>1</show_in_store>
133
- <comment>Logs requests to and responses from FdmsConnect to /var/log.system.log provided that logging is enabled.</comment>
134
  <depends>
135
  <active>1</active>
136
  </depends>
137
  </debug>
138
  </fields>
139
- </fdmsemeaconnect>
140
  </groups>
141
  </payment>
142
  </sections>
143
- </config>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * Virtualpayer_Fdmsconnectredirect Plugin
5
  *
6
  * NOTICE OF LICENSE
7
  *
10
  * It is also available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
+ * @category Virtualpayer
14
+ * @package Virtualpayer_Fdmsconnectredirect
15
+ * @copyright Copyright (c) 2013 VirtualPayer
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
  -->
20
  <sections>
21
  <payment>
22
  <groups>
23
+ <fdmsconnectredirect translate="label" module="paygate">
24
  <label>First Data EMEA Connect</label>
25
  <sort_order>670</sort_order>
26
  <show_in_default>1</show_in_default>
52
  <model translate="label">
53
  <label>Payment Gateway Mode</label>
54
  <frontend_type>select</frontend_type>
55
+ <source_model>fdmsconnectredirect/source_paymentMode</source_model>
56
  <sort_order>25</sort_order>
57
  <show_in_default>1</show_in_default>
58
  <show_in_website>1</show_in_website>
89
  <order_status translate="label">
90
  <label>New order status</label>
91
  <frontend_type>select</frontend_type>
92
+ <source_model>fdmsconnectredirect/source_orderStatus</source_model>
93
  <sort_order>80</sort_order>
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
101
  <currency translate="label">
102
  <label>Transaction Currency</label>
103
  <frontend_type>select</frontend_type>
104
+ <source_model>fdmsconnectredirect/source_currency</source_model>
105
  <sort_order>95</sort_order>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>1</show_in_website>
130
  <show_in_default>1</show_in_default>
131
  <show_in_website>1</show_in_website>
132
  <show_in_store>1</show_in_store>
133
+ <comment>Logs requests to and responses from Fdmsconnect to /var/log.system.log provided that logging is enabled.</comment>
134
  <depends>
135
  <active>1</active>
136
  </depends>
137
  </debug>
138
  </fields>
139
+ </fdmsconnectredirect>
140
  </groups>
141
  </payment>
142
  </sections>
143
+ </config>
app/code/local/Virtualpayer/Fdmsconnectredirect/etc/system.xml~ ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Virtualpayer_Fdmsconnectredirect Plugin
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ *
13
+ * @category Virtualpayer
14
+ * @package Virtualpayer_Fdmsconnectredirect
15
+ * @copyright Copyright (c) 2013 VirtualPayer
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ -->
19
+ <config>
20
+ <sections>
21
+ <payment>
22
+ <groups>
23
+ <fdmsconnectredirect translate="label" module="paygate">
24
+ <label>First Data EMEA Connect (Redirect Option)</label>
25
+ <sort_order>670</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <fields>
30
+ <active translate="label">
31
+ <label>Enabled</label>
32
+ <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_yesno</source_model>
34
+ <sort_order>10</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>1</show_in_store>
38
+ </active>
39
+ <title translate="label">
40
+ <label>Title</label>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>20</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ <validate>required-entry</validate>
47
+ <comment>Appears in the checkout and in emails sent to the customer.</comment>
48
+ <depends>
49
+ <active>1</active>
50
+ </depends>
51
+ </title>
52
+ <model translate="label">
53
+ <label>Payment Gateway Mode</label>
54
+ <frontend_type>select</frontend_type>
55
+ <source_model>fdmsconnectredirect/source_paymentMode</source_model>
56
+ <sort_order>25</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>1</show_in_store>
60
+ <comment>For PCI DSS related reasons, please contact First Data or developer for other Payment Modes.</comment>
61
+ <depends>
62
+ <active>1</active>
63
+ </depends>
64
+ </model>
65
+ <storeid translate="label">
66
+ <label>Store ID</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>40</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <validate>required-entry</validate>
73
+ <depends>
74
+ <active>1</active>
75
+ </depends>
76
+ </storeid>
77
+ <sharedsecret translate="label">
78
+ <label>Shared Secret</label>
79
+ <frontend_type>password</frontend_type>
80
+ <sort_order>50</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ <validate>required-entry</validate>
85
+ <depends>
86
+ <active>1</active>
87
+ </depends>
88
+ </sharedsecret>
89
+ <order_status translate="label">
90
+ <label>New order status</label>
91
+ <frontend_type>select</frontend_type>
92
+ <source_model>fdmsconnectredirect/source_orderStatus</source_model>
93
+ <sort_order>80</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>1</show_in_store>
97
+ <depends>
98
+ <active>1</active>
99
+ </depends>
100
+ </order_status>
101
+ <currency translate="label">
102
+ <label>Transaction Currency</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>fdmsconnectredirect/source_currency</source_model>
105
+ <sort_order>95</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ <depends>
110
+ <active>1</active>
111
+ </depends>
112
+ </currency>
113
+ <test translate="label">
114
+ <label>Test Environment</label>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>adminhtml/system_config_source_yesno</source_model>
117
+ <sort_order>100</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <show_in_store>1</show_in_store>
121
+ <depends>
122
+ <active>1</active>
123
+ </depends>
124
+ </test>
125
+ <debug translate="label">
126
+ <label>Debug</label>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>adminhtml/system_config_source_yesno</source_model>
129
+ <sort_order>110</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ <comment>Logs requests to and responses from Fdmsconnect to /var/log.system.log provided that logging is enabled.</comment>
134
+ <depends>
135
+ <active>1</active>
136
+ </depends>
137
+ </debug>
138
+ </fields>
139
+ </fdmsconnectredirect>
140
+ </groups>
141
+ </payment>
142
+ </sections>
143
+ </config>
app/code/local/{VirtualPayer/FdmsEMEAconnect/sql/fdmsemeaconnect_setup → Virtualpayer/Fdmsconnectredirect/sql/fdmsconnectredirect_setup}/mysql4-install-0.1.0.php RENAMED
@@ -6,9 +6,9 @@ $installer->startSetup();
6
 
7
  $installer->run("
8
 
9
- DROP TABLE IF EXISTS {$this->getTable('fdmsemeaconnect')};
10
- CREATE TABLE {$this->getTable('fdmsemeaconnect')} (
11
- `fdmsemeaconnect_id` int(11) unsigned NOT NULL auto_increment,
12
  `order_id` varchar(255) NOT NULL default '',
13
  `timestamp` datetime NULL,
14
  `terminal_id` varchar(255) NOT NULL default '',
@@ -32,7 +32,7 @@ CREATE TABLE {$this->getTable('fdmsemeaconnect')} (
32
  `txntype` varchar(255) NOT NULL default '',
33
  `response_hash` varchar(255) NOT NULL default '',
34
  `paymentMethod` varchar(2) NOT NULL default '',
35
- PRIMARY KEY (`fdmsemeaconnect_id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
38
  ");
6
 
7
  $installer->run("
8
 
9
+ DROP TABLE IF EXISTS {$this->getTable('fdmsconnectredirect')};
10
+ CREATE TABLE {$this->getTable('fdmsconnectredirect')} (
11
+ `fdmsconnectredirect_id` int(11) unsigned NOT NULL auto_increment,
12
  `order_id` varchar(255) NOT NULL default '',
13
  `timestamp` datetime NULL,
14
  `terminal_id` varchar(255) NOT NULL default '',
32
  `txntype` varchar(255) NOT NULL default '',
33
  `response_hash` varchar(255) NOT NULL default '',
34
  `paymentMethod` varchar(2) NOT NULL default '',
35
+ PRIMARY KEY (`fdmsconnectredirect_id`)
36
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
37
 
38
  ");
app/design/adminhtml/default/default/layout/fdmsconnectredirect.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <fdmsconnectredirect_adminhtml_fdmsconnectredirect_index>
4
+ <reference name="content">
5
+ <block type="fdmsconnectredirect/adminhtml_fdmsconnectredirect" name="fdmsconnectredirect" />
6
+ </reference>
7
+ </fdmsconnectredirect_adminhtml_fdmsconnectredirect_index>
8
+ </layout>
app/design/adminhtml/default/default/layout/fdmsemeaconnect.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <fdmsemeaconnect_adminhtml_fdmsemeaconnect_index>
4
- <reference name="content">
5
- <block type="fdmsemeaconnect/adminhtml_fdmsemeaconnect" name="fdmsemeaconnect" />
6
- </reference>
7
- </fdmsemeaconnect_adminhtml_fdmsemeaconnect_index>
8
- </layout>
 
 
 
 
 
 
 
 
app/design/frontend/base/default/layout/fdmsconnectredirect.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <fdmsconnectredirect_redirect_success>
4
+ <reference name="root">
5
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
6
+ </reference>
7
+
8
+ <reference name="content">
9
+ <block type="core/template" name="fdmsconnectredirect.redirect.success" template="fdmsconnectredirect/redirect/success.phtml" />
10
+ </reference>
11
+ </fdmsconnectredirect_redirect_success>
12
+
13
+ <fdmsconnectredirect_redirect_failure>
14
+ <reference name="root">
15
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
16
+ </reference>
17
+
18
+ <reference name="content">
19
+ <block type="core/template" name="fdmsconnectredirect.redirect.failure" template="fdmsconnectredirect/redirect/failure.phtml" />
20
+ </reference>
21
+ </fdmsconnectredirect_redirect_failure>
22
+ </layout>
app/design/frontend/base/default/layout/fdmsemeaconnect.xml DELETED
@@ -1,21 +0,0 @@
1
- <layout version="0.1.0">
2
- <fdmsemeaconnect_redirect_success>
3
- <reference name="root">
4
- <action method="setTemplate"><template>page/1column.phtml</template></action>
5
- </reference>
6
-
7
- <reference name="content">
8
- <block type="core/template" name="fdmsemeaconnect.redirect.success" template="fdmsemeaconnect/redirect/success.phtml" />
9
- </reference>
10
- </fdmsemeaconnect_redirect_success>
11
-
12
- <fdmsemeaconnect_redirect_failure>
13
- <reference name="root">
14
- <action method="setTemplate"><template>page/1column.phtml</template></action>
15
- </reference>
16
-
17
- <reference name="content">
18
- <block type="core/template" name="fdmsemeaconnect.redirect.failure" template="fdmsemeaconnect/redirect/failure.phtml" />
19
- </reference>
20
- </fdmsemeaconnect_redirect_failure>
21
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/fdmsconnectredirect/redirect/failure.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsconnectredirect_error');
4
+
5
+ $html = Mage::helper('fdmsconnectredirect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsconnectredirect/fdmsconnectredirect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
+
7
+ echo $html;
8
+
9
+ ?>
app/design/frontend/base/default/template/fdmsconnectredirect/redirect/form.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ ?>
4
+ <fieldset class="form-list">
5
+ <?php $_code=$this->getMethodCode() ?>
6
+
7
+ <?php $redirect = Mage::getModel('fdmsconnectredirect/redirect'); ?>
8
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
9
+ <li>
10
+ <?php echo $this->__('You will be redirected to our payment processor First Data secured hosted platform.') ?>
11
+ </li>
12
+ </ul>
13
+ </fieldset>
app/design/frontend/base/default/template/fdmsconnectredirect/redirect/success.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsconnectredirect_success');
4
+
5
+ $html = Mage::helper('fdmsconnectredirect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsconnectredirect/fdmsconnectredirect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
+
7
+ echo $html;
8
+
9
+ ?>
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/failure.phtml DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_error');
4
-
5
- $html = Mage::helper('fdmsemeaconnect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
-
7
- echo $html;
8
-
9
- ?>
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/form.phtml DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- ?>
4
- <fieldset class="form-list">
5
- <?php $_code=$this->getMethodCode() ?>
6
-
7
- <?php $redirect = Mage::getModel('fdmsemeaconnect/redirect'); ?>
8
- <ul id="payment_form_<?php echo $_code ?>" style="display:none">
9
- <li>
10
- <?php echo $this->__('You will be redirected to First Data secured hosted pages.') ?>
11
- </li>
12
- </ul>
13
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/fdmsemeaconnect/redirect/success.phtml DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- $block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('fdmsemeaconnect_success');
4
-
5
- $html = Mage::helper('fdmsemeaconnect')->getCustomerMessage($block, Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()), Mage::getModel('fdmsemeaconnect/fdmsemeaconnect')->getCollection()->addFieldToFilter('order_id', Mage::getSingleton('checkout/session')->getLastRealOrderId())->getFirstItem());
6
-
7
- echo $html;
8
-
9
- ?>
 
 
 
 
 
 
 
 
 
app/etc/modules/{VirtualPayer_FdmsEMEAconnect.xml → Virtualpayer_Fdmsconnectredirect.xml} RENAMED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * VirtualPayer_FdmsEMEAconnect extension
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -11,19 +11,19 @@
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @category VirtualPayer
14
- * @package VirtualPayer_FdmsEMEAconnect
15
  * @copyright Copyright (c) 2016 VirtualPayer
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
- <VirtualPayer_FdmsEMEAconnect>
22
  <active>true</active>
23
  <codePool>local</codePool>
24
  <depends>
25
  <Mage_Payment />
26
  </depends>
27
- </VirtualPayer_FdmsEMEAconnect>
28
  </modules>
29
  </config>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * Virtualpayer_Fdmsconnectredirect extension
5
  *
6
  * NOTICE OF LICENSE
7
  *
11
  * http://opensource.org/licenses/osl-3.0.php
12
  *
13
  * @category VirtualPayer
14
+ * @package Virtualpayer_Fdmsconnectredirect
15
  * @copyright Copyright (c) 2016 VirtualPayer
16
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
+ <Virtualpayer_Fdmsconnectredirect>
22
  <active>true</active>
23
  <codePool>local</codePool>
24
  <depends>
25
  <Mage_Payment />
26
  </depends>
27
+ </Virtualpayer_Fdmsconnectredirect>
28
  </modules>
29
  </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>VirtualPayer_FdmsEMEAconnect</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension offers a convenient way to accept online payments via the First Data Merchant Solutions Connect Internet Payment Gateway</summary>
10
- <description>This First Data Merchant Solutions (FDMS) Europe Middle East Africa (EMEA) Connect Redirect extention integrates with your webshop to process transactions via the First Data EMEA Internet Payment Gateway (IPG).</description>
11
- <notes>Free and fully tested First Data Merchant Solutions Hosted Payment Page module.</notes>
12
- <authors><author><name>Bright Ocansey</name><user>VirtualPayer</user><email>support@virtualpayer.com</email></author></authors>
13
- <date>2016-01-29</date>
14
- <time>11:49:13</time>
15
- <contents><target name="magelocal"><dir name="VirtualPayer"><dir name="FdmsEMEAconnect"><dir name="Block"><dir name="Adminhtml"><dir name="FdmsEMEAconnect"><file name="Grid.php" hash="3054cef4d955b987324f0dbdc527769f"/></dir><file name="FdmsEMEAconnect.php" hash="0df406a345c877d7ad688d062b99eda2"/></dir><dir name="Redirect"><file name="Error.php" hash="81da65837c1d74bf4128f8a054a0a8a6"/><file name="Form.php" hash="696f9eb442f76cd555a94f76778db0de"/><file name="Redirect.php" hash="4b7ae1b02c71d9a7fc8d10f40028426d"/><file name="Success.php" hash="a8093fe0332695013153e1b218706656"/></dir></dir><dir name="Helper"><file name="Data.php" hash="043c176d8e3c89ec8037f775f083a69b"/></dir><dir name="Model"><file name="FdmsEMEAconnect.php" hash="127f4e9d8a56619fe5b4671c8135e15b"/><dir name="Mysql4"><dir name="FdmsEMEAconnect"><file name="Collection.php" hash="0fa15b94757bb7ed9c634bf9b5b12687"/></dir><file name="FdmsEMEAconnect.php" hash="7b2332cf845281c677e995919ecfa92f"/></dir><file name="Redirect.php" hash="64267a5cc1157d28a2701b3951f0c8c9"/><file name="Setup.php" hash="173f155639cd3d78b78556f9ea2ff6f9"/><dir name="Source"><file name="Cctype.php" hash="a50073d7dd258fb8233070d72ae0ce17"/><file name="Currency.php" hash="8a2e2a01372c5b5ae8bb2ceb5c5eba00"/><file name="OrderStatus.php" hash="1a8e01e0fb20e2e3fa9836d80d403165"/><file name="PaymentAction.php" hash="900e5c3cce51048e1185f7a6539fd1aa"/><file name="PaymentMode.php" hash="60b0bdf140dfd3b7340702c227c5e785"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FdmsEMEAconnectController.php" hash="b274a89c07370e49e9e14733e3d69798"/></dir><file name="RedirectController.php" hash="1a448122b40bb506e4227cc1eade45b5"/><file name="ResponseController.php" hash="1433370829adbcd3b2d01758eba1aff0"/></dir><dir name="etc"><file name="config.xml" hash="34f5f815ba66cdffd3535b52ab733269"/><file name="system.xml" hash="dbdc829f452652360ab0b851d9ed4956"/></dir><dir name="sql"><dir name="fdmsemeaconnect_setup"><file name="mysql4-install-0.1.0.php" hash="6b7e37d15d26296d6939acb578c7b35a"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fdmsemeaconnect.xml" hash="b4f0b7d6ebfd8865d5927a94c64343d5"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fdmsemeaconnect.xml" hash="cdd2bae0c9998ab792af562a66da824c"/></dir><dir name="template"><dir name="fdmsemeaconnect"><dir name="redirect"><file name="failure.phtml" hash="8d0098aec62b5e9fb5643b3a575b6d01"/><file name="form.phtml" hash="50d75f2eab794ee2b7d1c985313db3bc"/><file name="success.phtml" hash="bd869cdf0c1dcae3932d46fd4382ebaf"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="VirtualPayer_FdmsEMEAconnect.xml" hash="28859fd69cad1546fbe687c65a635587"/></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>VirtualPayer_FdmsEMEAconnect</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
+ <license>Open Software Licence</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Issues with 'Success' and 'Failure' pages not displaying has now been resolved.</summary>
10
+ <description>This version now redirects the customer to the 'Thank you' and 'Sorry' pages after processing with First Data</description>
11
+ <notes>Camel casing changed from previous version.</notes>
12
+ <authors><author><name>VirtualPayer</name><user>VirtualPayer</user><email>support@virtualpayer.com</email></author></authors>
13
+ <date>2016-05-28</date>
14
+ <time>07:52:22</time>
15
+ <contents><target name="magelocal"><dir name="Virtualpayer"><dir name="Fdmsconnectredirect"><dir name="Block"><dir name="Adminhtml"><dir name="Fdmsconnectredirect"><file name="Grid.php" hash="1aef8aa9074b5fc4cfd34434545f0989"/></dir><file name="Fdmsconnectredirect.php" hash="b3b04065f98f619d8fa24ce43bcb533b"/></dir><dir name="Redirect"><file name="Error.php" hash="7c34a5641564aac1b1b217cd747b0c49"/><file name="Form.php" hash="bf9ac302eff7cff16851fce5724cc83b"/><file name="Redirect.php" hash="41c4c936600a706f5d52b3837c15ae7a"/><file name="Success.php" hash="38911ecaa99500ec89c2bc341abc7661"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4332c2de2735fcf79e053f0743eb988b"/></dir><dir name="Model"><file name="Fdmsconnectredirect.php" hash="b851ba0982ebc310767503fd67e72e5d"/><dir name="Mysql4"><dir name="Fdmsconnectredirect"><file name="Collection.php" hash="1c259e2dca9660a9a1bdee7414355673"/></dir><file name="Fdmsconnectredirect.php" hash="2a9309beaab73a10c48c57aec776ebc7"/></dir><file name="Redirect.php" hash="45320e026bb65a586a0b0df2116a5163"/><file name="Setup.php" hash="c3221ba33714b47d54619906a92f6809"/><dir name="Source"><file name="Cctype.php" hash="5a233130d7cb8ddfa03efd9fca91a2e0"/><file name="Currency.php" hash="17c3efb14615423dbc0fc235d487d570"/><file name="OrderStatus.php" hash="95edf0d1b232257365c677fc883ff599"/><file name="PaymentAction.php" hash="4d269123a253795876fc531352d81546"/><file name="PaymentMode.php" hash="0598e86b65145409f9049be16783aacd"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FdmsconnectredirectController.php" hash="b1e5ccab9f1aca512d460ad01106b59a"/></dir><file name="RedirectController.php" hash="9dbf499b8fc5a2dc343c355c780396c1"/><file name="ResponseController.php" hash="39e823b63179369ddf7f147f817aa14b"/></dir><dir name="etc"><file name="config.xml" hash="5784f2a5c62cb4a9706dca2719c3734a"/><file name="system.xml" hash="d53c288ca4fcd3480863c70f172a9d74"/><file name="system.xml~" hash="64dc1aa2477b32867f62651907e2e074"/></dir><dir name="sql"><dir name="fdmsconnectredirect_setup"><file name="mysql4-install-0.1.0.php" hash="6d596fdfb7ca65bc4c46684f90057c0a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fdmsconnectredirect.xml" hash="e1a6af6e939b68527155addbbab8391b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fdmsconnectredirect.xml" hash="5228447f93429b4854ceb91361fada8a"/></dir><dir name="template"><dir name="fdmsconnectredirect"><dir name="redirect"><file name="failure.phtml" hash="25e46738b7529e4eb8744281457c2c0d"/><file name="form.phtml" hash="befff7599af9bb656d495781f0f6a133"/><file name="success.phtml" hash="a57cc2283bef2e369c35bc5a48e1bfbe"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Virtualpayer_Fdmsconnectredirect.xml" hash="5e15b51fa0df95dd5bc6bad7d7ecded5"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>