-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorldpayJsonCw.patch
288 lines (260 loc) · 13.2 KB
/
WorldpayJsonCw.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Block/Checkout.php b/app/code/local/Customweb/WorldpayJsonCw/Block/Checkout.php
index 439013b..ae1f18d 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Block/Checkout.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Block/Checkout.php
@@ -48,31 +48,31 @@ class Customweb_WorldpayJsonCw_Block_Checkout extends Mage_Core_Block_Template {
}
public function getHiddenFieldsUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/getHiddenFields', array(
+ return Mage::getUrl('worldpayjsoncw/process/getHiddenFields', array(
'_secure' => true
));
}
public function getVisibleFieldsUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/getVisibleFields', array(
+ return Mage::getUrl('worldpayjsoncw/process/getVisibleFields', array(
'_secure' => true
));
}
public function getAuthorizeUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/authorize', array(
+ return Mage::getUrl('worldpayjsoncw/process/authorize', array(
'_secure' => true
));
}
public function getJavascriptUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/ajax', array(
+ return Mage::getUrl('worldpayjsoncw/process/ajax', array(
'_secure' => true
));
}
public function getSaveShippingMethodUrl(){
- return Mage::getUrl('WorldpayJsonCw/onepage/saveShippingMethod', array(
+ return Mage::getUrl('worldpayjsoncw/onepage/saveShippingMethod', array(
'_secure' => true
));
}
@@ -89,7 +89,7 @@ class Customweb_WorldpayJsonCw_Block_Checkout extends Mage_Core_Block_Template {
public function getPreloadUrl(){
if (version_compare(Mage::getVersion(), '1.8', '>=')) {
- return Mage::getUrl('WorldpayJsonCw/process/preloadOnepage', array(
+ return Mage::getUrl('worldpayjsoncw/process/preloadOnepage', array(
'_secure' => true
));
}
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Block/ExternalCheckout/Login.php b/app/code/local/Customweb/WorldpayJsonCw/Block/ExternalCheckout/Login.php
index 308eb86..4a52afd 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Block/ExternalCheckout/Login.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Block/ExternalCheckout/Login.php
@@ -39,12 +39,12 @@ class Customweb_WorldpayJsonCw_Block_ExternalCheckout_Login extends Mage_Core_Bl
public function getLoginPostAction()
{
- return Mage::getUrl('WorldpayJsonCw/Externalcheckout/loginPost', array('_secure'=>true));
+ return Mage::getUrl('worldpayjsoncw/Externalcheckout/loginPost', array('_secure'=>true));
}
public function getRegisterPostAction()
{
- return Mage::getUrl('WorldpayJsonCw/Externalcheckout/registerPost', array('_secure'=>true));
+ return Mage::getUrl('worldpayjsoncw/Externalcheckout/registerPost', array('_secure'=>true));
}
public function isAllowedGuestCheckout()
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Block/Form.php b/app/code/local/Customweb/WorldpayJsonCw/Block/Form.php
index d3d40fd..c6978cb 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Block/Form.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Block/Form.php
@@ -86,25 +86,25 @@ class Customweb_WorldpayJsonCw_Block_Form extends Mage_Payment_Block_Form {
}
public function getProcessUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/process', array(
+ return Mage::getUrl('worldpayjsoncw/process/process', array(
'_secure' => true
));
}
public function getJavascriptUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/ajax', array(
+ return Mage::getUrl('worldpayjsoncw/process/ajax', array(
'_secure' => true
));
}
public function getHiddenFieldsUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/getHiddenFields', array(
+ return Mage::getUrl('worldpayjsoncw/process/getHiddenFields', array(
'_secure' => true
));
}
public function getVisibleFieldsUrl(){
- return Mage::getUrl('WorldpayJsonCw/process/getVisibleFields', array(
+ return Mage::getUrl('worldpayjsoncw/process/getVisibleFields', array(
'_secure' => true
));
}
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Model/ConfigurationAdapter.php b/app/code/local/Customweb/WorldpayJsonCw/Model/ConfigurationAdapter.php
index a1384b0..c8ce27c 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Model/ConfigurationAdapter.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Model/ConfigurationAdapter.php
@@ -95,7 +95,7 @@ class Customweb_WorldpayJsonCw_Model_ConfigurationAdapter implements Customweb_P
public function getDefaultTemplateUrl()
{
- $url = Mage::getUrl('WorldpayJsonCw/checkout/template', array(
+ $url = Mage::getUrl('worldpayjsoncw/checkout/template', array(
'_secure' => true,
'_store' => self::$storeId,
'_store_to_url' => true
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Model/EndpointAdapter.php b/app/code/local/Customweb/WorldpayJsonCw/Model/EndpointAdapter.php
index 396908d..8ef2067 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Model/EndpointAdapter.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Model/EndpointAdapter.php
@@ -9,7 +9,7 @@
class Customweb_WorldpayJsonCw_Model_EndpointAdapter extends Customweb_Payment_Endpoint_AbstractAdapter
{
protected function getBaseUrl() {
- return Mage::getUrl('WorldpayJsonCw/endpoint/index', array('_store' => Customweb_WorldpayJsonCw_Model_ConfigurationAdapter::getStoreId()));
+ return Mage::getUrl('worldpayjsoncw/endpoint/index', array('_store' => Customweb_WorldpayJsonCw_Model_ConfigurationAdapter::getStoreId()));
}
protected function getControllerQueryKey() {
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Model/ExternalCheckoutService.php b/app/code/local/Customweb/WorldpayJsonCw/Model/ExternalCheckoutService.php
index 8f5005e..57cbc7a 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Model/ExternalCheckoutService.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Model/ExternalCheckoutService.php
@@ -174,7 +174,7 @@ class Customweb_WorldpayJsonCw_Model_ExternalCheckoutService implements Customwe
$context->setAuthenticationSuccessUrl($successUrl);
$context->save();
- return Customweb_Core_Http_Response::redirect(Mage::getUrl('WorldpayJsonCw/Externalcheckout/login', array(
+ return Customweb_Core_Http_Response::redirect(Mage::getUrl('worldpayjsoncw/Externalcheckout/login', array(
'_secure' => true
)));
}
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Model/Method.php b/app/code/local/Customweb/WorldpayJsonCw/Model/Method.php
index 5fabc5f..a441ab3 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Model/Method.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Model/Method.php
@@ -849,7 +849,7 @@ abstract class Customweb_WorldpayJsonCw_Model_Method extends Mage_Payment_Model_
$secretHash = $this->getHelper()->hash($transactionId);
if ($adapter instanceof Customweb_Payment_Authorization_PaymentPage_IAdapter) {
- return Mage::getUrl('WorldpayJsonCw/process/ppRedirect',
+ return Mage::getUrl('worldpayjsoncw/process/ppRedirect',
array(
'transaction_id' => $transactionId,
'secret' => $secretHash,
@@ -858,7 +858,7 @@ abstract class Customweb_WorldpayJsonCw_Model_Method extends Mage_Payment_Model_
}
elseif ($adapter instanceof Customweb_Payment_Authorization_Iframe_IAdapter ||
$adapter instanceof Customweb_Payment_Authorization_Widget_IAdapter) {
- return Mage::getUrl('WorldpayJsonCw/checkout/pay',
+ return Mage::getUrl('worldpayjsoncw/checkout/pay',
array(
'transaction_id' => $transactionId,
'secret' => $secretHash,
@@ -866,7 +866,7 @@ abstract class Customweb_WorldpayJsonCw_Model_Method extends Mage_Payment_Model_
));
}
else {
- return Mage::getUrl('WorldpayJsonCw/process/dummy', array(
+ return Mage::getUrl('worldpayjsoncw/process/dummy', array(
'_secure' => true
));
}
diff --git a/app/code/local/Customweb/WorldpayJsonCw/Model/TransactionContext.php b/app/code/local/Customweb/WorldpayJsonCw/Model/TransactionContext.php
index 182aa47..c814402 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/Model/TransactionContext.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/Model/TransactionContext.php
@@ -55,8 +55,8 @@ class Customweb_WorldpayJsonCw_Model_TransactionContext implements Customweb_Pay
$this->backendFailUrl = $backendFailUrl;
$this->storeId = $storeId;
$this->aliasTransactionId = $aliasTransactionId;
- $this->successUrl = $this->appendNonTrackingParameter(Mage::getUrl('WorldpayJsonCw/process/success', $this->getUrlParameters()));
- $this->failedUrl = $this->appendNonTrackingParameter(Mage::getUrl('WorldpayJsonCw/process/fail', $this->getUrlParameters()));
+ $this->successUrl = $this->appendNonTrackingParameter(Mage::getUrl('worldpayjsoncw/process/success', $this->getUrlParameters()));
+ $this->failedUrl = $this->appendNonTrackingParameter(Mage::getUrl('worldpayjsoncw/process/fail', $this->getUrlParameters()));
}
public function __sleep() {
@@ -146,7 +146,7 @@ class Customweb_WorldpayJsonCw_Model_TransactionContext implements Customweb_Pay
public function getUpdateUrl()
{
- return Mage::getUrl('WorldpayJsonCw/process/update', array(
+ return Mage::getUrl('worldpayjsoncw/process/update', array(
'_secure' => true,
'_store' => $this->getOrderContext()->getStore()->getId()
));
@@ -168,7 +168,7 @@ class Customweb_WorldpayJsonCw_Model_TransactionContext implements Customweb_Pay
public function getBackendSuccessUrl()
{
- return Mage::getUrl('WorldpayJsonCw/process/motoSuccess', array(
+ return Mage::getUrl('worldpayjsoncw/process/motoSuccess', array(
'_secure' => true,
'_store' => $this->getOrderContext()->getStore()->getId()
));
@@ -176,7 +176,7 @@ class Customweb_WorldpayJsonCw_Model_TransactionContext implements Customweb_Pay
public function getBackendFailedUrl()
{
- return Mage::getUrl('WorldpayJsonCw/process/motoFail', array(
+ return Mage::getUrl('worldpayjsoncw/process/motoFail', array(
'_secure' => true,
'_store' => $this->getOrderContext()->getStore()->getId()
));
@@ -210,14 +210,14 @@ class Customweb_WorldpayJsonCw_Model_TransactionContext implements Customweb_Pay
private function getProcessUrl()
{
if ($this->processUrl == null) {
- $this->processUrl = $this->appendNonTrackingParameter(Mage::getUrl('WorldpayJsonCw/process/process', $this->getUrlParameters()));
+ $this->processUrl = $this->appendNonTrackingParameter(Mage::getUrl('worldpayjsoncw/process/process', $this->getUrlParameters()));
}
return $this->processUrl;
}
public function getIframeBreakOutUrl()
{
- return Mage::getUrl('WorldpayJsonCw/checkout/breakout', $this->getUrlParameters());
+ return Mage::getUrl('worldpayjsoncw/checkout/breakout', $this->getUrlParameters());
}
/**
diff --git a/app/code/local/Customweb/WorldpayJsonCw/controllers/CheckoutController.php b/app/code/local/Customweb/WorldpayJsonCw/controllers/CheckoutController.php
index 16cabc4..5afaea0 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/controllers/CheckoutController.php
+++ b/app/code/local/Customweb/WorldpayJsonCw/controllers/CheckoutController.php
@@ -32,7 +32,7 @@ class Customweb_WorldpayJsonCw_CheckoutController extends Customweb_WorldpayJson
$redirectionUrl = Customweb_Util_Url::appendParameters($transaction->getTransactionObject()->getTransactionContext()->getFailedUrl(), $transaction->getTransactionObject()->getTransactionContext()->getCustomParameters());
} else {
- $redirectionUrl = Mage::getUrl('WorldpayJsonCw/process/success', array('transaction_id' => $transaction->getTransactionId(), '_secure' => true));
+ $redirectionUrl = Mage::getUrl('worldpayjsoncw/process/success', array('transaction_id' => $transaction->getTransactionId(), '_secure' => true));
}
$html =
diff --git a/app/code/local/Customweb/WorldpayJsonCw/etc/config.xml b/app/code/local/Customweb/WorldpayJsonCw/etc/config.xml
index 7dcd677..d0cd34a 100644
--- a/app/code/local/Customweb/WorldpayJsonCw/etc/config.xml
+++ b/app/code/local/Customweb/WorldpayJsonCw/etc/config.xml
@@ -259,7 +259,7 @@
<frontend>
<secure_url>
- <worldpayjsoncw>/WorldpayJsonCw/</worldpayjsoncw>
+ <worldpayjsoncw>/worldpayjsoncw/</worldpayjsoncw>
</secure_url>
<blocks>
<WorldpayJsonCw>
@@ -274,13 +274,13 @@
</updates>
</layout>
<routers>
- <WorldpayJsonCw>
+ <worldpayjsoncw>
<use>standard</use>
<args>
<module>Customweb_WorldpayJsonCw</module>
- <frontName>WorldpayJsonCw</frontName>
+ <frontName>worldpayjsoncw</frontName>
</args>
- </WorldpayJsonCw>
+ </worldpayjsoncw>
</routers>
<translate>
diff --git a/app/design/adminhtml/default/default/template/customweb/worldpayjsoncw/info.phtml b/app/design/adminhtml/default/default/template/customweb/worldpayjsoncw/info.phtml
index 5d093f4..a595990 100644
--- a/app/design/adminhtml/default/default/template/customweb/worldpayjsoncw/info.phtml
+++ b/app/design/adminhtml/default/default/template/customweb/worldpayjsoncw/info.phtml
@@ -30,7 +30,7 @@ try {
if ($transaction->getTransactionObject()->isUpdatable()) {
$output .= '
- <form action="' . $this->getInfo()->getOrder()->getStore()->getUrl('WorldpayJsonCw/process/pullUpdate', array(
+ <form action="' . $this->getInfo()->getOrder()->getStore()->getUrl('worldpayjsoncw/process/pullUpdate', array(
'_secure' => true
)) . '" method="post">
<input type="hidden" name="backUrl" value="' . Mage::helper('core/url')->getCurrentUrl() . '" />