CDev_XPaymentsConnector - Version 1.6.3

Version Notes

Version number: 1.6.3

Download this release

Release Info

Developer Valerii Demidov
Extension CDev_XPaymentsConnector
Version 1.6.3
Comparing to
See all releases


Code changes from version 1.5.5 to 1.6.3

Files changed (49) hide show
  1. app/code/community/Cdev/XPaymentsConnector/Block/Control.php +27 -18
  2. app/code/community/Cdev/XPaymentsConnector/Helper/Data.php +40 -1
  3. app/code/community/Cdev/XPaymentsConnector/etc/config.xml +0 -2
  4. app/code/community/Cdev/XPaymentsConnector/etc/system.xml +20 -22
  5. app/design/adminhtml/default/default/layout/xpaymentsconnector.xml +18 -0
  6. app/design/adminhtml/default/default/template/xpaymentsconnector/control.phtml +159 -73
  7. app/design/frontend/{default → base}/default/layout/xpaymentsconnector.xml +9 -3
  8. app/design/frontend/{default → base}/default/template/xpaymentsconnector/blank.phtml +0 -0
  9. app/design/frontend/{default → base}/default/template/xpaymentsconnector/cancel.phtml +0 -0
  10. app/design/frontend/{rwd → base}/default/template/xpaymentsconnector/checkout/onepage/beforesuccess.phtml +18 -10
  11. app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/order-detail.phtml +0 -0
  12. app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/review/button.phtml +15 -0
  13. app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml +0 -0
  14. app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/success.phtml +0 -0
  15. app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/cardaddsuccess.phtml +0 -0
  16. app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/usercards/cardadd.phtml +0 -0
  17. app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/usercards/list.phtml +0 -0
  18. app/design/frontend/{default → base}/default/template/xpaymentsconnector/failure.phtml +0 -0
  19. app/design/frontend/{default → base}/default/template/xpaymentsconnector/form/cc.phtml +0 -0
  20. app/design/frontend/{default → base}/default/template/xpaymentsconnector/form/savedcards.phtml +0 -0
  21. app/design/frontend/{rwd → base}/default/template/xpaymentsconnector/info/cc.phtml +0 -0
  22. app/design/frontend/{default → base}/default/template/xpaymentsconnector/info/prepaidpayments.phtml +0 -0
  23. app/design/frontend/{default → base}/default/template/xpaymentsconnector/info/savedcards.phtml +0 -0
  24. app/design/frontend/{default → base}/default/template/xpaymentsconnector/redirect.phtml +0 -0
  25. app/design/frontend/default/default/template/xpaymentsconnector/checkout/onepage/beforesuccess.phtml +0 -77
  26. app/design/frontend/default/default/template/xpaymentsconnector/info/cc.phtml +0 -47
  27. app/design/frontend/rwd/default/layout/xpaymentsconnector.xml +0 -148
  28. app/design/frontend/rwd/default/template/xpaymentsconnector/blank.phtml +0 -30
  29. app/design/frontend/rwd/default/template/xpaymentsconnector/cancel.phtml +0 -49
  30. app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/order-detail.phtml +0 -59
  31. app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/review/button.phtml +0 -65
  32. app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml +0 -79
  33. app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/success.phtml +0 -79
  34. app/design/frontend/rwd/default/template/xpaymentsconnector/customer/cardaddsuccess.phtml +0 -59
  35. app/design/frontend/rwd/default/template/xpaymentsconnector/customer/usercards/cardadd.phtml +0 -115
  36. app/design/frontend/rwd/default/template/xpaymentsconnector/customer/usercards/list.phtml +0 -118
  37. app/design/frontend/rwd/default/template/xpaymentsconnector/failure.phtml +0 -39
  38. app/design/frontend/rwd/default/template/xpaymentsconnector/form/cc.phtml +0 -121
  39. app/design/frontend/rwd/default/template/xpaymentsconnector/form/savedcards.phtml +0 -56
  40. app/design/frontend/rwd/default/template/xpaymentsconnector/info/prepaidpayments.phtml +0 -43
  41. app/design/frontend/rwd/default/template/xpaymentsconnector/info/savedcards.phtml +0 -54
  42. app/design/frontend/rwd/default/template/xpaymentsconnector/redirect.phtml +0 -55
  43. app/locale/en_US/Cdev_XPaymentsConnector.csv +1 -1
  44. js/xpayment/checkout-submit.js +14 -9
  45. js/xpayment/images/atep-arrow.png +0 -0
  46. js/xpayment/images/xpayment-logo.png +0 -0
  47. js/xpayment/settings.css +30 -0
  48. js/xpayment/xp-contorl.css +73 -0
  49. package.xml +5 -5
app/code/community/Cdev/XPaymentsConnector/Block/Control.php CHANGED
@@ -28,6 +28,11 @@
28
*/
29
class Cdev_XPaymentsConnector_Block_Control extends Mage_Adminhtml_Block_Template
30
{
31
/**
32
* Constructor
33
*
@@ -174,33 +179,37 @@ class Cdev_XPaymentsConnector_Block_Control extends Mage_Adminhtml_Block_Templat
174
*/
175
public function getConfigurationErrors()
176
{
177
- $api = Mage::getModel('xpaymentsconnector/payment_cc');
178
179
- $result = $api->getConfigurationErrors();
180
181
- $list = array();
182
183
- if ($result & $api::CONF_CART_ID) {
184
- $list[] = 'Store ID is empty or has an incorrect value';
185
- }
186
187
- if ($result & $api::CONF_URL) {
188
- $list[] = 'X-Payments URL is empty or has an incorrect value';
189
- }
190
191
- if ($result & $api::CONF_PUBLIC_KEY) {
192
- $list[] = 'Public key is empty';
193
- }
194
195
- if ($result & $api::CONF_PRIVATE_KEY) {
196
- $list[] = 'Private key is empty';
197
- }
198
199
- if ($result & $api::CONF_PRIVATE_KEY_PASS) {
200
- $list[] = 'Private key password is empty';
201
}
202
203
- return $list;
204
}
205
206
}
28
*/
29
class Cdev_XPaymentsConnector_Block_Control extends Mage_Adminhtml_Block_Template
30
{
31
+ /**
32
+ * @var array
33
+ */
34
+ private $_configurationErrorList = array();
35
+
36
/**
37
* Constructor
38
*
179
*/
180
public function getConfigurationErrors()
181
{
182
+ if(empty($this->_configurationErrorList)){
183
+ $api = Mage::getModel('xpaymentsconnector/payment_cc');
184
185
+ $result = $api->getConfigurationErrors();
186
187
+ $list = array();
188
189
+ if ($result & $api::CONF_CART_ID) {
190
+ $list[] = 'Store ID is empty or has an incorrect value';
191
+ }
192
193
+ if ($result & $api::CONF_URL) {
194
+ $list[] = 'X-Payments URL is empty or has an incorrect value';
195
+ }
196
197
+ if ($result & $api::CONF_PUBLIC_KEY) {
198
+ $list[] = 'Public key is empty';
199
+ }
200
201
+ if ($result & $api::CONF_PRIVATE_KEY) {
202
+ $list[] = 'Private key is empty';
203
+ }
204
205
+ if ($result & $api::CONF_PRIVATE_KEY_PASS) {
206
+ $list[] = 'Private key password is empty';
207
+ }
208
+
209
+ $this->_configurationErrorList = $list;
210
}
211
212
+ return $this->_configurationErrorList;
213
}
214
215
}
app/code/community/Cdev/XPaymentsConnector/Helper/Data.php CHANGED
@@ -322,7 +322,11 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
322
return false;
323
}
324
325
-
326
public function getReviewButtonTemplate($name, $block)
327
{
328
$quote = Mage::getSingleton('checkout/session')->getQuote();
@@ -342,6 +346,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
342
return '';
343
}
344
345
public function isNeedToSaveUserCard()
346
{
347
$result = (bool)Mage::getSingleton('checkout/session')->getData('user_card_save');
@@ -352,6 +359,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
352
Mage::getSingleton('checkout/session')->setData('user_card_save',false);
353
}
354
355
public function isRegisteredUser()
356
{
357
$currentCustomerState = Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod();
@@ -364,6 +374,10 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
364
}
365
}
366
367
public function isXpaymentsMethod($currentPaymentCode)
368
{
369
$xpaymentPaymentCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
@@ -608,6 +622,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
608
return $result;
609
}
610
611
public function checkIssetSimpleOrder()
612
{
613
$checkoutSession = Mage::getSingleton('checkout/session');
@@ -750,6 +767,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
750
}
751
}
752
753
public function checkStartDateData()
754
{
755
$result = array();
@@ -856,6 +876,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
856
}
857
}
858
859
public function getIframeUrl()
860
{
861
@@ -1064,4 +1087,20 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
1064
return $xpCardDataStr;
1065
}
1066
1067
}
322
return false;
323
}
324
325
+ /**
326
+ * @param $name
327
+ * @param $block
328
+ * @return string
329
+ */
330
public function getReviewButtonTemplate($name, $block)
331
{
332
$quote = Mage::getSingleton('checkout/session')->getQuote();
346
return '';
347
}
348
349
+ /**
350
+ * @return bool
351
+ */
352
public function isNeedToSaveUserCard()
353
{
354
$result = (bool)Mage::getSingleton('checkout/session')->getData('user_card_save');
359
Mage::getSingleton('checkout/session')->setData('user_card_save',false);
360
}
361
362
+ /**
363
+ * @return bool
364
+ */
365
public function isRegisteredUser()
366
{
367
$currentCustomerState = Mage::getSingleton('checkout/type_onepage')->getCheckoutMethod();
374
}
375
}
376
377
+ /**
378
+ * @param $currentPaymentCode
379
+ * @return bool
380
+ */
381
public function isXpaymentsMethod($currentPaymentCode)
382
{
383
$xpaymentPaymentCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
622
return $result;
623
}
624
625
+ /**
626
+ * @return bool
627
+ */
628
public function checkIssetSimpleOrder()
629
{
630
$checkoutSession = Mage::getSingleton('checkout/session');
767
}
768
}
769
770
+ /**
771
+ * @return array
772
+ */
773
public function checkStartDateData()
774
{
775
$result = array();
876
}
877
}
878
879
+ /**
880
+ * @return string
881
+ */
882
public function getIframeUrl()
883
{
884
1087
return $xpCardDataStr;
1088
}
1089
1090
+ /**
1091
+ * @param $name
1092
+ * @param $block
1093
+ * @return mixed
1094
+ */
1095
+ public function getCheckoutSuccessTemplate($name, $block)
1096
+ {
1097
+ if (Mage::helper('core')->isModuleEnabled('Vsourz_Ordersuccess')) {
1098
+ if ($blockObject = Mage::getSingleton('core/layout')->getBlock($block)) {
1099
+ return $blockObject->getTemplate();
1100
+ }
1101
+ } else {
1102
+ return $name;
1103
+ }
1104
+ }
1105
+
1106
}
app/code/community/Cdev/XPaymentsConnector/etc/config.xml CHANGED
@@ -325,9 +325,7 @@
325
</recurring_initialfee_tax>
326
</nominal_totals>
327
</quote>
328
-
329
</sales>
330
-
331
</global>
332
<frontend>
333
<routers>
325
</recurring_initialfee_tax>
326
</nominal_totals>
327
</quote>
328
</sales>
329
</global>
330
<frontend>
331
<routers>
app/code/community/Cdev/XPaymentsConnector/etc/system.xml CHANGED
@@ -208,28 +208,6 @@
208
<show_in_store>0</show_in_store>
209
<groups>
210
<settings translate="label">
211
- <label>X-Payments Connector Settings</label>
212
- <frontend_type>text</frontend_type>
213
- <comment>
214
- <![CDATA[
215
- <div id="xp-connector-settings" style="display:none">
216
- Connect to X-Payments in 3 easy steps:<ol>
217
- <li>1 - Open your X-Payments back-end (if you do not have it - <a href="http://www.x-payments.com/trial-demo.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link">get a free trial</a>!)</li>
218
- <li>2 - Configure payment methods at X-Payments (<a href="http://help.x-cart.com/index.php?title=X-Payments:User_manual#Online_Stores">Read how to do that</a>)</li>
219
- <li>3 - Connect X-Payments with Magento (see how to do that below).</li>
220
- <li><iframe width="560" height="315" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/2VRR0JW23qc"></iframe></li>
221
- </ol>
222
- </div>
223
- <script>
224
- document.observe('dom:loaded', function(){
225
- var bundleKey = $('xpaymentsconnector_settings_xpay_conf_bundle').getValue();
226
- if(bundleKey.trim() == ''){
227
- $('xp-connector-settings').show();
228
- }
229
- });
230
- </script>
231
- ]]>
232
- </comment>
233
<sort_order>1</sort_order>
234
<show_in_default>1</show_in_default>
235
<show_in_website>0</show_in_website>
@@ -273,6 +251,26 @@
273
</xpay_minimum_payment_recurring_amount>
274
275
</fields>
276
</settings>
277
</groups>
278
</xpaymentsconnector>
208
<show_in_store>0</show_in_store>
209
<groups>
210
<settings translate="label">
211
<sort_order>1</sort_order>
212
<show_in_default>1</show_in_default>
213
<show_in_website>0</show_in_website>
251
</xpay_minimum_payment_recurring_amount>
252
253
</fields>
254
+ <label>X-Payments Connector Settings</label>
255
+ <frontend_type>text</frontend_type>
256
+ <comment>
257
+ <![CDATA[
258
+ <div id="xp-connector-settings" style="display:none">
259
+ <li>See how to connect <strong>X-Payments</strong> with <strong>Magento</strong></li>
260
+ <li><iframe width="400" height="260" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/2VRR0JW23qc"></iframe></li>
261
+ <li><strong>Need help in settings of x-payments? <a href="http://www.x-payments.com/contact-us.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link" target="_blank">Сontact us!</a></strong></li>
262
+ </ol>
263
+ </div>
264
+ <script>
265
+ document.observe('dom:loaded', function(){
266
+ var bundleKey = $('xpaymentsconnector_settings_xpay_conf_bundle').getValue();
267
+ if(bundleKey.trim() == ''){
268
+ $('xp-connector-settings').show();
269
+ }
270
+ });
271
+ </script>
272
+ ]]>
273
+ </comment>
274
</settings>
275
</groups>
276
</xpaymentsconnector>
app/design/adminhtml/default/default/layout/xpaymentsconnector.xml CHANGED
@@ -84,4 +84,22 @@
84
</reference>
85
</adminhtml_sales_recurring_profile_view>
86
87
</layout>
84
</reference>
85
</adminhtml_sales_recurring_profile_view>
86
87
+ <adminhtml_system_config_edit>
88
+ <reference name="head">
89
+ <action method="addItem">
90
+ <type>js_css</type>
91
+ <name>xpayment/settings.css</name>
92
+ </action>
93
+ </reference>
94
+ </adminhtml_system_config_edit>
95
+
96
+ <xpaymentsconnector_control_index>
97
+ <reference name="head">
98
+ <action method="addItem">
99
+ <type>js_css</type>
100
+ <name>xpayment/xp-contorl.css</name>
101
+ </action>
102
+ </reference>
103
+ </xpaymentsconnector_control_index>
104
+
105
</layout>
app/design/adminhtml/default/default/template/xpaymentsconnector/control.phtml CHANGED
@@ -26,95 +26,174 @@
26
?>
27
<?php if ($this->getRequiremenetsErrors()) { ?>
28
29
- <h4><?php echo $this->helper('adminhtml')->__('Failed to meet environment requirements'); ?></h4>
30
- <ul>
31
- <?php foreach ($this->getRequiremenetsErrors() as $err) { ?>
32
- <li class="error"><?php echo $this->helper('adminhtml')->__($err); ?></li>
33
<?php } ?>
34
- </ul>
35
- <br />
36
- <hr />
37
- <br />
38
39
- <?php } ?>
40
-
41
- <?php if ($this->getConfigurationErrors()) { ?>
42
-
43
- <h4><?php echo Mage::helper('xpaymentsconnector')->__('Configuration problems'); ?></h4>
44
- <ul>
45
- <?php foreach ($this->getConfigurationErrors() as $err) { ?>
46
- <li class="error">* <?php echo Mage::helper('xpaymentsconnector')->__($err); ?></li>
47
- <?php } ?>
48
- </ul>
49
- <p><strong>
50
- <?php echo $this->__('Please, check x-payment settings '); ?>
51
- <a href="<?php echo $this->getUrl('adminhtml/system_config/edit/section/xpaymentsconnector/'); ?>">
52
- <?php echo $this->__('here'); ?>.
53
- </a>
54
- </strong>
55
- </p>
56
- <br />
57
- <hr />
58
- <br />
59
- <?php } ?>
60
61
- <h4><?php echo Mage::helper('xpaymentsconnector')->__('Test module'); ?></h4>
62
63
- <p><?php echo Mage::helper('xpaymentsconnector')->__("To test the module settings and connection with X-Payments click the button below. If the module is configured properly, a 'Test transaction completed successfully' message will be displayed at the top of the page."); ?></p>
64
65
<form action="<?php echo $this->getUrl('xpaymentsconnector/control/test'); ?>" method="post" name="testmodule_form">
66
- <?php echo $this->getBlockHtml('formkey'); ?>
67
- <?php echo $this->getChildHtml('testButton'); ?>
68
</form>
69
70
- <br />
71
- <br />
72
73
- <h4><?php echo Mage::helper('xpaymentsconnector')->__('Import payment methods'); ?></h4>
74
75
- <p><?php echo Mage::helper('xpaymentsconnector')->__('To be able to use X-Payments payment methods you need to import them from X-Payments first.'); ?></p>
76
77
<?php if ($this->isMethodsRequested()) { ?>
78
79
- <?php echo Mage::helper('xpaymentsconnector')->__('The list of payment configurations imported from X-Payments'); ?>:<br />
80
-
81
- <div class="grid">
82
- <table cellpadding="5" cellspacing="1">
83
- <tr class="headings">
84
- <th><?php echo Mage::helper('xpaymentsconnector')->__('Payment method'); ?></th>
85
- <th><?php echo Mage::helper('xpaymentsconnector')->__('Payment method ID'); ?></th>
86
- <th><?php echo Mage::helper('xpaymentsconnector')->__('Auth'); ?></th>
87
- <!--th><?php echo Mage::helper('xpaymentsconnector')->__('Capture'); ?></th>
88
- <th><?php echo Mage::helper('xpaymentsconnector')->__('Void'); ?></th>
89
- <th class="last"><?php echo Mage::helper('xpaymentsconnector')->__('Refund'); ?></th-->
90
- </tr>
91
-
92
- <?php foreach($this->getPaymentMethods() as $pm) { ?>
93
-
94
- <tr>
95
- <td><?php echo $pm['name']; ?></td>
96
- <td><?php echo $pm['confid']; ?></td>
97
- <td><?php if ($pm['is_auth']) { ?><?php echo $this->__('Yes'); ?><?php } else { ?><?php echo $this->__('No'); ?><?php } ?></td>
98
- <!--td><?php if ($pm['is_capture']) { ?><?php echo $this->helper('adminhtml')->__('Yes'); ?><?php } else { ?><?php echo $this->helper('adminhtml')->__('No'); ?><?php } ?></td>
99
- <td><?php if ($pm['is_void']) { ?><?php echo $this->__('Yes'); ?><?php } else { ?><?php echo $this->__('No'); ?><?php } ?></td>
100
- <td class="last"><?php if ($pm['is_refund']) { ?><?php echo $this->__('Yes'); ?><?php } else { ?><?php echo $this->__('No'); ?><?php } ?></td-->
101
- </tr>
102
103
- <?php } ?>
104
105
- </table>
106
- </div>
107
108
- <form action="<?php echo $this->getUrl('xpaymentsconnector/control/clear'); ?>" method="post" name="clear_form">
109
- <?php echo $this->getBlockHtml('formkey'); ?>
110
- <?php echo $this->getChildHtml('clearButton'); ?>
111
- </form>
112
113
- <?php if ($this->isMethodsAlreadyImported()) { ?>
114
- <br />
115
- <br />
116
- <p><?php echo $this->__('Warning! Importing payment configurations from X-Payments will disable the X-Payments connector payment method!'); ?></p>
117
- <?php } ?>
118
119
<?php } ?>
120
@@ -123,4 +202,11 @@
123
<?php echo $this->getChildHtml('requestButton'); ?>
124
</form>
125
126
-
26
?>
27
<?php if ($this->getRequiremenetsErrors()) { ?>
28
29
+ <h4><?php echo $this->__('Failed to meet environment requirements'); ?></h4>
30
+ <ul>
31
+ <?php foreach ($this->getRequiremenetsErrors() as $err) { ?>
32
+ <li class="error"><?php echo $this->__($err); ?></li>
33
+ <?php } ?>
34
+ </ul>
35
+ <br/>
36
<?php } ?>
37
38
+ <div class="xpayment-info">
39
+ <div class="content-header">
40
+ <table cellspacing="0">
41
+ <tbody>
42
+ <tr>
43
+ <td>
44
+ <h3>
45
+ <?php echo $this->__('X-Payments connector'); ?>
46
+ </h3>
47
+ </td>
48
+ </tr>
49
+ </tbody>
50
+ </table>
51
+ </div>
52
+
53
+ <?php if ($this->getConfigurationErrors()) { ?>
54
+ <p><strong>
55
+ <h4 class="sub-heading">
56
+ <?php echo $this->__('X-Payments not configured yet. Please, check x-payment'); ?>
57
+ <a href="<?php echo $this->getUrl('adminhtml/system_config/edit/section/xpaymentsconnector/'); ?>"
58
+ target="_blank">
59
+ <strong>
60
+ <?php echo $this->__('settings') ?>
61
+ </strong>
62
+ </a>
63
+ </h4>
64
+ </strong>
65
+ </p>
66
+
67
+ <div class="payment-description">
68
+ <div class="payment-logo">
69
+ <img src="<?php echo Mage::getBaseUrl('js') . 'xpayment/images/xpayment-logo.png'; ?>"
70
+ alt="xpayments connector"/>
71
+ </div>
72
+ <div class="description-block">
73
+ <p>
74
+
75
+ <?php
76
+ $xpDescr = "Give your customers – and yourself – peace of mind with this payment processing module "
77
+ . "that guarantees compliance with PCI security mandates, significantly reduces the risk of "
78
+ . "data breaches and ensures you won’t be hit with a fine of up to $500,000 for non-compliance. "
79
+ . "Safely and conveniently store customers credit card information to use for new orders, reorders "
80
+ . "or recurring payments.";
81
+ echo $this->__($xpDescr); ?>
82
+ </p>
83
+ </div>
84
+ </div>
85
+
86
+ <h4>
87
+ <?php echo $this->__('Connect to X-Payments in 3 easy steps:'); ?>
88
+ </h4>
89
+ <div class="payment-step">
90
+ <div class="step">
91
+ <span class="step-number">1</span>
92
+ <p><?php echo $this->__('Open your'); ?>
93
+ <a href="http://www.x-payments.com/trial-demo.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link"
94
+ target="_blank">
95
+ <?php echo $this->__('X-Payments'); ?>
96
+ </a>
97
+ <?php echo $this->__('back-end (if you do not have it)'); ?>
98
+ </p>
99
+ <button onclick="window.open('http://www.x-payments.com/trial-demo.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link');">
100
+ <span>
101
+ <span>
102
+ <span>
103
+ <?php echo $this->__('Start free Trial'); ?>
104
+ </span>
105
+ </span>
106
+ </span>
107
+ </button>
108
+ </div>
109
+ <img src="<?php echo Mage::getBaseUrl('js') . 'xpayment/images/atep-arrow.png' ?>" class=" step-arrow">
110
+ <div class="step">
111
+ <span class="step-number">2</span>
112
+
113
+ <p>
114
+ <?php echo $this->__('Configure payment methods at'); ?>
115
+ <strong>
116
+ <?php echo $this->__('X-Payments'); ?>
117
+ </strong>
118
+ </p>
119
+ <a href="http://help.x-cart.com/index.php?title=X-Payments:User_manual#Online_Stores" target="_blank">
120
+ <?php echo $this->__('Read how to do that'); ?>
121
+ </a>
122
+ </div>
123
+ <img src="<?php echo Mage::getBaseUrl('js') . 'xpayment/images/atep-arrow.png' ?>" class=" step-arrow">
124
+ <div class="step">
125
+ <span class="step-number">3</span>
126
+ <p>
127
+ <?php echo $this->__('Connect'); ?>
128
+ <strong>
129
+ <?php echo $this->__('X-Payments'); ?>
130
+ </strong>
131
+ <?php echo $this->__('with'); ?>
132
+ <strong>
133
+ <?php echo $this->__('Magento'); ?>
134
+ </strong>
135
+ </p>
136
+ <a href="https://www.youtube.com/embed/2VRR0JW23qc" target="_blank">See how to do that</a>
137
+ </div>
138
+ </div>
139
+ <?php } ?>
140
+ </div>
141
+ <?php if ($this->getConfigurationErrors()): ?>
142
+ <hr/>
143
+ <?php endif; ?>
144
+ <br/>
145
146
+ <h4><?php echo $this->__('Test module'); ?></h4>
147
148
+ <p><?php echo $this->__("To test the module settings and connection with X-Payments click the button below. If the module is configured properly, a 'Test transaction completed successfully' message will be displayed at the top of the page."); ?></p>
149
150
<form action="<?php echo $this->getUrl('xpaymentsconnector/control/test'); ?>" method="post" name="testmodule_form">
151
+ <?php echo $this->getBlockHtml('formkey'); ?>
152
+ <?php echo $this->getChildHtml('testButton'); ?>
153
</form>
154
155
+ <br/>
156
+ <br/>
157
158
+ <h4><?php echo $this->__('Import payment methods'); ?></h4>
159
160
+ <p><?php echo $this->__('To be able to use X-Payments payment methods you need to import them from X-Payments first.'); ?></p>
161
162
<?php if ($this->isMethodsRequested()) { ?>
163
164
+ <?php echo $this->__('The list of payment configurations imported from X-Payments'); ?>:<br/>
165
166
+ <div class="grid">
167
+ <table cellpadding="5" cellspacing="1">
168
+ <tr class="headings">
169
+ <th><?php echo $this->__('Payment method'); ?></th>
170
+ <th><?php echo $this->__('Payment method ID'); ?></th>
171
+ <th><?php echo $this->__('Auth'); ?></th>
172
+ </tr>
173
174
+ <?php foreach ($this->getPaymentMethods() as $pm) { ?>
175
176
+ <tr>
177
+ <td><?php echo $pm['name']; ?></td>
178
+ <td><?php echo $pm['confid']; ?></td>
179
+ <td><?php if ($pm['is_auth']) { ?><?php echo $this->__('Yes'); ?><?php } else { ?><?php echo $this->__('No'); ?><?php } ?></td>
180
+ </tr>
181
182
+ <?php } ?>
183
+
184
+ </table>
185
+ </div>
186
+
187
+ <form action="<?php echo $this->getUrl('xpaymentsconnector/control/clear'); ?>" method="post" name="clear_form">
188
+ <?php echo $this->getBlockHtml('formkey'); ?>
189
+ <?php echo $this->getChildHtml('clearButton'); ?>
190
+ </form>
191
+
192
+ <?php if ($this->isMethodsAlreadyImported()) { ?>
193
+ <br/>
194
+ <br/>
195
+ <p><?php echo $this->__('Warning! Importing payment configurations from X-Payments will disable the X-Payments connector payment method!'); ?></p>
196
+ <?php } ?>
197
198
<?php } ?>
199
202
<?php echo $this->getChildHtml('requestButton'); ?>
203
</form>
204
205
+ <br/>
206
+ <br/>
207
+ <h4>
208
+ <?php echo $this->__('Need help in settings of x-payments?'); ?>
209
+ <a href="http://www.x-payments.com/contact-us.html?utm_source=mage_shop&utm_medium=link&utm_campaign=mage_shop_link" target="_blank">
210
+ <?php echo $this->__('Contact us!'); ?>
211
+ </a>
212
+ </h4>
app/design/frontend/{default → base}/default/layout/xpaymentsconnector.xml RENAMED
@@ -75,10 +75,16 @@
75
</reference>
76
</checkout_onepage_review>
77
78
- <checkout_onepage_success translate="label">
79
<reference name="content">
80
- <remove name="checkout.success"/>
81
- <block type="checkout/onepage_success" name="xp.checkout.success" template="xpaymentsconnector/checkout/success.phtml"/>
82
</reference>
83
</checkout_onepage_success>
84
75
</reference>
76
</checkout_onepage_review>
77
78
+ <checkout_onepage_success>
79
<reference name="content">
80
+ <reference name="checkout.success">
81
+ <action method="setTemplate">
82
+ <template helper="xpaymentsconnector/data/getCheckoutSuccessTemplate">
83
+ <name>xpaymentsconnector/checkout/success.phtml</name>
84
+ <block>checkout.success</block>
85
+ </template>
86
+ </action>
87
+ </reference>
88
</reference>
89
</checkout_onepage_success>
90
app/design/frontend/{default → base}/default/template/xpaymentsconnector/blank.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/cancel.phtml RENAMED
File without changes
app/design/frontend/{rwd → base}/default/template/xpaymentsconnector/checkout/onepage/beforesuccess.phtml RENAMED
@@ -46,28 +46,36 @@
46
<?php $formKey = Mage::getSingleton('core/session')->getFormKey();?>
47
48
<script type="text/javascript">
49
- jQuery(document).ready(function(){
50
jQuery.ajax({
51
url: "<?php echo $this->getSaveOrderUrl();?>",
52
type: "post",
53
- data: {"payment[method]": "<?php echo $this->getXpaymentsCode();?>","form_key":"<?php echo $formKey;?>"},
54
- datatype: 'json',
55
- success: function(data){
56
var response = jQuery.parseJSON(data);
57
- if(response.success == true){
58
window.parent.location = "<?php echo $this->getCheckoutSuccessUrl();?>";
59
- }else if(response.success == false){
60
- if(response['error_messages']){
61
alert(response['error_messages']);
62
}
63
- if(response['redirect'] != undefined){
64
window.parent.location = response['redirect'];
65
- }else{
66
window.parent.location = "<?php echo Mage::getUrl();?>";
67
}
68
}
69
},
70
- error:function(){
71
}
72
});
73
});
46
<?php $formKey = Mage::getSingleton('core/session')->getFormKey();?>
47
48
<script type="text/javascript">
49
+ jQuery(document).ready(function () {
50
+ var dataObj = {};
51
+ if (jQuery("#checkout-agreements", window.parent.document).length) {
52
+ jQuery("#checkout-agreements input", window.parent.document).each(function (obj, item) {
53
+ dataObj[item.name] = item.value;
54
+ });
55
+ }
56
+ dataObj["payment[method]"] = "<?php echo $this->getXpaymentsCode();?>";
57
+ dataObj["form_key"] = "<?php echo $formKey;?>";
58
+
59
jQuery.ajax({
60
url: "<?php echo $this->getSaveOrderUrl();?>",
61
type: "post",
62
+ data: jQuery.param(dataObj),
63
+ success: function (data) {
64
var response = jQuery.parseJSON(data);
65
+ if (response.success == true) {
66
window.parent.location = "<?php echo $this->getCheckoutSuccessUrl();?>";
67
+ } else if (response.success == false) {
68
+ if (response['error_messages']) {
69
alert(response['error_messages']);
70
}
71
+ if (response['redirect'] != undefined) {
72
window.parent.location = response['redirect'];
73
+ } else {
74
window.parent.location = "<?php echo Mage::getUrl();?>";
75
}
76
}
77
},
78
+ error: function () {
79
}
80
});
81
});
app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/order-detail.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/review/button.phtml RENAMED
@@ -58,6 +58,21 @@ $checkIframeUrl = Mage::getUrl('xpaymentsconnector/processing/istokenactual', ar
58
}
59
}
60
});
61
</script>
62
63
58
}
59
}
60
});
61
+
62
+ //add 'validate-agreement' class into 'terms and conditions' form
63
+ if ($("checkout-agreements") != null) {
64
+ $("#checkout-agreements input").each(function (obj, item) {
65
+ if (!$(obj).hasClassName("validate-agreement")) {
66
+ $(obj).addClassName('validate-agreement');
67
+ }
68
+ });
69
+ }
70
+
71
+ Validation.add('validate-agreement',
72
+ '<?php echo $this->__('Please agree to all the terms and conditions before placing the order.'); ?>',
73
+ function (v) {
74
+ return !Validation.get('IsEmpty').test(v);
75
+ });
76
</script>
77
78
app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/checkout/success.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/cardaddsuccess.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/usercards/cardadd.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/customer/usercards/list.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/failure.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/form/cc.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/form/savedcards.phtml RENAMED
File without changes
app/design/frontend/{rwd → base}/default/template/xpaymentsconnector/info/cc.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/info/prepaidpayments.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/info/savedcards.phtml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/xpaymentsconnector/redirect.phtml RENAMED
File without changes
app/design/frontend/default/default/template/xpaymentsconnector/checkout/onepage/beforesuccess.phtml DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- /**
22
- * @see Cdev_XPaymentsConnector_Block_Beforesuccess
23
- */
24
- ?>
25
-
26
- <html>
27
- <head>
28
- <link href="<?php echo $this->getJsUrl("xpayment/settings.css"); ?>" type="text/css" rel="stylesheet">
29
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
30
- <script>
31
- </script>
32
- </head>
33
-
34
- <body>
35
- <div id="wait-message">
36
- <strong>
37
- <?php echo Mage::helper('xpaymentsconnector')->__('Please wait, your order is being created ...'); ?>
38
- </strong>
39
- </div>
40
-
41
- <div class="b-loader-wrap">
42
- <div id="ajax-loader">
43
- </div>
44
- </div>
45
-
46
- <?php $formKey = Mage::getSingleton('core/session')->getFormKey();?>
47
-
48
- <script type="text/javascript">
49
- jQuery(document).ready(function(){
50
- jQuery.ajax({
51
- url: "<?php echo $this->getSaveOrderUrl();?>",
52
- type: "post",
53
- data: {"payment[method]": "<?php echo $this->getXpaymentsCode();?>","form_key":"<?php echo $formKey;?>"},
54
- datatype: 'json',
55
- success: function(data){
56
- var response = jQuery.parseJSON(data);
57
- if(response.success == true){
58
- window.parent.location = "<?php echo $this->getCheckoutSuccessUrl();?>";
59
- }else if(response.success == false){
60
- if(response['error_messages']){
61
- alert(response['error_messages']);
62
- }
63
- if(response['redirect'] != undefined){
64
- window.parent.location = response['redirect'];
65
- }else{
66
- window.parent.location = "<?php echo Mage::getUrl();?>";
67
- }
68
- }
69
- },
70
- error:function(){
71
- }
72
- });
73
- });
74
- </script>
75
- </body>
76
-
77
- </html>
app/design/frontend/default/default/template/xpaymentsconnector/info/cc.phtml DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Info_Cc
25
- */
26
- ?>
27
- <?php
28
- $orderCardData = $this->getCardData();
29
- ?>
30
-
31
- <?php echo $this->getMethod()->getTitle(); ?>
32
- <br />
33
- <?php if ($this->getInfo()->getLastTransId() == ''): ?>
34
- <?php
35
- echo $this->__('You will be redirected to X-Payments website when you place an order.');
36
- ?>
37
- <?php else: ?>
38
- <?php
39
- echo $this->__('X-Payments Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId()));
40
- ?>
41
- <br/>
42
- <?php endif; ?>
43
- <?php if(!empty($orderCardData)): ?>
44
- <span id="x-payment-prepaid-card-info">
45
- <?php echo $this->__('For current order we used your payment card %s', $orderCardData); ?>
46
- </span>
47
- <?php endif;?>
app/design/frontend/rwd/default/layout/xpaymentsconnector.xml DELETED
@@ -1,148 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * @author Valerii Demidov
17
- * @category Cdev
18
- * @package Cdev_XPaymentsConnector
19
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
- */
22
- -->
23
- <layout version="1.0.0">
24
-
25
- <checkout_cart_index translate="label">
26
- <reference name="head">
27
- <action method="addItem">
28
- <type>js_css</type>
29
- <name>xpayment/settings.css</name>
30
- <params/>
31
- </action>
32
- </reference>
33
- </checkout_cart_index>
34
-
35
- <checkout_onepage_index translate="label">
36
- <reference name="head">
37
- <block type="core/text" name="google.jquery">
38
- <action method="setText">
39
- <text>
40
- <![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>]]></text>
41
- </action>
42
- </block>
43
- <block type="core/text" name="google.jquery.noconflict" after="google.jquery">
44
- <action method="setText">
45
- <text><![CDATA[<script type="text/javascript">jQuery.noConflict(); </script>]]></text>
46
- </action>
47
- </block>
48
- <action method="addItem">
49
- <type>js_css</type>
50
- <name>xpayment/settings.css</name>
51
- <params/>
52
- </action>
53
- <action method="addItem">
54
- <type>js</type>
55
- <name>xpayment/checkout-submit.js</name>
56
- <params/>
57
- </action>
58
- </reference>
59
- </checkout_onepage_index>
60
-
61
- <checkout_onepage_review translate="label">
62
- <reference name="checkout.onepage.review.info.items.after">
63
- <block type="xpaymentsconnector/checkout_onepage_settings" name="xpayment_settings" output="toHtml"
64
- template="xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml"/>
65
- <block type="xpaymentsconnector/checkout_onepage_orderdetail" name="xpayment_recurring_detail" output="toHtml"
66
- template="xpaymentsconnector/checkout/onepage/order-detail.phtml"/>
67
- </reference>
68
- <reference name="checkout.onepage.review.button">
69
- <action method="setTemplate">
70
- <template helper="xpaymentsconnector/data/getReviewButtonTemplate">
71
- <name>xpaymentsconnector/checkout/onepage/review/button.phtml</name>
72
- <block>checkout.onepage.review.button</block>
73
- </template>
74
- </action>
75
- </reference>
76
- </checkout_onepage_review>
77
-
78
- <checkout_onepage_success translate="label">
79
- <reference name="content">
80
- <remove name="checkout.success"/>
81
- <block type="checkout/onepage_success" name="xp.checkout.success" template="xpaymentsconnector/checkout/success.phtml"/>
82
- </reference>
83
- </checkout_onepage_success>
84
-
85
- <xpaymentsconnector_processing_redirect>
86
- <reference name="root">
87
- <action method="setTemplate">
88
- <template>xpaymentsconnector/blank.phtml</template>
89
- </action>
90
- </reference>
91
- <reference name="content">
92
- <block type="xpaymentsconnector/redirect" name="xpaymentsconnector_redirect"
93
- template="xpaymentsconnector/redirect.phtml"/>
94
- </reference>
95
- </xpaymentsconnector_processing_redirect>
96
-
97
-
98
- <customer_account>
99
- <reference name="head">
100
- <action method="addItem">
101
- <type>js_css</type>
102
- <name>xpayment/settings.css</name>
103
- <params/>
104
- </action>
105
- </reference>
106
- <reference name="customer_account_navigation">
107
- <action method="addLink" translate="label" module="xpaymentsconnector">
108
- <name>customer_usercards</name>
109
- <path>xpaymentsconnector/customer/usercards</path>
110
- <label>My Payment Cards</label>
111
- </action>
112
- </reference>
113
- </customer_account>
114
-
115
- <xpaymentsconnector_customer_usercards translate="label">
116
- <label>Customer My Account credit cards list</label>
117
- <update handle="customer_account"/>
118
- <reference name="my.account.wrapper">
119
- <block type="xpaymentsconnector/customer_usercards" name="xpaymentsconnector_customer_usercards" template="xpaymentsconnector/customer/usercards/list.phtml" />
120
- </reference>
121
- <reference name="root">
122
- <action method="setHeaderTitle" translate="title" module="xpaymentsconnector"><title>My credit cards list</title></action>
123
- </reference>
124
- </xpaymentsconnector_customer_usercards>
125
-
126
- <xpaymentsconnector_customer_cardadd translate="label">
127
- <label>Add new credit card to list (X-Payments)</label>
128
- <update handle="customer_account"/>
129
- <reference name="my.account.wrapper">
130
- <block type="xpaymentsconnector/customer_cardadd" name="xpaymentsconnector_customer_cardadd" template="xpaymentsconnector/customer/usercards/cardadd.phtml" />
131
- </reference>
132
- </xpaymentsconnector_customer_cardadd>
133
-
134
-
135
- <!--add discount item on user profile page-->
136
- <sales_recurring_profile_view>
137
- <reference name="sales.recurring.profile.view">
138
- <remove name="sales.recurring.profile.view.fees" />
139
- <block type="xpaymentsconnector/recurring_profile_view" name="xpaymentsconnector.sales.recurring.profile.view.fees" as="fees" template="sales/recurring/profile/view/info.phtml">
140
- <action method="prepareFeesInfo"/>
141
- <action method="addToParentGroup"><value>info_blocks_row_2</value></action>
142
- <action method="setViewColumn"><value>2</value></action>
143
- <action method="setViewLabel" translate="value"><value>Profile Payments</value></action>
144
- </block>
145
- </reference>
146
- </sales_recurring_profile_view>
147
-
148
- </layout>
app/design/frontend/rwd/default/template/xpaymentsconnector/blank.phtml DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
23
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
24
- <head>
25
- <link href="<?php echo $this->getJsUrl("xpayment/settings.css"); ?>" type="text/css" rel="stylesheet">
26
- </head>
27
- <body>
28
- <?php echo $this->getChildHtml('content') ?>
29
- </body>
30
- </html>
app/design/frontend/rwd/default/template/xpaymentsconnector/cancel.phtml DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Cancel
25
- */
26
- ?>
27
- <html>
28
- <head>
29
- <meta http-equiv="refresh" content="0; URL=<?php echo $this->getContinueShoppingUrl(); ?>" />
30
- <link href="<?php echo $this->getJsUrl("xpayment/settings.css"); ?>" type="text/css" rel="stylesheet">
31
- </head>
32
- <body>
33
-
34
- <div class="b-loader-wrap">
35
- <div id="ajax-loader">
36
- </div>
37
- </div>
38
- <div id="wait-message">
39
- <div class="page-head">
40
- <h3><?php echo Mage::helper('xpaymentsconnector')->__('The payment has been canceled') ?></h3>
41
- </div>
42
- <p><?php echo Mage::helper('xpaymentsconnector')->__('Please')?>&nbsp;
43
- <a href="<?php echo $this->getContinueShoppingUrl();?>">
44
- <?php echo Mage::helper('xpaymentsconnector')->__('continue shopping.');?>
45
- </a>
46
- </p>
47
- </div>
48
- </body>
49
- </html>
app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/order-detail.phtml DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * Block for additional information about 'recurring items'
25
- *
26
- * @see Cdev_XPaymentsConnector_Block_Checkout_Onepage_Orderdetail
27
- */
28
- ?>
29
-
30
- <?php
31
- $recurringQuoteItems = $this->getRecurringQuoteItems();
32
- ?>
33
-
34
- <?php if(!empty($recurringQuoteItems)):?>
35
- <div id="recurring-detail-block">
36
- <strong><?php echo $this->__('ATTENTION:');?></strong>
37
- </br>
38
- <?php echo $this->__('Since this orders contains recurring products we charge your credit card several times:');?>
39
- </br>
40
- <ul>
41
- <?php $simpleQuoteItemMessage = $this->getSimpleQuoteItemMessage(); ?>
42
- <?php if ($simpleQuoteItemMessage): ?>
43
- <li>
44
- <?php echo $simpleQuoteItemMessage; ?>
45
- </li>
46
- <?php endif; ?>
47
- <?php foreach ($recurringQuoteItems as $recQuoteItem): ?>
48
- <?php $recQuoteItemMessage = $this->getRecurringItemMessage($recQuoteItem); ?>
49
- <?php if ($recQuoteItemMessage): ?>
50
- <li>
51
- <?php echo $recQuoteItemMessage; ?>
52
- </li>
53
- <?php endif; ?>
54
- <?php endforeach; ?>
55
- </ul>
56
- </div>
57
- <?php endif;?>
58
-
59
-
app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/review/button.phtml DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- $xpayUrlMas = parse_url(Mage::getModel('xpaymentsconnector/payment_cc')->getConfig('xpay_url'));
24
- $xpayUrl = $xpayUrlMas["scheme"]."://".$xpayUrlMas["host"];
25
- $updateCartUrl = Mage::getUrl("checkout/cart",array("unset_xp_prepare_order"=>1));
26
- $checkIframeUrl = Mage::getUrl('xpaymentsconnector/processing/istokenactual', array('_nosid' => true,'_secure'=>true));
27
- ?>
28
-
29
- <button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="submitXpaymentIframe('<?php echo $checkIframeUrl;?>');"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
30
-
31
- <script type="text/javascript">
32
- /*process iframe session expired*/
33
- var redirectUrl = '<?php echo $updateCartUrl;?>';
34
- var eventUrlPath = '<?php echo $xpayUrl; ?>';
35
- Event.observe(window, 'message', function (event) {
36
- var eventUrl = event.origin;
37
- if (eventUrl == eventUrlPath) {
38
- var jsonEventData = JSON.parse(event.data)
39
- if (jsonEventData.message = "paymentFormSubmitError") {
40
- if (jsonEventData.params.type != undefined && jsonEventData.params.type == "2") {
41
- Foobar = function () {
42
- this.callBack = function () {
43
- window.location.replace(redirectUrl);
44
- };
45
- }
46
- Foobar.prototype = {
47
- Init: function () {
48
- var self = this;
49
- var errorMessage = jsonEventData.params.error+ " (X-Payments)";
50
- alert(errorMessage);
51
- self.callBack.call();
52
-
53
- }
54
- };
55
- var foobar = new Foobar();
56
- foobar.Init();
57
- }
58
- }
59
- }
60
- });
61
- </script>
62
-
63
-
64
-
65
-
app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * Additional settings for "IFrame" variant of payment method (frontend)
25
- *
26
- * @see Cdev_XPaymentsConnector_Block_Checkout_Onepage_Settings
27
- */
28
- ?>
29
-
30
- <?php
31
- $xpHelper = Mage::helper("xpaymentsconnector");
32
- $useIframe = Mage::getStoreConfig('payment/xpayments/use_iframe');
33
- $isRecuringProduct = $xpHelper->checkIssetRecurringOrder();
34
- $IsSaveCardsPaymentActive = (bool)Mage::getStoreConfig('payment/savedcards/active');
35
- $displayOnPaymentStep = (bool)(Mage::getStoreConfig('payment/xpayments/placedisplay') == "review");
36
- ?>
37
-
38
- <?php if($this->isXpaymentMethod() && $useIframe && $displayOnPaymentStep):?>
39
- <?php
40
- $iFrameUrl = $xpHelper->getIframeUrl();
41
- $isNeedToSaveUserCard = $xpHelper->isNeedToSaveUserCard();
42
- $customerRegistered = $xpHelper->isRegisteredUser();
43
- ?>
44
- <div id="xpayment-iframe-block">
45
- <iframe id="xp-iframe" class="xp-iframe" data-src="<?php echo $iFrameUrl;?>" src="<?php echo $iFrameUrl;?>" name="xp-iframe">
46
- </iframe>
47
- <?php if($customerRegistered):?>
48
- <?php if(!$isRecuringProduct["isset"]): ?>
49
- <?php if ($IsSaveCardsPaymentActive): ?>
50
- <span id="iframe-save-card-switcher" >
51
- <input type="checkbox" <?php echo ($isNeedToSaveUserCard)?"checked":"";?> title="<?php echo $this->__("Use this credit card"); ?>" class="checkbox x-payment-card " id="iframe_savecard" name="iframe_savecard" value="1" />
52
- <label for="iframe_savecard"><?php echo $this->__("I want to use this credit card for my future orders in this shop."); ?></label>
53
- </span>
54
- <script type="text/javascript">
55
- var url = "<?php echo Mage::getUrl("xpaymentsconnector/processing/saveusercard");?>";
56
- $('iframe_savecard').observe('change',
57
- function() {
58
- if($('iframe_savecard').checked === true) {
59
- new Ajax.Request(url, {
60
- parameters: "user_card_save=1"
61
- });
62
- }else{
63
- new Ajax.Request(url, {
64
- parameters: "user_card_save=0"
65
- });
66
- }
67
- });
68
- </script>
69
- <?php endif; ?>
70
- <?php else: ?>
71
- <span id="iframe-save-card-switcher" >
72
- <?php echo $this->__("Your credit card will be saved for this subscription."); ?>
73
- </span>
74
- <?php endif;?>
75
- <?php endif;?>
76
- </div>
77
- <?php endif;?>
78
-
79
-
app/design/frontend/rwd/default/template/xpaymentsconnector/checkout/success.phtml DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magento.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magento.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
-
28
- <div class="page-title">
29
- <h1>
30
- <?php if ($this->checkOrderSuccess()): ?>
31
- <?php echo $this->__('Your order has been received.') ?>
32
- <?php else: ?>
33
- <?php echo $this->__('Order incomplete.') ?>
34
- <?php endif; ?>
35
- </h1>
36
- </div>
37
- <?php echo $this->getMessagesBlock()->toHtml() ?>
38
- <?php if ($this->checkOrderSuccess()): ?>
39
- <h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
40
- <?php endif; ?>
41
-
42
- <?php if ($this->getOrderId()):?>
43
- <?php if ($this->checkOrderSuccess()) :?>
44
- <?php if ($this->getCanViewOrder()) :?>
45
- <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
46
- <?php else :?>
47
- <p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
48
- <?php endif;?>
49
- <?php endif;?>
50
- <?php if ($this->checkOrderSuccess()): ?>
51
- <p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
52
- <?php endif;?>
53
- <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder() && $this->checkOrderSuccess()) :?>
54
- <p>
55
- <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
56
- <?php echo $this->getChildHtml() ?>
57
- </p>
58
- <?php endif;?>
59
- <?php endif;?>
60
-
61
- <?php if ($this->getAgreementRefId()): ?>
62
- <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
63
- <?php endif;?>
64
-
65
- <?php if ($profiles = $this->getRecurringProfiles() && $this->checkOrderSuccess()):?>
66
- <p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
67
- <ul class="disc">
68
- <?php foreach($profiles as $profile):?>
69
- <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id'))); ?>
70
- <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description'))) ?></li>
71
- <?php endforeach;?>
72
- </ul>
73
- <?php endif;?>
74
-
75
- <div class="buttons-set">
76
- <button type="button" class="button" title="<?php echo $this->getButtonLabel() ?>"
77
- onclick="window.location='<?php echo $this->getButtonUrl() ?>'">
78
- <span><span><?php echo $this->getButtonLabel() ?></span></span></button>
79
- </div>
app/design/frontend/rwd/default/template/xpaymentsconnector/customer/cardaddsuccess.phtml DELETED
@@ -1,59 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- /**
22
- * @see Cdev_XPaymentsConnector_Block_Customer_Success
23
- */
24
- ?>
25
-
26
- <html>
27
- <head>
28
- <link href="<?php echo $this->getJsUrl("xpayment/settings.css"); ?>" type="text/css" rel="stylesheet">
29
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
30
- <script>
31
- </script>
32
- </head>
33
-
34
- <body>
35
- <div id="wait-message">
36
- <strong>
37
- <?php
38
- $resultMessage = $this->getData("result_message");
39
- echo Mage::helper('xpaymentsconnector')->__($resultMessage);
40
- ?>
41
- </strong>
42
- </div>
43
-
44
- <div class="b-loader-wrap">
45
- <div id="ajax-loader">
46
- </div>
47
- </div>
48
-
49
-
50
- <script type="text/javascript">
51
- jQuery(document).ready(function(){
52
- setTimeout(function() {
53
- window.parent.location = "<?php echo Mage::getUrl("xpaymentsconnector/customer/usercards");?>";
54
- }, 1500);
55
- });
56
- </script>
57
- </body>
58
-
59
- </html>
app/design/frontend/rwd/default/template/xpaymentsconnector/customer/usercards/cardadd.phtml DELETED
@@ -1,115 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Customer_Cardadd
25
- */
26
- ?>
27
- <?php
28
- $xpayUrl = $this->getXpayUrl();
29
- ?>
30
-
31
- <div class="page-title">
32
- <h1><?php echo Mage::helper('xpaymentsconnector')->__('Add new credit card to list (X-Payments)') ?></h1>
33
- </div>
34
-
35
- <?php
36
- $result = $this->getAuthorizeIframeUrl();
37
- ?>
38
- <div id="new-card-block">
39
- <?php if($result['success']):?>
40
- <div id="xpayment-iframe-block">
41
- <iframe id="xp-iframe" class="xp-iframe" data-src="<?php echo $result['iframe_url'];?>" src="<?php echo $result['iframe_url'];?>" name="xp-iframe">
42
- </iframe>
43
- <button onclick="cardAuthorizeSubmit();" id="create-card-button" class="button" title="Add new card" type="button"><span><span>Create card</span></span></button>
44
- <span style="display:none;" id="card-add-please-wait" class="please-wait">
45
- <img class="v-middle" title="<?php echo $this->__("Submit card information...");?>" alt="<?php echo $this->__("Submit card information...");?>"
46
- src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>">&nbsp;<?php echo $this->__("Submit card information...");?>
47
- </span>
48
- </div>
49
- <?php elseif(isset($result['error_message'])): ?>
50
- <?php echo $result['error_message'] ?>
51
- <?php endif;?>
52
- </div>
53
-
54
-
55
-
56
-
57
- <div class="buttons-set">
58
- <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
59
- </div>
60
-
61
- <script type="text/javascript">
62
- /*process iframe session expired*/
63
- var redirectUrl = '<?php echo $this->getUrl('xpaymentsconnector/customer/usercards');?>';
64
- var eventUrlPath = '<?php echo $xpayUrl; ?>';
65
- Event.observe(window, 'message', function (event) {
66
- var eventUrl = event.origin;
67
- if (eventUrl == eventUrlPath) {
68
- var jsonEventData = JSON.parse(event.data)
69
- if (jsonEventData.message = "paymentFormSubmitError") {
70
- if (jsonEventData.params.type != undefined && jsonEventData.params.type == "2") {
71
- Foobar = function () {
72
- this.callBack = function () {
73
- window.location.replace(redirectUrl);
74
- };
75
- }
76
- Foobar.prototype = {
77
- Init: function () {
78
- var self = this;
79
- var errorMessage = jsonEventData.params.error + " (X-Payments)";
80
- console.log(jsonEventData);
81
- alert(errorMessage);
82
- self.callBack.call();
83
-
84
- }
85
- };
86
- var foobar = new Foobar();
87
- foobar.Init();
88
- }
89
- }
90
- }
91
- });
92
-
93
-
94
- function cardAuthorizeSubmit() {
95
-
96
- var message = {
97
- message: 'submitPaymentForm',
98
- params: {}
99
- };
100
- $("create-card-button").hide();
101
- $("card-add-please-wait").show()
102
- var messageJson = JSON.stringify(message);
103
- var xpcShown = $('xp-iframe');
104
- xpcShown.contentWindow.postMessage(messageJson, '*');
105
- window.addEventListener("message", receiveMessage, false);
106
-
107
-
108
- }
109
-
110
- function receiveMessage(event)
111
- {
112
- $("create-card-button").show();
113
- $("card-add-please-wait").hide()
114
- }
115
- </script>
app/design/frontend/rwd/default/template/xpaymentsconnector/customer/usercards/list.phtml DELETED
@@ -1,118 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Customer_Usercards
25
- */
26
- ?>
27
- <?php $_items = $this->getItems(); ?>
28
- <?php $cardUsageOptions = $this->getCardsUsageOptions();?>
29
- <div class="page-title">
30
- <h1><?php echo $this->__('Edit payment cards list (X-Payments)') ?></h1>
31
- </div>
32
- <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
- <?php echo $this->getChildHtml('pager'); ?>
34
- <form id="credit-card-list-form" method="post" action="<?php echo Mage::getUrl("xpaymentsconnector/customer/usercards");?>">
35
- <?php if(count($_items)): ?>
36
- <table class="data-table" id="my-credit-cards-table">
37
- <col width="1" />
38
- <col width="1" />
39
- <col />
40
- <col width="1" />
41
- <col width="1" />
42
- <thead>
43
- <tr>
44
- <th><a id="select-all-cards" href="#" onclick="addRelatedCard(event)">Select all</a>
45
- /
46
- <a id="unselect-all-cards" href="#" onclick="removeRelatedCard(event)">Unselect all</a></th>
47
- <th><?php echo $this->__('Card id #') ?></th>
48
- <th><?php echo $this->__('Card number') ?></th>
49
- <th><?php echo $this->__('Usage card type'); ?></th>
50
- <th><?php echo $this->__('Card type'); ?></th>
51
- </tr>
52
- </thead>
53
- <tbody>
54
- <?php $_odd = ''; ?>
55
- <?php foreach ($_items as $_item): ?>
56
- <tr>
57
- <td><input type="checkbox" class="checkbox related-checkbox"
58
- value="<?php echo $_item->getXpCardId();?>" name="card[]"></td>
59
- <td><?php echo $_item->getXpCardId();?></td>
60
- <td>
61
- <?php
62
- $xpCardDataStr = Mage::helper('xpaymentsconnector')->prepareCardDataString($_item->getData());
63
- echo $xpCardDataStr;
64
- ?>
65
- </td>
66
- <td><?php echo $cardUsageOptions[$_item->getUsageType()];?></td>
67
- <td>
68
- <span class="x-payment-card-logo-list <?php echo strtolower($_item->getCardType()) ?>"
69
- title="<?php echo $_item->getCardType();?>">
70
- </span>
71
- </td>
72
- </tr>
73
- <?php endforeach; ?>
74
- </tbody>
75
- </table>
76
- <input type="hidden" name="action" value="remove">
77
-
78
- <script type="text/javascript">decorateTable('my-credit-cards-table')</script>
79
- <?php else: ?>
80
- <p><?php echo $this->__('You have no saved credit cards yet.'); ?></p>
81
- <?php endif; ?>
82
- <?php echo $this->getChildHtml('pager'); ?>
83
- <div class="buttons-set">
84
- <p class="back-link">
85
- <a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>">
86
- <small>&laquo; </small><?php echo $this->__('Back') ?>
87
- </a>
88
- </p>
89
- <?php if(count($_items)): ?>
90
- <button class="button" title="Save" type="submit"><span><span>Remove</span></span></button>
91
- <?php endif; ?>
92
- <button onclick="window.location='<?php echo $this->getAddCardUrl();?>'"
93
- class="button" title="Add new card" type="button"><span><span>Add new card</span></span></button>
94
- </div>
95
- </form>
96
-
97
- <script type="text/javascript">
98
- //<![CDATA[
99
-
100
- function addRelatedCard(event){
101
- Event.stop(event)
102
- var checkboxes = $('.related-checkbox');
103
- var values = [];
104
- for(var i=0;i<checkboxes.length;i++){
105
- checkboxes[i].checked = true;
106
- }
107
- }
108
- function removeRelatedCard(event){
109
- Event.stop(event)
110
- var checkboxes = $('.related-checkbox');
111
- var values = [];
112
- for(var i=0;i<checkboxes.length;i++){
113
- checkboxes[i].checked = false;
114
- }
115
- }
116
- //]]>
117
- </script>
118
-
app/design/frontend/rwd/default/template/xpaymentsconnector/failure.phtml DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Failure
25
- */
26
- ?>
27
- <html>
28
- <meta http-equiv="refresh" content="0; URL=<?php echo $this->getContinueShoppingUrl()?>" />
29
- <body>
30
- <div class="page-head">
31
- <h3><?php echo Mage::helper('xpaymentsconnector')->__('Error occured') ?></h3>
32
- </div>
33
- <p><?php echo Mage::helper('xpaymentsconnector')->__('Please')?>&nbsp;
34
- <a href="<?php echo $this->getContinueShoppingUrl();?>">
35
- <?php echo Mage::helper('xpaymentsconnector')->__('continue shopping.');?>
36
- </a>
37
- </p>
38
- </body>
39
- </html>
app/design/frontend/rwd/default/template/xpaymentsconnector/form/cc.phtml DELETED
@@ -1,121 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Form_Cc
25
- */
26
- ?>
27
- <?php
28
- $_code=$this->getMethodCode();
29
- $useIframe = Mage::getStoreConfig('payment/xpayments/use_iframe');
30
- $isRecuringProduct = Mage::helper("xpaymentsconnector")->checkIssetRecurringOrder();
31
- $IsSaveCardsPaymentActive = (bool)Mage::getStoreConfig('payment/savedcards/active');
32
-
33
- // iframe display settings on the current page
34
- $displayOnPaymentStep = (bool)(Mage::getStoreConfig('payment/xpayments/placedisplay') == "payment");
35
-
36
- $isNeedToSaveUserCard = Mage::helper("xpaymentsconnector")->isNeedToSaveUserCard();
37
- $customerRegistered = Mage::helper("xpaymentsconnector")->isRegisteredUser();
38
- ?>
39
-
40
- <?php if (!$useIframe): ?>
41
- <?php if (!$isRecuringProduct["isset"]): ?>
42
- <?php if ($IsSaveCardsPaymentActive): ?>
43
- <ul id="payment_form_<?php echo $_code ?>" style="display:none;">
44
- <li>
45
- <span class="input-box">
46
- <input type="checkbox"
47
- title="<?php echo $this->__("I want to save a credit card for my future orders in this shop"); ?>"
48
- class="checkbox x-payment-card " id="<?php echo $_code . "_" . "save_card" ?>"
49
- name="savecard" value="1"/>
50
- <label
51
- for="<?php echo $_code . "_" . "save_card" ?>"><?php echo $this->__("I want to save a credit card for my future orders in this shop"); ?></label>
52
- </span>
53
- </li>
54
- </ul>
55
- <?php endif; ?>
56
- <?php else: ?>
57
- <ul id="payment_form_<?php echo $_code ?>" style="display:none;">
58
- <li>
59
- <span class="input-box">
60
- <?php echo $this->__("Your credit card will be saved for this subscription."); ?>
61
- </span>
62
- </li>
63
- </ul>
64
- <?php endif; ?>
65
- <?php elseif($displayOnPaymentStep): ?>
66
- <?php $iframeUrl = $this->getIframeUrl();?>
67
- <ul id="payment_form_<?php echo $_code ?>" style="display:none;">
68
- <li>
69
- <div id="xpayment-iframe-block">
70
- <iframe id="xp-iframe" class="xp-iframe" data-src="<?php echo $iframeUrl; ?>" src="<?php echo $iframeUrl;?>" name="xp-iframe" style="display: none">
71
- </iframe>
72
- <div id="paymentstep-ajax-loader"></div>
73
- <?php if($customerRegistered):?>
74
- <?php if(!$isRecuringProduct["isset"]): ?>
75
- <?php if ($IsSaveCardsPaymentActive): ?>
76
- <span id="iframe-save-card-switcher" >
77
- <input type="checkbox" <?php echo ($isNeedToSaveUserCard)?"checked":"";?> title="<?php echo $this->__("Use this credit card"); ?>" class="checkbox x-payment-card " id="iframe_savecard" name="iframe_savecard" value="1" />
78
- <label for="iframe_savecard"><?php echo $this->__("I want to use this credit card for my future orders in this shop."); ?></label>
79
- </span>
80
- <script type="text/javascript">
81
- var url = "<?php echo Mage::getUrl("xpaymentsconnector/processing/saveusercard");?>";
82
- $('iframe_savecard').observe('change',
83
- function() {
84
- if($('iframe_savecard').checked === true) {
85
- new Ajax.Request(url, {
86
- parameters: "user_card_save=1"
87
- });
88
- }else{
89
- new Ajax.Request(url, {
90
- parameters: "user_card_save=0"
91
- });
92
- }
93
- });
94
- </script>
95
- <?php endif; ?>
96
- <?php else: ?>
97
- <span id="iframe-save-card-switcher" >
98
- <?php echo $this->__("Your credit card will be saved for this subscription."); ?>
99
- </span>
100
- <?php endif;?>
101
- <?php endif;?>
102
- </div>
103
- </li>
104
- </ul>
105
-
106
- <script type="text/javascript">
107
- xpaymentMethodCode = '<?php echo $_code; ?>';
108
- getIfameUrl = "<?php echo Mage::getUrl("xpaymentsconnector/processing/getcheckoutiframeurl", array('_nosid' => true, '_secure' => true));?>";
109
- displayIframeOnPaymentStep = '<?php echo $displayOnPaymentStep ?>';
110
- iframe = $('xp-iframe');
111
-
112
- Event.observe(iframe, "load", function () {
113
- $('paymentstep-ajax-loader').hide();
114
- iframe.show();
115
- });
116
- </script>
117
-
118
- <?php endif; ?>
119
-
120
-
121
-
app/design/frontend/rwd/default/template/xpaymentsconnector/form/savedcards.phtml DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Form_Savedcards
25
- */
26
- ?>
27
-
28
- <?php $_code=$this->getMethodCode() ?>
29
- <?php $userCreditCardsList = $this->getUserCreditCardsList();?>
30
- <ul id="payment_form_<?php echo $_code ?>" style="display:none;">
31
- <?php if($userCreditCardsList):?>
32
- <?php foreach($userCreditCardsList as $key => $creditCard):?>
33
- <?php
34
- $xpCardDataStr = Mage::helper('xpaymentsconnector')->prepareCardDataString($creditCard->getData());
35
- ?>
36
- <li>
37
- <span class="input-box">
38
- <input type="radio"
39
- title="<?php echo "'".$creditCard->getCardType()."'"; ?> - credit card"
40
- class="input-radio x-payment-card validate-one-required-by-name"
41
- id="<?php echo $_code.'_'.$creditCard->getXpCardId(); ?>"
42
- name="payment[xp_payment_card]"
43
- value="<?php echo $creditCard->getData("xp_card_id");?>" />
44
- <label for="<?php echo $_code.'_'.$creditCard->getXpCardId() ?>">
45
- <?php echo $this->__('Use card - %s', $xpCardDataStr); ?>
46
- </label>
47
- <span class="x-payment-card-logo <?php echo strtolower($creditCard->getCardType()) ?>"
48
- title="<?php echo $creditCard->getCardType();?>">
49
- </span>
50
- </span>
51
-
52
- </li>
53
- <?php endforeach;?>
54
- <?php endif;?>
55
- </ul>
56
-
app/design/frontend/rwd/default/template/xpaymentsconnector/info/prepaidpayments.phtml DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Info_Prepaidpayments
25
- */
26
- ?>
27
- <?php
28
- $cardData = $this->getCardData()
29
- ?>
30
- <?php echo $this->getMethod()->getTitle(); ?>
31
- <br />
32
- <?php if (!empty($cardData)): ?>
33
- <span id="x-payment-prepaid-card-info">
34
- <?php echo $this->__("For current order we charged funds from your payment card (**%s)",$cardData['last_4_cc_num']); ?>
35
- </span>
36
- <?php elseif ($orderId = $this->getRequest()->getParam("order_id")): ?>
37
- <?php $orderCardData = $this->getOrderCardData($orderId); ?>
38
- <span id="x-payment-prepaid-card-info">
39
- <?php echo $this->__("For current order we charged funds from your payment card (**%s)",$orderCardData['last_4_cc_num']); ?>
40
- </span>
41
- <?php endif; ?>
42
-
43
-
app/design/frontend/rwd/default/template/xpaymentsconnector/info/savedcards.phtml DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * @author Valerii Demidov
16
- * @category Cdev
17
- * @package Cdev_XPaymentsConnector
18
- * @copyright (c) Qualiteam Software Ltd. <info@qtmsoft.com>. All rights reserved.
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- */
21
- ?>
22
- <?php
23
- /**
24
- * @see Cdev_XPaymentsConnector_Block_Info_Savedcards
25
- */
26
- ?>
27
- <?php
28
- $adminhtmlPaymentCardNumber = $this->getAdminXpPaymentCard();
29
- $cardData = $this->getCardData();
30
- ?>
31
-
32
- <?php echo $this->getMethod()->getTitle(); ?>
33
- <br />
34
- <?php if (!empty($cardData)): ?>
35
- <span id="x-payment-card-info">
36
- <?php echo $this->__("For current order we used your payment card %s", $cardData); ?>
37
- </span>
38
- <?php elseif ($orderId = $this->getRequest()->getParam("order_id")): ?>
39
- <?php $orderCardData = $this->getOrderCardData($orderId); ?>
40
- <span id="x-payment-card-info">
41
- <?php echo $this->__("For current order we used your payment card %s", $orderCardData); ?>
42
- </span>
43
- <?php elseif ($adminhtmlPaymentCardNumber): ?>
44
- <?php $cardData = $this->getCardData($adminhtmlPaymentCardNumber); ?>
45
- <?php if(!empty($cardData)): ?>
46
- <span id="x-payment-card-info">
47
- <?php echo $this->__("For current order we used your payment card %s", $cardData); ?>
48
- </span>
49
- <?php endif; ?>
50
- <?php endif; ?>
51
-
52
-
53
-
54
-