Version Notes
What's new?
- Re-factored code that implements Magento communication with X-Payments, namely: changed order placing procedure, fixed "The txnId field is missing or incorrect" and other errors.
- Support of X-Payments v3.0 API 1.6: new templates, improved operating of recurring charges.
- Improved look and feel of X-Payments credit card form. Credit card form displaying is now allowed before entering the address details.
- Improved errors processing (from X-Payments, from payment gateways etc).
- Integrated with One Step Checkout (http://www.onestepcheckout.com)
- Integrated with Firecheckout (http://www.firecheckout.com)
- Export to Stone Edge order manager
Download this release
Release Info
Developer | Alexander Mulin |
Extension | CDev_XPaymentsConnector |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.14 to 1.7.0
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Cardnumber.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Cardtype.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Txnid.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Tab/Usercards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Sales/Order/View.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Sales/Order/View/Tab/Xporderstate.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/System/Config/Form/Subselect.php +56 -30
- app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Usercards/Grid.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Beforesuccess.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Cancel.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Orderdetail.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Settings.php +24 -15
- app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Success.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Control.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Customer/Account/Navigation.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Customer/Cardadd.php +3 -3
- app/code/community/Cdev/XPaymentsConnector/Block/Customer/Success.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Customer/Usercards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Failure.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Form/Cc.php +17 -35
- app/code/community/Cdev/XPaymentsConnector/Block/Form/Container.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Form/Prepaidpayments.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Form/Savedcards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Info/Cc.php +13 -5
- app/code/community/Cdev/XPaymentsConnector/Block/Info/Prepaidpayments.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Info/Savedcards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Recurring/Profile/View.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Block/Redirect.php +28 -18
- app/code/community/Cdev/XPaymentsConnector/Block/Return.php +47 -0
- app/code/community/Cdev/XPaymentsConnector/Block/Success.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Helper/Data.php +1088 -80
- app/code/community/Cdev/XPaymentsConnector/Model/Adminhtml/System/Config/Source/Placedisplay.php +1 -1
- app/code/community/Cdev/XPaymentsConnector/Model/Mysql4/Paymentconfiguration.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Mysql4/Paymentconfiguration/Collection.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Mysql4/Usercards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Mysql4/Usercards/Collection.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Observer.php +639 -666
- app/code/community/Cdev/XPaymentsConnector/Model/Payment/Cc.php +191 -427
- app/code/community/Cdev/XPaymentsConnector/Model/Payment/Prepaidpayments.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Payment/Recurring/Profile.php +1 -1
- app/code/community/Cdev/XPaymentsConnector/Model/Payment/Savedcards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Paymentconfiguration.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Quote.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Quote/Address/Total/Nominal.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Quote/Address/Total/Nominal/Recurring/Discount.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Quote/Address/Total/Nominal/Recurring/Initialfee/Tax.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Sales/Recurring/Profile.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Source/Paymentconfiguration.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/Model/Usercards.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/controllers/Adminhtml/CustomerController.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/controllers/Adminhtml/Sales/Order/FraudController.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/controllers/ControlController.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/controllers/CustomerController.php +46 -30
- app/code/community/Cdev/XPaymentsConnector/controllers/ProcessingController.php +626 -288
- app/code/community/Cdev/XPaymentsConnector/etc/adminhtml.xml +2 -2
- app/code/community/Cdev/XPaymentsConnector/etc/config.xml +3 -2
- app/code/community/Cdev/XPaymentsConnector/etc/system.xml +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-install-1.0.0.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.0-1.0.1.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.1-1.0.2.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.2-1.0.3.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.3-1.0.4.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.4-1.0.5.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.5-1.0.6.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.6-1.0.7.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.7-1.0.8.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.8-1.0.9.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.0.9-1.1.0.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.1.0-1.1.1.php +2 -2
- app/code/community/Cdev/XPaymentsConnector/sql/xpaymentsconnector_setup/mysql4-upgrade-1.1.1-1.1.2.php +2 -2
- app/design/adminhtml/default/default/layout/xpaymentsconnector.xml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/control.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/form/prepaidpayments.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/form/savedcards.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/info.phtml +1 -1
- app/design/adminhtml/default/default/template/xpaymentsconnector/info/cc.phtml +22 -15
- app/design/adminhtml/default/default/template/xpaymentsconnector/info/prepaidpayments.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/info/savedcards.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/order/view/tab/xporderstate.phtml +6 -3
- app/design/adminhtml/default/default/template/xpaymentsconnector/pdf/info.phtml +2 -2
- app/design/adminhtml/default/default/template/xpaymentsconnector/usercards/tab/js.phtml +2 -2
- app/design/frontend/base/default/layout/xpaymentsconnector.xml +65 -22
- app/design/frontend/base/default/template/xpaymentsconnector/blank.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/cancel.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/checkout/onepage/beforesuccess.phtml +8 -6
- app/design/frontend/base/default/template/xpaymentsconnector/checkout/onepage/order-detail.phtml +10 -4
- app/design/frontend/base/default/template/xpaymentsconnector/checkout/onepage/review/button.phtml +8 -56
- app/design/frontend/base/default/template/xpaymentsconnector/checkout/onepage/xpayment-iframe.phtml +10 -49
- app/design/frontend/base/default/template/xpaymentsconnector/checkout/success.phtml +1 -1
- app/design/frontend/base/default/template/xpaymentsconnector/customer/cardaddsuccess.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/customer/usercards/cardadd.phtml +14 -4
- app/design/frontend/base/default/template/xpaymentsconnector/customer/usercards/list.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/failure.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/form/cc.phtml +18 -91
- app/design/frontend/base/default/template/xpaymentsconnector/form/savedcards.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/info/cc.phtml +14 -18
- app/design/frontend/base/default/template/xpaymentsconnector/info/prepaidpayments.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/info/savedcards.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/redirect.phtml +2 -2
- app/design/frontend/base/default/template/xpaymentsconnector/redirectiframe.phtml +65 -0
- app/design/frontend/base/default/template/xpaymentsconnector/return.phtml +37 -0
- app/design/frontend/base/default/template/xpaymentsconnector/xpc_data.phtml +31 -0
- app/etc/modules/Cdev_XPaymentsConnector.xml +1 -1
- js/xpayment/backend-xpayment.js +2 -2
- js/xpayment/checkout-submit.js +504 -76
- js/xpayment/settings.css +13 -19
- package.xml +23 -10
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Cardnumber.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Cardtype.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Renderer/Txnid.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Customer/Edit/Tab/Usercards.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Sales/Order/View.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Sales/Order/View/Tab/Xporderstate.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/System/Config/Form/Subselect.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,64 +13,89 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
|
23 |
class Cdev_XPaymentsConnector_Block_Adminhtml_System_Config_Form_Subselect extends Mage_Adminhtml_Block_System_Config_Form_Field
|
24 |
{
|
25 |
-
|
26 |
/**
|
27 |
* Get the button and scripts contents
|
28 |
*
|
29 |
* @param Varien_Data_Form_Element_Abstract $element
|
|
|
30 |
* @return string
|
31 |
*/
|
32 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
33 |
{
|
|
|
|
|
|
|
|
|
34 |
$html = parent::_getElementHtml($element);
|
35 |
-
$js = $this->getElementJsEvents();
|
36 |
$html = $html.$js;
|
37 |
|
38 |
return $html;
|
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 |
placeDisplaySelect.hide();
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
EndHTML;
|
70 |
|
|
|
|
|
71 |
return $js;
|
72 |
}
|
73 |
-
|
74 |
-
|
75 |
-
}
|
1 |
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
3 |
/**
|
4 |
* Magento
|
5 |
*
|
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 Qualiteam Software info@qtmsoft.com
|
17 |
* @category Cdev
|
18 |
* @package Cdev_XPaymentsConnector
|
19 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
23 |
|
24 |
class Cdev_XPaymentsConnector_Block_Adminhtml_System_Config_Form_Subselect extends Mage_Adminhtml_Block_System_Config_Form_Field
|
25 |
{
|
|
|
26 |
/**
|
27 |
* Get the button and scripts contents
|
28 |
*
|
29 |
* @param Varien_Data_Form_Element_Abstract $element
|
30 |
+
*
|
31 |
* @return string
|
32 |
*/
|
33 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
34 |
{
|
35 |
+
// Check if Onestep Checkout or Firecheckout module is enabed
|
36 |
+
$checkoutModuleEnabled = Mage::helper('xpaymentsconnector')->checkOscModuleEnabled()
|
37 |
+
|| Mage::helper('xpaymentsconnector')->checkFirecheckoutModuleEnabled();
|
38 |
+
|
39 |
$html = parent::_getElementHtml($element);
|
40 |
+
$js = $this->getElementJsEvents($checkoutModuleEnabled);
|
41 |
$html = $html.$js;
|
42 |
|
43 |
return $html;
|
44 |
}
|
45 |
|
46 |
|
47 |
+
/**
|
48 |
+
* Get Events for settings select boxes
|
49 |
+
*
|
50 |
+
* @param bool $hidden If the payment form place selector should always be hidden
|
51 |
+
*
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function getElementJsEvents($hidden = false)
|
55 |
{
|
56 |
+
if ($hidden) {
|
57 |
+
|
58 |
+
$js = <<<EndHTML
|
59 |
+
<script type="text/javascript">
|
60 |
+
document.observe("dom:loaded", function() {
|
61 |
+
|
62 |
+
$('row_payment_xpayments_placedisplay').hide();
|
63 |
+
$('payment_xpayments_placedisplay').value = "payment";
|
64 |
+
|
65 |
+
$('row_payment_xpayments_use_iframe').hide();
|
66 |
+
$('payment_xpayments_use_iframe').value = "1";
|
67 |
+
});
|
68 |
+
</script>
|
69 |
+
EndHTML;
|
70 |
+
|
71 |
+
|
72 |
+
} else {
|
73 |
+
|
74 |
+
$js = <<<EndHTML
|
75 |
+
<script type="text/javascript">
|
76 |
+
document.observe("dom:loaded", function() {
|
77 |
+
var useIframe = $('payment_xpayments_use_iframe');
|
78 |
+
var placeDisplaySelect = $('row_payment_xpayments_placedisplay');
|
79 |
+
if(useIframe.value == 0){
|
80 |
placeDisplaySelect.hide();
|
81 |
}
|
82 |
+
Event.observe(useIframe, 'change', checkPlaceDisplayAccess.bind(this));
|
83 |
+
function checkPlaceDisplayAccess(event)
|
84 |
+
{
|
85 |
+
var conditionNameElement = Event.element(event);
|
86 |
+
if(conditionNameElement.value == 1){
|
87 |
+
placeDisplaySelect.show();
|
88 |
+
}else{
|
89 |
+
placeDisplaySelect.hide();
|
90 |
+
}
|
91 |
|
92 |
+
}
|
93 |
+
});
|
94 |
+
</script>
|
95 |
EndHTML;
|
96 |
|
97 |
+
}
|
98 |
+
|
99 |
return $js;
|
100 |
}
|
101 |
+
}
|
|
|
|
app/code/community/Cdev/XPaymentsConnector/Block/Adminhtml/Usercards/Grid.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Beforesuccess.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Cancel.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Orderdetail.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Settings.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,32 +13,40 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
22 |
/**
|
23 |
* Additional settings for "IFrame" variant of payment method (frontend)
|
24 |
*/
|
25 |
-
|
26 |
class Cdev_XPaymentsConnector_Block_Checkout_Onepage_Settings extends Mage_Core_Block_Template
|
27 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
$paymentCode = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getCode();
|
32 |
-
$xpaymentPaymentCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
|
33 |
-
|
34 |
-
if($paymentCode == $xpaymentPaymentCode){
|
35 |
-
return true;
|
36 |
-
}
|
37 |
-
else{
|
38 |
-
return false;
|
39 |
-
}
|
40 |
}
|
41 |
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
1 |
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
3 |
/**
|
4 |
* Magento
|
5 |
*
|
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 Qualiteam Software info@qtmsoft.com
|
17 |
* @category Cdev
|
18 |
* @package Cdev_XPaymentsConnector
|
19 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
23 |
/**
|
24 |
* Additional settings for "IFrame" variant of payment method (frontend)
|
25 |
*/
|
|
|
26 |
class Cdev_XPaymentsConnector_Block_Checkout_Onepage_Settings extends Mage_Core_Block_Template
|
27 |
{
|
28 |
+
/**
|
29 |
+
* Check if X-Payments payment method was selected on the payment step
|
30 |
+
*
|
31 |
+
* @return bool
|
32 |
+
*/
|
33 |
+
private function isXpcMethod()
|
34 |
+
{
|
35 |
+
$code = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getCode();
|
36 |
+
$xpcCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
|
37 |
|
38 |
+
return $code == $xpcCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
+
/**
|
42 |
+
* Display iframe on the review step (after payment) or not
|
43 |
+
*
|
44 |
+
* @return bool
|
45 |
+
*/
|
46 |
+
protected function isVisible()
|
47 |
+
{
|
48 |
+
return $this->isXpcMethod()
|
49 |
+
&& Mage::helper('xpaymentsconnector')->isUseIframe()
|
50 |
+
&& 'review' == Mage::helper('xpaymentsconnector')->getIframePlaceDisplay();
|
51 |
+
}
|
52 |
}
|
app/code/community/Cdev/XPaymentsConnector/Block/Checkout/Onepage/Success.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Control.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Customer/Account/Navigation.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Customer/Cardadd.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -78,7 +78,7 @@ class Cdev_XPaymentsConnector_Block_Customer_Cardadd extends Mage_Core_Block_Tem
|
|
78 |
$xpaymentFormUrl = Mage::helper('payment')->getMethodInstance('xpayments')->getUrl();
|
79 |
$api = Mage::getModel('xpaymentsconnector/payment_cc');
|
80 |
|
81 |
-
$result = $api->sendIframeHandshakeRequest(
|
82 |
if($result['success']){
|
83 |
$iframeUrlDataArray = array('target' => $xpaymentFormData['target'], 'token' => $result['response']['token']);
|
84 |
$iframeUrl = $xpaymentFormUrl . '?' . http_build_query($iframeUrlDataArray);
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
78 |
$xpaymentFormUrl = Mage::helper('payment')->getMethodInstance('xpayments')->getUrl();
|
79 |
$api = Mage::getModel('xpaymentsconnector/payment_cc');
|
80 |
|
81 |
+
$result = $api->sendIframeHandshakeRequest(true);
|
82 |
if($result['success']){
|
83 |
$iframeUrlDataArray = array('target' => $xpaymentFormData['target'], 'token' => $result['response']['token']);
|
84 |
$iframeUrl = $xpaymentFormUrl . '?' . http_build_query($iframeUrlDataArray);
|
app/code/community/Cdev/XPaymentsConnector/Block/Customer/Success.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Customer/Usercards.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Failure.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Form/Cc.php
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,10 +14,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -25,45 +27,25 @@
|
|
25 |
|
26 |
class Cdev_XPaymentsConnector_Block_Form_Cc extends Mage_Payment_Block_Form
|
27 |
{
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
protected function _construct()
|
30 |
{
|
31 |
parent::_construct();
|
32 |
$this->setTemplate('xpaymentsconnector/form/cc.phtml');
|
33 |
}
|
34 |
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
{
|
37 |
-
|
38 |
-
|
39 |
-
$isPaymentPlaceDisplayFlag = Mage::helper('xpaymentsconnector')->isIframePaymentPlaceDisplay();
|
40 |
-
$methods = Mage::helper('xpaymentsconnector')->getAllowedPaymentsMethods();
|
41 |
-
if ($quotePayment->getMethod()) {
|
42 |
-
$currentPaymentMethodCode = $quotePayment->getMethodInstance()->getCode();
|
43 |
-
$xpaymentPaymentCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
|
44 |
-
if ($isPaymentPlaceDisplayFlag) {
|
45 |
-
if ($currentPaymentMethodCode == $xpaymentPaymentCode) {
|
46 |
-
$unsetParams = array('token');
|
47 |
-
Mage::helper('xpaymentsconnector')->unsetXpaymentPrepareOrder($unsetParams);
|
48 |
-
return Mage::helper('xpaymentsconnector')->getIframeUrl();
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
if($methods && $isPaymentPlaceDisplayFlag){
|
54 |
-
if(count($methods) == 1){
|
55 |
-
$currentMethod = current($methods);
|
56 |
-
$xpaymentPaymentCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
|
57 |
-
if($currentMethod['method_code'] == $xpaymentPaymentCode){
|
58 |
-
$unsetParams = array('token');
|
59 |
-
Mage::helper('xpaymentsconnector')->unsetXpaymentPrepareOrder($unsetParams);
|
60 |
-
return Mage::helper('xpaymentsconnector')->getIframeUrl();
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
return '#';
|
67 |
}
|
68 |
-
|
69 |
}
|
1 |
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
3 |
+
|
4 |
/**
|
5 |
* Magento
|
6 |
*
|
14 |
* obtain it through the world-wide-web, please send an email
|
15 |
* to license@magentocommerce.com so we can send you a copy immediately.
|
16 |
*
|
17 |
+
* @author Qualiteam Software info@qtmsoft.com
|
18 |
* @category Cdev
|
19 |
* @package Cdev_XPaymentsConnector
|
20 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
*/
|
23 |
|
27 |
|
28 |
class Cdev_XPaymentsConnector_Block_Form_Cc extends Mage_Payment_Block_Form
|
29 |
{
|
30 |
+
/**
|
31 |
+
* Constructor
|
32 |
+
*
|
33 |
+
* @return void
|
34 |
+
*/
|
35 |
protected function _construct()
|
36 |
{
|
37 |
parent::_construct();
|
38 |
$this->setTemplate('xpaymentsconnector/form/cc.phtml');
|
39 |
}
|
40 |
|
41 |
+
/**
|
42 |
+
* Display iframe on the paymment step (before review) or not
|
43 |
+
*
|
44 |
+
* @return bool
|
45 |
+
*/
|
46 |
+
protected function isVisible()
|
47 |
{
|
48 |
+
return Mage::helper('xpaymentsconnector')->isUseIframe()
|
49 |
+
&& 'payment' == Mage::helper('xpaymentsconnector')->getIframePlaceDisplay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
|
|
51 |
}
|
app/code/community/Cdev/XPaymentsConnector/Block/Form/Container.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Form/Prepaidpayments.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Form/Savedcards.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Info/Cc.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,10 +13,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -84,13 +85,20 @@ class Cdev_XPaymentsConnector_Block_Info_Cc extends Mage_Payment_Block_Info
|
|
84 |
. '/admin.php?target=payment&txnid=' . $this->getInfo()->getLastTransId();
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
87 |
public function getCardData()
|
88 |
{
|
89 |
$order = $this->getInfo()->getMethodInstance()->getOrder();
|
90 |
-
$xpCardData = unserialize($order->getXpCardData());
|
91 |
-
$xpCardDataStr = Mage::helper('xpaymentsconnector')->prepareCardDataString($xpCardData);
|
92 |
|
93 |
-
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
}
|
1 |
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
3 |
/**
|
4 |
* Magento
|
5 |
*
|
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 Qualiteam Software info@qtmsoft.com
|
17 |
* @category Cdev
|
18 |
* @package Cdev_XPaymentsConnector
|
19 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
85 |
. '/admin.php?target=payment&txnid=' . $this->getInfo()->getLastTransId();
|
86 |
}
|
87 |
|
88 |
+
/**
|
89 |
+
* Get masked card data as a string
|
90 |
+
*
|
91 |
+
* @return string
|
92 |
+
*/
|
93 |
public function getCardData()
|
94 |
{
|
95 |
$order = $this->getInfo()->getMethodInstance()->getOrder();
|
|
|
|
|
96 |
|
97 |
+
$data = unserialize($order->getXpCardData());
|
98 |
+
|
99 |
+
$result = Mage::helper('xpaymentsconnector')->prepareCardDataString($data, true);
|
100 |
+
|
101 |
+
return $result;
|
102 |
}
|
103 |
|
104 |
}
|
app/code/community/Cdev/XPaymentsConnector/Block/Info/Prepaidpayments.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Info/Savedcards.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Recurring/Profile/View.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Block/Redirect.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,10 +13,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -68,38 +69,47 @@ class Cdev_XPaymentsConnector_Block_Redirect extends Mage_Core_Block_Template
|
|
68 |
return $order;
|
69 |
}
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/**
|
72 |
* Get form action (URL)
|
73 |
*
|
74 |
* @return string
|
75 |
-
* @access public
|
76 |
-
* @see ____func_see____
|
77 |
-
* @since 1.0.0
|
78 |
*/
|
79 |
public function getFormAction()
|
80 |
{
|
81 |
-
|
82 |
-
$this->paymentMethod = Mage::getModel('xpaymentsconnector/payment_cc');
|
83 |
-
}
|
84 |
-
|
85 |
-
return $this->paymentMethod->getUrl();
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
* Get form data
|
90 |
*
|
91 |
* @return array
|
92 |
-
* @access public
|
93 |
-
* @see ____func_see____
|
94 |
-
* @since 1.0.0
|
95 |
*/
|
96 |
public function getFormData()
|
97 |
{
|
98 |
-
|
99 |
-
$this->paymentMethod = Mage::getModel('xpaymentsconnector/payment_cc');
|
100 |
-
}
|
101 |
-
return $this->paymentMethod->getFormFields();
|
102 |
}
|
103 |
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
1 |
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
3 |
/**
|
4 |
* Magento
|
5 |
*
|
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 Qualiteam Software info@qtmsoft.com
|
17 |
* @category Cdev
|
18 |
* @package Cdev_XPaymentsConnector
|
19 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
*/
|
22 |
|
69 |
return $order;
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* Get payment method model
|
74 |
+
*
|
75 |
+
* @return
|
76 |
+
*/
|
77 |
+
protected function getPaymentMethod()
|
78 |
+
{
|
79 |
+
if (is_null($this->paymentMethod)) {
|
80 |
+
$this->paymentMethod = Mage::getModel('xpaymentsconnector/payment_cc');
|
81 |
+
}
|
82 |
+
|
83 |
+
return $this->paymentMethod;
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
* Get form action (URL)
|
88 |
*
|
89 |
* @return string
|
|
|
|
|
|
|
90 |
*/
|
91 |
public function getFormAction()
|
92 |
{
|
93 |
+
return $this->getPaymentMethod()->getUrl();
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
97 |
* Get form data
|
98 |
*
|
99 |
* @return array
|
|
|
|
|
|
|
100 |
*/
|
101 |
public function getFormData()
|
102 |
{
|
103 |
+
return $this->getPaymentMethod()->getFormFields();
|
|
|
|
|
|
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Check if payment token is valid
|
108 |
+
*
|
109 |
+
* @return bool
|
110 |
+
*/
|
111 |
+
public function checkToken()
|
112 |
+
{
|
113 |
+
return $this->getPaymentMethod()->checkToken();
|
114 |
+
}
|
115 |
}
|
app/code/community/Cdev/XPaymentsConnector/Block/Return.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// vim: set ts=4 sw=4 sts=4 et:
|
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 Qualiteam Software info@qtmsoft.com
|
17 |
+
* @category Cdev
|
18 |
+
* @package Cdev_XPaymentsConnector
|
19 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Return from X-Payments block
|
25 |
+
*
|
26 |
+
* @package Cdev_XPaymentsConnector
|
27 |
+
* @see ____class_see____
|
28 |
+
* @since 1.0.0
|
29 |
+
*/
|
30 |
+
class Cdev_XPaymentsConnector_Block_Return extends Mage_Core_Block_Template
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Get succcess URL
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function getRedirectUrl()
|
38 |
+
{
|
39 |
+
$url = Mage::getSingleton('checkout/type_onepage')->getCheckout()->getXpcRedirectUrl();
|
40 |
+
|
41 |
+
if (!$url) {
|
42 |
+
$url = Mage::getUrl('checkout/cart');
|
43 |
+
}
|
44 |
+
|
45 |
+
return $url;
|
46 |
+
}
|
47 |
+
}
|
app/code/community/Cdev/XPaymentsConnector/Block/Success.php
CHANGED
@@ -12,10 +12,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
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 Qualiteam Software info@qtmsoft.com
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
+
* @copyright (c) 2010-2016 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
app/code/community/Cdev/XPaymentsConnector/Helper/Data.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magento
|
4 |
*
|
@@ -12,10 +13,10 @@
|
|
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
|
16 |
* @category Cdev
|
17 |
* @package Cdev_XPaymentsConnector
|
18 |
-
* @copyright (c) Qualiteam
|
19 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
|
@@ -33,12 +34,40 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
33 |
const WEEK_TIME_STAMP = 604800;
|
34 |
const SEMI_MONTH_TIME_STAMP = 1209600;
|
35 |
|
36 |
-
const
|
37 |
|
38 |
const XPAYMENTS_LOG_FILE = 'xpayments.log';
|
39 |
const RECURRING_ORDER_TYPE = 'recurring';
|
40 |
const SIMPLE_ORDER_TYPE = 'simple';
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* save/update qty for createOrder function.
|
44 |
* @var int
|
@@ -122,6 +151,100 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
122 |
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
/**
|
127 |
* This function set 'place_display' flag for feature x-payment form.
|
@@ -135,10 +258,9 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
135 |
*/
|
136 |
public function setIframePlaceDisplaySettings()
|
137 |
{
|
138 |
-
|
139 |
-
if ($useIframe) {
|
140 |
$xpaymentPrepareOrder = Mage::getSingleton('checkout/session')->getData('xpayment_prepare_order');
|
141 |
-
$xpaymentPrepareOrder['place_display'] =
|
142 |
Mage::getSingleton('checkout/session')->setData('xpayment_prepare_order', $xpaymentPrepareOrder);
|
143 |
}
|
144 |
}
|
@@ -176,47 +298,19 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
176 |
}
|
177 |
|
178 |
/**
|
179 |
-
*
|
180 |
-
*
|
181 |
-
* @param
|
182 |
-
*
|
183 |
-
|
184 |
-
|
185 |
-
public function saveXpCardData($quoteId = null,$cardData = array())
|
186 |
-
{
|
187 |
-
if (is_null($quoteId)) {
|
188 |
-
$currentCart = Mage::getModel('checkout/cart')->getQuote();
|
189 |
-
$quoteId = $currentCart->getEntityId();
|
190 |
-
}
|
191 |
-
$cartModel = Mage::getModel('sales/quote')->load($quoteId);
|
192 |
-
$cardData = serialize($cardData);
|
193 |
-
$cartModel->setXpCardData($cardData);
|
194 |
-
|
195 |
-
$cartModel->save();
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* This function return 'token' for X-Payments i-frame Url.
|
200 |
-
* Xpayment Prepare Order Mas(xpayment_prepare_order):
|
201 |
-
* - prepare_order_id (int)
|
202 |
-
* - xpayment_response
|
203 |
-
* - token
|
204 |
-
* return
|
205 |
-
* @return bool or int
|
206 |
*/
|
207 |
-
public function
|
208 |
{
|
209 |
-
$
|
210 |
-
if ($xpaymentPrepareOrder && isset($xpaymentPrepareOrder['token']) && !empty($xpaymentPrepareOrder['token'])) {
|
211 |
-
return $xpaymentPrepareOrder['token'];
|
212 |
-
} else {
|
213 |
-
$api = Mage::getModel('xpaymentsconnector/payment_cc');
|
214 |
-
$result = $api->sendIframeHandshakeRequest();
|
215 |
-
$xpaymentPrepareOrder['token'] = $result['response']['token'];
|
216 |
-
Mage::getSingleton('checkout/session')->setData('xpayment_prepare_order', $xpaymentPrepareOrder);
|
217 |
-
return $xpaymentPrepareOrder['token'];
|
218 |
-
}
|
219 |
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
@@ -330,7 +424,7 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
330 |
public function getReviewButtonTemplate($name, $block)
|
331 |
{
|
332 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
333 |
-
$useIframe =
|
334 |
$xpCcMethodCode = Mage::getModel('xpaymentsconnector/payment_cc')->getCode();
|
335 |
if ($quote) {
|
336 |
$payment = $quote->getPayment();
|
@@ -360,18 +454,25 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
360 |
}
|
361 |
|
362 |
/**
|
|
|
|
|
363 |
* @return bool
|
364 |
*/
|
365 |
public function isRegisteredUser()
|
366 |
{
|
367 |
-
$
|
368 |
-
|
369 |
-
$
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
374 |
}
|
|
|
|
|
375 |
}
|
376 |
|
377 |
/**
|
@@ -876,22 +977,6 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
876 |
}
|
877 |
}
|
878 |
|
879 |
-
/**
|
880 |
-
* @return string
|
881 |
-
*/
|
882 |
-
public function getIframeUrl()
|
883 |
-
{
|
884 |
-
|
885 |
-
$xpaymentFormData = Mage::helper('payment')->getMethodInstance('xpayments')->getFormFields();
|
886 |
-
$xpaymentFormUrl = Mage::helper('payment')->getMethodInstance('xpayments')->getUrl();
|
887 |
-
|
888 |
-
$this->prepareOrderKey();
|
889 |
-
$token = $this->getIframeToken();
|
890 |
-
$iframeUrlDataArray = array('target' => $xpaymentFormData['target'], 'token' => $token);
|
891 |
-
$iframeUrl = $xpaymentFormUrl . "?" . http_build_query($iframeUrlDataArray);
|
892 |
-
return $iframeUrl;
|
893 |
-
}
|
894 |
-
|
895 |
/**
|
896 |
* This function fixed magento bug. Magento can't create user
|
897 |
* during checkout with recurring products.
|
@@ -1066,25 +1151,51 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
1066 |
}
|
1067 |
|
1068 |
/**
|
1069 |
-
*
|
|
|
|
|
|
|
|
|
1070 |
* @return string
|
1071 |
*/
|
1072 |
-
public function prepareCardDataString($
|
1073 |
{
|
1074 |
-
$
|
1075 |
-
if (!empty($xpCardData)) {
|
1076 |
-
$last4 = (isset($xpCardData['last4'])) ? $xpCardData['last4'] : $xpCardData['last_4_cc_num'];
|
1077 |
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1084 |
}
|
1085 |
}
|
1086 |
|
1087 |
-
return $
|
1088 |
}
|
1089 |
|
1090 |
/**
|
@@ -1103,4 +1214,901 @@ class Cdev_XPaymentsConnector_Helper_Data extends Mage_Payment_Helper_Data
|
|
1103 |
}
|
1104 |
}
|
1105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|