Version Notes
Features & Fixes
* Show OneClick payments in Magento checkout
* New API payment method SEPA
* Add discount for the payment method open invoice (karna/Afterpay)
* Optimized UI in the payment step (for the default OnePage checkout and the OneStepCheckout module)
* Build in scan functionality for using Magento as cash register solution
* express checkout button for payments through the Adyen Shuttle
* Creditcard installments can now be setup foreach creditcard type
* Installment rate (in %) is now added to the installment setup
* For Klarna it is now possible to show date of birth and gender only when you select payment method open invoice
* Multicurrency problem with Api Payments solved
* Show reservationNumber for Klarna and AfterPay in the payment information of the order
* Directory lookup call to retrieve the payment methods shown in the payment step can now be cached for better performance
* Payment methods can now be sorted in the front-end
* Boleto firstname and lastname automatically filled in based on billing information
* For Boleto payments the paid amount is now shown in the payment information of the order detail page
* Possible to select different status for Boleto if the payment is overpaid or underpaid
* Full refund will send in Cancel\Refund request to Adyen if payment is not yet captured the order will be cancelled
* For payment method Klarna and after pay the fields are disabled on the Adyen HPP
* Payment methods in the checkout give back the language specific payment method text
* Add after pay logo in magento checkout
* Plugin version number and links for setting up now visible in the Adyen General settings sections
Release Info
Developer | Adyen |
Extension | Adyen_Payment |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.1.0
- app/code/community/Adyen/Payment/.DS_Store +0 -0
- app/code/community/Adyen/Payment/Block/Adminhtml/Form/Field/Installments.php +5 -1
- app/code/community/Adyen/Payment/Block/Adminhtml/Sales/Order/Creditmemo/Totals.php +62 -0
- app/code/community/Adyen/Payment/Block/Adminhtml/Sales/Order/Filter/Adyen.php +34 -1
- app/code/community/Adyen/Payment/Block/Adminhtml/Sales/Order/Invoice/Totals.php +63 -0
- app/code/community/Adyen/Payment/Block/Adminhtml/Sales/Order/Totals.php +63 -0
- app/code/community/Adyen/Payment/Block/Adminhtml/Version.php +9 -0
- app/code/community/Adyen/Payment/Block/Form/Boleto.php +31 -0
- app/code/community/Adyen/Payment/Block/Form/Hpp.php +2 -2
- app/code/community/Adyen/Payment/Block/Form/Oneclick.php +42 -0
- app/code/community/Adyen/Payment/Block/Form/Openinvoice.php +89 -0
- app/code/community/Adyen/Payment/Block/Form/Sepa.php +35 -0
- app/code/community/Adyen/Payment/Block/Info/Oneclick.php +31 -0
- app/code/community/Adyen/Payment/Block/Info/Sepa.php +43 -0
- app/code/community/Adyen/Payment/Block/PosExpressCheckout.php +41 -0
- app/code/community/Adyen/Payment/Block/Redirect.php +6 -2
- app/code/community/Adyen/Payment/Block/Sales/Order/Totals.php +62 -0
- app/code/community/Adyen/Payment/Block/ScanProduct.php +36 -0
- app/code/community/Adyen/Payment/Helper/Data.php +100 -23
- app/code/community/Adyen/Payment/Helper/Installments.php +21 -8
- app/code/community/Adyen/Payment/Model/.DS_Store +0 -0
- app/code/community/Adyen/Payment/Model/Adyen/.DS_Store +0 -0
- app/code/community/Adyen/Payment/Model/Adyen/Abstract.php +113 -7
- app/code/community/Adyen/Payment/Model/Adyen/Cc.php +84 -11
- app/code/community/Adyen/Payment/Model/Adyen/Data/Abstract.php +0 -5
- app/code/community/Adyen/Payment/Model/Adyen/Data/BankAccount.php +34 -0
- app/code/community/Adyen/Payment/Model/Adyen/Data/IdealPaymentRequest.php +2 -1
- app/code/community/Adyen/Payment/Model/Adyen/Data/Installments.php +32 -0
- app/code/community/Adyen/Payment/Model/Adyen/Data/InvoiceRow.php +4 -3
- app/code/community/Adyen/Payment/Model/Adyen/Data/ModificationRequest.php +6 -6
- app/code/community/Adyen/Payment/Model/Adyen/Data/OpenInvoiceDetailResult.php +26 -17
- app/code/community/Adyen/Payment/Model/Adyen/Data/PaymentRequest.php +74 -19
- app/code/community/Adyen/Payment/Model/Adyen/Data/Recurring.php +0 -3
- app/code/community/Adyen/Payment/Model/Adyen/Hpp.php +473 -437
- app/code/community/Adyen/Payment/Model/Adyen/Oneclick.php +114 -0
- app/code/community/Adyen/Payment/Model/Adyen/Openinvoice.php +197 -105
- app/code/community/Adyen/Payment/Model/Adyen/Pos.php +1 -1
- app/code/community/Adyen/Payment/Model/Adyen/Sepa.php +128 -0
- app/code/community/Adyen/Payment/Model/Event.php +6 -3
- app/code/community/Adyen/Payment/Model/Mysql4/Adyen/Event.php +14 -3
- app/code/community/Adyen/Payment/Model/Observer.php +0 -22
- app/code/community/Adyen/Payment/Model/Process.php +459 -356
- app/code/community/Adyen/Payment/Model/Sales/Quote/Address/Total/PaymentFee.php +70 -0
- app/code/community/Adyen/Payment/Model/Sales/Quote/Address/Total/PaymentInstallmentFee.php +120 -0
- app/code/community/Adyen/Payment/Model/Total/PaymentFee/Creditmemo.php +36 -0
- app/code/community/Adyen/Payment/Model/Total/PaymentFee/Invoice.php +36 -0
- app/code/community/Adyen/Payment/Model/Total/PaymentInstallmentFee/Creditmemo.php +36 -0
- app/code/community/Adyen/Payment/Model/Total/PaymentInstallmentFee/Invoice.php +36 -0
- app/code/community/Adyen/Payment/controllers/CheckoutPosController.php +85 -0
- app/code/community/Adyen/Payment/controllers/GetInstallmentsController.php +105 -0
- app/code/community/Adyen/Payment/controllers/UpdateCartController.php +77 -0
- app/code/community/Adyen/Payment/docs/.DS_Store +0 -0
- app/code/community/Adyen/Payment/etc/Payment.wsdl +923 -1133
- app/code/community/Adyen/Payment/etc/config.xml +140 -52
- app/code/community/Adyen/Payment/etc/system.xml +430 -103
- app/code/community/Adyen/Payment/sql/adyen_setup/mysql4-upgrade-2.0.3-2.1.0.php +41 -0
- app/design/adminhtml/default/default/template/adyen/form/hpp.phtml +1 -1
- app/design/adminhtml/default/default/template/adyen/form/sepa.phtml +110 -0
- app/design/adminhtml/default/default/template/adyen/info/boleto.phtml +3 -0
- app/design/adminhtml/default/default/template/adyen/info/cc.phtml +13 -1
- app/design/adminhtml/default/default/template/adyen/info/hpp.phtml +4 -1
- app/design/adminhtml/default/default/template/adyen/info/openinvoice.phtml +5 -0
- app/design/adminhtml/default/default/template/adyen/info/sepa.phtml +49 -0
- app/design/adminhtml/default/default/template/adyen/order/view/history.phtml +80 -0
- app/design/frontend/base/default/layout/adyen.xml +22 -0
- app/design/frontend/base/default/template/adyen/form/boleto.phtml +2 -2
- app/design/frontend/base/default/template/adyen/form/cc.phtml +49 -0
- app/design/frontend/base/default/template/adyen/form/hpp.phtml +107 -76
- app/design/frontend/base/default/template/adyen/form/oneclick.phtml +340 -0
- app/design/frontend/base/default/template/adyen/form/openinvoice.phtml +59 -9
- app/design/frontend/base/default/template/adyen/form/sepa.phtml +108 -0
- app/design/frontend/base/default/template/adyen/info/sepa.phtml +33 -0
- app/design/frontend/base/default/template/adyen/posExpressCheckout.phtml +14 -0
- app/design/frontend/base/default/template/adyen/scanProduct.phtml +143 -0
- app/design/frontend/default/adyen/template/checkout/onepage/payment/methods.phtml +149 -0
- app/design/frontend/default/adyen/template/onestepcheckout/checkout.phtml +1319 -0
- app/design/frontend/default/adyen/template/onestepcheckout/payment_method.phtml +217 -0
- app/design/frontend/enterprise/adyen/template/checkout/onepage/payment/methods.phtml +139 -0
- app/design/frontend/enterprise/adyen/template/onestepcheckout/checkout.phtml +1319 -0
- app/design/frontend/enterprise/adyen/template/onestepcheckout/payment_method.phtml +217 -0
- app/design/frontend/rwd/adyen/template/checkout/onepage/payment/methods.phtml +149 -0
- app/design/frontend/rwd/adyen/template/onestepcheckout/checkout.phtml +1319 -0
- app/design/frontend/rwd/adyen/template/onestepcheckout/payment_method.phtml +217 -0
- js/adyen/payment/adyen.encrypt.js +56 -60
- package.xml +28 -8
- skin/frontend/base/default/css/adyenstyle.css +17 -1
- skin/frontend/base/default/images/adyen/afterpay_default.png +0 -0
- skin/frontend/default/adyen/onestepcheckout/js/onestepcheckout.js +1051 -0
- skin/frontend/enterprise/adyen/onestepcheckout/js/onestepcheckout.js +1051 -0
- skin/frontend/rwd/adyen/onestepcheckout/js/onestepcheckout.js +1051 -0
Binary file
|
@@ -47,13 +47,17 @@ class Adyen_Payment_Block_Adminhtml_Form_Field_Installments extends Mage_Adminht
|
|
47 |
Â
'style' => 'width:100px',
|
48 |
Â
));
|
49 |
Â
$this->addColumn('installment_boundary', array(
|
50 |
-
'label' => Mage::helper('adyen')->__('
|
51 |
Â
'style' => 'width:100px',
|
52 |
Â
));
|
53 |
Â
$this->addColumn('installment_frequency', array(
|
54 |
Â
'label' => Mage::helper('adyen')->__('Maximum Number of Installments'),
|
55 |
Â
'style' => 'width:100px',
|
56 |
Â
));
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
57 |
Â
$this->_addAfter = false;
|
58 |
Â
$this->_addButtonLabel = Mage::helper('adyen')->__('Add Installment Boundary');
|
59 |
Â
}
|
47 |
Â
'style' => 'width:100px',
|
48 |
Â
));
|
49 |
Â
$this->addColumn('installment_boundary', array(
|
50 |
+
'label' => Mage::helper('adyen')->__('Amount (incl.)'),
|
51 |
Â
'style' => 'width:100px',
|
52 |
Â
));
|
53 |
Â
$this->addColumn('installment_frequency', array(
|
54 |
Â
'label' => Mage::helper('adyen')->__('Maximum Number of Installments'),
|
55 |
Â
'style' => 'width:100px',
|
56 |
Â
));
|
57 |
+
$this->addColumn('installment_interest', array(
|
58 |
+
'label' => Mage::helper('adyen')->__('Interest Rate (%)'),
|
59 |
+
'style' => 'width:100px',
|
60 |
+
));
|
61 |
Â
$this->_addAfter = false;
|
62 |
Â
$this->_addButtonLabel = Mage::helper('adyen')->__('Add Installment Boundary');
|
63 |
Â
}
|
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Adminhtml_Sales_Order_Creditmemo_Totals extends Mage_Adminhtml_Block_Sales_Order_Creditmemo_Totals {
|
29 |
+
|
30 |
+
protected function _initTotals()
|
31 |
+
{
|
32 |
+
parent::_initTotals();
|
33 |
+
$this->addTotal(
|
34 |
+
new Varien_Object(
|
35 |
+
array(
|
36 |
+
'code' => 'payment_fee',
|
37 |
+
'strong' => false,
|
38 |
+
'value' => $this->getSource()->getPaymentFeeAmount(),
|
39 |
+
'base_value'=> $this->getSource()->getBasePaymentFeeAmount(),
|
40 |
+
'label' => $this->helper('adyen')->__('Payment Fee'),
|
41 |
+
'area' => '',
|
42 |
+
)
|
43 |
+
),
|
44 |
+
'subtotal'
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->addTotal(
|
48 |
+
new Varien_Object(
|
49 |
+
array(
|
50 |
+
'code' => 'payment_installment_fee',
|
51 |
+
'strong' => false,
|
52 |
+
'value' => $this->getSource()->getPaymentInstallmentFeeAmount(),
|
53 |
+
'base_value'=> $this->getSource()->getBasePaymentInstallmentFeeAmount(),
|
54 |
+
'label' => $this->helper('adyen')->__('Payment Fee Installments'),
|
55 |
+
'area' => '',
|
56 |
+
)
|
57 |
+
),
|
58 |
+
'subtotal'
|
59 |
+
);
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
}
|
@@ -33,7 +33,40 @@ class Adyen_Payment_Block_Adminhtml_Sales_Order_Filter_Adyen extends Mage_Adminh
|
|
33 |
Â
array('label' => '', 'value' => null),
|
34 |
Â
);
|
35 |
Â
foreach ($events as $event) {
|
36 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
37 |
Â
}
|
38 |
Â
return $select;
|
39 |
Â
}
|
33 |
Â
array('label' => '', 'value' => null),
|
34 |
Â
);
|
35 |
Â
foreach ($events as $event) {
|
36 |
+
|
37 |
+
|
38 |
+
switch($event['adyen_event_result']) {
|
39 |
+
|
40 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CAPTURE:
|
41 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CAPTURE_FAILED:
|
42 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_REFUND:
|
43 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CANCEL_OR_REFUND:
|
44 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION:
|
45 |
+
|
46 |
+
if ($event['adyen_event_result'] == Adyen_Payment_Model_Event::ADYEN_EVENT_REFUND) {
|
47 |
+
$eventNamePartialTrue = "(PARTIAL) " . $event['adyen_event_result'] . " : " . "TRUE";
|
48 |
+
$eventNamePartialFalse = "(PARTIAL) " . $event['adyen_event_result'] . " : " . "FALSE";
|
49 |
+
|
50 |
+
$select[] = array('label' => $eventNamePartialTrue, 'value' => $eventNamePartialTrue);
|
51 |
+
$select[] = array('label' => $eventNamePartialFalse, 'value' => $eventNamePartialFalse);
|
52 |
+
}
|
53 |
+
|
54 |
+
$eventNameTrue = $event['adyen_event_result'] . " : " . "TRUE";
|
55 |
+
$eventNameFalse = $event['adyen_event_result'] . " : " . "FALSE";
|
56 |
+
$select[] = array('label' => $eventNameTrue, 'value' => $eventNameTrue);
|
57 |
+
$select[] = array('label' => $eventNameFalse, 'value' => $eventNameFalse);
|
58 |
+
|
59 |
+
break;
|
60 |
+
default:
|
61 |
+
$select[] = array('label' => $event['adyen_event_result'], 'value' => $event['adyen_event_result']);
|
62 |
+
break;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
Â
}
|
71 |
Â
return $select;
|
72 |
Â
}
|
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Adminhtml_Sales_Order_Invoice_Totals extends Mage_Adminhtml_Block_Sales_Order_Invoice_Totals {
|
29 |
+
|
30 |
+
protected function _initTotals()
|
31 |
+
{
|
32 |
+
parent::_initTotals();
|
33 |
+
$this->addTotal(
|
34 |
+
new Varien_Object(
|
35 |
+
array(
|
36 |
+
'code' => 'payment_fee',
|
37 |
+
'strong' => false,
|
38 |
+
'value' => $this->getSource()->getPaymentFeeAmount(),
|
39 |
+
'base_value'=> $this->getSource()->getBasePaymentFeeAmount(),
|
40 |
+
'label' => $this->helper('adyen')->__('Payment Fee'),
|
41 |
+
'area' => '',
|
42 |
+
)
|
43 |
+
),
|
44 |
+
'subtotal'
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->addTotal(
|
48 |
+
new Varien_Object(
|
49 |
+
array(
|
50 |
+
'code' => 'payment_installment_fee',
|
51 |
+
'strong' => false,
|
52 |
+
'value' => $this->getSource()->getPaymentInstallmentFeeAmount(),
|
53 |
+
'base_value'=> $this->getSource()->getBasePaymentInstallmentFeeAmount(),
|
54 |
+
'label' => $this->helper('adyen')->__('Payment Fee Installments'),
|
55 |
+
'area' => '',
|
56 |
+
)
|
57 |
+
),
|
58 |
+
'subtotal'
|
59 |
+
);
|
60 |
+
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
}
|
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Adminhtml_Sales_Order_Totals extends Mage_Sales_Block_Order_Totals {
|
29 |
+
|
30 |
+
protected function _initTotals()
|
31 |
+
{
|
32 |
+
parent::_initTotals();
|
33 |
+
$this->addTotal(
|
34 |
+
new Varien_Object(
|
35 |
+
array(
|
36 |
+
'code' => 'payment_fee',
|
37 |
+
'strong' => false,
|
38 |
+
'value' => $this->getSource()->getPaymentFeeAmount(),
|
39 |
+
'base_value'=> $this->getSource()->getBasePaymentFeeAmount(),
|
40 |
+
'label' => $this->helper('adyen')->__('Payment Fee'),
|
41 |
+
'area' => '',
|
42 |
+
)
|
43 |
+
),
|
44 |
+
'subtotal'
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->addTotal(
|
48 |
+
new Varien_Object(
|
49 |
+
array(
|
50 |
+
'code' => 'payment_installment_fee',
|
51 |
+
'strong' => false,
|
52 |
+
'value' => $this->getSource()->getPaymentInstallmentFeeAmount(),
|
53 |
+
'base_value'=> $this->getSource()->getBasePaymentInstallmentFeeAmount(),
|
54 |
+
'label' => $this->helper('adyen')->__('Payment Fee Installments'),
|
55 |
+
'area' => '',
|
56 |
+
)
|
57 |
+
),
|
58 |
+
'subtotal'
|
59 |
+
);
|
60 |
+
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
}
|
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Adyen_Payment_Block_Adminhtml_Version extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
6 |
+
{
|
7 |
+
return (string) Mage::helper('adyen')->getExtensionVersion();
|
8 |
+
}
|
9 |
+
}
|
@@ -41,4 +41,35 @@ class Adyen_Payment_Block_Form_Boleto extends Mage_Payment_Block_Form {
|
|
41 |
Â
return $this->getMethod()->getAvailableBoletoTypes();
|
42 |
Â
}
|
43 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
44 |
Â
}
|
41 |
Â
return $this->getMethod()->getAvailableBoletoTypes();
|
42 |
Â
}
|
43 |
Â
|
44 |
+
|
45 |
+
public function getFirstname() {
|
46 |
+
$firstname = "";
|
47 |
+
|
48 |
+
// check if user is logged in
|
49 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
50 |
+
/* Get the customer data */
|
51 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
52 |
+
$firstname = $customer->getFirstname();
|
53 |
+
|
54 |
+
} else {
|
55 |
+
$firstname = Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getFirstname();
|
56 |
+
}
|
57 |
+
return $firstname;
|
58 |
+
}
|
59 |
+
|
60 |
+
public function getLastname() {
|
61 |
+
$lastname = "";
|
62 |
+
|
63 |
+
// check if user is logged in
|
64 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
65 |
+
/* Get the customer data */
|
66 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
67 |
+
$lastname = $customer->getLastname();
|
68 |
+
|
69 |
+
} else {
|
70 |
+
$lastname = Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getLastname();
|
71 |
+
}
|
72 |
+
return $lastname;
|
73 |
+
}
|
74 |
+
|
75 |
Â
}
|
@@ -45,7 +45,7 @@ class Adyen_Payment_Block_Form_Hpp extends Mage_Payment_Block_Form {
|
|
45 |
Â
* @since 0.1.0.4
|
46 |
Â
* @return type
|
47 |
Â
*/
|
48 |
-
public function
|
49 |
-
return
|
50 |
Â
}
|
51 |
Â
}
|
45 |
Â
* @since 0.1.0.4
|
46 |
Â
* @return type
|
47 |
Â
*/
|
48 |
+
public function getHppOptionsDisabled() {
|
49 |
+
return $this->getMethod()->getHppOptionsDisabled();
|
50 |
Â
}
|
51 |
Â
}
|
@@ -0,0 +1,42 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Form_Oneclick extends Adyen_Payment_Block_Form_Cc {
|
29 |
+
|
30 |
+
protected function _construct() {
|
31 |
+
parent::_construct();
|
32 |
+
$this->setTemplate('adyen/form/oneclick.phtml');
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getlistRecurringDetails() {
|
36 |
+
return $this->getMethod()->getlistRecurringDetails();
|
37 |
+
}
|
38 |
+
|
39 |
+
public function isNotRecurring() {
|
40 |
+
return $this->getMethod()->isNotRecurring();
|
41 |
+
}
|
42 |
+
}
|
@@ -27,9 +27,98 @@
|
|
27 |
Â
*/
|
28 |
Â
class Adyen_Payment_Block_Form_Openinvoice extends Mage_Payment_Block_Form {
|
29 |
Â
|
Â
|
|
Â
|
|
30 |
Â
protected function _construct() {
|
31 |
Â
$this->setTemplate('adyen/form/openinvoice.phtml');
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
32 |
Â
parent::_construct();
|
33 |
Â
}
|
34 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
35 |
Â
}
|
27 |
Â
*/
|
28 |
Â
class Adyen_Payment_Block_Form_Openinvoice extends Mage_Payment_Block_Form {
|
29 |
Â
|
30 |
+
protected $_dateInputs = array();
|
31 |
+
|
32 |
Â
protected function _construct() {
|
33 |
Â
$this->setTemplate('adyen/form/openinvoice.phtml');
|
34 |
+
|
35 |
+
/* Check if the customer is logged in or not */
|
36 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
37 |
+
|
38 |
+
/* Get the customer data */
|
39 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
40 |
+
|
41 |
+
// set the default value
|
42 |
+
$this->setDate($customer->getDob());
|
43 |
+
$this->setGender($customer->getGender());
|
44 |
+
}
|
45 |
+
|
46 |
Â
parent::_construct();
|
47 |
Â
}
|
48 |
Â
|
49 |
+
|
50 |
+
public function setDate($date)
|
51 |
+
{
|
52 |
+
$this->setTime($date ? strtotime($date) : false);
|
53 |
+
$this->setData('date', $date);
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function getDay()
|
58 |
+
{
|
59 |
+
return $this->getTime() ? date('d', $this->getTime()) : '';
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getMonth()
|
63 |
+
{
|
64 |
+
return $this->getTime() ? date('m', $this->getTime()) : '';
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getYear()
|
68 |
+
{
|
69 |
+
return $this->getTime() ? date('Y', $this->getTime()) : '';
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Returns format which will be applied for DOB in javascript
|
74 |
+
*
|
75 |
+
* @return string
|
76 |
+
*/
|
77 |
+
public function getDateFormat()
|
78 |
+
{
|
79 |
+
return Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Add date input html
|
84 |
+
*
|
85 |
+
* @param string $code
|
86 |
+
* @param string $html
|
87 |
+
*/
|
88 |
+
public function setDateInput($code, $html)
|
89 |
+
{
|
90 |
+
$this->_dateInputs[$code] = $html;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Sort date inputs by dateformat order of current locale
|
95 |
+
*
|
96 |
+
* @return string
|
97 |
+
*/
|
98 |
+
public function getSortedDateInputs()
|
99 |
+
{
|
100 |
+
$strtr = array(
|
101 |
+
'%b' => '%1$s',
|
102 |
+
'%B' => '%1$s',
|
103 |
+
'%m' => '%1$s',
|
104 |
+
'%d' => '%2$s',
|
105 |
+
'%e' => '%2$s',
|
106 |
+
'%Y' => '%3$s',
|
107 |
+
'%y' => '%3$s'
|
108 |
+
);
|
109 |
+
|
110 |
+
$dateFormat = preg_replace('/[^\%\w]/', '\\1', $this->getDateFormat());
|
111 |
+
|
112 |
+
return sprintf(strtr($dateFormat, $strtr),
|
113 |
+
$this->_dateInputs['m'], $this->_dateInputs['d'], $this->_dateInputs['y']);
|
114 |
+
}
|
115 |
+
|
116 |
+
public function genderShow() {
|
117 |
+
return $this->getMethod()->genderShow();
|
118 |
+
}
|
119 |
+
|
120 |
+
public function dobShow() {
|
121 |
+
return $this->getMethod()->dobShow();
|
122 |
+
}
|
123 |
+
|
124 |
Â
}
|
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Form_Sepa extends Mage_Payment_Block_Form {
|
29 |
+
|
30 |
+
protected function _construct() {
|
31 |
+
parent::_construct();
|
32 |
+
$this->setTemplate('adyen/form/sepa.phtml');
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Adyen_Payment_Block_Info_Oneclick extends Adyen_Payment_Block_Info_Cc {
|
30 |
+
|
31 |
+
}
|
@@ -0,0 +1,43 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Info_Sepa extends Mage_Payment_Block_Info {
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Init default template for block
|
32 |
+
*/
|
33 |
+
protected function _construct() {
|
34 |
+
parent::_construct();
|
35 |
+
$this->setTemplate('adyen/info/sepa.phtml');
|
36 |
+
}
|
37 |
+
|
38 |
+
public function toPdf() {
|
39 |
+
$this->setTemplate('adyen/info/pdf/sepa.phtml');
|
40 |
+
return $this->toHtml();
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_PosExpressCheckout extends Mage_Core_Block_Template
|
29 |
+
{
|
30 |
+
|
31 |
+
public function hasExpressCheckout()
|
32 |
+
{
|
33 |
+
// must be login to show this checkout option
|
34 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
35 |
+
return (string) Mage::helper('adyen')->hasExpressCheckout();
|
36 |
+
} else {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
@@ -61,12 +61,16 @@
|
|
61 |
Â
$extra_paramaters = urlencode("/?originalCustomCurrency=".$adyFields['currencyCode']."&originalCustomAmount=".$adyFields['paymentAmount']. "&originalCustomMerchantReference=".$adyFields['merchantReference'] . "&originalCustomSessionId=".session_id());
|
62 |
Â
|
63 |
Â
// add recurring before the callback url
|
64 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
65 |
Â
|
66 |
Â
// important url must be the latest parameter before extra parameters! otherwise extra parameters won't return in return url
|
67 |
Â
if($android !== false) { // && stripos($ua,'mobile') !== false) {
|
68 |
Â
// watch out some attributes are different from ios (sessionid and callback_automatic) added start_immediately
|
69 |
-
$launchlink = "adyen://www.adyen.com/?sessionid=".date(U)."&amount=".$adyFields['paymentAmount']."¤cy=".$adyFields['currencyCode']."&description=".$adyFields['merchantReference']. $recurring_parameters . "&start_immediately=1&callback_automatic=1&callback=".$url .$extra_paramaters;
|
70 |
Â
} else {
|
71 |
Â
//$launchlink = "adyen://payment?currency=".$adyFields['currencyCode']."&amount=".$adyFields['paymentAmount']."&description=".$adyFields['merchantReference']."&callback=".$url."&sessionId=".session_id()."&callbackAutomatic=1".$extra_paramaters;
|
72 |
Â
$launchlink = "adyen://payment?sessionId=".session_id()."&amount=".$adyFields['paymentAmount']."¤cy=".$adyFields['currencyCode']."&description=".$adyFields['merchantReference']. $recurring_parameters . "&callbackAutomatic=1&callback=".$url .$extra_paramaters;
|
61 |
Â
$extra_paramaters = urlencode("/?originalCustomCurrency=".$adyFields['currencyCode']."&originalCustomAmount=".$adyFields['paymentAmount']. "&originalCustomMerchantReference=".$adyFields['merchantReference'] . "&originalCustomSessionId=".session_id());
|
62 |
Â
|
63 |
Â
// add recurring before the callback url
|
64 |
+
if(empty($adyFields['recurringContract'])) {
|
65 |
+
$recurring_parameters = "";
|
66 |
+
} else {
|
67 |
+
$recurring_parameters = "&recurringContract=".urlencode($adyFields['recurringContract'])."&shopperReference=".urlencode($adyFields['shopperReference']). "&shopperEmail=".urlencode($adyFields['shopperEmail']);
|
68 |
+
}
|
69 |
Â
|
70 |
Â
// important url must be the latest parameter before extra parameters! otherwise extra parameters won't return in return url
|
71 |
Â
if($android !== false) { // && stripos($ua,'mobile') !== false) {
|
72 |
Â
// watch out some attributes are different from ios (sessionid and callback_automatic) added start_immediately
|
73 |
+
$launchlink = "adyen://www.adyen.com/?sessionid=".date('U')."&amount=".$adyFields['paymentAmount']."¤cy=".$adyFields['currencyCode']."&description=".$adyFields['merchantReference']. $recurring_parameters . "&start_immediately=1&callback_automatic=1&callback=".$url .$extra_paramaters;
|
74 |
Â
} else {
|
75 |
Â
//$launchlink = "adyen://payment?currency=".$adyFields['currencyCode']."&amount=".$adyFields['paymentAmount']."&description=".$adyFields['merchantReference']."&callback=".$url."&sessionId=".session_id()."&callbackAutomatic=1".$extra_paramaters;
|
76 |
Â
$launchlink = "adyen://payment?sessionId=".session_id()."&amount=".$adyFields['paymentAmount']."¤cy=".$adyFields['currencyCode']."&description=".$adyFields['merchantReference']. $recurring_parameters . "&callbackAutomatic=1&callback=".$url .$extra_paramaters;
|
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_Sales_Order_Totals extends Mage_Sales_Block_Order_Totals {
|
29 |
+
|
30 |
+
protected function _initTotals()
|
31 |
+
{
|
32 |
+
parent::_initTotals();
|
33 |
+
$this->addTotal(
|
34 |
+
new Varien_Object(
|
35 |
+
array(
|
36 |
+
'code' => 'payment_fee',
|
37 |
+
'strong' => false,
|
38 |
+
'value' => $this->getSource()->getPaymentFeeAmount(),
|
39 |
+
'base_value'=> $this->getSource()->getBasePaymentFeeAmount(),
|
40 |
+
'label' => $this->helper('adyen')->__('Payment Fee'),
|
41 |
+
'area' => '',
|
42 |
+
)
|
43 |
+
),
|
44 |
+
'subtotal'
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->addTotal(
|
48 |
+
new Varien_Object(
|
49 |
+
array(
|
50 |
+
'code' => 'payment_installment_fee',
|
51 |
+
'strong' => false,
|
52 |
+
'value' => $this->getSource()->getPaymentInstallmentFeeAmount(),
|
53 |
+
'base_value'=> $this->getSource()->getBasePaymentInstallmentFeeAmount(),
|
54 |
+
'label' => $this->helper('adyen')->__('Payment Fee Installments'),
|
55 |
+
'area' => '',
|
56 |
+
)
|
57 |
+
),
|
58 |
+
'subtotal'
|
59 |
+
);
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
}
|
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Block_ScanProduct extends Mage_Core_Block_Template
|
29 |
+
{
|
30 |
+
|
31 |
+
public function hasEnableScanner()
|
32 |
+
{
|
33 |
+
return (string) Mage::helper('adyen')->hasEnableScanner();
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
@@ -38,33 +38,110 @@ class Adyen_Payment_Helper_Data extends Mage_Payment_Helper_Data {
|
|
38 |
Â
}
|
39 |
Â
|
40 |
Â
public function getBoletoTypes() {
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
Â
}
|
48 |
-
|
49 |
Â
public function getOpenInvoiceTypes() {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
Â
}
|
57 |
-
|
58 |
Â
public function getRecurringTypes() {
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
65 |
Â
}
|
66 |
-
|
67 |
-
|
68 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
69 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
70 |
Â
}
|
38 |
Â
}
|
39 |
Â
|
40 |
Â
public function getBoletoTypes() {
|
41 |
+
$_types = Mage::getConfig()->getNode('default/adyen/payment/boletotypes')->asArray();
|
42 |
+
$types = array();
|
43 |
+
foreach ($_types as $data) {
|
44 |
+
$types[$data['code']] = $data['name'];
|
45 |
+
}
|
46 |
+
return $types;
|
47 |
Â
}
|
48 |
+
|
49 |
Â
public function getOpenInvoiceTypes() {
|
50 |
+
$_types = Mage::getConfig()->getNode('default/adyen/payment/openinvoicetypes')->asArray();
|
51 |
+
$types = array();
|
52 |
+
foreach ($_types as $data) {
|
53 |
+
$types[$data['code']] = $data['name'];
|
54 |
+
}
|
55 |
+
return $types;
|
56 |
Â
}
|
57 |
+
|
58 |
Â
public function getRecurringTypes() {
|
59 |
+
$_types = Mage::getConfig()->getNode('default/adyen/payment/recurringtypes')->asArray();
|
60 |
+
$types = array();
|
61 |
+
foreach ($_types as $data) {
|
62 |
+
$types[$data['code']] = $data['name'];
|
63 |
+
}
|
64 |
+
return $types;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getExtensionVersion() {
|
68 |
+
return (string) Mage::getConfig()->getNode()->modules->Adyen_Payment->version;
|
69 |
+
}
|
70 |
+
|
71 |
+
public function hasEnableScanner() {
|
72 |
+
return (int) Mage::getStoreConfig('payment/adyen_pos/enable_scanner');
|
73 |
+
}
|
74 |
+
|
75 |
+
public function hasExpressCheckout() {
|
76 |
+
return (int) Mage::getStoreConfig('payment/adyen_pos/express_checkout');
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getOrderStatus() {
|
80 |
+
return Mage::getStoreConfig('payment/adyen_abstract/order_status');
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @param Mage_Sales_Model_Quote | Mage_Sales_Model_Order $object
|
85 |
+
*/
|
86 |
+
public function isPaymentFeeEnabled($object)
|
87 |
+
{
|
88 |
+
$fee = Mage::getStoreConfig('payment/adyen_openinvoice/fee');
|
89 |
+
$paymentMethod = $object->getPayment()->getMethod() ;
|
90 |
+
if ($paymentMethod == 'adyen_openinvoice' && $fee > 0) {
|
91 |
+
return true;
|
92 |
+
}
|
93 |
+
else {
|
94 |
+
return false;
|
95 |
+
}
|
96 |
Â
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @param Mage_Sales_Model_Quote | Mage_Sales_Model_Order $object
|
100 |
+
*/
|
101 |
+
public function getPaymentFeeAmount($object)
|
102 |
+
{
|
103 |
+
return Mage::getStoreConfig('payment/adyen_openinvoice/fee');
|
104 |
Â
}
|
105 |
+
|
106 |
+
public function formatAmount($amount, $currency) {
|
107 |
+
|
108 |
+
// check the format
|
109 |
+
switch($currency) {
|
110 |
+
case "JPY":
|
111 |
+
case "IDR":
|
112 |
+
case "KRW":
|
113 |
+
case "BYR":
|
114 |
+
case "VND":
|
115 |
+
case "CVE":
|
116 |
+
case "DJF":
|
117 |
+
case "GNF":
|
118 |
+
case "PYG":
|
119 |
+
case "RWF":
|
120 |
+
case "UGX":
|
121 |
+
case "VUV":
|
122 |
+
case "XAF":
|
123 |
+
case "XOF":
|
124 |
+
case "XPF":
|
125 |
+
case "GHC":
|
126 |
+
$format = 0;
|
127 |
+
break;
|
128 |
+
case "MRO":
|
129 |
+
$format = 1;
|
130 |
+
break;
|
131 |
+
case "BHD":
|
132 |
+
case "JOD":
|
133 |
+
case "KWD":
|
134 |
+
case "OMR":
|
135 |
+
case "LYD":
|
136 |
+
case "TND":
|
137 |
+
$format = 3;
|
138 |
+
break;
|
139 |
+
default:
|
140 |
+
$format = 2;
|
141 |
+
break;
|
142 |
+
}
|
143 |
+
|
144 |
+
return number_format($amount, $format, '', '');
|
145 |
+
}
|
146 |
+
|
147 |
Â
}
|
@@ -79,13 +79,19 @@ class Adyen_Payment_Helper_Installments
|
|
79 |
Â
}
|
80 |
Â
unset($value['__empty']);
|
81 |
Â
foreach ($value as $_id => $row) {
|
82 |
-
if (!is_array($row) || !array_key_exists('installment_currency',$row) || !array_key_exists('installment_boundary', $row) || !array_key_exists('installment_frequency', $row)) {
|
83 |
Â
return false;
|
84 |
Â
}
|
85 |
Â
}
|
86 |
Â
return true;
|
87 |
Â
}
|
88 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
89 |
Â
/**
|
90 |
Â
* Encode value to be used in Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
91 |
Â
* deserialized DB entry => HTML form
|
@@ -96,12 +102,18 @@ class Adyen_Payment_Helper_Installments
|
|
96 |
Â
{
|
97 |
Â
$result = array();
|
98 |
Â
foreach ($value as $triplet){
|
99 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
100 |
Â
$_id = Mage::helper('core')->uniqHash('_');
|
101 |
Â
$result[$_id] = array(
|
102 |
Â
'installment_currency' => $currency,
|
103 |
Â
'installment_boundary' => $boundary,
|
104 |
Â
'installment_frequency' => $frequency,
|
Â
|
|
105 |
Â
);
|
106 |
Â
}
|
107 |
Â
return $result;
|
@@ -118,13 +130,14 @@ class Adyen_Payment_Helper_Installments
|
|
118 |
Â
$result = array();
|
119 |
Â
unset($value['__empty']);
|
120 |
Â
foreach ($value as $_id => $row) {
|
121 |
-
if (!is_array($row) || !array_key_exists('installment_currency',$row) || !array_key_exists('installment_boundary', $row) || !array_key_exists('installment_frequency', $row)) {
|
122 |
Â
continue;
|
123 |
Â
}
|
124 |
Â
$currency = $row['installment_currency'];
|
125 |
Â
$boundary = $row['installment_boundary'];
|
126 |
Â
$frequency = $row['installment_frequency'];
|
127 |
-
$
|
Â
|
|
128 |
Â
}
|
129 |
Â
return $result;
|
130 |
Â
}
|
@@ -136,10 +149,10 @@ class Adyen_Payment_Helper_Installments
|
|
136 |
Â
* @param mixed $store
|
137 |
Â
* @return float|null
|
138 |
Â
*/
|
139 |
-
public function getConfigValue($curr,$amount, $store = null)
|
140 |
Â
{
|
141 |
-
$value =
|
142 |
-
|
143 |
Â
if ($this->_isEncodedArrayFieldValue($value)) {
|
144 |
Â
$value = $this->_decodeArrayFieldValue($value);
|
145 |
Â
}
|
@@ -149,7 +162,7 @@ class Adyen_Payment_Helper_Installments
|
|
149 |
Â
list($currency,$boundary,$frequency) = $row;
|
150 |
Â
if ($curr == $currency){
|
151 |
Â
if($amount <= $boundary && ($boundary <= $cur_minimal_boundary || $cur_minimal_boundary == -1) ) {
|
152 |
-
|
153 |
Â
$resulting_freq = $frequency;
|
154 |
Â
}
|
155 |
Â
if($boundary == "" && $cur_minimal_boundary == -1){
|
79 |
Â
}
|
80 |
Â
unset($value['__empty']);
|
81 |
Â
foreach ($value as $_id => $row) {
|
82 |
+
if (!is_array($row) || !array_key_exists('installment_currency',$row) || !array_key_exists('installment_boundary', $row) || !array_key_exists('installment_frequency', $row ) || !array_key_exists('installment_interest', $row )) {
|
83 |
Â
return false;
|
84 |
Â
}
|
85 |
Â
}
|
86 |
Â
return true;
|
87 |
Â
}
|
88 |
Â
|
89 |
+
public function getInstallments($store = null, $ccType = "installments") {
|
90 |
+
$value = Mage::getStoreConfig("payment/adyen_cc/".$ccType, $store);
|
91 |
+
$value = $this->_unserializeValue($value);
|
92 |
+
return $value;
|
93 |
+
}
|
94 |
+
|
95 |
Â
/**
|
96 |
Â
* Encode value to be used in Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
97 |
Â
* deserialized DB entry => HTML form
|
102 |
Â
{
|
103 |
Â
$result = array();
|
104 |
Â
foreach ($value as $triplet){
|
105 |
+
|
106 |
+
$currency = (isset($triplet[0])) ? $triplet[0] : "";
|
107 |
+
$boundary = (isset($triplet[1])) ? $triplet[1] : "";
|
108 |
+
$frequency = (isset($triplet[2])) ? $triplet[2] : "";
|
109 |
+
$interest = (isset($triplet[3])) ? $triplet[3] : "";
|
110 |
+
|
111 |
Â
$_id = Mage::helper('core')->uniqHash('_');
|
112 |
Â
$result[$_id] = array(
|
113 |
Â
'installment_currency' => $currency,
|
114 |
Â
'installment_boundary' => $boundary,
|
115 |
Â
'installment_frequency' => $frequency,
|
116 |
+
'installment_interest' => $interest
|
117 |
Â
);
|
118 |
Â
}
|
119 |
Â
return $result;
|
130 |
Â
$result = array();
|
131 |
Â
unset($value['__empty']);
|
132 |
Â
foreach ($value as $_id => $row) {
|
133 |
+
if (!is_array($row) || !array_key_exists('installment_currency',$row) || !array_key_exists('installment_boundary', $row) || !array_key_exists('installment_frequency', $row) || !array_key_exists('installment_interest', $row)) {
|
134 |
Â
continue;
|
135 |
Â
}
|
136 |
Â
$currency = $row['installment_currency'];
|
137 |
Â
$boundary = $row['installment_boundary'];
|
138 |
Â
$frequency = $row['installment_frequency'];
|
139 |
+
$interest = $row['installment_interest'];
|
140 |
+
$result[] = array($currency,$boundary,$frequency,$interest);
|
141 |
Â
}
|
142 |
Â
return $result;
|
143 |
Â
}
|
149 |
Â
* @param mixed $store
|
150 |
Â
* @return float|null
|
151 |
Â
*/
|
152 |
+
public function getConfigValue($curr,$amount, $store = null, $ccType = "installments")
|
153 |
Â
{
|
154 |
+
$value = $this->getInstallments($store, $ccType);
|
155 |
+
|
156 |
Â
if ($this->_isEncodedArrayFieldValue($value)) {
|
157 |
Â
$value = $this->_decodeArrayFieldValue($value);
|
158 |
Â
}
|
162 |
Â
list($currency,$boundary,$frequency) = $row;
|
163 |
Â
if ($curr == $currency){
|
164 |
Â
if($amount <= $boundary && ($boundary <= $cur_minimal_boundary || $cur_minimal_boundary == -1) ) {
|
165 |
+
$cur_minimal_boundary = $boundary;
|
166 |
Â
$resulting_freq = $frequency;
|
167 |
Â
}
|
168 |
Â
if($boundary == "" && $cur_minimal_boundary == -1){
|
Binary file
|
Binary file
|
@@ -84,7 +84,19 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
84 |
Â
*/
|
85 |
Â
public function refund(Varien_Object $payment, $amount) {
|
86 |
Â
$this->writeLog('refund fx called');
|
87 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
88 |
Â
return $this;
|
89 |
Â
}
|
90 |
Â
|
@@ -96,7 +108,7 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
96 |
Â
public function authorize(Varien_Object $payment, $amount) {
|
97 |
Â
parent::authorize($payment, $amount);
|
98 |
Â
$payment->setLastTransId($this->getTransactionId())->setIsTransactionPending(true);
|
99 |
-
if ($this->getCode() == 'adyen_boleto' || $this->getCode() == 'adyen_cc' || $this->getCode() == 'adyen_elv') {
|
100 |
Â
$_authorizeResponse = $this->_processRequest($payment, $amount, "authorise");
|
101 |
Â
}
|
102 |
Â
return $this;
|
@@ -139,6 +151,15 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
139 |
Â
return $this->_processRequest($payment, $amount, "refund", $pspReference);
|
140 |
Â
}
|
141 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
142 |
Â
/**
|
143 |
Â
* Process the request here
|
144 |
Â
* @param Varien_Object $payment
|
@@ -150,14 +171,16 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
150 |
Â
$this->_initOrder();
|
151 |
Â
$this->_initService();
|
152 |
Â
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
Â
|
|
Â
|
|
153 |
Â
$modificationResult = Mage::getModel('adyen/adyen_data_modificationResult');
|
154 |
Â
$requestData = Mage::getModel('adyen/adyen_data_modificationRequest')
|
155 |
Â
->create($payment, $amount, $this->_order, $merchantAccount, $pspReference);
|
156 |
-
|
157 |
Â
switch ($request) {
|
158 |
Â
case "authorise":
|
159 |
Â
$requestData = Mage::getModel('adyen/adyen_data_paymentRequest')
|
160 |
-
->create($payment, $amount, $this->_order, $this->_paymentMethod, $merchantAccount);
|
161 |
Â
|
162 |
Â
$response = $this->_service->authorise(array('paymentRequest' => $requestData));
|
163 |
Â
break;
|
@@ -177,6 +200,11 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
177 |
Â
'modificationRequest' => $requestData,
|
178 |
Â
'modificationResult' => $modificationResult));
|
179 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
180 |
Â
}
|
181 |
Â
|
182 |
Â
if (!empty($response)) {
|
@@ -194,6 +222,81 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
194 |
Â
return $response;
|
195 |
Â
}
|
196 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
197 |
Â
/**
|
198 |
Â
* @desc authorise response
|
199 |
Â
* Process the response of the soap
|
@@ -215,6 +318,10 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
215 |
Â
$responseCode = $response->refundResult->response;
|
216 |
Â
$pspReference = $response->refundResult->pspReference;
|
217 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
218 |
Â
case "capture":
|
219 |
Â
$responseCode = $response->captureResult->response;
|
220 |
Â
$pspReference = $response->captureResult->pspReference;
|
@@ -245,9 +352,8 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
245 |
Â
$this->_addStatusHistory($payment, $responseCode, $pspReference, false, $pdfUrl);
|
246 |
Â
break;
|
247 |
Â
case '[capture-received]':
|
248 |
-
$this->_addStatusHistory($payment, $responseCode, $pspReference);
|
249 |
-
break;
|
250 |
Â
case '[refund-received]':
|
Â
|
|
251 |
Â
$this->_addStatusHistory($payment, $responseCode, $pspReference);
|
252 |
Â
break;
|
253 |
Â
case "Error":
|
@@ -295,7 +401,7 @@ abstract class Adyen_Payment_Model_Adyen_Abstract extends Mage_Payment_Model_Met
|
|
295 |
Â
* @param unknown_type $amount
|
296 |
Â
* @param unknown_type $format
|
297 |
Â
*/
|
298 |
-
protected function
|
299 |
Â
return (int) number_format($amount, $format, '', '');
|
300 |
Â
}
|
301 |
Â
|
84 |
Â
*/
|
85 |
Â
public function refund(Varien_Object $payment, $amount) {
|
86 |
Â
$this->writeLog('refund fx called');
|
87 |
+
|
88 |
+
$order = $payment->getOrder();
|
89 |
+
$pspReference = Mage::getModel('adyen/event')->getOriginalPspReference($order->getIncrementId());
|
90 |
+
|
91 |
+
// if amound is a full refund send a refund/cancelled request so if it is not captured yet it will cancel the order
|
92 |
+
$grandTotal = $order->getGrandTotal();
|
93 |
+
|
94 |
+
if($grandTotal == $amount) {
|
95 |
+
$order->getPayment()->getMethodInstance()->SendCancelOrRefund($payment, null, $pspReference);
|
96 |
+
} else {
|
97 |
+
$order->getPayment()->getMethodInstance()->sendRefundRequest($payment, $amount, $pspReference);
|
98 |
+
}
|
99 |
+
|
100 |
Â
return $this;
|
101 |
Â
}
|
102 |
Â
|
108 |
Â
public function authorize(Varien_Object $payment, $amount) {
|
109 |
Â
parent::authorize($payment, $amount);
|
110 |
Â
$payment->setLastTransId($this->getTransactionId())->setIsTransactionPending(true);
|
111 |
+
if ($this->getCode() == 'adyen_boleto' || $this->getCode() == 'adyen_cc' || $this->getCode() == 'adyen_oneclick' || $this->getCode() == 'adyen_elv' || $this->getCode() == 'adyen_sepa') {
|
112 |
Â
$_authorizeResponse = $this->_processRequest($payment, $amount, "authorise");
|
113 |
Â
}
|
114 |
Â
return $this;
|
151 |
Â
return $this->_processRequest($payment, $amount, "refund", $pspReference);
|
152 |
Â
}
|
153 |
Â
|
154 |
+
public function SendCancelOrRefund(Varien_Object $payment, $amount, $pspReference) {
|
155 |
+
if (empty($pspReference)) {
|
156 |
+
$this->writeLog('oops empty pspReference');
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
$this->writeLog("sendCancelOrRefundRequest pspReference : $pspReference");
|
160 |
+
return $this->_processRequest($payment, null, "cancel_or_refund", $pspReference);
|
161 |
+
}
|
162 |
+
|
163 |
Â
/**
|
164 |
Â
* Process the request here
|
165 |
Â
* @param Varien_Object $payment
|
171 |
Â
$this->_initOrder();
|
172 |
Â
$this->_initService();
|
173 |
Â
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
174 |
+
$recurringType = $this->_getConfigData('recurringtypes', 'adyen_abstract');
|
175 |
+
$enableMoto = (int) $this->_getConfigData('enable_moto', 'adyen_cc');
|
176 |
Â
$modificationResult = Mage::getModel('adyen/adyen_data_modificationResult');
|
177 |
Â
$requestData = Mage::getModel('adyen/adyen_data_modificationRequest')
|
178 |
Â
->create($payment, $amount, $this->_order, $merchantAccount, $pspReference);
|
179 |
+
|
180 |
Â
switch ($request) {
|
181 |
Â
case "authorise":
|
182 |
Â
$requestData = Mage::getModel('adyen/adyen_data_paymentRequest')
|
183 |
+
->create($payment, $amount, $this->_order, $this->_paymentMethod, $merchantAccount,$recurringType, $enableMoto);
|
184 |
Â
|
185 |
Â
$response = $this->_service->authorise(array('paymentRequest' => $requestData));
|
186 |
Â
break;
|
200 |
Â
'modificationRequest' => $requestData,
|
201 |
Â
'modificationResult' => $modificationResult));
|
202 |
Â
break;
|
203 |
+
case "cancel_or_refund":
|
204 |
+
$response = $this->_service->cancelorrefund(array(
|
205 |
+
'modificationRequest' => $requestData,
|
206 |
+
'modificationResult' => $modificationResult));
|
207 |
+
break;
|
208 |
Â
}
|
209 |
Â
|
210 |
Â
if (!empty($response)) {
|
222 |
Â
return $response;
|
223 |
Â
}
|
224 |
Â
|
225 |
+
protected function _processRecurringRequest($customerId) {
|
226 |
+
|
227 |
+
$this->_initService();
|
228 |
+
|
229 |
+
// customerId
|
230 |
+
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
231 |
+
$recurringType = $this->_getConfigData('recurringtypes', 'adyen_abstract');
|
232 |
+
|
233 |
+
|
234 |
+
// do not show the oneclick if recurring type is empty or recurring
|
235 |
+
if($recurringType == "ONECLICK" || $recurringType == "ONECLICK,RECURRING" || $recurringType == "RECURRING")
|
236 |
+
{
|
237 |
+
// recurring type is always ONECLICK
|
238 |
+
if($recurringType == "ONECLICK,RECURRING") {
|
239 |
+
$recurringType = "ONECLICK";
|
240 |
+
}
|
241 |
+
|
242 |
+
// rest call to get listrecurring details
|
243 |
+
$request = array(
|
244 |
+
"action" => "Recurring.listRecurringDetails",
|
245 |
+
"recurringDetailsRequest.merchantAccount" => $merchantAccount,
|
246 |
+
"recurringDetailsRequest.shopperReference" => $customerId,
|
247 |
+
"recurringDetailsRequest.recurring.contract" => $recurringType, // i.e.: "ONECLICK" Or "RECURRING"
|
248 |
+
);
|
249 |
+
|
250 |
+
$ch = curl_init();
|
251 |
+
|
252 |
+
$isConfigDemoMode = $this->getConfigDataDemoMode();
|
253 |
+
$wsUsername = $this->getConfigDataWsUserName();
|
254 |
+
$wsPassword = $this->getConfigDataWsPassword();
|
255 |
+
|
256 |
+
if ($isConfigDemoMode)
|
257 |
+
curl_setopt($ch, CURLOPT_URL, "https://pal-test.adyen.com/pal/adapter/httppost");
|
258 |
+
else
|
259 |
+
curl_setopt($ch, CURLOPT_URL, "https://pal-live.adyen.com/pal/adapter/httppost");
|
260 |
+
|
261 |
+
curl_setopt($ch, CURLOPT_HEADER, false);
|
262 |
+
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
|
263 |
+
curl_setopt($ch, CURLOPT_USERPWD,$wsUsername.":".$wsPassword);
|
264 |
+
curl_setopt($ch, CURLOPT_POST,count($request));
|
265 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($request));
|
266 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
267 |
+
|
268 |
+
$result = curl_exec($ch);
|
269 |
+
|
270 |
+
if($result === false) {
|
271 |
+
Mage::log("List recurring is failing error is: " . curl_error($ch), self::DEBUG_LEVEL, 'http-request.log',true);
|
272 |
+
Mage::throwException(Mage::helper('adyen')->__('List recurring is generating the error see the log'));
|
273 |
+
} else{
|
274 |
+
/**
|
275 |
+
* The $result contains a JSON array containing
|
276 |
+
* the available payment methods for the merchant account.
|
277 |
+
*/
|
278 |
+
parse_str($result,$result);
|
279 |
+
Mage::log("List recurring result is: " . curl_error($ch), self::DEBUG_LEVEL, 'http-request.log',true);
|
280 |
+
|
281 |
+
// create a arraylist with the cards
|
282 |
+
$recurringCards = array();
|
283 |
+
|
284 |
+
foreach($result as $key => $value) {
|
285 |
+
// strip the key
|
286 |
+
$key = str_replace("recurringDetailsResult_details_", "", $key);
|
287 |
+
$key2 = strstr($key, '_');
|
288 |
+
$keyNumber = str_replace($key2, "", $key);
|
289 |
+
$keyAttribute = substr($key2, 1);
|
290 |
+
$recurringCards[$keyNumber][$keyAttribute] = $value;
|
291 |
+
}
|
292 |
+
// unset the recurringDetailsResult because this is not a card
|
293 |
+
unset($recurringCards["recurringDetailsResult"]);
|
294 |
+
|
295 |
+
return $recurringCards;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
Â
/**
|
301 |
Â
* @desc authorise response
|
302 |
Â
* Process the response of the soap
|
318 |
Â
$responseCode = $response->refundResult->response;
|
319 |
Â
$pspReference = $response->refundResult->pspReference;
|
320 |
Â
break;
|
321 |
+
case "cancel_or_refund":
|
322 |
+
$responseCode = $response->cancelOrRefundResult->response;
|
323 |
+
$pspReference = $response->cancelOrRefundResult->pspReference;
|
324 |
+
break;
|
325 |
Â
case "capture":
|
326 |
Â
$responseCode = $response->captureResult->response;
|
327 |
Â
$pspReference = $response->captureResult->pspReference;
|
352 |
Â
$this->_addStatusHistory($payment, $responseCode, $pspReference, false, $pdfUrl);
|
353 |
Â
break;
|
354 |
Â
case '[capture-received]':
|
Â
|
|
Â
|
|
355 |
Â
case '[refund-received]':
|
356 |
+
case '[cancelOrRefund-received]':
|
357 |
Â
$this->_addStatusHistory($payment, $responseCode, $pspReference);
|
358 |
Â
break;
|
359 |
Â
case "Error":
|
401 |
Â
* @param unknown_type $amount
|
402 |
Â
* @param unknown_type $format
|
403 |
Â
*/
|
404 |
+
protected function _numberFormat($amount, $format = 2) {
|
405 |
Â
return (int) number_format($amount, $format, '', '');
|
406 |
Â
}
|
407 |
Â
|
@@ -31,7 +31,7 @@ class Adyen_Payment_Model_Adyen_Cc extends Adyen_Payment_Model_Adyen_Abstract {
|
|
31 |
Â
protected $_formBlockType = 'adyen/form_cc';
|
32 |
Â
protected $_infoBlockType = 'adyen/info_cc';
|
33 |
Â
protected $_paymentMethod = 'cc';
|
34 |
-
|
35 |
Â
/**
|
36 |
Â
* 1)Called everytime the adyen_cc is called or used in checkout
|
37 |
Â
* @description Assign data to info model instance
|
@@ -40,11 +40,15 @@ class Adyen_Payment_Model_Adyen_Cc extends Adyen_Payment_Model_Adyen_Abstract {
|
|
40 |
Â
* @return Mage_Payment_Model_Info
|
41 |
Â
*/
|
42 |
Â
public function assignData($data) {
|
Â
|
|
43 |
Â
if (!($data instanceof Varien_Object)) {
|
44 |
Â
$data = new Varien_Object($data);
|
45 |
Â
}
|
46 |
Â
$info = $this->getInfoInstance();
|
47 |
-
|
Â
|
|
Â
|
|
Â
|
|
48 |
Â
if ($this->isCseEnabled()) {
|
49 |
Â
$info->setAdditionalInformation('encrypted_data', $data->getEncryptedData());
|
50 |
Â
}
|
@@ -58,24 +62,93 @@ class Adyen_Payment_Model_Adyen_Cc extends Adyen_Payment_Model_Adyen_Abstract {
|
|
58 |
Â
->setCcCid($data->getCcCid())
|
59 |
Â
->setPoNumber($data->getAdditionalData());
|
60 |
Â
}
|
61 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
62 |
Â
return $this;
|
63 |
Â
}
|
64 |
Â
|
65 |
-
public function getPossibleInstallments(){
|
66 |
Â
// retrieving quote
|
67 |
Â
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
68 |
-
|
69 |
-
|
70 |
-
$
|
71 |
-
|
72 |
-
$max_installments = Mage::helper('adyen/installments')->getConfigValue($currency,$amount);
|
73 |
-
|
74 |
Â
$result = array();
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
75 |
Â
for($i=1;$i<=$max_installments;$i++){
|
76 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
77 |
Â
$result[(string)$i] = $i."x ".$currency." ".number_format($partial_amount,2);
|
78 |
Â
}
|
Â
|
|
Â
|
|
79 |
Â
|
80 |
Â
return $result;
|
81 |
Â
}
|
31 |
Â
protected $_formBlockType = 'adyen/form_cc';
|
32 |
Â
protected $_infoBlockType = 'adyen/info_cc';
|
33 |
Â
protected $_paymentMethod = 'cc';
|
34 |
+
|
35 |
Â
/**
|
36 |
Â
* 1)Called everytime the adyen_cc is called or used in checkout
|
37 |
Â
* @description Assign data to info model instance
|
40 |
Â
* @return Mage_Payment_Model_Info
|
41 |
Â
*/
|
42 |
Â
public function assignData($data) {
|
43 |
+
|
44 |
Â
if (!($data instanceof Varien_Object)) {
|
45 |
Â
$data = new Varien_Object($data);
|
46 |
Â
}
|
47 |
Â
$info = $this->getInfoInstance();
|
48 |
+
|
49 |
+
// set number of installements
|
50 |
+
$info->setAdditionalInformation('number_of_installments', $data->getAdditionalData());
|
51 |
+
|
52 |
Â
if ($this->isCseEnabled()) {
|
53 |
Â
$info->setAdditionalInformation('encrypted_data', $data->getEncryptedData());
|
54 |
Â
}
|
62 |
Â
->setCcCid($data->getCcCid())
|
63 |
Â
->setPoNumber($data->getAdditionalData());
|
64 |
Â
}
|
65 |
+
|
66 |
+
// recalculate the totals so that extra fee is defined
|
67 |
+
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
68 |
+
$quote->setTotalsCollectedFlag(false);
|
69 |
+
$quote->collectTotals();
|
70 |
+
// not needed
|
71 |
+
// $quote->save();
|
72 |
+
|
73 |
+
|
74 |
Â
return $this;
|
75 |
Â
}
|
76 |
Â
|
77 |
+
public function getPossibleInstallments() {
|
78 |
Â
// retrieving quote
|
79 |
Â
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
80 |
+
|
81 |
+
// get selected payment method for now
|
82 |
+
$payment = $quote->getPayment();
|
83 |
+
|
Â
|
|
Â
|
|
84 |
Â
$result = array();
|
85 |
+
|
86 |
+
if($quote->isVirtual()) {
|
87 |
+
$address = $this->getBillingAddress();
|
88 |
+
} else {
|
89 |
+
$address = $quote->getShippingAddress();
|
90 |
+
}
|
91 |
+
|
92 |
+
// distract the already included added fee for installment you selected before
|
93 |
+
if($address->getBasePaymentInstallmentFeeAmount() > 0) {
|
94 |
+
$amount = (double) ($quote->getGrandTotal() - $address->getBasePaymentInstallmentFeeAmount());
|
95 |
+
} else {
|
96 |
+
$amount = (double) $quote->getGrandTotal();
|
97 |
+
}
|
98 |
+
|
99 |
+
$currency = $quote->getQuoteCurrencyCode();
|
100 |
+
|
101 |
+
$ccTypeInstallments = null;
|
102 |
+
// check if creditcard type is already selected if this is the case show installments for this card if they have one configured
|
103 |
+
if($payment && !empty($payment)) {
|
104 |
+
if($payment->getMethod()) {
|
105 |
+
$info = $payment->getMethodInstance();
|
106 |
+
|
107 |
+
$instance = $info->getInfoInstance();
|
108 |
+
$ccType = $instance->getCcType();
|
109 |
+
|
110 |
+
// this creditcard type is selected
|
111 |
+
if($ccType != "") {
|
112 |
+
|
113 |
+
// installment key where installents are saved in settings
|
114 |
+
$ccTypeInstallments = "installments_".$ccType;
|
115 |
+
|
116 |
+
// check if this type has installments configured
|
117 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments(null, $ccTypeInstallments);
|
118 |
+
|
119 |
+
if(empty($all_installments)) {
|
120 |
+
// no installments congigure fall back on default
|
121 |
+
$ccTypeInstallments = null;
|
122 |
+
} else {
|
123 |
+
$max_installments = Mage::helper('adyen/installments')->getConfigValue($currency,$amount, null, $ccTypeInstallments);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
// Fallback to the default installments if creditcard type has no one configured
|
130 |
+
if($ccTypeInstallments == null) {
|
131 |
+
$max_installments = Mage::helper('adyen/installments')->getConfigValue($currency,$amount, null);
|
132 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments();
|
133 |
+
}
|
134 |
+
|
135 |
+
// result array here
|
136 |
Â
for($i=1;$i<=$max_installments;$i++){
|
137 |
+
|
138 |
+
// check if installment has extra interest
|
139 |
+
$key = $i-1;
|
140 |
+
$installment = $all_installments[$key];
|
141 |
+
if(isset($installment[3]) && $installment[3] > 0) {
|
142 |
+
$total_amount_with_interest = $amount + ($amount * ($installment[3] / 100));
|
143 |
+
} else {
|
144 |
+
$total_amount_with_interest = $amount;
|
145 |
+
}
|
146 |
+
|
147 |
+
$partial_amount = ((double)$total_amount_with_interest)/$i;
|
148 |
Â
$result[(string)$i] = $i."x ".$currency." ".number_format($partial_amount,2);
|
149 |
Â
}
|
150 |
+
|
151 |
+
|
152 |
Â
|
153 |
Â
return $result;
|
154 |
Â
}
|
@@ -36,9 +36,4 @@ class Adyen_Payment_Model_Adyen_Data_Abstract {
|
|
36 |
Â
protected function _getCheckout() {
|
37 |
Â
return Mage::getSingleton('checkout/session');
|
38 |
Â
}
|
39 |
-
|
40 |
-
protected function _formatAmount($amount, $format = 2) {
|
41 |
-
return number_format($amount, $format, '', '');
|
42 |
-
}
|
43 |
-
|
44 |
Â
}
|
36 |
Â
protected function _getCheckout() {
|
37 |
Â
return Mage::getSingleton('checkout/session');
|
38 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
39 |
Â
}
|
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Adyen_Data_BankAccount extends Adyen_Payment_Model_Adyen_Data_Abstract {
|
29 |
+
|
30 |
+
public $iban;
|
31 |
+
public $ownerName;
|
32 |
+
public $countryCode;
|
33 |
+
|
34 |
+
}
|
@@ -39,11 +39,12 @@ class Adyen_Payment_Model_Adyen_Data_IdealPaymentRequest extends Adyen_Payment_M
|
|
39 |
Â
$incrementId = $order->getIncrementId();
|
40 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
41 |
Â
$customerId = $order->getCustomerId();
|
Â
|
|
42 |
Â
|
43 |
Â
$this->reference = $incrementId;
|
44 |
Â
$this->merchantAccount = $merchantAccount;
|
45 |
Â
$this->amount->currency = $orderCurrencyCode;
|
46 |
-
$this->amount->value =
|
47 |
Â
|
48 |
Â
//shopper data
|
49 |
Â
$customerEmail = $order->getCustomerEmail();
|
39 |
Â
$incrementId = $order->getIncrementId();
|
40 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
41 |
Â
$customerId = $order->getCustomerId();
|
42 |
+
$currency = $order->getOrderCurrencyCode();
|
43 |
Â
|
44 |
Â
$this->reference = $incrementId;
|
45 |
Â
$this->merchantAccount = $merchantAccount;
|
46 |
Â
$this->amount->currency = $orderCurrencyCode;
|
47 |
+
$this->amount->value = Mage::helper('adyen')->formatAmount($amount, $currency);
|
48 |
Â
|
49 |
Â
//shopper data
|
50 |
Â
$customerEmail = $order->getCustomerEmail();
|
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Adyen_Data_Installments extends Adyen_Payment_Model_Adyen_Data_Abstract {
|
29 |
+
|
30 |
+
public $value;
|
31 |
+
|
32 |
+
}
|
@@ -36,10 +36,11 @@ class Adyen_Payment_Model_Adyen_Data_InvoiceRow extends Adyen_Payment_Model_Adye
|
|
36 |
Â
public $vatCategory;
|
37 |
Â
|
38 |
Â
public function create($item, $count, $order) {
|
39 |
-
$
|
Â
|
|
40 |
Â
$this->description = $item->getName();
|
41 |
-
$this->itemPrice =
|
42 |
-
$this->itemVAT =
|
43 |
Â
$this->lineReference = $count;
|
44 |
Â
$this->numberOfItems = (int) $item->getQtyOrdered();
|
45 |
Â
$this->vatCategory = "None";
|
36 |
Â
public $vatCategory;
|
37 |
Â
|
38 |
Â
public function create($item, $count, $order) {
|
39 |
+
$currency = $order->getOrderCurrencyCode();
|
40 |
+
$this->currency = $currency;
|
41 |
Â
$this->description = $item->getName();
|
42 |
+
$this->itemPrice = Mage::helper('adyen')->formatAmount($item->getPrice(), $currency);
|
43 |
+
$this->itemVAT = Mage::helper('adyen')->formatAmount(($item->getTaxAmount()>0 && $item->getPriceInclTax()>0)?$item->getPriceInclTax() - $item->getPrice():$item->getTaxAmount(), $currency);
|
44 |
Â
$this->lineReference = $count;
|
45 |
Â
$this->numberOfItems = (int) $item->getQtyOrdered();
|
46 |
Â
$this->vatCategory = "None";
|
@@ -33,16 +33,16 @@ class Adyen_Payment_Model_Adyen_Data_ModificationRequest extends Adyen_Payment_M
|
|
33 |
Â
public $modificationAmount;
|
34 |
Â
public $originalReference;
|
35 |
Â
|
36 |
-
public function __construct() {
|
37 |
-
$this->modificationAmount = new Adyen_Payment_Model_Adyen_Data_Amount();
|
38 |
-
}
|
39 |
-
|
40 |
Â
public function create(Varien_Object $payment, $amount, $order, $merchantAccount, $pspReference = null) {
|
Â
|
|
41 |
Â
$this->anyType2anyTypeMap = null;
|
42 |
Â
$this->authorisationCode = null;
|
43 |
Â
$this->merchantAccount = $merchantAccount;
|
44 |
-
|
45 |
-
|
Â
|
|
Â
|
|
Â
|
|
46 |
Â
$this->originalReference = $pspReference;
|
47 |
Â
return $this;
|
48 |
Â
}
|
33 |
Â
public $modificationAmount;
|
34 |
Â
public $originalReference;
|
35 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
36 |
Â
public function create(Varien_Object $payment, $amount, $order, $merchantAccount, $pspReference = null) {
|
37 |
+
$currency = $order->getOrderCurrencyCode();
|
38 |
Â
$this->anyType2anyTypeMap = null;
|
39 |
Â
$this->authorisationCode = null;
|
40 |
Â
$this->merchantAccount = $merchantAccount;
|
41 |
+
if($amount) {
|
42 |
+
$this->modificationAmount = new Adyen_Payment_Model_Adyen_Data_Amount();
|
43 |
+
$this->modificationAmount->value = Mage::helper('adyen')->formatAmount($amount, $currency);
|
44 |
+
$this->modificationAmount->currency = $currency;
|
45 |
+
}
|
46 |
Â
$this->originalReference = $pspReference;
|
47 |
Â
return $this;
|
48 |
Â
}
|
@@ -31,11 +31,11 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
31 |
Â
|
32 |
Â
public function create($request) {
|
33 |
Â
$incrementId = $request->request->reference;
|
34 |
-
|
35 |
Â
//amaount negative
|
36 |
Â
$amount = (float)$request->request->amount->value / 100;
|
37 |
-
$isRefund = ($amount <= 0 ) ? true : false;
|
38 |
-
|
39 |
Â
if (empty($incrementId))
|
40 |
Â
return false;
|
41 |
Â
$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
|
@@ -48,9 +48,9 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
48 |
Â
$lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($item, $count, $order );
|
49 |
Â
$count++;
|
50 |
Â
}
|
51 |
-
|
52 |
Â
//discount cost
|
53 |
-
if($order->getDiscountAmount() > 0)
|
54 |
Â
{
|
55 |
Â
$cost = new Varien_Object();
|
56 |
Â
$cost->setName(Mage::helper('adyen')->__('Total Discount'));
|
@@ -59,7 +59,7 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
59 |
Â
$lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($cost, $count, $order);
|
60 |
Â
$count++;
|
61 |
Â
}
|
62 |
-
|
63 |
Â
//shipping cost
|
64 |
Â
if($order->getShippingAmount() > 0 || $order->getShippingTaxAmount() > 0)
|
65 |
Â
{
|
@@ -72,6 +72,15 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
72 |
Â
$count++;
|
73 |
Â
}
|
74 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
75 |
Â
// Klarna wants tax cost provided in the lines of the products so overal tax cost is not needed anymore
|
76 |
Â
// $cost = new Varien_Object();
|
77 |
Â
// $cost->setName(Mage::helper('adyen')->__('Tax'));
|
@@ -79,15 +88,15 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
79 |
Â
// $cost->setQtyOrdered(1);
|
80 |
Â
// $lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($cost, $count, $order);
|
81 |
Â
// $count++;
|
82 |
-
|
83 |
Â
/**
|
84 |
Â
* Refund line, heads up $lines is overwritten!
|
85 |
Â
*/
|
86 |
-
if ($isRefund === true) {
|
87 |
Â
$refundLine = $this->extractRefundLine($order, $amount);
|
88 |
-
$lines = Mage::getModel('adyen/adyen_data_invoiceRow')->create($refundLine, $count, $order);
|
89 |
Â
}
|
90 |
-
|
91 |
Â
//all lines
|
92 |
Â
$InvoiceLine = Mage::getModel('adyen/adyen_data_invoiceLine')->create($lines);
|
93 |
Â
@$this->result->lines = $InvoiceLine;
|
@@ -97,15 +106,15 @@ class Adyen_Payment_Model_Adyen_Data_OpenInvoiceDetailResult extends Adyen_Payme
|
|
97 |
Â
|
98 |
Â
return $this;
|
99 |
Â
}
|
100 |
-
|
101 |
Â
public function extractRefundLine($order , $amount) {
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
Â
return $_extract;
|
108 |
-
|
109 |
Â
}
|
110 |
Â
|
111 |
Â
}
|
31 |
Â
|
32 |
Â
public function create($request) {
|
33 |
Â
$incrementId = $request->request->reference;
|
34 |
+
|
35 |
Â
//amaount negative
|
36 |
Â
$amount = (float)$request->request->amount->value / 100;
|
37 |
+
$isRefund = ($amount <= 0 ) ? true : false;
|
38 |
+
|
39 |
Â
if (empty($incrementId))
|
40 |
Â
return false;
|
41 |
Â
$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
|
48 |
Â
$lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($item, $count, $order );
|
49 |
Â
$count++;
|
50 |
Â
}
|
51 |
+
|
52 |
Â
//discount cost
|
53 |
+
if($order->getDiscountAmount() > 0 || $order->getDiscountAmount() < 0)
|
54 |
Â
{
|
55 |
Â
$cost = new Varien_Object();
|
56 |
Â
$cost->setName(Mage::helper('adyen')->__('Total Discount'));
|
59 |
Â
$lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($cost, $count, $order);
|
60 |
Â
$count++;
|
61 |
Â
}
|
62 |
+
|
63 |
Â
//shipping cost
|
64 |
Â
if($order->getShippingAmount() > 0 || $order->getShippingTaxAmount() > 0)
|
65 |
Â
{
|
72 |
Â
$count++;
|
73 |
Â
}
|
74 |
Â
|
75 |
+
if($order->getPaymentFeeAmount() > 0) {
|
76 |
+
$cost = new Varien_Object();
|
77 |
+
$cost->setName(Mage::helper('adyen')->__('Payment Fee'));
|
78 |
+
$cost->setPrice($order->getPaymentFeeAmount());
|
79 |
+
$cost->setQtyOrdered(1);
|
80 |
+
$lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($cost, $count, $order);
|
81 |
+
$count++;
|
82 |
+
}
|
83 |
+
|
84 |
Â
// Klarna wants tax cost provided in the lines of the products so overal tax cost is not needed anymore
|
85 |
Â
// $cost = new Varien_Object();
|
86 |
Â
// $cost->setName(Mage::helper('adyen')->__('Tax'));
|
88 |
Â
// $cost->setQtyOrdered(1);
|
89 |
Â
// $lines[] = Mage::getModel('adyen/adyen_data_invoiceRow')->create($cost, $count, $order);
|
90 |
Â
// $count++;
|
91 |
+
|
92 |
Â
/**
|
93 |
Â
* Refund line, heads up $lines is overwritten!
|
94 |
Â
*/
|
95 |
+
if ($isRefund === true) {
|
96 |
Â
$refundLine = $this->extractRefundLine($order, $amount);
|
97 |
+
$lines = Mage::getModel('adyen/adyen_data_invoiceRow')->create($refundLine, $count, $order);
|
98 |
Â
}
|
99 |
+
|
100 |
Â
//all lines
|
101 |
Â
$InvoiceLine = Mage::getModel('adyen/adyen_data_invoiceLine')->create($lines);
|
102 |
Â
@$this->result->lines = $InvoiceLine;
|
106 |
Â
|
107 |
Â
return $this;
|
108 |
Â
}
|
109 |
+
|
110 |
Â
public function extractRefundLine($order , $amount) {
|
111 |
+
$_extract = new Varien_Object();
|
112 |
+
$_extract->setName('Refund / Correction');
|
113 |
+
$_extract->setPrice($amount);
|
114 |
+
$_extract->setTaxAmount(0);
|
115 |
+
$_extract->setQtyOrdered(1);
|
116 |
Â
return $_extract;
|
117 |
+
|
118 |
Â
}
|
119 |
Â
|
120 |
Â
}
|
@@ -53,6 +53,7 @@ class Adyen_Payment_Model_Adyen_Data_PaymentRequest extends Adyen_Payment_Model_
|
|
53 |
Â
// added for boleto
|
54 |
Â
public $shopperName;
|
55 |
Â
public $socialSecurityNumber;
|
Â
|
|
56 |
Â
|
57 |
Â
public function __construct() {
|
58 |
Â
$this->browserInfo = new Adyen_Payment_Model_Adyen_Data_BrowserInfo();
|
@@ -61,25 +62,34 @@ class Adyen_Payment_Model_Adyen_Data_PaymentRequest extends Adyen_Payment_Model_
|
|
61 |
Â
$this->elv = new Adyen_Payment_Model_Adyen_Data_Elv();
|
62 |
Â
$this->additionalData = new Adyen_Payment_Model_Adyen_Data_AdditionalData();
|
63 |
Â
$this->shopperName = new Adyen_Payment_Model_Adyen_Data_ShopperName(); // for boleto
|
Â
|
|
64 |
Â
}
|
65 |
Â
|
66 |
-
public function create(Varien_Object $payment, $amount, $order, $paymentMethod = null, $merchantAccount = null) {
|
67 |
Â
$incrementId = $order->getIncrementId();
|
68 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
Â
|
|
Â
|
|
69 |
Â
$customerId = $order->getCustomerId();
|
Â
|
|
70 |
Â
|
71 |
Â
$this->reference = $incrementId;
|
72 |
Â
$this->merchantAccount = $merchantAccount;
|
73 |
Â
$this->amount->currency = $orderCurrencyCode;
|
74 |
-
$this->amount->value =
|
75 |
Â
|
76 |
Â
//shopper data
|
77 |
Â
$customerEmail = $order->getCustomerEmail();
|
78 |
Â
$this->shopperEmail = $customerEmail;
|
79 |
Â
$this->shopperIP = $order->getRemoteIp();
|
80 |
-
$this->shopperReference = $customerId;
|
81 |
-
|
82 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
83 |
Â
/**
|
84 |
Â
* Browser info
|
85 |
Â
* @var unknown_type
|
@@ -92,6 +102,7 @@ class Adyen_Payment_Model_Adyen_Data_PaymentRequest extends Adyen_Payment_Model_
|
|
92 |
Â
$elv = unserialize($payment->getPoNumber());
|
93 |
Â
$this->card = null;
|
94 |
Â
$this->shopperName = null;
|
Â
|
|
95 |
Â
$this->elv->accountHolderName = $elv['account_owner'];
|
96 |
Â
$this->elv->bankAccountNumber = $elv['account_number'];
|
97 |
Â
$this->elv->bankLocation = $elv['bank_location'];
|
@@ -99,10 +110,32 @@ class Adyen_Payment_Model_Adyen_Data_PaymentRequest extends Adyen_Payment_Model_
|
|
99 |
Â
$this->elv->bankName = $elv['bank_name'];
|
100 |
Â
break;
|
101 |
Â
case "cc":
|
102 |
-
|
Â
|
|
Â
|
|
103 |
Â
$this->elv = null;
|
104 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
105 |
Â
if (Mage::getModel('adyen/adyen_cc')->isCseEnabled()) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
106 |
Â
$this->card = null;
|
107 |
Â
$kv = new Adyen_Payment_Model_Adyen_Data_AdditionalDataKVPair();
|
108 |
Â
$kv->key = new SoapVar("card.encrypted.json", XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
|
@@ -110,33 +143,55 @@ class Adyen_Payment_Model_Adyen_Data_PaymentRequest extends Adyen_Payment_Model_
|
|
110 |
Â
$this->additionalData->entry = $kv;
|
111 |
Â
}
|
112 |
Â
else {
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
118 |
Â
}
|
119 |
-
|
120 |
Â
// installments
|
121 |
-
if(Mage::helper('adyen/installments')->isInstallmentsEnabled()){
|
122 |
-
$
|
123 |
-
$
|
124 |
-
$kv->value = new SoapVar($payment->getPoNumber(), XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
|
125 |
-
$this->additionalData->entry = $kv;
|
126 |
Â
}
|
127 |
Â
break;
|
128 |
Â
case "boleto":
|
129 |
Â
$boleto = unserialize($payment->getPoNumber());
|
130 |
Â
$this->card = null;
|
131 |
Â
$this->elv = null;
|
Â
|
|
132 |
Â
$this->socialSecurityNumber = $boleto['social_security_number'];
|
133 |
Â
$this->selectedBrand = $boleto['selected_brand'];
|
134 |
Â
$this->shopperName->firstName = $boleto['firstname'];
|
135 |
Â
$this->shopperName->lastName = $boleto['lastname'];
|
136 |
Â
$this->deliveryDate = $boleto['delivery_date'];
|
137 |
Â
break;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
138 |
Â
}
|
139 |
-
|
140 |
Â
return $this;
|
141 |
Â
}
|
142 |
Â
|
53 |
Â
// added for boleto
|
54 |
Â
public $shopperName;
|
55 |
Â
public $socialSecurityNumber;
|
56 |
+
const GUEST_ID = 'customer_';
|
57 |
Â
|
58 |
Â
public function __construct() {
|
59 |
Â
$this->browserInfo = new Adyen_Payment_Model_Adyen_Data_BrowserInfo();
|
62 |
Â
$this->elv = new Adyen_Payment_Model_Adyen_Data_Elv();
|
63 |
Â
$this->additionalData = new Adyen_Payment_Model_Adyen_Data_AdditionalData();
|
64 |
Â
$this->shopperName = new Adyen_Payment_Model_Adyen_Data_ShopperName(); // for boleto
|
65 |
+
$this->bankAccount = new Adyen_Payment_Model_Adyen_Data_BankAccount(); // for SEPA
|
66 |
Â
}
|
67 |
Â
|
68 |
+
public function create(Varien_Object $payment, $amount, $order, $paymentMethod = null, $merchantAccount = null, $recurringType = null, $enableMoto = null) {
|
69 |
Â
$incrementId = $order->getIncrementId();
|
70 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
71 |
+
// override amount because this amount uses the right currency
|
72 |
+
$amount = $order->getGrandTotal();
|
73 |
Â
$customerId = $order->getCustomerId();
|
74 |
+
$realOrderId = $order->getRealOrderId();
|
75 |
Â
|
76 |
Â
$this->reference = $incrementId;
|
77 |
Â
$this->merchantAccount = $merchantAccount;
|
78 |
Â
$this->amount->currency = $orderCurrencyCode;
|
79 |
+
$this->amount->value = Mage::helper('adyen')->formatAmount($amount, $orderCurrencyCode);
|
80 |
Â
|
81 |
Â
//shopper data
|
82 |
Â
$customerEmail = $order->getCustomerEmail();
|
83 |
Â
$this->shopperEmail = $customerEmail;
|
84 |
Â
$this->shopperIP = $order->getRemoteIp();
|
85 |
+
$this->shopperReference = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
|
86 |
+
|
87 |
+
// add recurring type for oneclick and recurring
|
88 |
+
if($recurringType) {
|
89 |
+
$this->recurring = new Adyen_Payment_Model_Adyen_Data_Recurring();
|
90 |
+
$this->recurring->contract = $recurringType;
|
91 |
+
}
|
92 |
+
|
93 |
Â
/**
|
94 |
Â
* Browser info
|
95 |
Â
* @var unknown_type
|
102 |
Â
$elv = unserialize($payment->getPoNumber());
|
103 |
Â
$this->card = null;
|
104 |
Â
$this->shopperName = null;
|
105 |
+
$this->bankAccount = null;
|
106 |
Â
$this->elv->accountHolderName = $elv['account_owner'];
|
107 |
Â
$this->elv->bankAccountNumber = $elv['account_number'];
|
108 |
Â
$this->elv->bankLocation = $elv['bank_location'];
|
110 |
Â
$this->elv->bankName = $elv['bank_name'];
|
111 |
Â
break;
|
112 |
Â
case "cc":
|
113 |
+
case "oneclick":
|
114 |
+
|
115 |
+
$this->shopperName = null;
|
116 |
Â
$this->elv = null;
|
117 |
+
$this->bankAccount = null;
|
118 |
+
|
119 |
+
$recurringDetailReference = $payment->getAdditionalInformation("recurring_detail_reference");
|
120 |
+
|
121 |
+
// set shopperInteraction
|
122 |
+
if($recurringType == "RECURRING") {
|
123 |
+
$this->shopperInteraction = "ContAuth";
|
124 |
+
} else {
|
125 |
+
$this->shopperInteraction = "Ecommerce";
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
if(Mage::app()->getStore()->isAdmin() && $enableMoto != null && $enableMoto == 1) {
|
130 |
+
$this->shopperInteraction = "Moto";
|
131 |
+
}
|
132 |
+
|
133 |
Â
if (Mage::getModel('adyen/adyen_cc')->isCseEnabled()) {
|
134 |
+
|
135 |
+
if($recurringDetailReference && $recurringDetailReference != "") {
|
136 |
+
$this->selectedRecurringDetailReference = $recurringDetailReference;
|
137 |
+
}
|
138 |
+
|
139 |
Â
$this->card = null;
|
140 |
Â
$kv = new Adyen_Payment_Model_Adyen_Data_AdditionalDataKVPair();
|
141 |
Â
$kv->key = new SoapVar("card.encrypted.json", XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
|
143 |
Â
$this->additionalData->entry = $kv;
|
144 |
Â
}
|
145 |
Â
else {
|
146 |
+
|
147 |
+
if($recurringDetailReference && $recurringDetailReference != "") {
|
148 |
+
$this->selectedRecurringDetailReference = $recurringDetailReference;
|
149 |
+
|
150 |
+
if($recurringType != "RECURRING") {
|
151 |
+
$this->card->cvc = $payment->getCcCid();
|
152 |
+
}
|
153 |
+
|
154 |
+
// TODO: check if expirymonth and year is changed if so add this in the card object
|
155 |
+
$this->card->expiryMonth = $payment->getCcExpMonth();
|
156 |
+
$this->card->expiryYear = $payment->getCcExpYear();
|
157 |
+
|
158 |
+
} else {
|
159 |
+
$this->card->cvc = $payment->getCcCid();
|
160 |
+
$this->card->expiryMonth = $payment->getCcExpMonth();
|
161 |
+
$this->card->expiryYear = $payment->getCcExpYear();
|
162 |
+
$this->card->holderName = $payment->getCcOwner();
|
163 |
+
$this->card->number = $payment->getCcNumber();
|
164 |
+
}
|
165 |
Â
}
|
166 |
+
|
167 |
Â
// installments
|
168 |
+
if(Mage::helper('adyen/installments')->isInstallmentsEnabled() && $payment->getAdditionalInformation('number_of_installments') > 0){
|
169 |
+
$this->installments = new Adyen_Payment_Model_Adyen_Data_Installments();
|
170 |
+
$this->installments->value = $payment->getAdditionalInformation('number_of_installments');
|
Â
|
|
Â
|
|
171 |
Â
}
|
172 |
Â
break;
|
173 |
Â
case "boleto":
|
174 |
Â
$boleto = unserialize($payment->getPoNumber());
|
175 |
Â
$this->card = null;
|
176 |
Â
$this->elv = null;
|
177 |
+
$this->bankAccount = null;
|
178 |
Â
$this->socialSecurityNumber = $boleto['social_security_number'];
|
179 |
Â
$this->selectedBrand = $boleto['selected_brand'];
|
180 |
Â
$this->shopperName->firstName = $boleto['firstname'];
|
181 |
Â
$this->shopperName->lastName = $boleto['lastname'];
|
182 |
Â
$this->deliveryDate = $boleto['delivery_date'];
|
183 |
Â
break;
|
184 |
+
case "sepa":
|
185 |
+
$sepa = unserialize($payment->getPoNumber());
|
186 |
+
$this->card = null;
|
187 |
+
$this->elv = null;
|
188 |
+
$this->shopperName = null;
|
189 |
+
$this->bankAccount->iban = $sepa['iban'];
|
190 |
+
$this->bankAccount->ownerName = $sepa['account_name'];
|
191 |
+
$this->bankAccount->countryCode = $sepa['country'];
|
192 |
+
$this->selectedBrand = "sepadirectdebit";
|
193 |
+
break;
|
194 |
Â
}
|
Â
|
|
195 |
Â
return $this;
|
196 |
Â
}
|
197 |
Â
|
@@ -30,7 +30,4 @@ class Adyen_Payment_Model_Adyen_Data_Recurring extends Adyen_Payment_Model_Adyen
|
|
30 |
Â
public $contract;
|
31 |
Â
public $recurringDetailName = null;
|
32 |
Â
|
33 |
-
public function __construct() {
|
34 |
-
$this->contract = $this->_getConfigData('recurringtypes', 'adyen_abstract');
|
35 |
-
}
|
36 |
Â
}
|
30 |
Â
public $contract;
|
31 |
Â
public $recurringDetailName = null;
|
32 |
Â
|
Â
|
|
Â
|
|
Â
|
|
33 |
Â
}
|
@@ -1,437 +1,473 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Adyen Payment Module
|
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 |
-
* @category Adyen
|
17 |
-
* @package Adyen_Payment
|
18 |
-
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
-
*/
|
21 |
-
/**
|
22 |
-
* @category Payment Gateway
|
23 |
-
* @package Adyen_Payment
|
24 |
-
* @author Adyen
|
25 |
-
* @property Adyen B.V
|
26 |
-
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
-
*/
|
28 |
-
class Adyen_Payment_Model_Adyen_Hpp extends Adyen_Payment_Model_Adyen_Abstract {
|
29 |
-
/**
|
30 |
-
* @var DUMMY_EMAIL used when email is empty
|
31 |
-
*/
|
32 |
-
const DUMMY_EMAIL = 'dummy@dummy.com';
|
33 |
-
/**
|
34 |
-
* @var GUEST_ID , used when order is placed by guests
|
35 |
-
*/
|
36 |
-
const GUEST_ID = 'customer_';
|
37 |
-
|
38 |
-
protected $_canUseInternal = false;
|
39 |
-
protected $_code = 'adyen_hpp';
|
40 |
-
protected $_formBlockType = 'adyen/form_hpp';
|
41 |
-
protected $_infoBlockType = 'adyen/info_hpp';
|
42 |
-
protected $_paymentMethod = 'hpp';
|
43 |
-
protected $_testModificationUrl = 'https://pal-test.adyen.com/pal/adapter/httppost';
|
44 |
-
protected $_liveModificationUrl = 'https://pal-live.adyen.com/pal/adapter/httppost';
|
45 |
-
|
46 |
-
/**
|
47 |
-
* @desc Get checkout session namespace
|
48 |
-
*
|
49 |
-
* @return Mage_Checkout_Model_Session
|
50 |
-
*/
|
51 |
-
public function getCheckout() {
|
52 |
-
return Mage::getSingleton('checkout/session');
|
53 |
-
}
|
54 |
-
|
55 |
-
public function assignData($data) {
|
56 |
-
if (!($data instanceof Varien_Object)) {
|
57 |
-
$data = new Varien_Object($data);
|
58 |
-
}
|
59 |
-
$info = $this->getInfoInstance();
|
60 |
-
$hppType = $data->getHppType();
|
61 |
-
$info->setCcType($hppType)
|
62 |
-
|
63 |
-
$config = Mage::getStoreConfig("payment/adyen_hpp/disable_hpptypes");
|
64 |
-
if (empty($hppType) && empty($config)) {
|
65 |
-
Mage::throwException(Mage::helper('adyen')->__('Payment Method is complusory in order to process your payment'));
|
66 |
-
}
|
67 |
-
return $this;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* @desc Called just after asssign data
|
72 |
-
*/
|
73 |
-
public function prepareSave() {
|
74 |
-
parent::prepareSave();
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* @desc Get current quote
|
79 |
-
*
|
80 |
-
* @return Mage_Sales_Model_Quote
|
81 |
-
*/
|
82 |
-
public function getQuote() {
|
83 |
-
return $this->getCheckout()->getQuote();
|
84 |
-
}
|
85 |
-
|
86 |
-
public function getOrderPlaceRedirectUrl() {
|
87 |
-
return Mage::getUrl('adyen/process/redirect');
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* @desc prepare params array to send it to gateway page via POST
|
92 |
-
* @return array
|
93 |
-
*/
|
94 |
-
public function getFormFields() {
|
95 |
-
$this->_initOrder();
|
96 |
-
$order = $this->_order;
|
97 |
-
$realOrderId = $order->getRealOrderId();
|
98 |
-
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
99 |
-
$skinCode = trim($this->_getConfigData('skinCode', 'adyen_hpp'));
|
100 |
-
$amount =
|
101 |
-
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
102 |
-
$customerEmail = $order->getCustomerEmail();
|
103 |
-
$shopperEmail = (!empty($customerEmail)) ? $customerEmail : self::DUMMY_EMAIL;
|
104 |
-
$customerId = $order->getCustomerId();
|
105 |
-
$shopperIP = $order->getRemoteIp();
|
106 |
-
$browserInfo = $_SERVER['HTTP_USER_AGENT'];
|
107 |
-
$shopperLocale = trim($this->_getConfigData('shopperlocale'));
|
108 |
-
$shopperLocale = (!empty($shopperLocale)) ? $shopperLocale : Mage::app()->getLocale()->getLocaleCode();
|
109 |
-
$countryCode = trim($this->_getConfigData('countryCode'));
|
110 |
-
$countryCode = (!empty($countryCode)) ? $countryCode : false;
|
111 |
-
|
112 |
-
|
113 |
-
// if directory lookup is enabled use the billingadress as countrycode
|
114 |
-
if($countryCode == false) {
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
$adyFields = array();
|
121 |
-
$deliveryDays = (int) $this->_getConfigData('delivery_days', 'adyen_hpp');
|
122 |
-
$deliveryDays = (!empty($deliveryDays)) ? $deliveryDays : 55;
|
123 |
-
$adyFields['merchantAccount'] = $merchantAccount;
|
124 |
-
$adyFields['merchantReference'] = $realOrderId;
|
125 |
-
$adyFields['paymentAmount'] = $amount;
|
126 |
-
$adyFields['currencyCode'] = $orderCurrencyCode;
|
127 |
-
$adyFields['shipBeforeDate'] = date("Y-m-d", mktime(date("H"), date("i"), date("s"), date("m"), date("j") + $deliveryDays, date("Y")));
|
128 |
-
$adyFields['skinCode'] = $skinCode;
|
129 |
-
$adyFields['shopperLocale'] = $shopperLocale;
|
130 |
-
$adyFields['countryCode'] = $countryCode;
|
131 |
-
$adyFields['shopperIP'] = $shopperIP;
|
132 |
-
$adyFields['browserInfo'] = $browserInfo;
|
133 |
-
|
134 |
-
//order data
|
135 |
-
$items = $order->getAllItems();
|
136 |
-
$shipmentAmount = number_format($order->getShippingAmount() + $order->getShippingTaxAmount(), 2, ',', ' ');
|
137 |
-
$prodDetails = Mage::helper('adyen')->__('Shipment cost: %s %s <br />', $shipmentAmount, $orderCurrencyCode);
|
138 |
-
$prodDetails .= Mage::helper('adyen')->__('Order rows: <br />');
|
139 |
-
foreach ($items as $item) {
|
140 |
-
if ($item->getParentItem()) {
|
141 |
-
continue;
|
142 |
-
}
|
143 |
-
$name = $item->getName();
|
144 |
-
$qtyOrdered = $this->
|
145 |
-
$rowTotal = number_format($item->getRowTotalInclTax(), 2, ',', ' ');
|
146 |
-
$prodDetails .= Mage::helper('adyen')->__('%s ( Qty: %s ) (Price: %s %s ) <br />', $name, $qtyOrdered, $rowTotal, $orderCurrencyCode);
|
147 |
-
}
|
148 |
-
$adyFields['orderData'] = base64_encode(gzencode($prodDetails)); //depreacated by Adyen
|
149 |
-
$adyFields['sessionValidity'] = date(DATE_ATOM, mktime(date("H") + 1, date("i"), date("s"), date("m"), date("j"), date("Y")));
|
150 |
-
$adyFields['shopperEmail'] = $shopperEmail;
|
151 |
-
|
152 |
-
// recurring
|
153 |
-
$recurringType = trim($this->_getConfigData('recurringtypes', 'adyen_abstract'));
|
154 |
-
$adyFields['recurringContract'] = $recurringType;
|
155 |
-
$adyFields['shopperReference'] = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
|
156 |
-
|
157 |
-
//blocked methods
|
158 |
-
$adyFields['blockedMethods'] = "";
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
$
|
190 |
-
$
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
$
|
201 |
-
$adyFields['
|
202 |
-
$adyFields['
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
//
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
if ($paymentRoutine == 'single' && empty($brandCode)) {
|
253 |
-
$url = 'https://
|
254 |
-
} else {
|
255 |
-
$url = (empty($brandCode)) ?
|
256 |
-
|
257 |
-
|
258 |
-
}
|
259 |
-
break;
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
public function
|
285 |
-
|
286 |
-
}
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
$
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
$
|
341 |
-
|
342 |
-
$
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
$
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Adyen_Hpp extends Adyen_Payment_Model_Adyen_Abstract {
|
29 |
+
/**
|
30 |
+
* @var DUMMY_EMAIL used when email is empty
|
31 |
+
*/
|
32 |
+
const DUMMY_EMAIL = 'dummy@dummy.com';
|
33 |
+
/**
|
34 |
+
* @var GUEST_ID , used when order is placed by guests
|
35 |
+
*/
|
36 |
+
const GUEST_ID = 'customer_';
|
37 |
+
|
38 |
+
protected $_canUseInternal = false;
|
39 |
+
protected $_code = 'adyen_hpp';
|
40 |
+
protected $_formBlockType = 'adyen/form_hpp';
|
41 |
+
protected $_infoBlockType = 'adyen/info_hpp';
|
42 |
+
protected $_paymentMethod = 'hpp';
|
43 |
+
protected $_testModificationUrl = 'https://pal-test.adyen.com/pal/adapter/httppost';
|
44 |
+
protected $_liveModificationUrl = 'https://pal-live.adyen.com/pal/adapter/httppost';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @desc Get checkout session namespace
|
48 |
+
*
|
49 |
+
* @return Mage_Checkout_Model_Session
|
50 |
+
*/
|
51 |
+
public function getCheckout() {
|
52 |
+
return Mage::getSingleton('checkout/session');
|
53 |
+
}
|
54 |
+
|
55 |
+
public function assignData($data) {
|
56 |
+
if (!($data instanceof Varien_Object)) {
|
57 |
+
$data = new Varien_Object($data);
|
58 |
+
}
|
59 |
+
$info = $this->getInfoInstance();
|
60 |
+
$hppType = $data->getHppType();
|
61 |
+
$info->setCcType($hppType)
|
62 |
+
->setPoNumber($data->getData('hpp_ideal_type')); /* @note misused field */
|
63 |
+
$config = Mage::getStoreConfig("payment/adyen_hpp/disable_hpptypes");
|
64 |
+
if (empty($hppType) && empty($config)) {
|
65 |
+
Mage::throwException(Mage::helper('adyen')->__('Payment Method is complusory in order to process your payment'));
|
66 |
+
}
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @desc Called just after asssign data
|
72 |
+
*/
|
73 |
+
public function prepareSave() {
|
74 |
+
parent::prepareSave();
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @desc Get current quote
|
79 |
+
*
|
80 |
+
* @return Mage_Sales_Model_Quote
|
81 |
+
*/
|
82 |
+
public function getQuote() {
|
83 |
+
return $this->getCheckout()->getQuote();
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getOrderPlaceRedirectUrl() {
|
87 |
+
return Mage::getUrl('adyen/process/redirect');
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @desc prepare params array to send it to gateway page via POST
|
92 |
+
* @return array
|
93 |
+
*/
|
94 |
+
public function getFormFields() {
|
95 |
+
$this->_initOrder();
|
96 |
+
$order = $this->_order;
|
97 |
+
$realOrderId = $order->getRealOrderId();
|
98 |
+
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
99 |
+
$skinCode = trim($this->_getConfigData('skinCode', 'adyen_hpp'));
|
100 |
+
$amount = Mage::helper('adyen')->formatAmount($order->getGrandTotal(), $orderCurrencyCode);
|
101 |
+
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
102 |
+
$customerEmail = $order->getCustomerEmail();
|
103 |
+
$shopperEmail = (!empty($customerEmail)) ? $customerEmail : self::DUMMY_EMAIL;
|
104 |
+
$customerId = $order->getCustomerId();
|
105 |
+
$shopperIP = $order->getRemoteIp();
|
106 |
+
$browserInfo = $_SERVER['HTTP_USER_AGENT'];
|
107 |
+
$shopperLocale = trim($this->_getConfigData('shopperlocale'));
|
108 |
+
$shopperLocale = (!empty($shopperLocale)) ? $shopperLocale : Mage::app()->getLocale()->getLocaleCode();
|
109 |
+
$countryCode = trim($this->_getConfigData('countryCode'));
|
110 |
+
$countryCode = (!empty($countryCode)) ? $countryCode : false;
|
111 |
+
|
112 |
+
|
113 |
+
// if directory lookup is enabled use the billingadress as countrycode
|
114 |
+
if($countryCode == false) {
|
115 |
+
if(is_object($order->getBillingAddress()) && $order->getBillingAddress()->getCountry() != "") {
|
116 |
+
$countryCode = $order->getBillingAddress()->getCountry();
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
$adyFields = array();
|
121 |
+
$deliveryDays = (int) $this->_getConfigData('delivery_days', 'adyen_hpp');
|
122 |
+
$deliveryDays = (!empty($deliveryDays)) ? $deliveryDays : 55;
|
123 |
+
$adyFields['merchantAccount'] = $merchantAccount;
|
124 |
+
$adyFields['merchantReference'] = $realOrderId;
|
125 |
+
$adyFields['paymentAmount'] = $amount;
|
126 |
+
$adyFields['currencyCode'] = $orderCurrencyCode;
|
127 |
+
$adyFields['shipBeforeDate'] = date("Y-m-d", mktime(date("H"), date("i"), date("s"), date("m"), date("j") + $deliveryDays, date("Y")));
|
128 |
+
$adyFields['skinCode'] = $skinCode;
|
129 |
+
$adyFields['shopperLocale'] = $shopperLocale;
|
130 |
+
$adyFields['countryCode'] = $countryCode;
|
131 |
+
$adyFields['shopperIP'] = $shopperIP;
|
132 |
+
$adyFields['browserInfo'] = $browserInfo;
|
133 |
+
|
134 |
+
//order data
|
135 |
+
$items = $order->getAllItems();
|
136 |
+
$shipmentAmount = number_format($order->getShippingAmount() + $order->getShippingTaxAmount(), 2, ',', ' ');
|
137 |
+
$prodDetails = Mage::helper('adyen')->__('Shipment cost: %s %s <br />', $shipmentAmount, $orderCurrencyCode);
|
138 |
+
$prodDetails .= Mage::helper('adyen')->__('Order rows: <br />');
|
139 |
+
foreach ($items as $item) {
|
140 |
+
if ($item->getParentItem()) {
|
141 |
+
continue;
|
142 |
+
}
|
143 |
+
$name = $item->getName();
|
144 |
+
$qtyOrdered = $this->_numberFormat($item->getQtyOrdered(), '0');
|
145 |
+
$rowTotal = number_format($item->getRowTotalInclTax(), 2, ',', ' ');
|
146 |
+
$prodDetails .= Mage::helper('adyen')->__('%s ( Qty: %s ) (Price: %s %s ) <br />', $name, $qtyOrdered, $rowTotal, $orderCurrencyCode);
|
147 |
+
}
|
148 |
+
$adyFields['orderData'] = base64_encode(gzencode($prodDetails)); //depreacated by Adyen
|
149 |
+
$adyFields['sessionValidity'] = date(DATE_ATOM, mktime(date("H") + 1, date("i"), date("s"), date("m"), date("j"), date("Y")));
|
150 |
+
$adyFields['shopperEmail'] = $shopperEmail;
|
151 |
+
|
152 |
+
// recurring
|
153 |
+
$recurringType = trim($this->_getConfigData('recurringtypes', 'adyen_abstract'));
|
154 |
+
$adyFields['recurringContract'] = $recurringType;
|
155 |
+
$adyFields['shopperReference'] = (!empty($customerId)) ? $customerId : self::GUEST_ID . $realOrderId;
|
156 |
+
|
157 |
+
//blocked methods
|
158 |
+
$adyFields['blockedMethods'] = "";
|
159 |
+
|
160 |
+
$openinvoiceType = $this->_getConfigData('openinvoicetypes', 'adyen_openinvoice');
|
161 |
+
|
162 |
+
if($this->_code == "adyen_openinvoice" || $this->getInfoInstance()->getCcType() == "klarna" || $this->getInfoInstance()->getCcType() == "afterpay_default") {
|
163 |
+
$adyFields['billingAddressType'] = "1";
|
164 |
+
$adyFields['deliveryAddressType'] = "1";
|
165 |
+
$adyFields['shopperType'] = "1";
|
166 |
+
} else {
|
167 |
+
$adyFields['billingAddressType'] = "";
|
168 |
+
$adyFields['deliveryAddressType'] = "";
|
169 |
+
$adyFields['shopperType'] = "";
|
170 |
+
}
|
171 |
+
|
172 |
+
//the data that needs to be signed is a concatenated string of the form data
|
173 |
+
$sign = $adyFields['paymentAmount'] .
|
174 |
+
$adyFields['currencyCode'] .
|
175 |
+
$adyFields['shipBeforeDate'] .
|
176 |
+
$adyFields['merchantReference'] .
|
177 |
+
$adyFields['skinCode'] .
|
178 |
+
$adyFields['merchantAccount'] .
|
179 |
+
$adyFields['sessionValidity'] .
|
180 |
+
$adyFields['shopperEmail'] .
|
181 |
+
$adyFields['shopperReference'] .
|
182 |
+
$adyFields['recurringContract'] .
|
183 |
+
$adyFields['blockedMethods'] .
|
184 |
+
$adyFields['billingAddressType'] .
|
185 |
+
$adyFields['deliveryAddressType'] .
|
186 |
+
$adyFields['shopperType'];
|
187 |
+
|
188 |
+
//Generate HMAC encrypted merchant signature
|
189 |
+
$secretWord = $this->_getSecretWord();
|
190 |
+
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
191 |
+
$adyFields['merchantSig'] = base64_encode(pack('H*', $signMac));
|
192 |
+
|
193 |
+
// get extra fields
|
194 |
+
$adyFields = Mage::getModel('adyen/adyen_openinvoice')->getOptionalFormFields($adyFields,$this->_order);
|
195 |
+
|
196 |
+
//IDEAL
|
197 |
+
if (strpos($this->getInfoInstance()->getCcType(),"ideal") !== false) {
|
198 |
+
$bankData = $this->getInfoInstance()->getPoNumber();
|
199 |
+
if (!empty($bankData)) {
|
200 |
+
$id = explode(DS, $bankData);
|
201 |
+
$adyFields['skipSelection'] = 'true';
|
202 |
+
$adyFields['brandCode'] = $this->getInfoInstance()->getCcType();
|
203 |
+
$adyFields['idealIssuerId'] = $id['0'];
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
|
208 |
+
// if option to put Return Url in request from magento is enabled add this in the request
|
209 |
+
$returnUrlInRequest = $this->_getConfigData('return_url_in_request', 'adyen_hpp');
|
210 |
+
if($returnUrlInRequest){
|
211 |
+
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true)."adyen/process/success";
|
212 |
+
$adyFields['resURL'] = $url;
|
213 |
+
}
|
214 |
+
|
215 |
+
// pos over hpp
|
216 |
+
// disable this because no one using this and it will always show POS payment method
|
217 |
+
// $terminalcode = 'redirect';
|
218 |
+
// $adyFields['pos.serial_number'] = $terminalcode;
|
219 |
+
// // calculate signatature pos
|
220 |
+
// $strsign = "merchantSig:pos.serial_number|" . $adyFields['merchantSig'] . ":" . $terminalcode;
|
221 |
+
// $signPOS = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $strsign);
|
222 |
+
// $adyFields['pos.sig'] = base64_encode(pack('H*', $signPOS));
|
223 |
+
|
224 |
+
Mage::log($adyFields, self::DEBUG_LEVEL, 'http-request.log',true);
|
225 |
+
|
226 |
+
return $adyFields;
|
227 |
+
}
|
228 |
+
|
229 |
+
protected function _getSecretWord($options = null) {
|
230 |
+
switch ($this->getConfigDataDemoMode()) {
|
231 |
+
case true:
|
232 |
+
$secretWord = trim($this->_getConfigData('secret_wordt', 'adyen_hpp'));
|
233 |
+
break;
|
234 |
+
default:
|
235 |
+
$secretWord = trim($this->_getConfigData('secret_wordp', 'adyen_hpp'));
|
236 |
+
break;
|
237 |
+
}
|
238 |
+
return $secretWord;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* @desc Get url of Adyen payment
|
243 |
+
* @return string
|
244 |
+
* @todo add brandCode here
|
245 |
+
*/
|
246 |
+
public function getFormUrl() {
|
247 |
+
$brandCode = $this->getInfoInstance()->getCcType();
|
248 |
+
$paymentRoutine = $this->_getConfigData('payment_routines', 'adyen_hpp');
|
249 |
+
$isConfigDemoMode = $this->getConfigDataDemoMode();
|
250 |
+
switch ($isConfigDemoMode) {
|
251 |
+
case true:
|
252 |
+
if ($paymentRoutine == 'single' && empty($brandCode)) {
|
253 |
+
$url = 'https://test.adyen.com/hpp/pay.shtml';
|
254 |
+
} else {
|
255 |
+
$url = (empty($brandCode)) ?
|
256 |
+
'https://test.adyen.com/hpp/select.shtml' :
|
257 |
+
"https://test.adyen.com/hpp/details.shtml?brandCode=$brandCode";
|
258 |
+
}
|
259 |
+
break;
|
260 |
+
default:
|
261 |
+
if ($paymentRoutine == 'single' && empty($brandCode)) {
|
262 |
+
$url = 'https://live.adyen.com/hpp/pay.shtml';
|
263 |
+
} else {
|
264 |
+
$url = (empty($brandCode)) ?
|
265 |
+
'https://live.adyen.com/hpp/select.shtml' :
|
266 |
+
"https://live.adyen.com/hpp/details.shtml?brandCode=$brandCode";
|
267 |
+
}
|
268 |
+
break;
|
269 |
+
}
|
270 |
+
|
271 |
+
//IDEAL
|
272 |
+
$idealBankUrl = false;
|
273 |
+
$bankData = $this->getInfoInstance()->getPoNumber();
|
274 |
+
if ($brandCode == 'ideal' && !empty($bankData)) {
|
275 |
+
$idealBankUrl = ($isConfigDemoMode == true) ?
|
276 |
+
'https://test.adyen.com/hpp/redirectIdeal.shtml' :
|
277 |
+
'https://live.adyen.com/hpp/redirectIdeal.shtml';
|
278 |
+
}
|
279 |
+
|
280 |
+
|
281 |
+
return (!empty($idealBankUrl)) ? $idealBankUrl : $url;
|
282 |
+
}
|
283 |
+
|
284 |
+
public function getFormName() {
|
285 |
+
return "Adyen HPP";
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Return redirect block type
|
290 |
+
*
|
291 |
+
* @return string
|
292 |
+
*/
|
293 |
+
public function getRedirectBlockType() {
|
294 |
+
return $this->_redirectBlockType;
|
295 |
+
}
|
296 |
+
|
297 |
+
public function isInitializeNeeded() {
|
298 |
+
return true;
|
299 |
+
}
|
300 |
+
|
301 |
+
public function initialize($paymentAction, $stateObject) {
|
302 |
+
$state = Mage_Sales_Model_Order::STATE_NEW;
|
303 |
+
$stateObject->setState($state);
|
304 |
+
$stateObject->setStatus($this->_getConfigData('order_status'));
|
305 |
+
}
|
306 |
+
|
307 |
+
public function getConfigPaymentAction() {
|
308 |
+
return true;
|
309 |
+
}
|
310 |
+
|
311 |
+
|
312 |
+
public function getAvailableHPPTypes() {
|
313 |
+
|
314 |
+
$orderCurrencyCode = Mage::helper('checkout/cart')->getQuote()->getQuoteCurrencyCode();
|
315 |
+
$skinCode = trim($this->_getConfigData('skinCode', 'adyen_hpp'));
|
316 |
+
$merchantAccount = trim($this->_getConfigData('merchantAccount'));
|
317 |
+
$amount = Mage::helper('adyen')->formatAmount(Mage::helper('checkout/cart')->getQuote()->getGrandTotal(), $orderCurrencyCode);
|
318 |
+
$sessionValidity = date(DATE_ATOM, mktime(date("H") + 1, date("i"), date("s"), date("m"), date("j"), date("Y")));
|
319 |
+
$cacheDirectoryLookup = trim($this->_getConfigData('cache_directory_lookup', 'adyen_hpp'));
|
320 |
+
|
321 |
+
|
322 |
+
$countryCode = trim($this->_getConfigData('countryCode'));
|
323 |
+
|
324 |
+
if(empty($countryCode)) {
|
325 |
+
|
326 |
+
// check if billingcountry is filled in
|
327 |
+
if(is_object(Mage::helper('checkout/cart')->getQuote()->getBillingAddress()) && Mage::helper('checkout/cart')->getQuote()->getBillingAddress()->getCountry() != "") {
|
328 |
+
$countryCode = Mage::helper('checkout/cart')->getQuote()->getBillingAddress()->getCountry();
|
329 |
+
} else {
|
330 |
+
$countryCode = ""; // don't set countryCode so you get all the payment methods
|
331 |
+
// You could do ip lookup but availability and performace is not guaranteed
|
332 |
+
// $ip = $this->getClientIp();
|
333 |
+
// $countryCode = file_get_contents('http://api.hostip.info/country.php?ip='.$ip);
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
// check if cache setting is on
|
338 |
+
if($cacheDirectoryLookup) {
|
339 |
+
// cache name has variables merchantAccount, skinCode, currencycode and country code. Amound is not cached because of performance issues
|
340 |
+
$cacheId = 'cache_directory_lookup_request_' . $merchantAccount . "_" . $skinCode . "_" . $orderCurrencyCode . "_" . $countryCode;
|
341 |
+
// check if this request is already cached
|
342 |
+
if (false !== ($data = Mage::app()->getCache()->load($cacheId))) {
|
343 |
+
// return result from cache
|
344 |
+
return unserialize($data);
|
345 |
+
}
|
346 |
+
}
|
347 |
+
// directory lookup to search for available payment methods
|
348 |
+
$adyFields = array(
|
349 |
+
"paymentAmount" => $amount,
|
350 |
+
"currencyCode" => $orderCurrencyCode,
|
351 |
+
"merchantReference" => "Get Payment methods",
|
352 |
+
"skinCode" => $skinCode,
|
353 |
+
"merchantAccount" => $merchantAccount,
|
354 |
+
"sessionValidity" => $sessionValidity,
|
355 |
+
"countryCode" => $countryCode,
|
356 |
+
"shopperLocale" => $countryCode,
|
357 |
+
"merchantSig" => "",
|
358 |
+
);
|
359 |
+
|
360 |
+
$sign = $adyFields['paymentAmount'] .
|
361 |
+
$adyFields['currencyCode'] .
|
362 |
+
$adyFields['merchantReference'] .
|
363 |
+
$adyFields['skinCode'] .
|
364 |
+
$adyFields['merchantAccount'] .
|
365 |
+
$adyFields['sessionValidity'];
|
366 |
+
|
367 |
+
//Generate HMAC encrypted merchant signature
|
368 |
+
$secretWord = $this->_getSecretWord();
|
369 |
+
|
370 |
+
if($secretWord == "") {
|
371 |
+
Mage::throwException(Mage::helper('adyen')->__('You forgot to fill in HMAC key for Test or Live'));
|
372 |
+
}
|
373 |
+
|
374 |
+
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
375 |
+
$adyFields['merchantSig'] = base64_encode(pack('H*', $signMac));
|
376 |
+
|
377 |
+
$ch = curl_init();
|
378 |
+
|
379 |
+
$isConfigDemoMode = $this->getConfigDataDemoMode();
|
380 |
+
if ($isConfigDemoMode)
|
381 |
+
curl_setopt($ch, CURLOPT_URL, "https://test.adyen.com/hpp/directory.shtml");
|
382 |
+
else
|
383 |
+
curl_setopt($ch, CURLOPT_URL, "https://live.adyen.com/hpp/directory.shtml");
|
384 |
+
|
385 |
+
curl_setopt($ch, CURLOPT_HEADER, false);
|
386 |
+
curl_setopt($ch, CURLOPT_POST,count($adyFields));
|
387 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($adyFields));
|
388 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // do not print results if you do curl_exec
|
389 |
+
|
390 |
+
$results = curl_exec($ch);
|
391 |
+
|
392 |
+
if($results === false) {
|
393 |
+
echo "Error: " . curl_error($ch);
|
394 |
+
Mage::log("Payment methods are not available on this merchantaccount\skin result is: " . curl_error($ch), self::DEBUG_LEVEL, 'http-request.log',true);
|
395 |
+
Mage::throwException(Mage::helper('adyen')->__('Payment methods are not available on this merchantaccount\skin'));
|
396 |
+
} else{
|
397 |
+
/**
|
398 |
+
* The $result contains a JSON array containing
|
399 |
+
* the available payment methods for the merchant account.
|
400 |
+
*/
|
401 |
+
$results_json = json_decode($results);
|
402 |
+
|
403 |
+
if($results_json == null) {
|
404 |
+
// no valid json so show the error
|
405 |
+
echo $results;
|
406 |
+
Mage::log("Payment methods are empty on this merchantaccount\skin. results_json is incorrect result is:" . $results_json, self::DEBUG_LEVEL, 'http-request.log',true);
|
407 |
+
Mage::throwException(Mage::helper('adyen')->__('Payment methods are empty on this merchantaccount\skin'));
|
408 |
+
}
|
409 |
+
|
410 |
+
$payment_methods = $results_json->paymentMethods;
|
411 |
+
|
412 |
+
$result_array = array();
|
413 |
+
foreach($payment_methods as $payment_method) {
|
414 |
+
|
415 |
+
// if openinvoice is activated don't show this in HPP options
|
416 |
+
if(Mage::getStoreConfig("payment/adyen_openinvoice/active")) {
|
417 |
+
if(Mage::getStoreConfig("payment/adyen_openinvoice/openinvoicetypes") == $payment_method->brandCode) {
|
418 |
+
continue;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
|
422 |
+
$result_array[$payment_method->brandCode]['name'] = $payment_method->name;
|
423 |
+
|
424 |
+
if(isset($payment_method->issuers)) {
|
425 |
+
// for ideal go through the issuers
|
426 |
+
if(count($payment_method->issuers) > 0)
|
427 |
+
{
|
428 |
+
foreach($payment_method->issuers as $issuer) {
|
429 |
+
$result_array[$payment_method->brandCode]['issuers'][$issuer->issuerId] = $issuer->name;
|
430 |
+
}
|
431 |
+
}
|
432 |
+
ksort($result_array[$payment_method->brandCode]['issuers']); // sort on key
|
433 |
+
}
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
// if cache is on cache this result
|
438 |
+
if($cacheDirectoryLookup) {
|
439 |
+
Mage::app()->getCache()->save(serialize($result_array), $cacheId);
|
440 |
+
}
|
441 |
+
|
442 |
+
return $result_array;
|
443 |
+
}
|
444 |
+
|
445 |
+
public function getHppOptionsDisabled() {
|
446 |
+
return Mage::getStoreConfig("payment/adyen_hpp/disable_hpptypes");
|
447 |
+
}
|
448 |
+
|
449 |
+
// Function to get the client ip address
|
450 |
+
public function getClientIp() {
|
451 |
+
|
452 |
+
$ipaddress = '';
|
453 |
+
|
454 |
+
if (isset($_SERVER['HTTP_CLIENT_IP']))
|
455 |
+
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
|
456 |
+
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
457 |
+
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
458 |
+
else if(isset($_SERVER['HTTP_X_FORWARDED']))
|
459 |
+
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
|
460 |
+
else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
|
461 |
+
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
|
462 |
+
else if(isset($_SERVER['HTTP_FORWARDED']))
|
463 |
+
$ipaddress = $_SERVER['HTTP_FORWARDED'];
|
464 |
+
else if(isset($_SERVER['REMOTE_ADDR']))
|
465 |
+
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
466 |
+
else
|
467 |
+
$ipaddress = '';
|
468 |
+
|
469 |
+
return $ipaddress;
|
470 |
+
}
|
471 |
+
|
472 |
+
|
473 |
+
}
|
@@ -0,0 +1,114 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Adyen_Oneclick extends Adyen_Payment_Model_Adyen_Cc {
|
29 |
+
|
30 |
+
protected $_code = 'adyen_oneclick';
|
31 |
+
protected $_formBlockType = 'adyen/form_oneclick';
|
32 |
+
protected $_infoBlockType = 'adyen/info_oneclick';
|
33 |
+
protected $_paymentMethod = 'oneclick';
|
34 |
+
protected $_canUseInternal = false; // not possible through backoffice interface
|
35 |
+
|
36 |
+
|
37 |
+
/*
|
38 |
+
* only enable if adyen_cc is enabled
|
39 |
+
*/
|
40 |
+
public function isAvailable($quote = null)
|
41 |
+
{
|
42 |
+
$isAvailable = parent::isAvailable($quote);
|
43 |
+
|
44 |
+
// check if adyen_cc is enabled if not disable oneclick as well
|
45 |
+
$isCCActive = $this->_getConfigData('active', 'adyen_cc');
|
46 |
+
if(!$isCCActive)
|
47 |
+
return false;
|
48 |
+
|
49 |
+
return $isAvailable;
|
50 |
+
}
|
51 |
+
public function assignData($data) {
|
52 |
+
if (!($data instanceof Varien_Object)) {
|
53 |
+
$data = new Varien_Object($data);
|
54 |
+
}
|
55 |
+
$info = $this->getInfoInstance();
|
56 |
+
|
57 |
+
// check if selected payment is a recurring payment
|
58 |
+
if($data->getRecurring() != "") {
|
59 |
+
|
60 |
+
// get the selected recurring card
|
61 |
+
$recurringSelectedKey = $data->getRecurring();
|
62 |
+
|
63 |
+
// get cvc code for this creditcard
|
64 |
+
$recurringDetailReferenceKey = "recurringDetailReference_".$recurringSelectedKey;
|
65 |
+
$cvcKey = "oneclick_cid_".$recurringSelectedKey;
|
66 |
+
|
67 |
+
// don't use magic getter but get the key because this is a variable value
|
68 |
+
$recurringDetailReference = $data->getData($recurringDetailReferenceKey);
|
69 |
+
//$cvc = $data->getData($cvcKey);
|
70 |
+
|
71 |
+
// save information as additional information so you don't have to add column in table
|
72 |
+
$info->setAdditionalInformation('recurring_detail_reference', $recurringDetailReference);
|
73 |
+
|
74 |
+
if ($this->isCseEnabled()) {
|
75 |
+
$info->setAdditionalInformation('encrypted_data', $data->getEncryptedDataOneclick());
|
76 |
+
}
|
77 |
+
else {
|
78 |
+
|
79 |
+
if($data->getRecurring() != "") {
|
80 |
+
|
81 |
+
// check if expiry month and year is changed
|
82 |
+
$expiryMonth = $data->getData("oneclick_exp_month" . $recurringSelectedKey);
|
83 |
+
$expiryYear = $data->getData("oneclick_exp_year_" . $recurringSelectedKey);
|
84 |
+
|
85 |
+
// just set default data for info block only
|
86 |
+
$info->setCcType($data->getData("oneclick_type_" . $recurringSelectedKey))
|
87 |
+
->setCcOwner($data->getData("oneclick_owner_" . $recurringSelectedKey))
|
88 |
+
->setCcLast4($data->getData("oneclick_last_4_" . $recurringSelectedKey))
|
89 |
+
->setCcExpMonth($data->getData("oneclick_exp_month_" . $recurringSelectedKey))
|
90 |
+
->setCcExpYear($data->getData("oneclick_exp_year_" . $recurringSelectedKey))
|
91 |
+
->setCcCid($data->getData("oneclick_cid_" . $recurringSelectedKey));
|
92 |
+
}
|
93 |
+
}
|
94 |
+
} else {
|
95 |
+
Mage::throwException(Mage::helper('adyen')->__('Payment Method is complusory in order to process your payment'));
|
96 |
+
}
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function getlistRecurringDetails()
|
101 |
+
{
|
102 |
+
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
103 |
+
$customerId = $quote->getCustomerId();
|
104 |
+
return $this->_processRecurringRequest($customerId);
|
105 |
+
}
|
106 |
+
|
107 |
+
public function isNotRecurring() {
|
108 |
+
$recurring_type = $this->_getConfigData('recurringtypes', 'adyen_abstract');
|
109 |
+
if($recurring_type == "RECURRING")
|
110 |
+
return false;
|
111 |
+
return true;
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
@@ -27,7 +27,7 @@
|
|
27 |
Â
*/
|
28 |
Â
class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hpp {
|
29 |
Â
|
30 |
-
|
31 |
Â
protected $_code = 'adyen_openinvoice';
|
32 |
Â
protected $_formBlockType = 'adyen/form_openinvoice';
|
33 |
Â
protected $_infoBlockType = 'adyen/info_openinvoice';
|
@@ -37,30 +37,71 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
37 |
Â
if (!($data instanceof Varien_Object)) {
|
38 |
Â
$data = new Varien_Object($data);
|
39 |
Â
}
|
Â
|
|
40 |
Â
$info = $this->getInfoInstance();
|
41 |
Â
$info->setCcType('openinvoice');
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
42 |
Â
return $this;
|
43 |
Â
}
|
44 |
Â
|
45 |
Â
/**
|
46 |
Â
* @desc Get url of Adyen payment
|
47 |
-
* @return string
|
48 |
Â
* @todo add brandCode here
|
49 |
Â
*/
|
50 |
Â
public function getFormUrl() {
|
51 |
-
|
52 |
-
|
53 |
Â
|
54 |
Â
switch ($this->getConfigDataDemoMode()) {
|
55 |
Â
case true:
|
56 |
-
|
57 |
Â
$url = 'https://test.adyen.com/hpp/pay.shtml';
|
58 |
Â
} else {
|
59 |
Â
$url = "https://test.adyen.com/hpp/details.shtml?brandCode=".$openinvoiceType;
|
60 |
Â
}
|
61 |
Â
break;
|
62 |
Â
default:
|
63 |
-
|
64 |
Â
$url = 'https://live.adyen.com/hpp/pay.shtml';
|
65 |
Â
} else {
|
66 |
Â
$url = "https://live.adyen.com/hpp/details.shtml?brandCode=".$openinvoiceType;
|
@@ -69,9 +110,9 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
69 |
Â
}
|
70 |
Â
return $url;
|
71 |
Â
}
|
72 |
-
|
73 |
Â
public function getFormName() {
|
74 |
-
|
75 |
Â
}
|
76 |
Â
|
77 |
Â
/**
|
@@ -84,12 +125,12 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
84 |
Â
$adyFields = $this->getOptionalFormFields($adyFields,$this->_order);
|
85 |
Â
return $adyFields;
|
86 |
Â
}
|
87 |
-
|
88 |
Â
public function getOptionalFormFields($adyFields,$order) {
|
89 |
Â
if (empty($order)) return $adyFields;
|
90 |
-
|
91 |
Â
$secretWord = $this->_getSecretWord();
|
92 |
-
|
93 |
Â
$billingAddress = $order->getBillingAddress();
|
94 |
Â
$adyFields['shopper.firstName'] = $billingAddress->getFirstname();
|
95 |
Â
$adyFields['shopper.lastName'] = $billingAddress->getLastname();
|
@@ -100,133 +141,176 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
100 |
Â
$adyFields['billingAddress.stateOrProvince'] = $billingAddress->getRegion();
|
101 |
Â
$adyFields['billingAddress.country'] = $billingAddress->getCountryId();
|
102 |
Â
$sign = $adyFields['billingAddress.street'] .
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
Â
;
|
109 |
Â
//Generate HMAC encrypted merchant signature
|
110 |
Â
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
111 |
Â
$adyFields['billingAddressSig'] = base64_encode(pack('H*', $signMac));
|
112 |
Â
|
113 |
-
|
114 |
Â
$deliveryAddress = $order->getShippingAddress();
|
115 |
Â
if($deliveryAddress != null)
|
116 |
Â
{
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
Â
|
|
Â
|
|
136 |
Â
|
137 |
-
if ($adyFields['shopperReference'] != self::GUEST_ID) {
|
138 |
Â
$customer = Mage::getModel('customer/customer')->load($adyFields['shopperReference']);
|
139 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
140 |
Â
$adyFields['shopper.infix'] = $customer->getPrefix();
|
141 |
Â
$dob = $customer->getDob();
|
142 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
143 |
Â
if (!empty($dob)) {
|
144 |
Â
$adyFields['shopper.dateOfBirthDayOfMonth'] = $this->getDate($dob, 'd');
|
145 |
Â
$adyFields['shopper.dateOfBirthMonth'] = $this->getDate($dob, 'm');
|
146 |
Â
$adyFields['shopper.dateOfBirthYear'] = $this->getDate($dob, 'Y');
|
147 |
Â
}
|
148 |
Â
}
|
149 |
-
|
150 |
Â
// for sweden add here your socialSecurityNumber
|
151 |
Â
// $adyFields['shopper.socialSecurityNumber'] = "Result of your custom input field";
|
152 |
Â
|
153 |
Â
$adyFields['shopper.telephoneNumber'] = $billingAddress->getTelephone();
|
154 |
-
|
155 |
Â
$openinvoiceType = $this->_getConfigData('openinvoicetypes', 'adyen_openinvoice');
|
156 |
Â
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
$shoppperSign = $adyFields['shopper.firstName'] . $adyFields['shopper.infix'] . $adyFields['shopper.lastName'] . $adyFields['shopper.gender'] . $adyFields['shopper.dateOfBirthDayOfMonth'] . $adyFields['shopper.dateOfBirthMonth'] . $adyFields['shopper.dateOfBirthYear'] . $adyFields['shopper.telephoneNumber'];
|
166 |
-
$shopperSignMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $shoppperSign);
|
167 |
-
$adyFields['shopperSig'] = base64_encode(pack('H*', $shopperSignMac));
|
168 |
-
}
|
169 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
170 |
Â
|
171 |
Â
$count = 0;
|
172 |
Â
$currency = $order->getOrderCurrencyCode();
|
173 |
Â
$additional_data_sign = array();
|
174 |
Â
|
175 |
Â
foreach ($order->getItemsCollection() as $item) {
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
Â
}
|
188 |
-
|
189 |
Â
//discount cost
|
190 |
-
|
191 |
-
if($order->getDiscountAmount() > 0)
|
192 |
Â
{
|
193 |
Â
$linename = "line".++$count;
|
194 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
195 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = Mage::helper('adyen')->__('Total Discount');
|
196 |
-
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] =
|
197 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = "0";
|
198 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
199 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
200 |
-
|
201 |
-
|
202 |
Â
//shipping cost
|
203 |
Â
if($order->getShippingAmount() > 0 || $order->getShippingTaxAmount() > 0)
|
204 |
Â
{
|
205 |
Â
$linename = "line".++$count;
|
206 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
207 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = $order->getShippingDescription();
|
208 |
-
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] =
|
209 |
-
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] =
|
210 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
211 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
212 |
Â
}
|
213 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
214 |
Â
// Klarna wants tax cost provided in the lines of the products so overal tax cost is not needed anymore
|
215 |
Â
// $linename = "line".++$count;
|
216 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
217 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.description'] = Mage::helper('adyen')->__('Tax');
|
218 |
-
// $additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] =
|
219 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = "0";
|
220 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
221 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
222 |
-
|
223 |
Â
// general for invoicelines
|
224 |
Â
$additional_data_sign['openinvoicedata.refundDescription'] = "Refund / Correction for ".$adyFields['merchantReference'];
|
225 |
Â
$additional_data_sign['openinvoicedata.numberOfLines'] = $count;
|
226 |
-
|
227 |
Â
// add merchantsignature in additional signature
|
228 |
Â
$additional_data_sign['merchantSig'] = $adyFields['merchantSig'];
|
229 |
-
|
230 |
Â
// generate signature
|
231 |
Â
ksort($additional_data_sign);
|
232 |
Â
|
@@ -234,37 +318,37 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
234 |
Â
$sign_additional_data_keys = "";
|
235 |
Â
$sign_additional_data_values = "";
|
236 |
Â
foreach($additional_data_sign as $key => $value) {
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
Â
}
|
251 |
-
|
252 |
Â
$sign_additional_data = $sign_additional_data_keys . "|" . $sign_additional_data_values;
|
253 |
-
|
254 |
Â
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign_additional_data);
|
255 |
Â
$adyFields['openinvoicedata.sig'] = base64_encode(pack('H*', $signMac));
|
256 |
-
|
257 |
-
|
258 |
Â
Mage::log($adyFields, self::DEBUG_LEVEL, 'http-request.log');
|
259 |
-
|
260 |
Â
return $adyFields;
|
261 |
-
}
|
262 |
Â
|
263 |
Â
/**
|
264 |
Â
* Get Attribute label
|
265 |
Â
* @param type $customer
|
266 |
Â
* @param type $code
|
267 |
-
* @return type
|
268 |
Â
*/
|
269 |
Â
public function getCustomerAttributeText($customer, $code='gender') {
|
270 |
Â
$helper = Mage::helper('adyen');
|
@@ -284,21 +368,21 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
284 |
Â
$timeStamp = new DateTime($date);
|
285 |
Â
return $timeStamp->format($format);
|
286 |
Â
}
|
287 |
-
|
288 |
-
/**
|
289 |
Â
* Street format
|
290 |
Â
* @param type $address
|
291 |
-
* @return Varien_Object
|
292 |
Â
*/
|
293 |
Â
public function getStreet($address) {
|
294 |
Â
if (empty($address)) return false;
|
295 |
Â
$street = self::formatStreet($address->getStreet());
|
296 |
Â
$streetName = $street['0'];
|
297 |
Â
unset($street['0']);
|
298 |
-
$streetNr = implode('',$street);
|
299 |
Â
return new Varien_Object(array('name' => $streetName, 'house_number' => $streetNr));
|
300 |
Â
}
|
301 |
-
|
302 |
Â
/**
|
303 |
Â
* Fix this one string street + number
|
304 |
Â
* @example street + number
|
@@ -308,14 +392,22 @@ class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hp
|
|
308 |
Â
static public function formatStreet($street) {
|
309 |
Â
if (count($street) != 1) {
|
310 |
Â
return $street;
|
311 |
-
}
|
312 |
Â
preg_match('/((\s\d{0,10})|(\s\d{0,10}\w{1,3}))$/i', $street['0'], $houseNumber, PREG_OFFSET_CAPTURE);
|
313 |
Â
if(!empty($houseNumber['0'])) {
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
Â
}
|
319 |
Â
return $street;
|
320 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
321 |
Â
}
|
27 |
Â
*/
|
28 |
Â
class Adyen_Payment_Model_Adyen_Openinvoice extends Adyen_Payment_Model_Adyen_Hpp {
|
29 |
Â
|
30 |
+
protected $_canUseInternal = false;
|
31 |
Â
protected $_code = 'adyen_openinvoice';
|
32 |
Â
protected $_formBlockType = 'adyen/form_openinvoice';
|
33 |
Â
protected $_infoBlockType = 'adyen/info_openinvoice';
|
37 |
Â
if (!($data instanceof Varien_Object)) {
|
38 |
Â
$data = new Varien_Object($data);
|
39 |
Â
}
|
40 |
+
|
41 |
Â
$info = $this->getInfoInstance();
|
42 |
Â
$info->setCcType('openinvoice');
|
43 |
+
|
44 |
+
// check if option gender or date of birth is enabled
|
45 |
+
$genderShow = $this->genderShow();
|
46 |
+
$dobShow = $this->dobShow();
|
47 |
+
|
48 |
+
if($genderShow || $dobShow) {
|
49 |
+
|
50 |
+
// set gender and dob to the quote
|
51 |
+
$quote = $this->getQuote();
|
52 |
+
|
53 |
+
// dob must be in yyyy-MM-dd
|
54 |
+
$dob = $data->getYear() . "-" . $data->getMonth() . "-" . $data->getDay();
|
55 |
+
|
56 |
+
if($dobShow)
|
57 |
+
$quote->setCustomerDob($dob);
|
58 |
+
|
59 |
+
if($genderShow) {
|
60 |
+
$quote->setCustomerGender($data->getGender());
|
61 |
+
// Fix for OneStepCheckout (won't convert quote customerGender to order object)
|
62 |
+
$info->setAdditionalInformation('customerGender', $data->getGender());
|
63 |
+
}
|
64 |
+
|
65 |
+
/* Check if the customer is logged in or not */
|
66 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
67 |
+
|
68 |
+
/* Get the customer data */
|
69 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
70 |
+
|
71 |
+
// set the email and/or gender
|
72 |
+
if($dobShow)
|
73 |
+
$customer->setDob($dob);
|
74 |
+
|
75 |
+
if($genderShow)
|
76 |
+
$customer->setGender($data->getGender());
|
77 |
+
|
78 |
+
// save changes into customer
|
79 |
+
$customer->save();
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
Â
return $this;
|
84 |
Â
}
|
85 |
Â
|
86 |
Â
/**
|
87 |
Â
* @desc Get url of Adyen payment
|
88 |
+
* @return string
|
89 |
Â
* @todo add brandCode here
|
90 |
Â
*/
|
91 |
Â
public function getFormUrl() {
|
92 |
+
$paymentRoutine = $this->_getConfigData('payment_routines', 'adyen_hpp');
|
93 |
+
$openinvoiceType = $this->_getConfigData('openinvoicetypes', 'adyen_openinvoice');
|
94 |
Â
|
95 |
Â
switch ($this->getConfigDataDemoMode()) {
|
96 |
Â
case true:
|
97 |
+
if ($paymentRoutine == 'single' && empty($openinvoiceType)) {
|
98 |
Â
$url = 'https://test.adyen.com/hpp/pay.shtml';
|
99 |
Â
} else {
|
100 |
Â
$url = "https://test.adyen.com/hpp/details.shtml?brandCode=".$openinvoiceType;
|
101 |
Â
}
|
102 |
Â
break;
|
103 |
Â
default:
|
104 |
+
if ($paymentRoutine == 'single' && empty($openinvoiceType)) {
|
105 |
Â
$url = 'https://live.adyen.com/hpp/pay.shtml';
|
106 |
Â
} else {
|
107 |
Â
$url = "https://live.adyen.com/hpp/details.shtml?brandCode=".$openinvoiceType;
|
110 |
Â
}
|
111 |
Â
return $url;
|
112 |
Â
}
|
113 |
+
|
114 |
Â
public function getFormName() {
|
115 |
+
return "Adyen HPP";
|
116 |
Â
}
|
117 |
Â
|
118 |
Â
/**
|
125 |
Â
$adyFields = $this->getOptionalFormFields($adyFields,$this->_order);
|
126 |
Â
return $adyFields;
|
127 |
Â
}
|
128 |
+
|
129 |
Â
public function getOptionalFormFields($adyFields,$order) {
|
130 |
Â
if (empty($order)) return $adyFields;
|
131 |
+
|
132 |
Â
$secretWord = $this->_getSecretWord();
|
133 |
+
|
134 |
Â
$billingAddress = $order->getBillingAddress();
|
135 |
Â
$adyFields['shopper.firstName'] = $billingAddress->getFirstname();
|
136 |
Â
$adyFields['shopper.lastName'] = $billingAddress->getLastname();
|
141 |
Â
$adyFields['billingAddress.stateOrProvince'] = $billingAddress->getRegion();
|
142 |
Â
$adyFields['billingAddress.country'] = $billingAddress->getCountryId();
|
143 |
Â
$sign = $adyFields['billingAddress.street'] .
|
144 |
+
$adyFields['billingAddress.houseNumberOrName'] .
|
145 |
+
$adyFields['billingAddress.city'] .
|
146 |
+
$adyFields['billingAddress.postalCode'] .
|
147 |
+
$adyFields['billingAddress.stateOrProvince'] .
|
148 |
+
$adyFields['billingAddress.country']
|
149 |
Â
;
|
150 |
Â
//Generate HMAC encrypted merchant signature
|
151 |
Â
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
152 |
Â
$adyFields['billingAddressSig'] = base64_encode(pack('H*', $signMac));
|
153 |
Â
|
154 |
+
|
155 |
Â
$deliveryAddress = $order->getShippingAddress();
|
156 |
Â
if($deliveryAddress != null)
|
157 |
Â
{
|
158 |
+
$adyFields['deliveryAddress.street'] = $this->getStreet($deliveryAddress)->getName();
|
159 |
+
$adyFields['deliveryAddress.houseNumberOrName'] = $this->getStreet($deliveryAddress)->getHouseNumber();
|
160 |
+
$adyFields['deliveryAddress.city'] = $deliveryAddress->getCity();
|
161 |
+
$adyFields['deliveryAddress.postalCode'] = $deliveryAddress->getPostcode();
|
162 |
+
$adyFields['deliveryAddress.stateOrProvince'] = $deliveryAddress->getRegion();
|
163 |
+
$adyFields['deliveryAddress.country'] = $deliveryAddress->getCountryId();
|
164 |
+
$sign = $adyFields['deliveryAddress.street'] .
|
165 |
+
$adyFields['deliveryAddress.houseNumberOrName'] .
|
166 |
+
$adyFields['deliveryAddress.city'] .
|
167 |
+
$adyFields['deliveryAddress.postalCode'] .
|
168 |
+
$adyFields['deliveryAddress.stateOrProvince'] .
|
169 |
+
$adyFields['deliveryAddress.country']
|
170 |
+
;
|
171 |
+
//Generate HMAC encrypted merchant signature
|
172 |
+
$secretWord = $this->_getSecretWord();
|
173 |
+
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
174 |
+
$adyFields['deliveryAddressSig'] = base64_encode(pack('H*', $signMac));
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
if ($adyFields['shopperReference'] != (self::GUEST_ID . $order->getRealOrderId())) {
|
179 |
Â
|
Â
|
|
180 |
Â
$customer = Mage::getModel('customer/customer')->load($adyFields['shopperReference']);
|
181 |
+
|
182 |
+
if($this->getCustomerAttributeText($customer, 'gender') != "") {
|
183 |
+
$adyFields['shopper.gender'] = strtoupper($this->getCustomerAttributeText($customer, 'gender'));
|
184 |
+
} else {
|
185 |
+
// fix for OneStepCheckout (guest is not logged in but uses email that exists with account)
|
186 |
+
$_customer = Mage::getModel('customer/customer');
|
187 |
+
if($order->getCustomerGender()) {
|
188 |
+
$customerGender = $order->getCustomerGender();
|
189 |
+
} else {
|
190 |
+
// this is still empty for OneStepCheckout so uses extra saved parameter
|
191 |
+
$payment = $order->getPayment();
|
192 |
+
$customerGender = $payment->getAdditionalInformation('customerGender');
|
193 |
+
}
|
194 |
+
$adyFields['shopper.gender'] = strtoupper($_customer->getResource()->getAttribute('gender')->getSource()->getOptionText($customerGender));
|
195 |
+
}
|
196 |
+
|
197 |
Â
$adyFields['shopper.infix'] = $customer->getPrefix();
|
198 |
Â
$dob = $customer->getDob();
|
199 |
Â
|
200 |
+
if (!empty($dob)) {
|
201 |
+
$adyFields['shopper.dateOfBirthDayOfMonth'] = $this->getDate($dob, 'd');
|
202 |
+
$adyFields['shopper.dateOfBirthMonth'] = $this->getDate($dob, 'm');
|
203 |
+
$adyFields['shopper.dateOfBirthYear'] = $this->getDate($dob, 'Y');
|
204 |
+
} else {
|
205 |
+
// fix for OneStepCheckout (guest is not logged in but uses email that exists with account)
|
206 |
+
$dob = $order->getCustomerDob();
|
207 |
+
if (!empty($dob)) {
|
208 |
+
$adyFields['shopper.dateOfBirthDayOfMonth'] = $this->getDate($dob, 'd');
|
209 |
+
$adyFields['shopper.dateOfBirthMonth'] = $this->getDate($dob, 'm');
|
210 |
+
$adyFields['shopper.dateOfBirthYear'] = $this->getDate($dob, 'Y');
|
211 |
+
}
|
212 |
+
}
|
213 |
+
} else {
|
214 |
+
// checkout as guest use details from the order
|
215 |
+
$_customer = Mage::getModel('customer/customer');
|
216 |
+
$adyFields['shopper.gender'] = strtoupper($_customer->getResource()->getAttribute('gender')->getSource()->getOptionText($order->getCustomerGender()));
|
217 |
+
$adyFields['shopper.infix'] = $order->getCustomerPrefix();
|
218 |
+
$dob = $order->getCustomerDob();
|
219 |
Â
if (!empty($dob)) {
|
220 |
Â
$adyFields['shopper.dateOfBirthDayOfMonth'] = $this->getDate($dob, 'd');
|
221 |
Â
$adyFields['shopper.dateOfBirthMonth'] = $this->getDate($dob, 'm');
|
222 |
Â
$adyFields['shopper.dateOfBirthYear'] = $this->getDate($dob, 'Y');
|
223 |
Â
}
|
224 |
Â
}
|
Â
|
|
225 |
Â
// for sweden add here your socialSecurityNumber
|
226 |
Â
// $adyFields['shopper.socialSecurityNumber'] = "Result of your custom input field";
|
227 |
Â
|
228 |
Â
$adyFields['shopper.telephoneNumber'] = $billingAddress->getTelephone();
|
229 |
+
|
230 |
Â
$openinvoiceType = $this->_getConfigData('openinvoicetypes', 'adyen_openinvoice');
|
231 |
Â
|
232 |
+
if($this->_code == "adyen_openinvoice" || $this->getInfoInstance()->getCcType() == "klarna" || $this->getInfoInstance()->getCcType() == "afterpay_default" ) {
|
233 |
+
// initialize values if they are empty
|
234 |
+
$adyFields['shopper.gender'] = (isset($adyFields['shopper.gender'])) ? $adyFields['shopper.gender'] : "";
|
235 |
+
$adyFields['shopper.infix'] = (isset($adyFields['shopper.infix'])) ? $adyFields['shopper.infix'] : "";
|
236 |
+
$adyFields['shopper.dateOfBirthDayOfMonth'] = (isset($adyFields['shopper.dateOfBirthDayOfMonth'])) ? $adyFields['shopper.dateOfBirthDayOfMonth'] : "";
|
237 |
+
$adyFields['shopper.dateOfBirthMonth'] = (isset($adyFields['shopper.dateOfBirthMonth'])) ? $adyFields['shopper.dateOfBirthMonth'] : "";
|
238 |
+
$adyFields['shopper.dateOfBirthYear'] = (isset($adyFields['shopper.dateOfBirthYear'])) ? $adyFields['shopper.dateOfBirthYear'] : "";
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
239 |
Â
|
240 |
+
$shoppperSign = $adyFields['shopper.firstName'] . $adyFields['shopper.infix'] . $adyFields['shopper.lastName'] . $adyFields['shopper.gender'] . $adyFields['shopper.dateOfBirthDayOfMonth'] . $adyFields['shopper.dateOfBirthMonth'] . $adyFields['shopper.dateOfBirthYear'] . $adyFields['shopper.telephoneNumber'];
|
241 |
+
$shopperSignMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $shoppperSign);
|
242 |
+
$adyFields['shopperSig'] = base64_encode(pack('H*', $shopperSignMac));
|
243 |
+
}
|
244 |
+
|
245 |
Â
|
246 |
Â
$count = 0;
|
247 |
Â
$currency = $order->getOrderCurrencyCode();
|
248 |
Â
$additional_data_sign = array();
|
249 |
Â
|
250 |
Â
foreach ($order->getItemsCollection() as $item) {
|
251 |
+
//skip dummies
|
252 |
+
if ($item->isDummy()) continue;
|
253 |
+
|
254 |
+
++$count;
|
255 |
+
$linename = "line".$count;
|
256 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
257 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = $item->getName();
|
258 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] = Mage::helper('adyen')->formatAmount($item->getPrice(), $currency);
|
259 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = Mage::helper('adyen')->formatAmount(($item->getTaxAmount()>0 && $item->getPriceInclTax()>0)?$item->getPriceInclTax() - $item->getPrice():$item->getTaxAmount(), $currency);
|
260 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = (int) $item->getQtyOrdered();
|
261 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
262 |
Â
}
|
263 |
+
|
264 |
Â
//discount cost
|
265 |
+
if($order->getDiscountAmount() > 0 || $order->getDiscountAmount() < 0)
|
Â
|
|
266 |
Â
{
|
267 |
Â
$linename = "line".++$count;
|
268 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
269 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = Mage::helper('adyen')->__('Total Discount');
|
270 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] = Mage::helper('adyen')->formatAmount($order->getDiscountAmount(), $currency);
|
271 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = "0";
|
272 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
273 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
274 |
+
}
|
275 |
+
|
276 |
Â
//shipping cost
|
277 |
Â
if($order->getShippingAmount() > 0 || $order->getShippingTaxAmount() > 0)
|
278 |
Â
{
|
279 |
Â
$linename = "line".++$count;
|
280 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
281 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = $order->getShippingDescription();
|
282 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] = Mage::helper('adyen')->formatAmount($order->getShippingAmount(), $currency);
|
283 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = Mage::helper('adyen')->formatAmount($order->getShippingTaxAmount(), $currency);
|
284 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
285 |
Â
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
286 |
Â
}
|
287 |
Â
|
288 |
+
if($order->getPaymentFeeAmount() > 0) {
|
289 |
+
$linename = "line".++$count;
|
290 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
291 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.description'] = Mage::helper('adyen')->__('Payment Fee');
|
292 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] = Mage::helper('adyen')->formatAmount($order->getPaymentFeeAmount(), $currency);
|
293 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = "0";
|
294 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
295 |
+
$additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
296 |
+
}
|
297 |
+
|
298 |
Â
// Klarna wants tax cost provided in the lines of the products so overal tax cost is not needed anymore
|
299 |
Â
// $linename = "line".++$count;
|
300 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.currencyCode'] = $currency;
|
301 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.description'] = Mage::helper('adyen')->__('Tax');
|
302 |
+
// $additional_data_sign['openinvoicedata.' . $linename . '.itemAmount'] = Mage::helper('adyen')->formatAmount($order->getTaxAmount(), $currency);
|
303 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.itemVatAmount'] = "0";
|
304 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.numberOfItems'] = 1;
|
305 |
Â
// $additional_data_sign['openinvoicedata.' . $linename . '.vatCategory'] = "None";
|
306 |
+
|
307 |
Â
// general for invoicelines
|
308 |
Â
$additional_data_sign['openinvoicedata.refundDescription'] = "Refund / Correction for ".$adyFields['merchantReference'];
|
309 |
Â
$additional_data_sign['openinvoicedata.numberOfLines'] = $count;
|
310 |
+
|
311 |
Â
// add merchantsignature in additional signature
|
312 |
Â
$additional_data_sign['merchantSig'] = $adyFields['merchantSig'];
|
313 |
+
|
314 |
Â
// generate signature
|
315 |
Â
ksort($additional_data_sign);
|
316 |
Â
|
318 |
Â
$sign_additional_data_keys = "";
|
319 |
Â
$sign_additional_data_values = "";
|
320 |
Â
foreach($additional_data_sign as $key => $value) {
|
321 |
+
|
322 |
+
// add to fields
|
323 |
+
$adyFields[$key] = $value;
|
324 |
+
|
325 |
+
// create sign
|
326 |
+
$sign_additional_data_keys .= $key;
|
327 |
+
$sign_additional_data_values .= $value;
|
328 |
+
|
329 |
+
$keys = array_keys($additional_data_sign);
|
330 |
+
if(end($keys) != $key) {
|
331 |
+
$sign_additional_data_keys .= ":";
|
332 |
+
$sign_additional_data_values .= ":";
|
333 |
+
}
|
334 |
Â
}
|
335 |
+
|
336 |
Â
$sign_additional_data = $sign_additional_data_keys . "|" . $sign_additional_data_values;
|
337 |
+
|
338 |
Â
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign_additional_data);
|
339 |
Â
$adyFields['openinvoicedata.sig'] = base64_encode(pack('H*', $signMac));
|
340 |
+
|
341 |
+
|
342 |
Â
Mage::log($adyFields, self::DEBUG_LEVEL, 'http-request.log');
|
343 |
+
|
344 |
Â
return $adyFields;
|
345 |
+
}
|
346 |
Â
|
347 |
Â
/**
|
348 |
Â
* Get Attribute label
|
349 |
Â
* @param type $customer
|
350 |
Â
* @param type $code
|
351 |
+
* @return type
|
352 |
Â
*/
|
353 |
Â
public function getCustomerAttributeText($customer, $code='gender') {
|
354 |
Â
$helper = Mage::helper('adyen');
|
368 |
Â
$timeStamp = new DateTime($date);
|
369 |
Â
return $timeStamp->format($format);
|
370 |
Â
}
|
371 |
+
|
372 |
+
/**
|
373 |
Â
* Street format
|
374 |
Â
* @param type $address
|
375 |
+
* @return Varien_Object
|
376 |
Â
*/
|
377 |
Â
public function getStreet($address) {
|
378 |
Â
if (empty($address)) return false;
|
379 |
Â
$street = self::formatStreet($address->getStreet());
|
380 |
Â
$streetName = $street['0'];
|
381 |
Â
unset($street['0']);
|
382 |
+
$streetNr = implode('',$street);
|
383 |
Â
return new Varien_Object(array('name' => $streetName, 'house_number' => $streetNr));
|
384 |
Â
}
|
385 |
+
|
386 |
Â
/**
|
387 |
Â
* Fix this one string street + number
|
388 |
Â
* @example street + number
|
392 |
Â
static public function formatStreet($street) {
|
393 |
Â
if (count($street) != 1) {
|
394 |
Â
return $street;
|
395 |
+
}
|
396 |
Â
preg_match('/((\s\d{0,10})|(\s\d{0,10}\w{1,3}))$/i', $street['0'], $houseNumber, PREG_OFFSET_CAPTURE);
|
397 |
Â
if(!empty($houseNumber['0'])) {
|
398 |
+
$_houseNumber = trim($houseNumber['0']['0']);
|
399 |
+
$position = $houseNumber['0']['1'];
|
400 |
+
$streeName = trim(substr($street['0'], 0, $position));
|
401 |
+
$street = array($streeName,$_houseNumber);
|
402 |
Â
}
|
403 |
Â
return $street;
|
404 |
Â
}
|
405 |
+
|
406 |
+
public function genderShow() {
|
407 |
+
return $this->_getConfigData('gender_show', 'adyen_openinvoice');
|
408 |
+
}
|
409 |
+
|
410 |
+
public function dobShow() {
|
411 |
+
return $this->_getConfigData('dob_show', 'adyen_openinvoice');
|
412 |
+
}
|
413 |
Â
}
|
@@ -85,7 +85,7 @@ class Adyen_Payment_Model_Adyen_Pos extends Adyen_Payment_Model_Adyen_Abstract {
|
|
85 |
Â
$order = $this->_order;
|
86 |
Â
$realOrderId = $order->getRealOrderId();
|
87 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
88 |
-
$amount =
|
89 |
Â
$customerId = $order->getCustomerId();
|
90 |
Â
$customerEmail = $order->getCustomerEmail();
|
91 |
Â
|
85 |
Â
$order = $this->_order;
|
86 |
Â
$realOrderId = $order->getRealOrderId();
|
87 |
Â
$orderCurrencyCode = $order->getOrderCurrencyCode();
|
88 |
+
$amount = Mage::helper('adyen')->formatAmount($order->getGrandTotal(),$orderCurrencyCode);
|
89 |
Â
$customerId = $order->getCustomerId();
|
90 |
Â
$customerEmail = $order->getCustomerEmail();
|
91 |
Â
|
@@ -0,0 +1,128 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Adyen_Sepa extends Adyen_Payment_Model_Adyen_Abstract {
|
29 |
+
|
30 |
+
protected $_code = 'adyen_sepa';
|
31 |
+
protected $_formBlockType = 'adyen/form_sepa';
|
32 |
+
protected $_infoBlockType = 'adyen/info_sepa';
|
33 |
+
protected $_paymentMethod = 'sepa';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* 1)Called everytime the adyen_sepa is called or used in checkout
|
37 |
+
* @descrition Assign data to info model instance
|
38 |
+
*
|
39 |
+
* @param mixed $data
|
40 |
+
* @return Mage_Payment_Model_Info
|
41 |
+
*/
|
42 |
+
public function assignData($data) {
|
43 |
+
|
44 |
+
if (!($data instanceof Varien_Object)) {
|
45 |
+
$data = new Varien_Object($data);
|
46 |
+
}
|
47 |
+
|
48 |
+
$info = $this->getInfoInstance();
|
49 |
+
$sepa = array(
|
50 |
+
'account_name' => $data->getAccountName(),
|
51 |
+
'iban' => $data->getIban(),
|
52 |
+
'country' => $data->getCountry()
|
53 |
+
);
|
54 |
+
|
55 |
+
$info = $this->getInfoInstance();
|
56 |
+
$info->setCcOwner($data->getOwner())
|
57 |
+
->setCcType($data->getBankLocation())
|
58 |
+
->setCcLast4(substr($data->getAccountNumber(), -4))
|
59 |
+
->setCcNumber($data->getAccountNumber())
|
60 |
+
->setCcNumberEnc($data->getBankCode())
|
61 |
+
->setPoNumber(serialize($sepa)); /* @note misused field for the elv */
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
|
65 |
+
public function validate()
|
66 |
+
{
|
67 |
+
parent::validate();
|
68 |
+
|
69 |
+
// check if validator is on
|
70 |
+
$ibanValidation = $this->_getConfigData("validate_iban", "adyen_sepa");
|
71 |
+
|
72 |
+
if($ibanValidation) {
|
73 |
+
|
74 |
+
$info = $this->getInfoInstance();
|
75 |
+
$sepa = unserialize($info->getPoNumber());
|
76 |
+
|
77 |
+
if(!$this->validateIban($sepa['iban']) || empty($sepa['iban'])){
|
78 |
+
$errorCode = 'invalid_data';
|
79 |
+
$errorMsg = Mage::helper('adyen')->__('Invalid Iban number.');
|
80 |
+
Mage::throwException($errorMsg);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
return $this;
|
84 |
+
}
|
85 |
+
|
86 |
+
public function validateIban($iban) {
|
87 |
+
|
88 |
+
$iban = strtolower(str_replace(' ','',$iban));
|
89 |
+
$Countries = array('al'=>28,'ad'=>24,'at'=>20,'az'=>28,'bh'=>22,'be'=>16,'ba'=>20,'br'=>29,'bg'=>22,'cr'=>21,'hr'=>21,'cy'=>28,'cz'=>24,'dk'=>18,'do'=>28,'ee'=>20,'fo'=>18,'fi'=>18,'fr'=>27,'ge'=>22,'de'=>22,'gi'=>23,'gr'=>27,'gl'=>18,'gt'=>28,'hu'=>28,'is'=>26,'ie'=>22,'il'=>23,'it'=>27,'jo'=>30,'kz'=>20,'kw'=>30,'lv'=>21,'lb'=>28,'li'=>21,'lt'=>20,'lu'=>20,'mk'=>19,'mt'=>31,'mr'=>27,'mu'=>30,'mc'=>27,'md'=>24,'me'=>22,'nl'=>18,'no'=>15,'pk'=>24,'ps'=>29,'pl'=>28,'pt'=>25,'qa'=>29,'ro'=>24,'sm'=>27,'sa'=>24,'rs'=>22,'sk'=>24,'si'=>19,'es'=>24,'se'=>24,'ch'=>21,'tn'=>24,'tr'=>26,'ae'=>23,'gb'=>22,'vg'=>24);
|
90 |
+
$Chars = array('a'=>10,'b'=>11,'c'=>12,'d'=>13,'e'=>14,'f'=>15,'g'=>16,'h'=>17,'i'=>18,'j'=>19,'k'=>20,'l'=>21,'m'=>22,'n'=>23,'o'=>24,'p'=>25,'q'=>26,'r'=>27,'s'=>28,'t'=>29,'u'=>30,'v'=>31,'w'=>32,'x'=>33,'y'=>34,'z'=>35);
|
91 |
+
|
92 |
+
if(isset($Countries[substr($iban,0,2)]) && strlen($iban) == $Countries[substr($iban,0,2)]){
|
93 |
+
|
94 |
+
$MovedChar = substr($iban, 4).substr($iban,0,4);
|
95 |
+
$MovedCharArray = str_split($MovedChar);
|
96 |
+
$NewString = "";
|
97 |
+
|
98 |
+
foreach($MovedCharArray AS $key => $value){
|
99 |
+
if(!is_numeric($MovedCharArray[$key])){
|
100 |
+
$MovedCharArray[$key] = $Chars[$MovedCharArray[$key]];
|
101 |
+
}
|
102 |
+
$NewString .= $MovedCharArray[$key];
|
103 |
+
}
|
104 |
+
|
105 |
+
if(bcmod($NewString, '97') == 1)
|
106 |
+
{
|
107 |
+
return TRUE;
|
108 |
+
}
|
109 |
+
else{
|
110 |
+
return FALSE;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
else{
|
114 |
+
return FALSE;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Called just after asssign data
|
120 |
+
*
|
121 |
+
* @return Mage_Payment_Model_Abstract
|
122 |
+
*/
|
123 |
+
public function prepareSave() {
|
124 |
+
//@todo encryption or so
|
125 |
+
parent::prepareSave();
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
@@ -34,11 +34,13 @@ class Adyen_Payment_Model_Event extends Mage_Core_Model_Abstract {
|
|
34 |
Â
const ADYEN_EVENT_REFUSED = 'REFUSED';
|
35 |
Â
const ADYEN_EVENT_ERROR = 'ERROR';
|
36 |
Â
const ADYEN_EVENT_REFUND = 'REFUND';
|
Â
|
|
37 |
Â
const ADYEN_EVENT_CAPTURE = 'CAPTURE';
|
Â
|
|
38 |
Â
const ADYEN_EVENT_CANCELLATION = 'CANCELLATION';
|
39 |
Â
const ADYEN_EVENT_POSAPPROVED = 'POS_APPROVED';
|
40 |
Â
const ADYEN_EVENT_HANDLEDEXTERNALLY = 'HANDLED_EXTERNALLY';
|
41 |
-
|
42 |
Â
/**
|
43 |
Â
* Initialize resources
|
44 |
Â
*/
|
@@ -52,8 +54,9 @@ class Adyen_Payment_Model_Event extends Mage_Core_Model_Abstract {
|
|
52 |
Â
* @param type $dbEventCode
|
53 |
Â
* @return boolean true if the event is a duplicate
|
54 |
Â
*/
|
55 |
-
public function isDuplicate($pspReference, $event) {
|
56 |
-
$
|
Â
|
|
57 |
Â
return (empty($result)) ? false : true;
|
58 |
Â
}
|
59 |
Â
|
34 |
Â
const ADYEN_EVENT_REFUSED = 'REFUSED';
|
35 |
Â
const ADYEN_EVENT_ERROR = 'ERROR';
|
36 |
Â
const ADYEN_EVENT_REFUND = 'REFUND';
|
37 |
+
const ADYEN_EVENT_CANCEL_OR_REFUND = 'CANCEL_OR_REFUND';
|
38 |
Â
const ADYEN_EVENT_CAPTURE = 'CAPTURE';
|
39 |
+
const ADYEN_EVENT_CAPTURE_FAILED = 'CAPTURE_FAILED';
|
40 |
Â
const ADYEN_EVENT_CANCELLATION = 'CANCELLATION';
|
41 |
Â
const ADYEN_EVENT_POSAPPROVED = 'POS_APPROVED';
|
42 |
Â
const ADYEN_EVENT_HANDLEDEXTERNALLY = 'HANDLED_EXTERNALLY';
|
43 |
+
|
44 |
Â
/**
|
45 |
Â
* Initialize resources
|
46 |
Â
*/
|
54 |
Â
* @param type $dbEventCode
|
55 |
Â
* @return boolean true if the event is a duplicate
|
56 |
Â
*/
|
57 |
+
public function isDuplicate($pspReference, $event, $success) {
|
58 |
+
$success = (trim($success) == "true") ? true : false;
|
59 |
+
$result = $this->getResource()->getEvent(trim($pspReference), trim($event), $success);
|
60 |
Â
return (empty($result)) ? false : true;
|
61 |
Â
}
|
62 |
Â
|
@@ -39,13 +39,24 @@ class Adyen_Payment_Model_Mysql4_Adyen_Event extends Mage_Core_Model_Mysql4_Abst
|
|
39 |
Â
* @param type $adyenEventCode
|
40 |
Â
* @return type
|
41 |
Â
*/
|
42 |
-
public function getEvent($pspReference, $adyenEventCode) {
|
43 |
Â
$db = $this->_getReadAdapter();
|
44 |
-
|
Â
|
|
Â
|
|
45 |
Â
->from($this->getMainTable(), array('*'))
|
46 |
Â
->where('adyen_event_code = ?', $adyenEventCode)
|
47 |
Â
->where('psp_reference = ?', $pspReference)
|
48 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
49 |
Â
$stmt = $db->query($sql);
|
50 |
Â
return $stmt->fetch();
|
51 |
Â
}
|
39 |
Â
* @param type $adyenEventCode
|
40 |
Â
* @return type
|
41 |
Â
*/
|
42 |
+
public function getEvent($pspReference, $adyenEventCode, $success = null) {
|
43 |
Â
$db = $this->_getReadAdapter();
|
44 |
+
|
45 |
+
if($success == null) {
|
46 |
+
$sql = $db->select()
|
47 |
Â
->from($this->getMainTable(), array('*'))
|
48 |
Â
->where('adyen_event_code = ?', $adyenEventCode)
|
49 |
Â
->where('psp_reference = ?', $pspReference)
|
50 |
+
;
|
51 |
+
} else {
|
52 |
+
$sql = $db->select()
|
53 |
+
->from($this->getMainTable(), array('*'))
|
54 |
+
->where('adyen_event_code = ?', $adyenEventCode)
|
55 |
+
->where('psp_reference = ?', $pspReference)
|
56 |
+
->where('success = ?', $success)
|
57 |
+
;
|
58 |
+
}
|
59 |
+
|
60 |
Â
$stmt = $db->query($sql);
|
61 |
Â
return $stmt->fetch();
|
62 |
Â
}
|
@@ -49,28 +49,6 @@ class Adyen_Payment_Model_Observer {
|
|
49 |
Â
return false;
|
50 |
Â
}
|
51 |
Â
|
52 |
-
/**
|
53 |
-
* @desc online refund only
|
54 |
-
* @param Mage_Sales_Model_Order_Creditmemo $observer
|
55 |
-
*/
|
56 |
-
public function refund(Varien_Event_Observer $observer) {
|
57 |
-
$event = $observer->getEvent();
|
58 |
-
$eventNameCmp = strcmp($event->getName(), 'sales_order_creditmemo_refund');
|
59 |
-
$offline = (bool) $event->getCreditmemo()->getData('offline_requested');
|
60 |
-
if ($eventNameCmp === 0 && !$offline) {
|
61 |
-
$order = $event->getCreditmemo()->getOrder();
|
62 |
-
$isAdyen = $this->isPaymentMethodAdyen($order);
|
63 |
-
if (!$isAdyen)
|
64 |
-
return false;
|
65 |
-
$grandTotal = $event->getCreditmemo()->getGrandTotal();
|
66 |
-
$payment = $order->getPayment();
|
67 |
-
$pspReference = Mage::getModel('adyen/event')->getOriginalPspReference($order->getIncrementId());
|
68 |
-
$order->getPayment()->getMethodInstance()->sendRefundRequest($payment, $grandTotal, $pspReference);
|
69 |
-
return true;
|
70 |
-
}
|
71 |
-
return false;
|
72 |
-
}
|
73 |
-
|
74 |
Â
/**
|
75 |
Â
* Determine if the payment method is Adyen
|
76 |
Â
* @param type $order
|
49 |
Â
return false;
|
50 |
Â
}
|
51 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
52 |
Â
/**
|
53 |
Â
* Determine if the payment method is Adyen
|
54 |
Â
* @param type $order
|
@@ -34,17 +34,17 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
34 |
Â
* @throws Exception
|
35 |
Â
*/
|
36 |
Â
public function processResponse($soapItem = null) {
|
37 |
-
|
38 |
-
|
39 |
Â
Mage::getResourceModel('adyen/adyen_debug')->assignData($response);
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
Â
if (empty($response)) {
|
44 |
-
|
45 |
Â
return "401";
|
46 |
Â
}
|
47 |
-
|
48 |
Â
$varienObj = new Varien_Object();
|
49 |
Â
foreach ($response as $code => $value) {
|
50 |
Â
if ($code == 'amount') {
|
@@ -57,10 +57,10 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
57 |
Â
|
58 |
Â
// if version is added to notification url (?version=true) then only return the version of the plugin (only works from verion 1.0.0.8)
|
59 |
Â
if($varienObj->getData('version')) {
|
60 |
-
|
61 |
-
|
62 |
Â
}
|
63 |
-
|
64 |
Â
//authenticate
|
65 |
Â
$authStatus = Mage::getModel('adyen/authenticate')->authenticate($actionName, $varienObj);
|
66 |
Â
if (!$authStatus) {
|
@@ -70,12 +70,12 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
70 |
Â
}
|
71 |
Â
|
72 |
Â
$incrementId = $varienObj->getData('merchantReference');
|
73 |
-
|
74 |
-
try{
|
75 |
-
|
76 |
Â
//get order && payment objects
|
77 |
Â
$order = Mage::getModel('sales/order');
|
78 |
-
|
79 |
Â
//error
|
80 |
Â
$orderExist = $this->_incrementIdExist($incrementId);
|
81 |
Â
if (empty($orderExist)) {
|
@@ -101,146 +101,146 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
101 |
Â
|
102 |
Â
return $status;
|
103 |
Â
}
|
104 |
-
|
105 |
-
|
106 |
-
public function processPosResponse() {
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
Â
<script type=\"text/javascript\">
|
245 |
Â
function closeWindow() {
|
246 |
Â
window.open('', '_self', '');
|
@@ -249,103 +249,103 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
249 |
Â
setTimeout(closeWindow, 500);
|
250 |
Â
</script>
|
251 |
Â
</body></html>";
|
252 |
-
|
253 |
-
|
254 |
Â
}
|
255 |
-
|
256 |
Â
public function processCashResponse()
|
257 |
Â
{
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
Â
}
|
321 |
-
|
322 |
Â
protected function _getSecretWord($options = null) {
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
Â
}
|
333 |
-
|
334 |
Â
/**
|
335 |
Â
* Used via Payment method.Notice via configuration ofcourse Y or N
|
336 |
Â
* @return boolean true on demo, else false
|
337 |
Â
*/
|
338 |
Â
public function getConfigDataDemoMode() {
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
Â
}
|
344 |
-
|
345 |
Â
/**
|
346 |
Â
* @desc check order existance
|
347 |
Â
* @param type $incrementId
|
348 |
-
* @return type
|
349 |
Â
*/
|
350 |
Â
protected function _incrementIdExist($incrementId) {
|
351 |
Â
return Mage::getResourceModel('adyen/order')->orderExist($incrementId);
|
@@ -354,51 +354,73 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
354 |
Â
/**
|
355 |
Â
* @desc Adyen attribute handling
|
356 |
Â
* @param Varien_Object $order
|
357 |
-
* @param type $response
|
358 |
Â
*/
|
359 |
Â
protected function _addAdyenAttributes(Varien_Object $order, $response, $updateAdyenStatus = true) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
360 |
Â
$pspReference = $response->getData('pspReference');
|
361 |
Â
$eventCode = $response->getData('eventCode');
|
362 |
Â
$authResult = $response->getData('authResult');
|
363 |
Â
$incrementId = $response->getData('merchantReference');
|
364 |
Â
$paymentMethod = $response->getData('paymentMethod');
|
Â
|
|
365 |
Â
$eventData = (!empty($eventCode)) ? $eventCode : $authResult;
|
366 |
Â
$paymentObj = $order->getPayment();
|
367 |
-
|
368 |
Â
$paymentObj->setLastTransId($incrementId)
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
Â
|
373 |
Â
// only update this when authroization notification is not yet processed
|
374 |
Â
Mage::log("AdyenEventCode in paymentobject order:".$order->getAdyenEventCode(), Zend_Log::DEBUG, "adyen_notification.log", true);
|
375 |
Â
Mage::log("paymentobject order authResult:".$authResult, Zend_Log::DEBUG, "adyen_notification.log", true);
|
376 |
-
|
377 |
Â
if(!(substr($order->getAdyenEventCode(), 0, 13) == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION && $authResult == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED)){
|
378 |
-
|
379 |
-
|
380 |
Â
}
|
381 |
-
|
382 |
Â
//only original here
|
383 |
Â
if ($eventCode == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED
|
384 |
-
|
385 |
Â
{
|
386 |
Â
$paymentObj->setAdyenPspReference($pspReference);
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
387 |
Â
}
|
388 |
-
|
389 |
Â
try {
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
Â
|
|
400 |
Â
} catch (Exception $e) {
|
401 |
-
|
402 |
Â
}
|
403 |
Â
}
|
404 |
Â
|
@@ -407,8 +429,8 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
407 |
Â
* @param Varien_Object $params
|
408 |
Â
*/
|
409 |
Â
protected function _processPostSuccess($order, $params) {
|
410 |
-
|
411 |
-
|
412 |
Â
$this->_addAdyenAttributes($order, $params, false);
|
413 |
Â
$status = false;
|
414 |
Â
$authResult = $params->getData('authResult');
|
@@ -416,27 +438,27 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
416 |
Â
switch ($authResult) {
|
417 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED:
|
418 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_PENDING:
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
Â
break;
|
437 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_CANCELLED:
|
438 |
Â
$isBankTransfer = Mage::getModel('adyen/event')
|
439 |
-
|
440 |
Â
//attempt to hold/cancel (exceptional to BankTransfer they stay in previous status/pending)
|
441 |
Â
if (!$isBankTransfer) {
|
442 |
Â
$this->_addStatusHistoryComment($order, $params);
|
@@ -463,7 +485,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
463 |
Â
* @desc process notifications
|
464 |
Â
* @param type $order
|
465 |
Â
* @param type $response
|
466 |
-
* @return type
|
467 |
Â
*/
|
468 |
Â
public function notificationHandler($order, $response) {
|
469 |
Â
$payment = $order->getPayment()->getMethodInstance();
|
@@ -473,19 +495,19 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
473 |
Â
|
474 |
Â
//handle duplicates
|
475 |
Â
$isDuplicate = Mage::getModel('adyen/event')
|
476 |
-
|
477 |
Â
if ($isDuplicate) {
|
478 |
-
$payment->writeLog("#skipping duplicate notification pspReference:$pspReference && eventCode: $eventCode");
|
479 |
Â
return false; //hmt
|
480 |
Â
}
|
481 |
Â
|
482 |
Â
//set these attributes here
|
483 |
Â
$this->_addAdyenAttributes($order, $response);
|
484 |
-
|
485 |
Â
//add comment to the order
|
486 |
Â
if (strcmp($success, 'false') == 0 || !$success) {
|
487 |
Â
$status = ($order->isCanceled() || ($order->getState() === Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)) ?
|
488 |
-
|
489 |
Â
$this->_addStatusHistoryComment($order, $response, $status);
|
490 |
Â
} else {
|
491 |
Â
$this->_addStatusHistoryComment($order, $response, $order->getStatus());
|
@@ -507,57 +529,103 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
507 |
Â
/**
|
508 |
Â
* @desc process notifications
|
509 |
Â
* @param type $order
|
510 |
-
* @param type $response
|
511 |
Â
*/
|
512 |
Â
protected function _processNotifications($order, $response) {
|
513 |
Â
$valid = $this->notificationHandler($order, $response); //hmt: added $valid
|
514 |
-
|
515 |
Â
if ($valid) {
|
516 |
-
|
517 |
-
|
518 |
-
$success = (bool) trim($response->getData('success'));
|
519 |
-
switch ($eventCode) {
|
520 |
-
case Adyen_Payment_Model_Event::ADYEN_EVENT_REFUND:
|
521 |
Â
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
550 |
Â
}
|
551 |
Â
}
|
552 |
Â
|
553 |
Â
/**
|
554 |
Â
* @since v0.1.0.5
|
555 |
Â
* @param type $order
|
556 |
-
* @param type $success
|
557 |
Â
*/
|
558 |
-
public function setPaymentAuthorized($order, $success = false) {
|
559 |
Â
if ($success && !empty($order)) {
|
Â
|
|
560 |
Â
$status = $this->_getConfigData('payment_authorized');
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
561 |
Â
$status = (!empty($status)) ? $status : $order->getStatus();
|
562 |
Â
$order->addStatusHistoryComment(Mage::helper('adyen')->__('Adyen Payment Successfully completed'), $status);
|
563 |
Â
$order->sendOrderUpdateEmail((bool) $this->_getConfigData('send_update_mail'));
|
@@ -571,7 +639,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
571 |
Â
/**
|
572 |
Â
* @since v0.1.0.5
|
573 |
Â
* @param type $order
|
574 |
-
* @param type $success
|
575 |
Â
*/
|
576 |
Â
public function setPrePaymentAuthorized($order, $success = false) {
|
577 |
Â
if ($success && !empty($order)) {
|
@@ -589,7 +657,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
589 |
Â
/**
|
590 |
Â
* @since v0.1.0.8
|
591 |
Â
* @param type $order
|
592 |
-
* @param type $success
|
593 |
Â
*/
|
594 |
Â
public function setRefundAuthorized($order, $success = false) {
|
595 |
Â
if ($success && !empty($order)) {
|
@@ -614,7 +682,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
614 |
Â
$paymentMethod = trim($response->getData('paymentMethod'));
|
615 |
Â
$captureMode = trim($this->_getConfigData('capture_mode'));
|
616 |
Â
// payment method ideal and cash has direct capture
|
617 |
-
if (strcmp($paymentMethod, 'ideal') === 0 || strcmp($paymentMethod, 'c_cash') === 0 ) {
|
618 |
Â
return true;
|
619 |
Â
}
|
620 |
Â
if (strcmp($captureMode, 'manual') === 0) {
|
@@ -639,7 +707,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
639 |
Â
//skip orders with [refund-received]
|
640 |
Â
$pspReference = trim($response->getData('pspReference'));
|
641 |
Â
$result = Mage::getModel('adyen/event')
|
642 |
-
|
643 |
Â
if (!empty($result)) {
|
644 |
Â
$this->_writeLog("\nSkip refund process, as refund initiated via Magento id: {$order->getIncrementId()}");
|
645 |
Â
return false;
|
@@ -660,14 +728,14 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
660 |
Â
|
661 |
Â
try {
|
662 |
Â
Mage::getModel('core/resource_transaction')
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
Â
//refund
|
667 |
Â
$creditmemo->refund();
|
668 |
Â
$transactionSave = Mage::getModel('core/resource_transaction')
|
669 |
-
|
670 |
-
|
671 |
Â
if ($creditmemo->getInvoice()) {
|
672 |
Â
$transactionSave->addObject($creditmemo->getInvoice());
|
673 |
Â
}
|
@@ -688,7 +756,7 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
688 |
Â
* @desc Create invoice
|
689 |
Â
* @param type $order
|
690 |
Â
* @param type $response
|
691 |
-
* @return type
|
692 |
Â
*/
|
693 |
Â
public function createInvoice($order, $response) {
|
694 |
Â
$payment = $order->getPayment()->getMethodInstance();
|
@@ -700,35 +768,38 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
700 |
Â
$_status = $this->_getConfigData('order_status');
|
701 |
Â
$_mail = (bool) $this->_getConfigData('send_update_mail');
|
702 |
Â
$value = trim($response->getData('value'));
|
703 |
-
|
704 |
-
|
705 |
Â
if (strcmp($order->getState(), Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) == 0) {
|
706 |
Â
$order->setState(Mage_Sales_Model_Order::STATE_NEW);
|
707 |
Â
}
|
708 |
Â
|
709 |
Â
//capture mode
|
710 |
Â
if (!$this->isAutoCapture($response)) {
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
Â
}
|
716 |
-
|
Â
|
|
Â
|
|
Â
|
|
717 |
Â
if ($order->canInvoice()) {
|
718 |
Â
$invoice = $order->prepareInvoice();
|
719 |
Â
$invoice->getOrder()->setIsInProcess(true);
|
720 |
Â
$invoice->register()->capture();
|
721 |
Â
try {
|
722 |
Â
Mage::getModel('core/resource_transaction')
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
Â
} catch (Exception $e) {
|
727 |
Â
$payment->writeLog($e->getMessage());
|
728 |
Â
}
|
729 |
Â
|
730 |
Â
//selected adyen status
|
731 |
-
$this->setPaymentAuthorized($order, $success);
|
732 |
Â
|
733 |
Â
if ($invoiceAutoMail) {
|
734 |
Â
$invoice->sendEmail();
|
@@ -741,11 +812,11 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
741 |
Â
/**
|
742 |
Â
* @desc order comments or history
|
743 |
Â
* @param type $order
|
744 |
-
* @param Varien_Object $response
|
745 |
Â
*/
|
746 |
Â
protected function _addStatusHistoryComment($order, Varien_Object $response, $status = false) {
|
747 |
-
|
748 |
-
|
749 |
Â
//notification
|
750 |
Â
$pspReference = $response->getData('pspReference');
|
751 |
Â
$success = trim($response->getData('success'));
|
@@ -753,6 +824,8 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
753 |
Â
$eventCode = $response->getData('eventCode');
|
754 |
Â
$reason = $response->getData('reason');
|
755 |
Â
$success = (!empty($reason)) ? "$success_result <br />reason:$reason" : $success_result;
|
Â
|
|
Â
|
|
756 |
Â
|
757 |
Â
//post
|
758 |
Â
$authResult = $response->getData('authResult');
|
@@ -765,26 +838,56 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
765 |
Â
$type = (!empty($authResult)) ? 'Adyen Result URL Notification(s):' : 'Adyen HTTP Notification(s):';
|
766 |
Â
switch ($type) {
|
767 |
Â
case 'Adyen Result URL Notification(s):':
|
768 |
-
/*PCD*/ // choose not to update the adyen_event_code in the order when the order is already on notification:Authorisation status and authresult = resultURL:Authorised
|
769 |
Â
if(!(substr($order->getAdyenEventCode(), 0, 13) == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION && $authResult == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED)){
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
Â
}
|
774 |
Â
$comment = Mage::helper('adyen')
|
775 |
-
|
776 |
Â
break;
|
777 |
Â
default:
|
778 |
-
|
779 |
-
|
780 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
781 |
Â
$comment = Mage::helper('adyen')
|
782 |
-
|
Â
|
|
783 |
Â
break;
|
784 |
Â
}
|
785 |
-
$order->addStatusHistoryComment($comment, $status);
|
786 |
Â
|
787 |
-
|
Â
|
|
788 |
Â
}
|
789 |
Â
|
790 |
Â
/**
|
@@ -898,4 +1001,4 @@ class Adyen_Payment_Model_Process extends Mage_Core_Model_Abstract {
|
|
898 |
Â
return Mage::app()->getRequest();
|
899 |
Â
}
|
900 |
Â
|
901 |
-
}
|
34 |
Â
* @throws Exception
|
35 |
Â
*/
|
36 |
Â
public function processResponse($soapItem = null) {
|
37 |
+
|
38 |
+
$response = (!empty($soapItem)) ? $soapItem : $this->getRequest()->getParams();
|
39 |
Â
Mage::getResourceModel('adyen/adyen_debug')->assignData($response);
|
40 |
+
$actionName = $this->getRequest()->getActionName();
|
41 |
+
$helper = Mage::helper('adyen');
|
42 |
+
|
43 |
Â
if (empty($response)) {
|
44 |
+
Mage::log('blanco on response, please check your webserver that the result url accepts parameters', Zend_Log::CRIT, "adyen_notification.log", true);
|
45 |
Â
return "401";
|
46 |
Â
}
|
47 |
+
|
48 |
Â
$varienObj = new Varien_Object();
|
49 |
Â
foreach ($response as $code => $value) {
|
50 |
Â
if ($code == 'amount') {
|
57 |
Â
|
58 |
Â
// if version is added to notification url (?version=true) then only return the version of the plugin (only works from verion 1.0.0.8)
|
59 |
Â
if($varienObj->getData('version')) {
|
60 |
+
echo $helper->getExtensionVersion();
|
61 |
+
exit;
|
62 |
Â
}
|
63 |
+
|
64 |
Â
//authenticate
|
65 |
Â
$authStatus = Mage::getModel('adyen/authenticate')->authenticate($actionName, $varienObj);
|
66 |
Â
if (!$authStatus) {
|
70 |
Â
}
|
71 |
Â
|
72 |
Â
$incrementId = $varienObj->getData('merchantReference');
|
73 |
+
|
74 |
+
try{
|
75 |
+
|
76 |
Â
//get order && payment objects
|
77 |
Â
$order = Mage::getModel('sales/order');
|
78 |
+
|
79 |
Â
//error
|
80 |
Â
$orderExist = $this->_incrementIdExist($incrementId);
|
81 |
Â
if (empty($orderExist)) {
|
101 |
Â
|
102 |
Â
return $status;
|
103 |
Â
}
|
104 |
+
|
105 |
+
|
106 |
+
public function processPosResponse() {
|
107 |
+
|
108 |
+
$helper = Mage::helper('adyen');
|
109 |
+
$response = $_REQUEST;
|
110 |
+
|
111 |
+
|
112 |
+
$varienObj = new Varien_Object();
|
113 |
+
foreach ($response as $code => $value) {
|
114 |
+
if ($code == 'amount') {
|
115 |
+
if (is_object($value))
|
116 |
+
$value = $value->value;
|
117 |
+
$code = 'value';
|
118 |
+
}
|
119 |
+
$varienObj->setData($code, $value);
|
120 |
+
}
|
121 |
+
|
122 |
+
$actionName = $this->getRequest()->getActionName();
|
123 |
+
$result = $varienObj->getData('result');
|
124 |
+
|
125 |
+
// check if result comes from POS device comes form POS
|
126 |
+
if($actionName == "successPos" && $result != "") {
|
127 |
+
|
128 |
+
$checksum = $varienObj->getData('checksum');
|
129 |
+
|
130 |
+
// for android checksum is called cs
|
131 |
+
if($checksum == "") {
|
132 |
+
$checksum = $varienObj->getData('cs');
|
133 |
+
}
|
134 |
+
|
135 |
+
$amount = $varienObj->getData('originalCustomAmount');
|
136 |
+
$currency = $varienObj->getData('originalCustomCurrency');
|
137 |
+
$session_id = $varienObj->getData('sessionId');
|
138 |
+
|
139 |
+
|
140 |
+
// for android sessionis is with low i
|
141 |
+
if($session_id == "") {
|
142 |
+
$session_id = $varienObj->getData('sessionid');
|
143 |
+
}
|
144 |
+
|
145 |
+
// calculate amount checksum
|
146 |
+
$amount_checksum = 0;
|
147 |
+
|
148 |
+
for($i=0;$i<strlen($amount);$i++)
|
149 |
+
{
|
150 |
+
// ASCII value use ord
|
151 |
+
$checksum_calc = ord($amount[$i]) - 48;
|
152 |
+
$amount_checksum += $checksum_calc;
|
153 |
+
}
|
154 |
+
|
155 |
+
$currency_checksum = 0;
|
156 |
+
for($i=0;$i<strlen($currency);$i++)
|
157 |
+
{
|
158 |
+
$checksum_calc = ord($currency[$i]) - 64;
|
159 |
+
$currency_checksum += $checksum_calc;
|
160 |
+
}
|
161 |
+
|
162 |
+
$result_checksum = 0;
|
163 |
+
for($i=0;$i<strlen($result);$i++)
|
164 |
+
{
|
165 |
+
$checksum_calc = ord($result[$i]) - 64;
|
166 |
+
$result_checksum += $checksum_calc;
|
167 |
+
}
|
168 |
+
|
169 |
+
$session_id_checksum = 0;
|
170 |
+
for($i=0;$i<strlen($session_id);$i++)
|
171 |
+
{
|
172 |
+
$checksum_calc = ord($session_id[$i]) - 48;
|
173 |
+
$session_id_checksum += $checksum_calc;
|
174 |
+
}
|
175 |
+
|
176 |
+
$total_result_checksum = (($amount_checksum + $currency_checksum + $result_checksum) * $session_id_checksum) % 100;
|
177 |
+
|
178 |
+
// check if request is valid
|
179 |
+
if($total_result_checksum == $checksum) {
|
180 |
+
|
181 |
+
//get order && payment objects
|
182 |
+
$order = Mage::getModel('sales/order');
|
183 |
+
//$incrementId = $varienObj->getData('merchantReference');
|
184 |
+
$incrementId = $varienObj->getData('originalCustomMerchantReference');
|
185 |
+
|
186 |
+
//error
|
187 |
+
$orderExist = $this->_incrementIdExist($incrementId);
|
188 |
+
|
189 |
+
if (empty($orderExist)) {
|
190 |
+
$this->_writeLog("unknown order : $incrementId");
|
191 |
+
} else {
|
192 |
+
$order->loadByIncrementId($incrementId);
|
193 |
+
|
194 |
+
if($result == 'APPROVED') {
|
195 |
+
// wait for notification to finish the order
|
196 |
+
|
197 |
+
// set adyen event status on true
|
198 |
+
$order->setAdyenEventCode(Adyen_Payment_Model_Event::ADYEN_EVENT_POSAPPROVED);
|
199 |
+
|
200 |
+
$comment = Mage::helper('adyen')
|
201 |
+
->__('%s <br /> Result: %s <br /> paymentMethod: %s', 'Adyen App Result URL Notification:', $result, 'POS');
|
202 |
+
|
203 |
+
$order->addStatusHistoryComment($comment, false);
|
204 |
+
|
205 |
+
try {
|
206 |
+
$order->save();
|
207 |
+
} catch (Exception $e) {
|
208 |
+
Mage::logException($e);
|
209 |
+
}
|
210 |
+
} else {
|
211 |
+
|
212 |
+
$isBankTransfer = Mage::getModel('adyen/event')
|
213 |
+
->isBanktransfer($order->getIncrementId());
|
214 |
+
//attempt to hold/cancel (exceptional to BankTransfer they stay in previous status/pending)
|
215 |
+
|
216 |
+
if (!$isBankTransfer) {
|
217 |
+
|
218 |
+
$comment = Mage::helper('adyen')
|
219 |
+
->__('%s <br /> Result: %s <br /> paymentMethod: %s', 'Adyen App Result URL Notification:', $result, 'POS');
|
220 |
+
|
221 |
+
$order->addStatusHistoryComment($comment, Mage_Sales_Model_Order::STATE_CANCELED);
|
222 |
+
|
223 |
+
$order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_CANCEL, true);
|
224 |
+
|
225 |
+
if (!$order->canCancel()) {
|
226 |
+
$this->_writeLog('order can not be canceled', $order);
|
227 |
+
$order->addStatusHistoryComment($helper->__('Order can not be canceled'), Mage_Sales_Model_Order::STATE_CANCELED);
|
228 |
+
$order->save();
|
229 |
+
|
230 |
+
} else {
|
231 |
+
$order->cancel()->save();
|
232 |
+
}
|
233 |
+
|
234 |
+
} else {
|
235 |
+
$this->_addStatusHistoryComment($order, $varienObj, $order->getStatus());
|
236 |
+
$status = true;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
// close the window
|
243 |
+
$html = "<html><body>
|
244 |
Â
<script type=\"text/javascript\">
|
245 |
Â
function closeWindow() {
|
246 |
Â
window.open('', '_self', '');
|
249 |
Â
setTimeout(closeWindow, 500);
|
250 |
Â
</script>
|
251 |
Â
</body></html>";
|
252 |
+
|
253 |
+
return $html;
|
254 |
Â
}
|
255 |
+
|
256 |
Â
public function processCashResponse()
|
257 |
Â
{
|
258 |
+
$response = $_REQUEST;
|
259 |
+
|
260 |
+
$varienObj = new Varien_Object();
|
261 |
+
foreach ($response as $code => $value) {
|
262 |
+
if ($code == 'amount') {
|
263 |
+
if (is_object($value))
|
264 |
+
$value = $value->value;
|
265 |
+
$code = 'value';
|
266 |
+
}
|
267 |
+
$varienObj->setData($code, $value);
|
268 |
+
}
|
269 |
+
|
270 |
+
$pspReference = $varienObj->getData('pspReference');
|
271 |
+
$merchantReference = $varienObj->getData('merchantReference');
|
272 |
+
$skinCode = $varienObj->getData('skinCode');
|
273 |
+
$paymentAmount = $varienObj->getData('paymentAmount');
|
274 |
+
$currencyCode = $varienObj->getData('currencyCode');
|
275 |
+
$customPaymentMethod = $varienObj->getData('c_cash');
|
276 |
+
$paymentMethod = $varienObj->getData('paymentMethod');
|
277 |
+
$merchantSig = $varienObj->getData('merchantSig');
|
278 |
+
|
279 |
+
$sign = $pspReference .
|
280 |
+
$merchantReference .
|
281 |
+
$skinCode .
|
282 |
+
$paymentAmount .
|
283 |
+
$currencyCode .
|
284 |
+
$customPaymentMethod . $paymentMethod;
|
285 |
+
|
286 |
+
$secretWord = $this->_getSecretWord();
|
287 |
+
$signMac = Zend_Crypt_Hmac::compute($secretWord, 'sha1', $sign);
|
288 |
+
$calMerchantSig = base64_encode(pack('H*', $signMac));
|
289 |
+
|
290 |
+
// check if signatures are the same
|
291 |
+
if($calMerchantSig == $merchantSig) {
|
292 |
+
|
293 |
+
//get order && payment objects
|
294 |
+
$order = Mage::getModel('sales/order');
|
295 |
+
|
296 |
+
//error
|
297 |
+
$orderExist = $this->_incrementIdExist($merchantReference);
|
298 |
+
|
299 |
+
if (empty($orderExist)) {
|
300 |
+
$this->_writeLog("unknown order : $merchantReference");
|
301 |
+
} else {
|
302 |
+
$order->loadByIncrementId($merchantReference);
|
303 |
+
|
304 |
+
$comment = Mage::helper('adyen')
|
305 |
+
->__('Adyen Cash Result URL Notification: <br /> pspReference: %s <br /> paymentMethod: %s', $pspReference, $paymentMethod);
|
306 |
+
|
307 |
+
$status = true;
|
308 |
+
|
309 |
+
$history = Mage::getModel('sales/order_status_history')
|
310 |
+
->setStatus($status)
|
311 |
+
->setComment($comment)
|
312 |
+
->setEntityName("order")
|
313 |
+
->setOrder($order);
|
314 |
+
$history->save();
|
315 |
+
|
316 |
+
return $status;
|
317 |
+
}
|
318 |
+
}
|
319 |
+
return false;
|
320 |
Â
}
|
321 |
+
|
322 |
Â
protected function _getSecretWord($options = null) {
|
323 |
+
switch ($this->getConfigDataDemoMode()) {
|
324 |
+
case true:
|
325 |
+
$secretWord = trim($this->_getConfigData('secret_wordt', 'adyen_hpp'));
|
326 |
+
break;
|
327 |
+
default:
|
328 |
+
$secretWord = trim($this->_getConfigData('secret_wordp', 'adyen_hpp'));
|
329 |
+
break;
|
330 |
+
}
|
331 |
+
return $secretWord;
|
332 |
Â
}
|
333 |
+
|
334 |
Â
/**
|
335 |
Â
* Used via Payment method.Notice via configuration ofcourse Y or N
|
336 |
Â
* @return boolean true on demo, else false
|
337 |
Â
*/
|
338 |
Â
public function getConfigDataDemoMode() {
|
339 |
+
if ($this->_getConfigData('demoMode') == 'Y') {
|
340 |
+
return true;
|
341 |
+
}
|
342 |
+
return false;
|
343 |
Â
}
|
344 |
+
|
345 |
Â
/**
|
346 |
Â
* @desc check order existance
|
347 |
Â
* @param type $incrementId
|
348 |
+
* @return type
|
349 |
Â
*/
|
350 |
Â
protected function _incrementIdExist($incrementId) {
|
351 |
Â
return Mage::getResourceModel('adyen/order')->orderExist($incrementId);
|
354 |
Â
/**
|
355 |
Â
* @desc Adyen attribute handling
|
356 |
Â
* @param Varien_Object $order
|
357 |
+
* @param type $response
|
358 |
Â
*/
|
359 |
Â
protected function _addAdyenAttributes(Varien_Object $order, $response, $updateAdyenStatus = true) {
|
360 |
+
$klarnaReservationNumber = $response->getData('additionalData_additionalData_acquirerReference');
|
361 |
+
$ccLast4 = $response->getData('additionalData_cardSummary');
|
362 |
+
$avsResult = $response->getData('additionalData_avsResult');
|
363 |
+
$cvcResult = $response->getData('additionalData_cvcResult');
|
364 |
+
$boletoPaidAmount = $response->getData('additionalData_boletobancario_paidAmount');
|
365 |
Â
$pspReference = $response->getData('pspReference');
|
366 |
Â
$eventCode = $response->getData('eventCode');
|
367 |
Â
$authResult = $response->getData('authResult');
|
368 |
Â
$incrementId = $response->getData('merchantReference');
|
369 |
Â
$paymentMethod = $response->getData('paymentMethod');
|
370 |
+
$success = (trim($response->getData('success')) == "true") ? true : false;
|
371 |
Â
$eventData = (!empty($eventCode)) ? $eventCode : $authResult;
|
372 |
Â
$paymentObj = $order->getPayment();
|
373 |
+
|
374 |
Â
$paymentObj->setLastTransId($incrementId)
|
375 |
+
->setAdyenPaymentMethod($paymentMethod)
|
376 |
+
->setCcType($paymentMethod)
|
377 |
+
;
|
378 |
Â
|
379 |
Â
// only update this when authroization notification is not yet processed
|
380 |
Â
Mage::log("AdyenEventCode in paymentobject order:".$order->getAdyenEventCode(), Zend_Log::DEBUG, "adyen_notification.log", true);
|
381 |
Â
Mage::log("paymentobject order authResult:".$authResult, Zend_Log::DEBUG, "adyen_notification.log", true);
|
382 |
+
|
383 |
Â
if(!(substr($order->getAdyenEventCode(), 0, 13) == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION && $authResult == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED)){
|
384 |
+
Mage::log("update paymentobject eventcode with:".$eventData, Zend_Log::DEBUG, "adyen_notification.log", true);
|
385 |
+
$paymentObj->setAdyenEventCode($eventData);
|
386 |
Â
}
|
387 |
+
|
388 |
Â
//only original here
|
389 |
Â
if ($eventCode == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED
|
390 |
+
|| $eventCode == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION)
|
391 |
Â
{
|
392 |
Â
$paymentObj->setAdyenPspReference($pspReference);
|
393 |
+
if($klarnaReservationNumber != "") {
|
394 |
+
$paymentObj->setAdyenKlarnaNumber($klarnaReservationNumber);
|
395 |
+
}
|
396 |
+
if($ccLast4 != "") {
|
397 |
+
$paymentObj->setccLast4($ccLast4);
|
398 |
+
}
|
399 |
+
if($avsResult != "") {
|
400 |
+
$paymentObj->setAdyenAvsResult($avsResult);
|
401 |
+
}
|
402 |
+
if($cvcResult != "") {
|
403 |
+
$paymentObj->setAdyenCvcResult($cvcResult);
|
404 |
+
}
|
405 |
+
if($boletoPaidAmount != "") {
|
406 |
+
$paymentObj->setAdyenBoletoPaidAmount($boletoPaidAmount);
|
407 |
+
}
|
408 |
Â
}
|
409 |
+
|
410 |
Â
try {
|
411 |
+
//save all response data for a pure duplicate detection
|
412 |
+
Mage::getModel('adyen/event')
|
413 |
+
->setPspReference($pspReference)
|
414 |
+
->setAdyenEventCode($eventCode)
|
415 |
+
->setAdyenEventResult($eventData)
|
416 |
+
->setIncrementId($incrementId)
|
417 |
+
->setPaymentMethod($paymentMethod)
|
418 |
+
->setCreatedAt(now())
|
419 |
+
->setSuccess($success)
|
420 |
+
->saveData($updateAdyenStatus) // don't update the adyen status
|
421 |
+
;
|
422 |
Â
} catch (Exception $e) {
|
423 |
+
Mage::log($e->getMessage(), Zend_Log::DEBUG, "adyen_notification.log", true);
|
424 |
Â
}
|
425 |
Â
}
|
426 |
Â
|
429 |
Â
* @param Varien_Object $params
|
430 |
Â
*/
|
431 |
Â
protected function _processPostSuccess($order, $params) {
|
432 |
+
|
433 |
+
//set these attributes here
|
434 |
Â
$this->_addAdyenAttributes($order, $params, false);
|
435 |
Â
$status = false;
|
436 |
Â
$authResult = $params->getData('authResult');
|
438 |
Â
switch ($authResult) {
|
439 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED:
|
440 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_PENDING:
|
441 |
+
Mage::log("PAYMENT POST URL BEFORE SAVING STATUS:".$order->getStatus(), Zend_Log::DEBUG, "adyen_notification.log", true);
|
442 |
+
|
443 |
+
$type = "Adyen Result URL Notification(s):";
|
444 |
+
$pspReference = $params->getData('pspReference');
|
445 |
+
$paymentMethod = $params->getData('paymentMethod');
|
446 |
+
|
447 |
+
$comment = Mage::helper('adyen')
|
448 |
+
->__('%s <br /> authResult: %s <br /> pspReference: %s <br /> paymentMethod: %s', $type, $authResult, $pspReference, $paymentMethod);
|
449 |
+
|
450 |
+
$history = Mage::getModel('sales/order_status_history')
|
451 |
+
->setStatus($status)
|
452 |
+
->setComment($comment)
|
453 |
+
->setEntityName("order")
|
454 |
+
->setOrder($order);
|
455 |
+
$history->save();
|
456 |
+
$status = true;
|
457 |
+
// don't save the order because of interferrence with order status (set by notifications)
|
458 |
Â
break;
|
459 |
Â
case Adyen_Payment_Model_Event::ADYEN_EVENT_CANCELLED:
|
460 |
Â
$isBankTransfer = Mage::getModel('adyen/event')
|
461 |
+
->isBanktransfer($order->getIncrementId());
|
462 |
Â
//attempt to hold/cancel (exceptional to BankTransfer they stay in previous status/pending)
|
463 |
Â
if (!$isBankTransfer) {
|
464 |
Â
$this->_addStatusHistoryComment($order, $params);
|
485 |
Â
* @desc process notifications
|
486 |
Â
* @param type $order
|
487 |
Â
* @param type $response
|
488 |
+
* @return type
|
489 |
Â
*/
|
490 |
Â
public function notificationHandler($order, $response) {
|
491 |
Â
$payment = $order->getPayment()->getMethodInstance();
|
495 |
Â
|
496 |
Â
//handle duplicates
|
497 |
Â
$isDuplicate = Mage::getModel('adyen/event')
|
498 |
+
->isDuplicate($pspReference, $eventCode, $success);
|
499 |
Â
if ($isDuplicate) {
|
500 |
+
$payment->writeLog("#skipping duplicate notification pspReference:$pspReference && eventCode: $eventCode && success: $success");
|
501 |
Â
return false; //hmt
|
502 |
Â
}
|
503 |
Â
|
504 |
Â
//set these attributes here
|
505 |
Â
$this->_addAdyenAttributes($order, $response);
|
506 |
+
|
507 |
Â
//add comment to the order
|
508 |
Â
if (strcmp($success, 'false') == 0 || !$success) {
|
509 |
Â
$status = ($order->isCanceled() || ($order->getState() === Mage_Sales_Model_Order::STATE_PENDING_PAYMENT)) ?
|
510 |
+
Mage_Sales_Model_Order::STATE_CANCELED : $order->getStatus();
|
511 |
Â
$this->_addStatusHistoryComment($order, $response, $status);
|
512 |
Â
} else {
|
513 |
Â
$this->_addStatusHistoryComment($order, $response, $order->getStatus());
|
529 |
Â
/**
|
530 |
Â
* @desc process notifications
|
531 |
Â
* @param type $order
|
532 |
+
* @param type $response
|
533 |
Â
*/
|
534 |
Â
protected function _processNotifications($order, $response) {
|
535 |
Â
$valid = $this->notificationHandler($order, $response); //hmt: added $valid
|
536 |
+
|
537 |
Â
if ($valid) {
|
538 |
+
$eventCode = trim($response->getData('eventCode'));
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
539 |
Â
|
540 |
+
$success = (bool) trim($response->getData('success'));
|
541 |
+
$payment_method = trim($response->getData('paymentMethod'));
|
542 |
+
switch ($eventCode) {
|
543 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_REFUND:
|
544 |
+
|
545 |
+
$this->refundOrder($order, $response);
|
546 |
+
//refund completed
|
547 |
+
$this->setRefundAuthorized($order, $success);
|
548 |
+
break;
|
549 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_PENDING:
|
550 |
+
//add comment to the order
|
551 |
+
break;
|
552 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_HANDLEDEXTERNALLY:
|
553 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION:
|
554 |
+
//pre-authorise if success
|
555 |
+
$order->sendNewOrderEmail(); // send order email
|
556 |
+
|
557 |
+
/*
|
558 |
+
* For AliPay or UnionPay sometimes it first send a AUTHORISATION false notification and then
|
559 |
+
* a AUTHORISATION true notification. The second time it must revert the cancelled of the first notification before we can
|
560 |
+
* assign a new status
|
561 |
+
*/
|
562 |
+
if($success == "true") {
|
563 |
+
if($payment_method == "alipay" || $payment_method == "unionpay") {
|
564 |
+
foreach ($order->getAllItems() as $item) {
|
565 |
+
$item->setQtyCanceled(0);
|
566 |
+
$item->save();
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
$this->setPrePaymentAuthorized($order, $success);
|
571 |
+
|
572 |
+
$this->createInvoice($order, $response);
|
573 |
+
break;
|
574 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CAPTURE:
|
575 |
+
$this->setPaymentAuthorized($order, $success, $response);
|
576 |
+
break;
|
577 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CAPTURE_FAILED:
|
578 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CANCELLATION:
|
579 |
+
case Adyen_Payment_Model_Event::ADYEN_EVENT_CANCELLED:
|
580 |
+
$this->holdCancelOrder($order, $response);
|
581 |
+
break;
|
582 |
+
default:
|
583 |
+
//@todo fix me cancel && error here
|
584 |
+
$order->getPayment()->getMethodInstance()->writeLog('notification event not supported!');
|
585 |
+
break;
|
586 |
+
}
|
587 |
Â
}
|
588 |
Â
}
|
589 |
Â
|
590 |
Â
/**
|
591 |
Â
* @since v0.1.0.5
|
592 |
Â
* @param type $order
|
593 |
+
* @param type $success
|
594 |
Â
*/
|
595 |
+
public function setPaymentAuthorized($order, $success = false, $response) {
|
596 |
Â
if ($success && !empty($order)) {
|
597 |
+
|
598 |
Â
$status = $this->_getConfigData('payment_authorized');
|
599 |
+
|
600 |
+
// check for boleto if payment is totally paid
|
601 |
+
if($order->getPayment()->getMethod() == "adyen_boleto") {
|
602 |
+
|
603 |
+
// check if paid amount is the same as orginal amount
|
604 |
+
$orginalAmount = trim($response->getData('additionalData_boletobancario_originalAmount'));
|
605 |
+
$paidAmount = trim($response->getData('additionalData_boletobancario_paidAmount'));
|
606 |
+
|
607 |
+
if($orginalAmount != $paidAmount) {
|
608 |
+
|
609 |
+
// not the full amount is paid. Check if it is underpaid or overpaid
|
610 |
+
// strip the BRL of the string
|
611 |
+
$orginalAmount = str_replace("BRL", "", $orginalAmount);
|
612 |
+
$orginalAmount = floatval(trim($orginalAmount));
|
613 |
+
|
614 |
+
$paidAmount = str_replace("BRL", "", $paidAmount);
|
615 |
+
$paidAmount = floatval(trim($paidAmount));
|
616 |
+
|
617 |
+
if($paidAmount > $orginalAmount) {
|
618 |
+
$overpaidStatus = $this->_getConfigData('order_overpaid_status', 'adyen_boleto');
|
619 |
+
// check if there is selected a status if not fall back to the default
|
620 |
+
$status = (!empty($overpaidStatus)) ? $overpaidStatus : $status;
|
621 |
+
} else {
|
622 |
+
$underpaidStatus = $this->_getConfigData('order_underpaid_status', 'adyen_boleto');
|
623 |
+
// check if there is selected a status if not fall back to the default
|
624 |
+
$status = (!empty($underpaidStatus)) ? $underpaidStatus : $status;
|
625 |
+
}
|
626 |
+
}
|
627 |
+
}
|
628 |
+
|
629 |
Â
$status = (!empty($status)) ? $status : $order->getStatus();
|
630 |
Â
$order->addStatusHistoryComment(Mage::helper('adyen')->__('Adyen Payment Successfully completed'), $status);
|
631 |
Â
$order->sendOrderUpdateEmail((bool) $this->_getConfigData('send_update_mail'));
|
639 |
Â
/**
|
640 |
Â
* @since v0.1.0.5
|
641 |
Â
* @param type $order
|
642 |
+
* @param type $success
|
643 |
Â
*/
|
644 |
Â
public function setPrePaymentAuthorized($order, $success = false) {
|
645 |
Â
if ($success && !empty($order)) {
|
657 |
Â
/**
|
658 |
Â
* @since v0.1.0.8
|
659 |
Â
* @param type $order
|
660 |
+
* @param type $success
|
661 |
Â
*/
|
662 |
Â
public function setRefundAuthorized($order, $success = false) {
|
663 |
Â
if ($success && !empty($order)) {
|
682 |
Â
$paymentMethod = trim($response->getData('paymentMethod'));
|
683 |
Â
$captureMode = trim($this->_getConfigData('capture_mode'));
|
684 |
Â
// payment method ideal and cash has direct capture
|
685 |
+
if (strcmp($paymentMethod, 'ideal') === 0 || strcmp($paymentMethod, 'c_cash' ) === 0 ) {
|
686 |
Â
return true;
|
687 |
Â
}
|
688 |
Â
if (strcmp($captureMode, 'manual') === 0) {
|
707 |
Â
//skip orders with [refund-received]
|
708 |
Â
$pspReference = trim($response->getData('pspReference'));
|
709 |
Â
$result = Mage::getModel('adyen/event')
|
710 |
+
->getEvent($pspReference, '[refund-received]');
|
711 |
Â
if (!empty($result)) {
|
712 |
Â
$this->_writeLog("\nSkip refund process, as refund initiated via Magento id: {$order->getIncrementId()}");
|
713 |
Â
return false;
|
728 |
Â
|
729 |
Â
try {
|
730 |
Â
Mage::getModel('core/resource_transaction')
|
731 |
+
->addObject($creditmemo)
|
732 |
+
->addObject($creditmemo->getOrder())
|
733 |
+
->save();
|
734 |
Â
//refund
|
735 |
Â
$creditmemo->refund();
|
736 |
Â
$transactionSave = Mage::getModel('core/resource_transaction')
|
737 |
+
->addObject($creditmemo)
|
738 |
+
->addObject($creditmemo->getOrder());
|
739 |
Â
if ($creditmemo->getInvoice()) {
|
740 |
Â
$transactionSave->addObject($creditmemo->getInvoice());
|
741 |
Â
}
|
756 |
Â
* @desc Create invoice
|
757 |
Â
* @param type $order
|
758 |
Â
* @param type $response
|
759 |
+
* @return type
|
760 |
Â
*/
|
761 |
Â
public function createInvoice($order, $response) {
|
762 |
Â
$payment = $order->getPayment()->getMethodInstance();
|
768 |
Â
$_status = $this->_getConfigData('order_status');
|
769 |
Â
$_mail = (bool) $this->_getConfigData('send_update_mail');
|
770 |
Â
$value = trim($response->getData('value'));
|
771 |
+
|
772 |
+
//create invoice
|
773 |
Â
if (strcmp($order->getState(), Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) == 0) {
|
774 |
Â
$order->setState(Mage_Sales_Model_Order::STATE_NEW);
|
775 |
Â
}
|
776 |
Â
|
777 |
Â
//capture mode
|
778 |
Â
if (!$this->isAutoCapture($response)) {
|
779 |
+
$order->addStatusHistoryComment(Mage::helper('adyen')->__('Capture Mode set to Manual'));
|
780 |
+
$order->sendOrderUpdateEmail($_mail);
|
781 |
+
$order->save();
|
782 |
+
return false;
|
783 |
Â
}
|
784 |
+
|
785 |
+
//$order->addStatusHistoryComment(Mage::helper('adyen')->__('Adyen Payment Successfully completed'), $status);
|
786 |
+
|
787 |
+
|
788 |
Â
if ($order->canInvoice()) {
|
789 |
Â
$invoice = $order->prepareInvoice();
|
790 |
Â
$invoice->getOrder()->setIsInProcess(true);
|
791 |
Â
$invoice->register()->capture();
|
792 |
Â
try {
|
793 |
Â
Mage::getModel('core/resource_transaction')
|
794 |
+
->addObject($invoice)
|
795 |
+
->addObject($invoice->getOrder())
|
796 |
+
->save();
|
797 |
Â
} catch (Exception $e) {
|
798 |
Â
$payment->writeLog($e->getMessage());
|
799 |
Â
}
|
800 |
Â
|
801 |
Â
//selected adyen status
|
802 |
+
$this->setPaymentAuthorized($order, $success, $response);
|
803 |
Â
|
804 |
Â
if ($invoiceAutoMail) {
|
805 |
Â
$invoice->sendEmail();
|
812 |
Â
/**
|
813 |
Â
* @desc order comments or history
|
814 |
Â
* @param type $order
|
815 |
+
* @param Varien_Object $response
|
816 |
Â
*/
|
817 |
Â
protected function _addStatusHistoryComment($order, Varien_Object $response, $status = false) {
|
818 |
+
Mage::log("_addStatusHistoryComment", Zend_Log::DEBUG, "adyen_notification.log", true);
|
819 |
+
|
820 |
Â
//notification
|
821 |
Â
$pspReference = $response->getData('pspReference');
|
822 |
Â
$success = trim($response->getData('success'));
|
824 |
Â
$eventCode = $response->getData('eventCode');
|
825 |
Â
$reason = $response->getData('reason');
|
826 |
Â
$success = (!empty($reason)) ? "$success_result <br />reason:$reason" : $success_result;
|
827 |
+
$klarnaReservationNumber = $response->getData('additionalData_additionalData_acquirerReference');
|
828 |
+
$boletoPaidAmount = $response->getData('additionalData_boletobancario_paidAmount');
|
829 |
Â
|
830 |
Â
//post
|
831 |
Â
$authResult = $response->getData('authResult');
|
838 |
Â
$type = (!empty($authResult)) ? 'Adyen Result URL Notification(s):' : 'Adyen HTTP Notification(s):';
|
839 |
Â
switch ($type) {
|
840 |
Â
case 'Adyen Result URL Notification(s):':
|
841 |
+
/*PCD*/ // choose not to update the adyen_event_code in the order when the order is already on notification:Authorisation status and authresult = resultURL:Authorised
|
842 |
Â
if(!(substr($order->getAdyenEventCode(), 0, 13) == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISATION && $authResult == Adyen_Payment_Model_Event::ADYEN_EVENT_AUTHORISED)){
|
843 |
+
Mage::log("Adyen Result URL order authResult:".$authResult, Zend_Log::DEBUG, "adyen_notification.log", true);
|
844 |
+
|
845 |
+
$order->setAdyenEventCode($authResult);
|
846 |
Â
}
|
847 |
Â
$comment = Mage::helper('adyen')
|
848 |
+
->__('%s <br /> authResult: %s <br /> pspReference: %s <br /> paymentMethod: %s', $type, $authResult, $pspReference, $paymentMethod);
|
849 |
Â
break;
|
850 |
Â
default:
|
851 |
+
Mage::log("default order authResult:".$eventCode . " : " . strtoupper($success_result), Zend_Log::DEBUG, "adyen_notification.log", true);
|
852 |
+
|
853 |
+
if($eventCode == Adyen_Payment_Model_Event::ADYEN_EVENT_REFUND) {
|
854 |
+
|
855 |
+
$currency = $order->getOrderCurrencyCode();
|
856 |
+
|
857 |
+
// check if it is a full or partial refund
|
858 |
+
$amount = Mage::helper('adyen')->formatAmount(($response->getValue() / 100), $currency);
|
859 |
+
$orderAmount = Mage::helper('adyen')->formatAmount($order->getGrandTotal(), $currency);
|
860 |
+
|
861 |
+
if($amount == $orderAmount) {
|
862 |
+
$order->setAdyenEventCode($eventCode . " : " . strtoupper($success_result));
|
863 |
+
} else {
|
864 |
+
$order->setAdyenEventCode("(PARTIAL) " . $eventCode . " : " . strtoupper($success_result));
|
865 |
+
}
|
866 |
+
} else {
|
867 |
+
$order->setAdyenEventCode($eventCode . " : " . strtoupper($success_result));
|
868 |
+
}
|
869 |
+
|
870 |
+
// if payment method is klarna or openinvoice/afterpay show the reservartion number
|
871 |
+
if(($paymentMethod == "klarna" || $paymentMethod == "afterpay_default" || $paymentMethod == "openinvoice") && ($klarnaReservationNumber != null && $klarnaReservationNumber != "")) {
|
872 |
+
$klarnaReservationNumberText = "<br /> reservationNumber: " . $klarnaReservationNumber;
|
873 |
+
} else {
|
874 |
+
$klarnaReservationNumberText = "";
|
875 |
+
}
|
876 |
+
|
877 |
+
if($boletoPaidAmount != null && $boletoPaidAmount != "") {
|
878 |
+
$boletoPaidAmountText = "<br /> Paid amount: " . $boletoPaidAmount;
|
879 |
+
} else {
|
880 |
+
$boletoPaidAmountText = "";
|
881 |
+
}
|
882 |
+
|
883 |
Â
$comment = Mage::helper('adyen')
|
884 |
+
->__('%s <br /> eventCode: %s <br /> pspReference: %s <br /> paymentMethod: %s <br /> success: %s %s %s', $type, $eventCode, $pspReference, $paymentMethod, $success, $klarnaReservationNumberText, $boletoPaidAmountText);
|
885 |
+
|
886 |
Â
break;
|
887 |
Â
}
|
Â
|
|
888 |
Â
|
889 |
+
$order->addStatusHistoryComment($comment, $status);
|
890 |
+
$order->save();
|
891 |
Â
}
|
892 |
Â
|
893 |
Â
/**
|
1001 |
Â
return Mage::app()->getRequest();
|
1002 |
Â
}
|
1003 |
Â
|
1004 |
+
}
|
@@ -0,0 +1,70 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Sales_Quote_Address_Total_PaymentFee extends Mage_Sales_Model_Quote_Address_Total_Abstract
|
29 |
+
{
|
30 |
+
protected $_code = 'payment_fee';
|
31 |
+
|
32 |
+
public function collect(Mage_Sales_Model_Quote_Address $address)
|
33 |
+
{
|
34 |
+
parent::collect($address);
|
35 |
+
|
36 |
+
$this->_setAmount(0);
|
37 |
+
$this->_setBaseAmount(0);
|
38 |
+
|
39 |
+
$quote = $address->getQuote();
|
40 |
+
$val = Mage::Helper('adyen')->isPaymentFeeEnabled($quote);
|
41 |
+
if ($address->getAllItems() && $val) {
|
42 |
+
$currentAmount = $address->getPaymentFeeAmount();
|
43 |
+
$fee = Mage::Helper('adyen')->getPaymentFeeAmount($quote);
|
44 |
+
$balance = $fee - $currentAmount;
|
45 |
+
|
46 |
+
$address->setPaymentFeeAmount($address->getQuote()->getStore()->convertPrice($balance));
|
47 |
+
$address->setBasePaymentFeeAmount($balance);
|
48 |
+
|
49 |
+
$address->setGrandTotal($address->getGrandTotal() + $address->getPaymentFeeAmount());
|
50 |
+
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBasePaymentFeeAmount());
|
51 |
+
}
|
52 |
+
|
53 |
+
return $this;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
57 |
+
{
|
58 |
+
$amt = $address->getPaymentFeeAmount();
|
59 |
+
|
60 |
+
if ($amt != 0) {
|
61 |
+
$address->addTotal(array(
|
62 |
+
'code'=>$this->getCode(),
|
63 |
+
'title'=> Mage::helper('adyen')->__('Payment Fee'),
|
64 |
+
'value'=> $amt
|
65 |
+
));
|
66 |
+
}
|
67 |
+
|
68 |
+
return $this;
|
69 |
+
}
|
70 |
+
}
|
@@ -0,0 +1,120 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Sales_Quote_Address_Total_PaymentInstallmentFee extends Mage_Sales_Model_Quote_Address_Total_Abstract
|
29 |
+
{
|
30 |
+
protected $_code = 'payment_installment_fee';
|
31 |
+
|
32 |
+
/*
|
33 |
+
* keep in mind that collect is running twice if you save payment method.
|
34 |
+
* First time before the payment step save and second time after payment step change
|
35 |
+
*/
|
36 |
+
public function collect(Mage_Sales_Model_Quote_Address $address)
|
37 |
+
{
|
38 |
+
parent::collect($address);
|
39 |
+
|
40 |
+
$quote = $address->getQuote();
|
41 |
+
|
42 |
+
if ($address->getAllItems()) {
|
43 |
+
$currentAmount = $address->getPaymentInstallmentFeeAmount();
|
44 |
+
$payment = $quote->getPayment();
|
45 |
+
|
46 |
+
if($payment && !empty($payment)) {
|
47 |
+
|
48 |
+
$paymentMethod = $quote->getPayment()->getMethod() ;
|
49 |
+
|
50 |
+
if($paymentMethod == "adyen_cc") {
|
51 |
+
|
52 |
+
$info = $payment->getMethodInstance();
|
53 |
+
|
54 |
+
$instance = $info->getInfoInstance();
|
55 |
+
$numberOfInstallments = $instance->getAdditionalInformation('number_of_installments');
|
56 |
+
|
57 |
+
if($numberOfInstallments > 0)
|
58 |
+
{
|
59 |
+
// get the Interest Rate of this installment
|
60 |
+
|
61 |
+
// get cc type
|
62 |
+
$ccType = $instance->getCcType();
|
63 |
+
|
64 |
+
// get installment for this specific card type
|
65 |
+
$ccTypeInstallments = "installments_".$ccType;
|
66 |
+
|
67 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments(null, $ccTypeInstallments);
|
68 |
+
if(empty($all_installments)) {
|
69 |
+
// use default installments
|
70 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments();
|
71 |
+
}
|
72 |
+
|
73 |
+
$installmentKey = $numberOfInstallments - 1;
|
74 |
+
|
75 |
+
$installment = $all_installments[$installmentKey];
|
76 |
+
|
77 |
+
if($installment != null && is_array($installment)) {
|
78 |
+
|
79 |
+
// check if interest rate is filled in
|
80 |
+
if(isset($installment[3]) && $installment[3] > 0) {
|
81 |
+
|
82 |
+
$this->_setAmount(0);
|
83 |
+
$this->_setBaseAmount(0);
|
84 |
+
|
85 |
+
$interestRate = $installment[3];
|
86 |
+
$grandTotal = $address->getGrandTotal();
|
87 |
+
$fee = ($grandTotal / 100) * $interestRate;
|
88 |
+
|
89 |
+
$balance = $fee - $currentAmount;
|
90 |
+
|
91 |
+
$address->setPaymentInstallmentFeeAmount($address->getQuote()->getStore()->convertPrice($balance));
|
92 |
+
$address->setBasePaymentInstallmentFeeAmount($balance);
|
93 |
+
|
94 |
+
$address->setGrandTotal($address->getGrandTotal() + $address->getPaymentInstallmentFeeAmount());
|
95 |
+
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBasePaymentInstallmentFeeAmount());
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
107 |
+
{
|
108 |
+
$amt = $address->getPaymentInstallmentFeeAmount();
|
109 |
+
|
110 |
+
if ($amt != 0) {
|
111 |
+
$address->addTotal(array(
|
112 |
+
'code'=>$this->getCode(),
|
113 |
+
'title'=> Mage::helper('adyen')->__('Installment Fee'),
|
114 |
+
'value'=> $amt
|
115 |
+
));
|
116 |
+
}
|
117 |
+
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
}
|
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Total_PaymentFee_Creditmemo extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
|
29 |
+
{
|
30 |
+
public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
|
31 |
+
{
|
32 |
+
$creditmemo->setGrandTotal($creditmemo->getGrandTotal()+$creditmemo->getPaymentFeeAmount());
|
33 |
+
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal()+$creditmemo->getBasePaymentFeeAmount());
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
}
|
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Total_PaymentFee_Invoice extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
29 |
+
{
|
30 |
+
public function collect(Mage_Sales_Model_Order_Invoice $invoice)
|
31 |
+
{
|
32 |
+
$invoice->setGrandTotal($invoice->getGrandTotal()+$invoice->getPaymentFeeAmount());
|
33 |
+
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal()+$invoice->getBasePaymentFeeAmount());
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
}
|
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Total_PaymentInstallmentFee_Creditmemo extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
|
29 |
+
{
|
30 |
+
public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
|
31 |
+
{
|
32 |
+
$creditmemo->setGrandTotal($creditmemo->getGrandTotal()+$creditmemo->getPaymentInstallmentFeeAmount());
|
33 |
+
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal()+$creditmemo->getBasePaymentInstallmentFeeAmount());
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
}
|
@@ -0,0 +1,36 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
class Adyen_Payment_Model_Total_PaymentInstallmentFee_Invoice extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
29 |
+
{
|
30 |
+
public function collect(Mage_Sales_Model_Order_Invoice $invoice)
|
31 |
+
{
|
32 |
+
$invoice->setGrandTotal($invoice->getGrandTotal()+$invoice->getPaymentInstallmentFeeAmount());
|
33 |
+
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal()+$invoice->getBasePaymentInstallmentFeeAmount());
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
}
|
@@ -0,0 +1,85 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Adyen_Payment_CheckoutPosController extends Mage_Core_Controller_Front_Action {
|
30 |
+
|
31 |
+
public function indexAction()
|
32 |
+
{
|
33 |
+
|
34 |
+
$customer = Mage::getSingleton('customer/session');
|
35 |
+
|
36 |
+
// only proceed if customer is logged in
|
37 |
+
if($customer->isLoggedIn()) {
|
38 |
+
|
39 |
+
// get email
|
40 |
+
$params = $this->getRequest()->getParams();
|
41 |
+
$adyenPosEmail = isset($params['adyenPosEmail']) ? $params['adyenPosEmail'] : "";
|
42 |
+
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
43 |
+
|
44 |
+
// get customer object from session
|
45 |
+
$customerObject = Mage::getModel('customer/customer')->load($customer->getId());
|
46 |
+
|
47 |
+
// important update the shippingaddress and billingaddress this can be null sometimes.
|
48 |
+
$quote->assignCustomerWithAddressChange($customerObject);
|
49 |
+
|
50 |
+
// update email with customer Email
|
51 |
+
if($adyenPosEmail != "") {
|
52 |
+
$quote->setCustomerEmail($adyenPosEmail);
|
53 |
+
}
|
54 |
+
|
55 |
+
$shippingAddress = $quote->getShippingAddress();
|
56 |
+
|
57 |
+
$shippingAddress->setCollectShippingRates(true)->collectShippingRates()
|
58 |
+
->setShippingMethod('freeshipping_freeshipping')
|
59 |
+
->setPaymentMethod('adyen_pos');
|
60 |
+
|
61 |
+
$quote->getPayment()->importData(array('method' => 'adyen_pos'));
|
62 |
+
$quote->collectTotals()->save();
|
63 |
+
$session = Mage::getSingleton('checkout/session');
|
64 |
+
|
65 |
+
$service = Mage::getModel('sales/service_quote', $quote);
|
66 |
+
$service->submitAll();
|
67 |
+
$order = $service->getOrder();
|
68 |
+
|
69 |
+
$oderStatus = Mage::helper('adyen')->getOrderStatus();
|
70 |
+
$order->setStatus($oderStatus);
|
71 |
+
$order->save();
|
72 |
+
|
73 |
+
// add order information to the session
|
74 |
+
$session->setLastOrderId($order->getId())
|
75 |
+
->setLastRealOrderId($order->getIncrementId())
|
76 |
+
->setLastSuccessQuoteId($order->getQuoteId())
|
77 |
+
->setLastQuoteId($order->getQuoteId());
|
78 |
+
|
79 |
+
$this->_redirect('adyen/process/redirect');
|
80 |
+
return $this;
|
81 |
+
} else {
|
82 |
+
Mage::throwException('Customer is not logged in.');
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
@@ -0,0 +1,105 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Adyen_Payment_GetInstallmentsController extends Mage_Core_Controller_Front_Action {
|
30 |
+
|
31 |
+
public function indexAction()
|
32 |
+
{
|
33 |
+
|
34 |
+
$params = $this->getRequest()->getParams();
|
35 |
+
|
36 |
+
// get installments for cctype
|
37 |
+
$ccType = $params['ccType'];
|
38 |
+
|
39 |
+
// get installments
|
40 |
+
$quote = (Mage::getModel('checkout/type_onepage') !== false)? Mage::getModel('checkout/type_onepage')->getQuote(): Mage::getModel('checkout/session')->getQuote();
|
41 |
+
|
42 |
+
if($quote->isVirtual()) {
|
43 |
+
$address = $this->getBillingAddress();
|
44 |
+
} else {
|
45 |
+
$address = $quote->getShippingAddress();
|
46 |
+
}
|
47 |
+
|
48 |
+
// distract the already included added fee for installment you selected before
|
49 |
+
if($address->getBasePaymentInstallmentFeeAmount() > 0) {
|
50 |
+
$amount = (double) ($quote->getGrandTotal() - $address->getBasePaymentInstallmentFeeAmount());
|
51 |
+
} else {
|
52 |
+
$amount = (double) $quote->getGrandTotal();
|
53 |
+
}
|
54 |
+
|
55 |
+
$currency = $quote->getQuoteCurrencyCode();
|
56 |
+
|
57 |
+
|
58 |
+
// this creditcard type is selected
|
59 |
+
if($ccType != "") {
|
60 |
+
|
61 |
+
// installment key where installents are saved in settings
|
62 |
+
$ccTypeInstallments = "installments_".$ccType;
|
63 |
+
|
64 |
+
// check if this type has installments configured
|
65 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments(null, $ccTypeInstallments);
|
66 |
+
|
67 |
+
if(empty($all_installments)) {
|
68 |
+
// no installments congigure fall back on default
|
69 |
+
$ccTypeInstallments = null;
|
70 |
+
} else {
|
71 |
+
$max_installments = Mage::helper('adyen/installments')->getConfigValue($currency,$amount, null, $ccTypeInstallments);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
// Fallback to the default installments if creditcard type has no one configured
|
76 |
+
if($ccTypeInstallments == null) {
|
77 |
+
$max_installments = Mage::helper('adyen/installments')->getConfigValue($currency,$amount, null);
|
78 |
+
$all_installments = Mage::helper('adyen/installments')->getInstallments();
|
79 |
+
}
|
80 |
+
|
81 |
+
// result array here
|
82 |
+
for($i=1;$i<=$max_installments;$i++){
|
83 |
+
|
84 |
+
// check if installment has extra interest
|
85 |
+
$key = $i-1;
|
86 |
+
$installment = $all_installments[$key];
|
87 |
+
if(isset($installment[3]) && $installment[3] > 0) {
|
88 |
+
$total_amount_with_interest = $amount + ($amount * ($installment[3] / 100));
|
89 |
+
} else {
|
90 |
+
$total_amount_with_interest = $amount;
|
91 |
+
}
|
92 |
+
|
93 |
+
$partial_amount = ((double)$total_amount_with_interest)/$i;
|
94 |
+
$result[(string)$i] = $i."x ".$currency." ".number_format($partial_amount,2);
|
95 |
+
}
|
96 |
+
|
97 |
+
$jsonData = json_encode($result);
|
98 |
+
$this->getResponse()->setHeader('Content-type', 'application/json');
|
99 |
+
$this->getResponse()->setBody($jsonData);
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
@@ -0,0 +1,77 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
17 |
+
* @package Adyen_Payment
|
18 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
/**
|
22 |
+
* @category Payment Gateway
|
23 |
+
* @package Adyen_Payment
|
24 |
+
* @author Adyen
|
25 |
+
* @property Adyen B.V
|
26 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Adyen_Payment_UpdateCartController extends Mage_Core_Controller_Front_Action {
|
30 |
+
|
31 |
+
public function indexAction()
|
32 |
+
{
|
33 |
+
|
34 |
+
$params = $this->getRequest()->getParams();
|
35 |
+
$code = (isset($params['code'])) ? $params['code'] : "";
|
36 |
+
$customCode = (isset($params['customcode'])) ? $params['customcode'] : "";
|
37 |
+
|
38 |
+
// check if barcdoe is from scanner or filled in manually
|
39 |
+
if($code != "") {
|
40 |
+
$sku = $code;
|
41 |
+
} else if($customCode != "") {
|
42 |
+
$sku = $customCode;
|
43 |
+
} else {
|
44 |
+
// no barcode
|
45 |
+
$sku = "";
|
46 |
+
}
|
47 |
+
|
48 |
+
if($sku != "") {
|
49 |
+
$productId = Mage::getModel('catalog/product')
|
50 |
+
->getIdBySku(trim($sku));
|
51 |
+
|
52 |
+
if($productId > 0)
|
53 |
+
{
|
54 |
+
// Initiate product model
|
55 |
+
$product = Mage::getModel('catalog/product');
|
56 |
+
|
57 |
+
// Load specific product whose tier price want to update
|
58 |
+
$product ->load($productId);
|
59 |
+
|
60 |
+
if($product)
|
61 |
+
{
|
62 |
+
$cart = Mage::getSingleton('checkout/cart');
|
63 |
+
$cart->addProduct($product, array('qty'=>'1'));
|
64 |
+
$cart->save();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
// render the content so ajax call can update template
|
70 |
+
$this->loadLayout();
|
71 |
+
$layout = $this->getLayout();
|
72 |
+
$block = $layout->getBlock("content");
|
73 |
+
|
74 |
+
$this->getResponse()->setBody($block->toHtml());
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
Binary file
|
@@ -1,1135 +1,925 @@
|
|
1 |
Â
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<wsdl:definitions
|
3 |
-
|
4 |
-
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://payment.services.adyen.com">
|
5 |
-
<xsd:import namespace="http://common.services.adyen.com"
|
6 |
-
<xsd:complexType name="
|
7 |
-
<xsd:sequence>
|
8 |
-
<xsd:element minOccurs="0" name="additionalAmount" nillable="true" type="ns1:Amount"/>
|
9 |
-
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
10 |
-
<xsd:element minOccurs="0" name="amount" nillable="true" type="ns1:Amount"/>
|
11 |
-
<xsd:element minOccurs="0" name="bankAccount" nillable="true" type="tns:BankAccount"/>
|
12 |
-
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
13 |
-
<xsd:element minOccurs="0" name="browserInfo" nillable="true" type="ns1:BrowserInfo"/>
|
14 |
-
<xsd:element minOccurs="0" name="
|
15 |
-
<xsd:element minOccurs="0" name="
|
16 |
-
<xsd:element minOccurs="0" name="
|
17 |
-
<xsd:element minOccurs="0" name="
|
18 |
-
<xsd:element minOccurs="0" name="
|
19 |
-
<xsd:element minOccurs="0" name="
|
20 |
-
<xsd:element minOccurs="0" name="
|
21 |
-
<xsd:element minOccurs="0" name="
|
22 |
-
<xsd:element minOccurs="0" name="
|
23 |
-
<xsd:element minOccurs="0" name="
|
24 |
-
<xsd:element minOccurs="0" name="
|
25 |
-
<xsd:element minOccurs="0" name="
|
26 |
-
<xsd:element minOccurs="0" name="recurring" nillable="true" type="tns:Recurring"/>
|
27 |
-
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
28 |
-
<xsd:element minOccurs="0" name="
|
29 |
-
<xsd:element minOccurs="0" name="
|
30 |
-
<xsd:element minOccurs="0" name="
|
31 |
-
<xsd:element minOccurs="0" name="
|
32 |
-
<xsd:element minOccurs="0" name="
|
33 |
-
<xsd:element minOccurs="0" name="
|
34 |
-
<xsd:element minOccurs="0" name="
|
35 |
-
<xsd:element minOccurs="0" name="
|
36 |
-
<xsd:element minOccurs="0" name="
|
37 |
-
<xsd:element minOccurs="0" name="
|
38 |
-
<xsd:element minOccurs="0" name="
|
39 |
-
<xsd:element minOccurs="0" name="
|
40 |
-
|
41 |
-
</xsd:
|
42 |
-
|
43 |
-
<xsd:
|
44 |
-
<xsd:
|
45 |
-
<xsd:element minOccurs="0" name="
|
46 |
-
<xsd:element minOccurs="0" name="
|
47 |
-
<xsd:element minOccurs="0" name="
|
48 |
-
|
49 |
-
|
50 |
-
<xsd:
|
51 |
-
<xsd:
|
52 |
-
<xsd:
|
53 |
-
<xsd:
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<xsd:
|
59 |
-
<xsd:
|
60 |
-
<xsd:element minOccurs="0" name="
|
61 |
-
<xsd:element minOccurs="0" name="
|
62 |
-
<xsd:element minOccurs="0" name="
|
63 |
-
<xsd:element minOccurs="0" name="
|
64 |
-
<xsd:element minOccurs="0" name="
|
65 |
-
<xsd:element minOccurs="0" name="
|
66 |
-
<xsd:element minOccurs="0" name="
|
67 |
-
|
68 |
-
|
69 |
-
<xsd:
|
70 |
-
|
71 |
-
|
72 |
-
<xsd:
|
73 |
-
<xsd:
|
74 |
-
<xsd:
|
75 |
-
<xsd:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
<xsd:
|
82 |
-
<xsd:
|
83 |
-
<xsd:
|
84 |
-
<xsd:
|
85 |
-
|
86 |
-
</xsd:
|
87 |
-
</xsd:
|
88 |
-
</xsd:
|
89 |
-
|
90 |
-
<xsd:
|
91 |
-
<xsd:
|
92 |
-
<xsd:
|
93 |
-
<xsd:
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
<xsd:element minOccurs="
|
98 |
-
|
99 |
-
|
100 |
-
<xsd:
|
101 |
-
<xsd:
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
<xsd:element minOccurs="0" name="
|
106 |
-
<xsd:
|
107 |
-
|
108 |
-
|
109 |
-
<xsd:
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
<xsd:element minOccurs="
|
114 |
-
<xsd:
|
115 |
-
<xsd:
|
116 |
-
<xsd:
|
117 |
-
<xsd:
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<xsd:
|
124 |
-
<xsd:
|
125 |
-
<xsd:
|
126 |
-
|
127 |
-
</xsd:
|
128 |
-
</xsd:
|
129 |
-
|
130 |
-
<xsd:
|
131 |
-
<xsd:
|
132 |
-
<xsd:
|
133 |
-
<xsd:
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
<xsd:
|
140 |
-
<xsd:
|
141 |
-
<xsd:element minOccurs="0" name="
|
142 |
-
<xsd:element minOccurs="0" name="
|
143 |
-
|
144 |
-
|
145 |
-
<xsd:
|
146 |
-
<xsd:
|
147 |
-
<xsd:element minOccurs="0" name="
|
148 |
-
<xsd:element minOccurs="0" name="
|
149 |
-
|
150 |
-
|
151 |
-
<xsd:
|
152 |
-
<xsd:
|
153 |
-
<xsd:element
|
154 |
-
|
155 |
-
|
156 |
-
<xsd:
|
157 |
-
<xsd:
|
158 |
-
<xsd:element minOccurs="0" name="
|
159 |
-
<xsd:element minOccurs="0" name="
|
160 |
-
<xsd:element minOccurs="0" name="
|
161 |
-
|
162 |
-
|
163 |
-
<xsd:element name="
|
164 |
-
<xsd:
|
165 |
-
<xsd:
|
166 |
-
<xsd:element
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
<xsd:complexType>
|
173 |
-
<xsd:sequence>
|
174 |
-
<xsd:element
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
<xsd:element name="
|
179 |
-
|
180 |
-
|
181 |
-
<xsd:
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
<xsd:element name="
|
186 |
-
<xsd:
|
187 |
-
<xsd:
|
188 |
-
|
189 |
-
</xsd:
|
190 |
-
|
191 |
-
|
192 |
-
<xsd:element name="
|
193 |
-
<xsd:
|
194 |
-
<xsd:
|
195 |
-
<xsd:element
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<xsd:
|
200 |
-
<xsd:
|
201 |
-
<xsd:element minOccurs="0" name="
|
202 |
-
<xsd:element minOccurs="0" name="
|
203 |
-
<xsd:element minOccurs="
|
204 |
-
|
205 |
-
|
206 |
-
<xsd:
|
207 |
-
|
208 |
-
|
209 |
-
<xsd:element name="
|
210 |
-
<xsd:
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
<xsd:
|
217 |
-
|
218 |
-
|
219 |
-
<xsd:
|
220 |
-
<xsd:
|
221 |
-
|
222 |
-
|
223 |
-
<xsd:element name="
|
224 |
-
<xsd:
|
225 |
-
<xsd:
|
226 |
-
<xsd:element
|
227 |
-
|
228 |
-
|
229 |
-
</xsd:
|
230 |
-
|
231 |
-
<xsd:
|
232 |
-
<xsd:
|
233 |
-
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
234 |
-
<xsd:element minOccurs="0" name="
|
235 |
-
<xsd:element minOccurs="0" name="
|
236 |
-
|
237 |
-
|
238 |
-
<xsd:
|
239 |
-
<xsd:
|
240 |
-
<xsd:element minOccurs="0" name="
|
241 |
-
<xsd:element minOccurs="0" name="
|
242 |
-
<xsd:element minOccurs="0" name="
|
243 |
-
<xsd:element minOccurs="0" name="
|
244 |
-
<xsd:element minOccurs="0" name="
|
245 |
-
<xsd:element minOccurs="0" name="
|
246 |
-
|
247 |
-
|
248 |
-
<xsd:
|
249 |
-
<xsd:
|
250 |
-
<xsd:element minOccurs="0" name="
|
251 |
-
<xsd:element minOccurs="0" name="
|
252 |
-
<xsd:element minOccurs="0" name="
|
253 |
-
|
254 |
-
|
255 |
-
<xsd:
|
256 |
-
<xsd:
|
257 |
-
<xsd:element minOccurs="0" name="
|
258 |
-
<xsd:element minOccurs="0" name="
|
259 |
-
<xsd:element minOccurs="0" name="
|
260 |
-
<xsd:element minOccurs="0" name="
|
261 |
-
<xsd:element minOccurs="0" name="
|
262 |
-
|
263 |
-
|
264 |
-
<xsd:element name="
|
265 |
-
<xsd:
|
266 |
-
<xsd:
|
267 |
-
<xsd:element
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
<xsd:
|
272 |
-
<xsd:
|
273 |
-
<xsd:element minOccurs="0" name="
|
274 |
-
<xsd:element minOccurs="0" name="
|
275 |
-
<xsd:element minOccurs="0" name="
|
276 |
-
<xsd:element minOccurs="0" name="
|
277 |
-
<xsd:element minOccurs="0" name="
|
278 |
-
|
279 |
-
|
280 |
-
<xsd:element name="
|
281 |
-
<xsd:
|
282 |
-
<xsd:
|
283 |
-
<xsd:element
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
<xsd:element name="
|
288 |
-
<xsd:
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
<xsd:element name="
|
295 |
-
<xsd:
|
296 |
-
<xsd:
|
297 |
-
<xsd:element
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
<xsd:
|
302 |
-
<xsd:
|
303 |
-
<xsd:element minOccurs="0" name="
|
304 |
-
<xsd:element minOccurs="0" name="
|
305 |
-
<xsd:element minOccurs="0" name="
|
306 |
-
<xsd:element minOccurs="0" name="
|
307 |
-
<xsd:element minOccurs="0" name="
|
308 |
-
<xsd:element minOccurs="0" name="
|
309 |
-
<xsd:element minOccurs="0" name="
|
310 |
-
<xsd:element minOccurs="0" name="
|
311 |
-
<xsd:element minOccurs="0" name="
|
312 |
-
<xsd:element minOccurs="0" name="
|
313 |
-
<xsd:element minOccurs="0" name="
|
314 |
-
<xsd:element minOccurs="0" name="
|
315 |
-
<xsd:element minOccurs="0" name="
|
316 |
-
<xsd:element minOccurs="0" name="
|
317 |
-
<xsd:element minOccurs="0" name="
|
318 |
-
<xsd:element minOccurs="0" name="
|
319 |
-
<xsd:element minOccurs="0" name="
|
320 |
-
<xsd:element minOccurs="0" name="
|
321 |
-
<xsd:element minOccurs="0" name="
|
322 |
-
<xsd:element minOccurs="0" name="
|
323 |
-
|
324 |
-
|
325 |
-
<xsd:
|
326 |
-
<xsd:
|
327 |
-
<xsd:element minOccurs="0" name="
|
328 |
-
<xsd:element minOccurs="0" name="
|
329 |
-
<xsd:element minOccurs="0" name="
|
330 |
-
<xsd:element minOccurs="0" name="
|
331 |
-
<xsd:element minOccurs="0" name="
|
332 |
-
<xsd:element minOccurs="0" name="
|
333 |
-
<xsd:element minOccurs="0" name="
|
334 |
-
<xsd:element minOccurs="0" name="
|
335 |
-
<xsd:element minOccurs="0" name="
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
<xsd:
|
341 |
-
<xsd:
|
342 |
-
|
343 |
-
|
344 |
-
</xsd:
|
345 |
-
|
346 |
-
<xsd:
|
347 |
-
<xsd:
|
348 |
-
<xsd:element minOccurs="0" name="
|
349 |
-
<xsd:element minOccurs="0" name="
|
350 |
-
<xsd:element minOccurs="0" name="
|
351 |
-
|
352 |
-
|
353 |
-
<xsd:
|
354 |
-
|
355 |
-
|
356 |
-
<xsd:
|
357 |
-
<xsd:
|
358 |
-
<xsd:
|
359 |
-
</xsd:
|
360 |
-
</xsd:
|
361 |
-
<xsd:
|
362 |
-
<xsd:
|
363 |
-
<xsd:
|
364 |
-
<xsd:
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
<xsd:element
|
374 |
-
<xsd:element
|
375 |
-
<xsd:
|
376 |
-
<xsd:
|
377 |
-
<xsd:element minOccurs="
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
<xsd:element
|
382 |
-
<xsd:
|
383 |
-
<xsd:
|
384 |
-
<xsd:element minOccurs="
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
<xsd:element
|
389 |
-
<xsd:
|
390 |
-
<xsd:
|
391 |
-
<xsd:element minOccurs="
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
<xsd:element
|
396 |
-
<xsd:
|
397 |
-
<xsd:
|
398 |
-
<xsd:element minOccurs="
|
399 |
-
|
400 |
-
</xsd:
|
401 |
-
</xsd:
|
402 |
-
<xsd:element name="
|
403 |
-
<xsd:complexType>
|
404 |
-
<xsd:sequence>
|
405 |
-
<xsd:element maxOccurs="1" minOccurs="1" name="
|
406 |
-
</xsd:sequence>
|
407 |
-
</xsd:complexType>
|
408 |
-
</xsd:element>
|
409 |
-
<xsd:
|
410 |
-
<xsd:
|
411 |
-
<xsd:
|
412 |
-
<xsd:element minOccurs="
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
<xsd:element
|
417 |
-
|
418 |
-
|
419 |
-
<xsd:element name="
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
<xsd:
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
<xsd:element
|
431 |
-
<xsd:
|
432 |
-
<xsd:
|
433 |
-
<xsd:element minOccurs="
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
<xsd:element
|
438 |
-
<xsd:
|
439 |
-
<xsd:
|
440 |
-
<xsd:element minOccurs="
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
<xsd:element
|
445 |
-
<xsd:
|
446 |
-
<xsd:
|
447 |
-
<xsd:element minOccurs="
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
<xsd:element
|
452 |
-
<xsd:
|
453 |
-
<xsd:
|
454 |
-
<xsd:element minOccurs="
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
<xsd:element
|
459 |
-
|
460 |
-
|
461 |
-
<xsd:element name="
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
<xsd:element name="
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
<xsd:element name="
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
<xsd:element name="
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
<xsd:element name="
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
<xsd:element name="
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
<xsd:element name="
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
<xsd:element name="
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
<xsd:
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
<xsd:element
|
522 |
-
<xsd:
|
523 |
-
<xsd:
|
524 |
-
<xsd:element minOccurs="
|
525 |
-
|
526 |
-
|
527 |
-
</xsd:
|
528 |
-
|
529 |
-
<xsd:
|
530 |
-
<xsd:
|
531 |
-
<xsd:
|
532 |
-
|
533 |
-
</xsd:
|
534 |
-
</xsd:
|
535 |
-
|
536 |
-
<xsd:complexType
|
537 |
-
<xsd:sequence>
|
538 |
-
<xsd:element minOccurs="
|
539 |
-
|
540 |
-
|
541 |
-
</xsd:
|
542 |
-
</xsd:
|
543 |
-
<xsd:
|
544 |
-
<xsd:complexType>
|
545 |
-
<xsd:sequence>
|
546 |
-
<xsd:element
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
<xsd:
|
552 |
-
|
553 |
-
|
554 |
-
<xsd:
|
555 |
-
<xsd:
|
556 |
-
|
557 |
-
|
558 |
-
<xsd:
|
559 |
-
<xsd:
|
560 |
-
<xsd:
|
561 |
-
</xsd:
|
562 |
-
</xsd:
|
563 |
-
|
564 |
-
<xsd:
|
565 |
-
|
566 |
-
|
567 |
-
<xsd:
|
568 |
-
<xsd:
|
569 |
-
<xsd:element minOccurs="
|
570 |
-
<xsd:
|
571 |
-
|
572 |
-
|
573 |
-
<xsd:
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
<xsd:
|
580 |
-
<xsd:
|
581 |
-
<xsd:
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
</xsd:sequence>
|
586 |
-
</xsd:complexType>
|
587 |
-
<xsd:
|
588 |
-
<xsd:
|
589 |
-
<xsd:
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
<xsd:
|
595 |
-
<xsd:
|
596 |
-
<xsd:element minOccurs="0" name="
|
597 |
-
<xsd:element minOccurs="0" name="
|
598 |
-
|
599 |
-
|
600 |
-
<xsd:
|
601 |
-
<xsd:
|
602 |
-
|
603 |
-
|
604 |
-
<xsd:
|
605 |
-
|
606 |
-
|
607 |
-
<xsd:
|
608 |
-
<xsd:
|
609 |
-
<xsd:
|
610 |
-
<xsd:
|
611 |
-
|
612 |
-
|
613 |
-
<xsd:
|
614 |
-
<xsd:
|
615 |
-
<xsd:enumeration value="
|
616 |
-
<xsd:enumeration value="
|
617 |
-
<xsd:enumeration value="
|
618 |
-
<xsd:enumeration value="
|
619 |
-
<xsd:enumeration value="
|
620 |
-
<xsd:enumeration value="
|
621 |
-
<xsd:enumeration value="
|
622 |
-
<xsd:enumeration value="
|
623 |
-
<xsd:enumeration value="
|
624 |
-
|
625 |
-
|
626 |
-
<xsd:
|
627 |
-
<xsd:
|
628 |
-
<xsd:enumeration value="
|
629 |
-
<xsd:enumeration value="
|
630 |
-
<xsd:enumeration value="
|
631 |
-
<xsd:enumeration value="
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
<
|
637 |
-
<
|
638 |
-
|
639 |
-
<
|
640 |
-
<
|
641 |
-
|
642 |
-
<
|
643 |
-
<
|
644 |
-
|
645 |
-
<
|
646 |
-
<
|
647 |
-
|
648 |
-
<
|
649 |
-
<
|
650 |
-
|
651 |
-
<
|
652 |
-
<
|
653 |
-
|
654 |
-
<
|
655 |
-
<
|
656 |
-
|
657 |
-
<
|
658 |
-
<
|
659 |
-
|
660 |
-
<
|
661 |
-
<
|
662 |
-
|
663 |
-
<
|
664 |
-
<
|
665 |
-
|
666 |
-
<
|
667 |
-
<
|
668 |
-
|
669 |
-
<
|
670 |
-
<
|
671 |
-
|
672 |
-
<
|
673 |
-
<
|
674 |
-
|
675 |
-
<
|
676 |
-
<
|
677 |
-
|
678 |
-
<
|
679 |
-
<
|
680 |
-
|
681 |
-
<
|
682 |
-
<
|
683 |
-
|
684 |
-
<
|
685 |
-
<
|
686 |
-
|
687 |
-
<
|
688 |
-
<
|
689 |
-
|
690 |
-
<
|
691 |
-
<
|
692 |
-
|
693 |
-
<
|
694 |
-
<
|
695 |
-
|
696 |
-
<
|
697 |
-
<
|
698 |
-
|
699 |
-
<
|
700 |
-
<
|
701 |
-
|
702 |
-
<
|
703 |
-
<
|
704 |
-
|
705 |
-
<
|
706 |
-
<
|
707 |
-
|
708 |
-
<
|
709 |
-
<
|
710 |
-
|
711 |
-
<
|
712 |
-
<
|
713 |
-
<
|
714 |
-
<
|
715 |
-
<
|
716 |
-
|
717 |
-
<
|
718 |
-
<
|
719 |
-
<
|
720 |
-
<
|
721 |
-
|
722 |
-
<
|
723 |
-
<
|
724 |
-
<
|
725 |
-
<
|
726 |
-
|
727 |
-
<
|
728 |
-
<
|
729 |
-
<
|
730 |
-
<
|
731 |
-
|
732 |
-
<
|
733 |
-
<
|
734 |
-
<
|
735 |
-
<
|
736 |
-
|
737 |
-
<
|
738 |
-
<
|
739 |
-
<
|
740 |
-
<
|
741 |
-
|
742 |
-
<
|
743 |
-
<
|
744 |
-
<
|
745 |
-
|
746 |
-
</
|
747 |
-
<
|
748 |
-
<
|
749 |
-
<
|
750 |
-
<
|
751 |
-
|
752 |
-
<
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
</wsdl:
|
925 |
-
<wsdl:output name="addressCheckResponse" message="tns:addressCheckResponse">
|
926 |
-
</wsdl:output>
|
927 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
928 |
-
</wsdl:fault>
|
929 |
-
</wsdl:operation>
|
930 |
-
<wsdl:operation name="authorise3d">
|
931 |
-
<wsdl:input name="authorise3dRequest" message="tns:authorise3dRequest">
|
932 |
-
</wsdl:input>
|
933 |
-
<wsdl:output name="authorise3dResponse" message="tns:authorise3dResponse">
|
934 |
-
</wsdl:output>
|
935 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
936 |
-
</wsdl:fault>
|
937 |
-
</wsdl:operation>
|
938 |
-
<wsdl:operation name="refund">
|
939 |
-
<wsdl:input name="refundRequest" message="tns:refundRequest">
|
940 |
-
</wsdl:input>
|
941 |
-
<wsdl:output name="refundResponse" message="tns:refundResponse">
|
942 |
-
</wsdl:output>
|
943 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
944 |
-
</wsdl:fault>
|
945 |
-
</wsdl:operation>
|
946 |
-
<wsdl:operation name="capture">
|
947 |
-
<wsdl:input name="captureRequest" message="tns:captureRequest">
|
948 |
-
</wsdl:input>
|
949 |
-
<wsdl:output name="captureResponse" message="tns:captureResponse">
|
950 |
-
</wsdl:output>
|
951 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
952 |
-
</wsdl:fault>
|
953 |
-
</wsdl:operation>
|
954 |
-
<wsdl:operation name="cancelOrRefund">
|
955 |
-
<wsdl:input name="cancelOrRefundRequest" message="tns:cancelOrRefundRequest">
|
956 |
-
</wsdl:input>
|
957 |
-
<wsdl:output name="cancelOrRefundResponse" message="tns:cancelOrRefundResponse">
|
958 |
-
</wsdl:output>
|
959 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
960 |
-
</wsdl:fault>
|
961 |
-
</wsdl:operation>
|
962 |
-
<wsdl:operation name="fundTransfer">
|
963 |
-
<wsdl:input name="fundTransferRequest" message="tns:fundTransferRequest">
|
964 |
-
</wsdl:input>
|
965 |
-
<wsdl:output name="fundTransferResponse" message="tns:fundTransferResponse">
|
966 |
-
</wsdl:output>
|
967 |
-
<wsdl:fault name="ServiceException" message="tns:ServiceException">
|
968 |
-
</wsdl:fault>
|
969 |
-
</wsdl:operation>
|
970 |
-
</wsdl:portType>
|
971 |
-
<wsdl:binding name="PaymentHttpBinding" type="tns:PaymentPortType">
|
972 |
-
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
973 |
-
<wsdl:operation name="checkFraud">
|
974 |
-
<wsdlsoap:operation soapAction=""/>
|
975 |
-
<wsdl:input name="checkFraudRequest">
|
976 |
-
<wsdlsoap:body use="literal"/>
|
977 |
-
</wsdl:input>
|
978 |
-
<wsdl:output name="checkFraudResponse">
|
979 |
-
<wsdlsoap:body use="literal"/>
|
980 |
-
</wsdl:output>
|
981 |
-
<wsdl:fault name="ServiceException">
|
982 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
983 |
-
</wsdl:fault>
|
984 |
-
</wsdl:operation>
|
985 |
-
<wsdl:operation name="refundWithData">
|
986 |
-
<wsdlsoap:operation soapAction=""/>
|
987 |
-
<wsdl:input name="refundWithDataRequest">
|
988 |
-
<wsdlsoap:body use="literal"/>
|
989 |
-
</wsdl:input>
|
990 |
-
<wsdl:output name="refundWithDataResponse">
|
991 |
-
<wsdlsoap:body use="literal"/>
|
992 |
-
</wsdl:output>
|
993 |
-
<wsdl:fault name="ServiceException">
|
994 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
995 |
-
</wsdl:fault>
|
996 |
-
</wsdl:operation>
|
997 |
-
<wsdl:operation name="authorise">
|
998 |
-
<wsdlsoap:operation soapAction=""/>
|
999 |
-
<wsdl:input name="authoriseRequest">
|
1000 |
-
<wsdlsoap:body use="literal"/>
|
1001 |
-
</wsdl:input>
|
1002 |
-
<wsdl:output name="authoriseResponse">
|
1003 |
-
<wsdlsoap:body use="literal"/>
|
1004 |
-
</wsdl:output>
|
1005 |
-
<wsdl:fault name="ServiceException">
|
1006 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1007 |
-
</wsdl:fault>
|
1008 |
-
</wsdl:operation>
|
1009 |
-
<wsdl:operation name="authoriseReferral">
|
1010 |
-
<wsdlsoap:operation soapAction=""/>
|
1011 |
-
<wsdl:input name="authoriseReferralRequest">
|
1012 |
-
<wsdlsoap:body use="literal"/>
|
1013 |
-
</wsdl:input>
|
1014 |
-
<wsdl:output name="authoriseReferralResponse">
|
1015 |
-
<wsdlsoap:body use="literal"/>
|
1016 |
-
</wsdl:output>
|
1017 |
-
<wsdl:fault name="ServiceException">
|
1018 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1019 |
-
</wsdl:fault>
|
1020 |
-
</wsdl:operation>
|
1021 |
-
<wsdl:operation name="directdebit">
|
1022 |
-
<wsdlsoap:operation soapAction=""/>
|
1023 |
-
<wsdl:input name="directdebitRequest">
|
1024 |
-
<wsdlsoap:body use="literal"/>
|
1025 |
-
</wsdl:input>
|
1026 |
-
<wsdl:output name="directdebitResponse">
|
1027 |
-
<wsdlsoap:body use="literal"/>
|
1028 |
-
</wsdl:output>
|
1029 |
-
<wsdl:fault name="ServiceException">
|
1030 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1031 |
-
</wsdl:fault>
|
1032 |
-
</wsdl:operation>
|
1033 |
-
<wsdl:operation name="cancel">
|
1034 |
-
<wsdlsoap:operation soapAction=""/>
|
1035 |
-
<wsdl:input name="cancelRequest">
|
1036 |
-
<wsdlsoap:body use="literal"/>
|
1037 |
-
</wsdl:input>
|
1038 |
-
<wsdl:output name="cancelResponse">
|
1039 |
-
<wsdlsoap:body use="literal"/>
|
1040 |
-
</wsdl:output>
|
1041 |
-
<wsdl:fault name="ServiceException">
|
1042 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1043 |
-
</wsdl:fault>
|
1044 |
-
</wsdl:operation>
|
1045 |
-
<wsdl:operation name="balanceCheck">
|
1046 |
-
<wsdlsoap:operation soapAction=""/>
|
1047 |
-
<wsdl:input name="balanceCheckRequest">
|
1048 |
-
<wsdlsoap:body use="literal"/>
|
1049 |
-
</wsdl:input>
|
1050 |
-
<wsdl:output name="balanceCheckResponse">
|
1051 |
-
<wsdlsoap:body use="literal"/>
|
1052 |
-
</wsdl:output>
|
1053 |
-
<wsdl:fault name="ServiceException">
|
1054 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1055 |
-
</wsdl:fault>
|
1056 |
-
</wsdl:operation>
|
1057 |
-
<wsdl:operation name="addressCheck">
|
1058 |
-
<wsdlsoap:operation soapAction=""/>
|
1059 |
-
<wsdl:input name="addressCheckRequest">
|
1060 |
-
<wsdlsoap:body use="literal"/>
|
1061 |
-
</wsdl:input>
|
1062 |
-
<wsdl:output name="addressCheckResponse">
|
1063 |
-
<wsdlsoap:body use="literal"/>
|
1064 |
-
</wsdl:output>
|
1065 |
-
<wsdl:fault name="ServiceException">
|
1066 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1067 |
-
</wsdl:fault>
|
1068 |
-
</wsdl:operation>
|
1069 |
-
<wsdl:operation name="authorise3d">
|
1070 |
-
<wsdlsoap:operation soapAction=""/>
|
1071 |
-
<wsdl:input name="authorise3dRequest">
|
1072 |
-
<wsdlsoap:body use="literal"/>
|
1073 |
-
</wsdl:input>
|
1074 |
-
<wsdl:output name="authorise3dResponse">
|
1075 |
-
<wsdlsoap:body use="literal"/>
|
1076 |
-
</wsdl:output>
|
1077 |
-
<wsdl:fault name="ServiceException">
|
1078 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1079 |
-
</wsdl:fault>
|
1080 |
-
</wsdl:operation>
|
1081 |
-
<wsdl:operation name="refund">
|
1082 |
-
<wsdlsoap:operation soapAction=""/>
|
1083 |
-
<wsdl:input name="refundRequest">
|
1084 |
-
<wsdlsoap:body use="literal"/>
|
1085 |
-
</wsdl:input>
|
1086 |
-
<wsdl:output name="refundResponse">
|
1087 |
-
<wsdlsoap:body use="literal"/>
|
1088 |
-
</wsdl:output>
|
1089 |
-
<wsdl:fault name="ServiceException">
|
1090 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1091 |
-
</wsdl:fault>
|
1092 |
-
</wsdl:operation>
|
1093 |
-
<wsdl:operation name="capture">
|
1094 |
-
<wsdlsoap:operation soapAction=""/>
|
1095 |
-
<wsdl:input name="captureRequest">
|
1096 |
-
<wsdlsoap:body use="literal"/>
|
1097 |
-
</wsdl:input>
|
1098 |
-
<wsdl:output name="captureResponse">
|
1099 |
-
<wsdlsoap:body use="literal"/>
|
1100 |
-
</wsdl:output>
|
1101 |
-
<wsdl:fault name="ServiceException">
|
1102 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1103 |
-
</wsdl:fault>
|
1104 |
-
</wsdl:operation>
|
1105 |
-
<wsdl:operation name="cancelOrRefund">
|
1106 |
-
<wsdlsoap:operation soapAction=""/>
|
1107 |
-
<wsdl:input name="cancelOrRefundRequest">
|
1108 |
-
<wsdlsoap:body use="literal"/>
|
1109 |
-
</wsdl:input>
|
1110 |
-
<wsdl:output name="cancelOrRefundResponse">
|
1111 |
-
<wsdlsoap:body use="literal"/>
|
1112 |
-
</wsdl:output>
|
1113 |
-
<wsdl:fault name="ServiceException">
|
1114 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1115 |
-
</wsdl:fault>
|
1116 |
-
</wsdl:operation>
|
1117 |
-
<wsdl:operation name="fundTransfer">
|
1118 |
-
<wsdlsoap:operation soapAction=""/>
|
1119 |
-
<wsdl:input name="fundTransferRequest">
|
1120 |
-
<wsdlsoap:body use="literal"/>
|
1121 |
-
</wsdl:input>
|
1122 |
-
<wsdl:output name="fundTransferResponse">
|
1123 |
-
<wsdlsoap:body use="literal"/>
|
1124 |
-
</wsdl:output>
|
1125 |
-
<wsdl:fault name="ServiceException">
|
1126 |
-
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
1127 |
-
</wsdl:fault>
|
1128 |
-
</wsdl:operation>
|
1129 |
-
</wsdl:binding>
|
1130 |
-
<wsdl:service name="Payment">
|
1131 |
-
<wsdl:port name="PaymentHttpPort" binding="tns:PaymentHttpBinding">
|
1132 |
-
<wsdlsoap:address location="http://localhost:8080/pal/servlet/soap/Payment"/>
|
1133 |
-
</wsdl:port>
|
1134 |
-
</wsdl:service>
|
1135 |
Â
</wsdl:definitions>
|
1 |
Â
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:ns1="http://common.services.adyen.com" xmlns:tns="http://payment.services.adyen.com" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" targetNamespace="http://payment.services.adyen.com">
|
3 |
+
<wsdl:types>
|
4 |
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://payment.services.adyen.com">
|
5 |
+
<xsd:import namespace="http://common.services.adyen.com"/>
|
6 |
+
<xsd:complexType name="BalanceCheckRequest">
|
7 |
+
<xsd:sequence>
|
8 |
+
<xsd:element minOccurs="0" name="additionalAmount" nillable="true" type="ns1:Amount"/>
|
9 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
10 |
+
<xsd:element minOccurs="0" name="amount" nillable="true" type="ns1:Amount"/>
|
11 |
+
<xsd:element minOccurs="0" name="bankAccount" nillable="true" type="tns:BankAccount"/>
|
12 |
+
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
13 |
+
<xsd:element minOccurs="0" name="browserInfo" nillable="true" type="ns1:BrowserInfo"/>
|
14 |
+
<xsd:element minOccurs="0" name="captureDelayHours" nillable="true" type="xsd:int"/>
|
15 |
+
<xsd:element minOccurs="0" name="card" nillable="true" type="tns:Card"/>
|
16 |
+
<xsd:element minOccurs="0" name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
|
17 |
+
<xsd:element minOccurs="0" name="dccQuote" nillable="true" type="tns:ForexQuote"/>
|
18 |
+
<xsd:element minOccurs="0" name="deliveryAddress" nillable="true" type="ns1:Address"/>
|
19 |
+
<xsd:element minOccurs="0" name="deviceFingerprint" nillable="true" type="xsd:string"/>
|
20 |
+
<xsd:element minOccurs="0" name="elv" nillable="true" type="tns:ELV"/>
|
21 |
+
<xsd:element minOccurs="0" name="fraudOffset" nillable="true" type="xsd:int"/>
|
22 |
+
<xsd:element minOccurs="0" name="installments" nillable="true" type="ns1:Installments"/>
|
23 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
24 |
+
<xsd:element minOccurs="0" name="mpiData" nillable="true" type="tns:ThreeDSecureData"/>
|
25 |
+
<xsd:element minOccurs="0" name="orderReference" nillable="true" type="xsd:string"/>
|
26 |
+
<xsd:element minOccurs="0" name="recurring" nillable="true" type="tns:Recurring"/>
|
27 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
28 |
+
<xsd:element minOccurs="0" name="selectedBrand" nillable="true" type="xsd:string"/>
|
29 |
+
<xsd:element minOccurs="0" name="selectedRecurringDetailReference" nillable="true" type="xsd:string"/>
|
30 |
+
<xsd:element minOccurs="0" name="sessionId" nillable="true" type="xsd:string"/>
|
31 |
+
<xsd:element minOccurs="0" name="shopperEmail" nillable="true" type="xsd:string"/>
|
32 |
+
<xsd:element minOccurs="0" name="shopperIP" nillable="true" type="xsd:string"/>
|
33 |
+
<xsd:element minOccurs="0" name="shopperInteraction" nillable="true" type="xsd:string"/>
|
34 |
+
<xsd:element minOccurs="0" name="shopperLocale" nillable="true" type="xsd:string"/>
|
35 |
+
<xsd:element minOccurs="0" name="shopperName" nillable="true" type="ns1:Name"/>
|
36 |
+
<xsd:element minOccurs="0" name="shopperReference" nillable="true" type="xsd:string"/>
|
37 |
+
<xsd:element minOccurs="0" name="shopperStatement" nillable="true" type="xsd:string"/>
|
38 |
+
<xsd:element minOccurs="0" name="socialSecurityNumber" nillable="true" type="xsd:string"/>
|
39 |
+
<xsd:element minOccurs="0" name="telephoneNumber" nillable="true" type="xsd:string"/>
|
40 |
+
</xsd:sequence>
|
41 |
+
</xsd:complexType>
|
42 |
+
<xsd:complexType name="BalanceCheckResult">
|
43 |
+
<xsd:sequence>
|
44 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
45 |
+
<xsd:element minOccurs="0" name="currentBalance" nillable="true" type="ns1:Amount"/>
|
46 |
+
<xsd:element minOccurs="0" name="pspReference" nillable="true" type="xsd:string"/>
|
47 |
+
<xsd:element minOccurs="0" name="responseCode" nillable="true" type="tns:BalanceCheckResponseCode"/>
|
48 |
+
</xsd:sequence>
|
49 |
+
</xsd:complexType>
|
50 |
+
<xsd:simpleType name="BalanceCheckResponseCode">
|
51 |
+
<xsd:restriction base="xsd:string">
|
52 |
+
<xsd:enumeration value="OK"/>
|
53 |
+
<xsd:enumeration value="NO_BALANCE"/>
|
54 |
+
<xsd:enumeration value="NOT_CHECKED"/>
|
55 |
+
<xsd:enumeration value="NOT_ALLOWED"/>
|
56 |
+
</xsd:restriction>
|
57 |
+
</xsd:simpleType>
|
58 |
+
<xsd:complexType name="BankAccount">
|
59 |
+
<xsd:sequence>
|
60 |
+
<xsd:element minOccurs="0" name="bankAccountNumber" nillable="true" type="xsd:string"/>
|
61 |
+
<xsd:element minOccurs="0" name="bankLocationId" nillable="true" type="xsd:string"/>
|
62 |
+
<xsd:element minOccurs="0" name="bankName" nillable="true" type="xsd:string"/>
|
63 |
+
<xsd:element minOccurs="0" name="bic" nillable="true" type="xsd:string"/>
|
64 |
+
<xsd:element minOccurs="0" name="countryCode" nillable="true" type="xsd:string"/>
|
65 |
+
<xsd:element minOccurs="0" name="iban" nillable="true" type="xsd:string"/>
|
66 |
+
<xsd:element minOccurs="0" name="ownerName" nillable="true" type="xsd:string"/>
|
67 |
+
</xsd:sequence>
|
68 |
+
</xsd:complexType>
|
69 |
+
<xsd:complexType name="Card">
|
70 |
+
<xsd:sequence>
|
71 |
+
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
72 |
+
<xsd:element minOccurs="0" name="brand" nillable="true" type="xsd:string"/>
|
73 |
+
<xsd:element minOccurs="0" name="cvc" nillable="true">
|
74 |
+
<xsd:simpleType>
|
75 |
+
<xsd:restriction base="xsd:string">
|
76 |
+
<xsd:minLength value="1"/>
|
77 |
+
<xsd:maxLength value="20"/>
|
78 |
+
</xsd:restriction>
|
79 |
+
</xsd:simpleType>
|
80 |
+
</xsd:element>
|
81 |
+
<xsd:element minOccurs="1" name="expiryMonth">
|
82 |
+
<xsd:simpleType>
|
83 |
+
<xsd:restriction base="xsd:string">
|
84 |
+
<xsd:minLength value="2"/>
|
85 |
+
<xsd:maxLength value="2"/>
|
86 |
+
</xsd:restriction>
|
87 |
+
</xsd:simpleType>
|
88 |
+
</xsd:element>
|
89 |
+
<xsd:element minOccurs="1" name="expiryYear">
|
90 |
+
<xsd:simpleType>
|
91 |
+
<xsd:restriction base="xsd:string">
|
92 |
+
<xsd:minLength value="4"/>
|
93 |
+
<xsd:maxLength value="4"/>
|
94 |
+
</xsd:restriction>
|
95 |
+
</xsd:simpleType>
|
96 |
+
</xsd:element>
|
97 |
+
<xsd:element minOccurs="1" name="holderName">
|
98 |
+
<xsd:simpleType>
|
99 |
+
<xsd:restriction base="xsd:string">
|
100 |
+
<xsd:minLength value="1"/>
|
101 |
+
<xsd:maxLength value="50"/>
|
102 |
+
</xsd:restriction>
|
103 |
+
</xsd:simpleType>
|
104 |
+
</xsd:element>
|
105 |
+
<xsd:element minOccurs="0" name="issueNumber" nillable="true">
|
106 |
+
<xsd:simpleType>
|
107 |
+
<xsd:restriction base="xsd:string">
|
108 |
+
<xsd:minLength value="1"/>
|
109 |
+
<xsd:maxLength value="2"/>
|
110 |
+
</xsd:restriction>
|
111 |
+
</xsd:simpleType>
|
112 |
+
</xsd:element>
|
113 |
+
<xsd:element minOccurs="1" name="number">
|
114 |
+
<xsd:simpleType>
|
115 |
+
<xsd:restriction base="xsd:string">
|
116 |
+
<xsd:minLength value="4"/>
|
117 |
+
<xsd:maxLength value="19"/>
|
118 |
+
</xsd:restriction>
|
119 |
+
</xsd:simpleType>
|
120 |
+
</xsd:element>
|
121 |
+
<xsd:element minOccurs="0" name="startMonth" nillable="true">
|
122 |
+
<xsd:simpleType>
|
123 |
+
<xsd:restriction base="xsd:string">
|
124 |
+
<xsd:minLength value="2"/>
|
125 |
+
<xsd:maxLength value="2"/>
|
126 |
+
</xsd:restriction>
|
127 |
+
</xsd:simpleType>
|
128 |
+
</xsd:element>
|
129 |
+
<xsd:element minOccurs="0" name="startYear" nillable="true">
|
130 |
+
<xsd:simpleType>
|
131 |
+
<xsd:restriction base="xsd:string">
|
132 |
+
<xsd:minLength value="4"/>
|
133 |
+
<xsd:maxLength value="4"/>
|
134 |
+
</xsd:restriction>
|
135 |
+
</xsd:simpleType>
|
136 |
+
</xsd:element>
|
137 |
+
</xsd:sequence>
|
138 |
+
</xsd:complexType>
|
139 |
+
<xsd:complexType name="DirectDebitRequest">
|
140 |
+
<xsd:sequence>
|
141 |
+
<xsd:element minOccurs="0" name="additionalAmount" nillable="true" type="ns1:Amount"/>
|
142 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
143 |
+
<xsd:element minOccurs="0" name="amount" nillable="true" type="ns1:Amount"/>
|
144 |
+
<xsd:element minOccurs="0" name="bankAccount" nillable="true" type="tns:BankAccount"/>
|
145 |
+
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
146 |
+
<xsd:element minOccurs="0" name="browserInfo" nillable="true" type="ns1:BrowserInfo"/>
|
147 |
+
<xsd:element minOccurs="0" name="captureDelayHours" nillable="true" type="xsd:int"/>
|
148 |
+
<xsd:element minOccurs="0" name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
|
149 |
+
<xsd:element minOccurs="0" name="dccQuote" nillable="true" type="tns:ForexQuote"/>
|
150 |
+
<xsd:element minOccurs="0" name="deliveryAddress" nillable="true" type="ns1:Address"/>
|
151 |
+
<xsd:element minOccurs="0" name="deviceFingerprint" nillable="true" type="xsd:string"/>
|
152 |
+
<xsd:element minOccurs="0" name="fraudOffset" nillable="true" type="xsd:int"/>
|
153 |
+
<xsd:element minOccurs="0" name="installments" nillable="true" type="ns1:Installments"/>
|
154 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
155 |
+
<xsd:element minOccurs="0" name="orderReference" nillable="true" type="xsd:string"/>
|
156 |
+
<xsd:element minOccurs="0" name="recurring" nillable="true" type="tns:Recurring"/>
|
157 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
158 |
+
<xsd:element minOccurs="0" name="selectedBrand" nillable="true" type="xsd:string"/>
|
159 |
+
<xsd:element minOccurs="0" name="selectedRecurringDetailReference" nillable="true" type="xsd:string"/>
|
160 |
+
<xsd:element minOccurs="0" name="sessionId" nillable="true" type="xsd:string"/>
|
161 |
+
<xsd:element minOccurs="0" name="shopperEmail" nillable="true" type="xsd:string"/>
|
162 |
+
<xsd:element minOccurs="0" name="shopperIP" nillable="true" type="xsd:string"/>
|
163 |
+
<xsd:element minOccurs="0" name="shopperInteraction" nillable="true" type="xsd:string"/>
|
164 |
+
<xsd:element minOccurs="0" name="shopperLocale" nillable="true" type="xsd:string"/>
|
165 |
+
<xsd:element minOccurs="0" name="shopperName" nillable="true" type="ns1:Name"/>
|
166 |
+
<xsd:element minOccurs="0" name="shopperReference" nillable="true" type="xsd:string"/>
|
167 |
+
<xsd:element minOccurs="0" name="shopperStatement" nillable="true" type="xsd:string"/>
|
168 |
+
<xsd:element minOccurs="0" name="socialSecurityNumber" nillable="true" type="xsd:string"/>
|
169 |
+
<xsd:element minOccurs="0" name="telephoneNumber" nillable="true" type="xsd:string"/>
|
170 |
+
</xsd:sequence>
|
171 |
+
</xsd:complexType>
|
172 |
+
<xsd:complexType name="DirectDebitResponse">
|
173 |
+
<xsd:sequence>
|
174 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
175 |
+
<xsd:element minOccurs="0" name="fraudResult" nillable="true" type="tns:FraudResult"/>
|
176 |
+
<xsd:element minOccurs="0" name="pspReference" nillable="true" type="xsd:string"/>
|
177 |
+
<xsd:element minOccurs="0" name="refusalReason" nillable="true" type="xsd:string"/>
|
178 |
+
<xsd:element minOccurs="0" name="resultCode" nillable="true" type="xsd:string"/>
|
179 |
+
</xsd:sequence>
|
180 |
+
</xsd:complexType>
|
181 |
+
<xsd:complexType name="ELV">
|
182 |
+
<xsd:sequence>
|
183 |
+
<xsd:element minOccurs="0" name="accountHolderName" nillable="true" type="xsd:string"/>
|
184 |
+
<xsd:element minOccurs="0" name="bankAccountNumber" nillable="true" type="xsd:string"/>
|
185 |
+
<xsd:element minOccurs="0" name="bankLocation" nillable="true" type="xsd:string"/>
|
186 |
+
<xsd:element minOccurs="0" name="bankLocationId" nillable="true" type="xsd:string"/>
|
187 |
+
<xsd:element minOccurs="0" name="bankName" nillable="true" type="xsd:string"/>
|
188 |
+
</xsd:sequence>
|
189 |
+
</xsd:complexType>
|
190 |
+
<xsd:complexType name="ForexQuote">
|
191 |
+
<xsd:sequence>
|
192 |
+
<xsd:element minOccurs="0" name="account" nillable="true" type="xsd:string"/>
|
193 |
+
<xsd:element minOccurs="0" name="accountType" nillable="true" type="xsd:string"/>
|
194 |
+
<xsd:element minOccurs="0" name="baseAmount" nillable="true" type="ns1:Amount"/>
|
195 |
+
<xsd:element minOccurs="1" name="basePoints" type="xsd:int"/>
|
196 |
+
<xsd:element minOccurs="0" name="buy" nillable="true" type="ns1:Amount"/>
|
197 |
+
<xsd:element minOccurs="0" name="interbank" nillable="true" type="ns1:Amount"/>
|
198 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
199 |
+
<xsd:element minOccurs="0" name="sell" nillable="true" type="ns1:Amount"/>
|
200 |
+
<xsd:element minOccurs="0" name="signature" nillable="true" type="xsd:string"/>
|
201 |
+
<xsd:element minOccurs="0" name="source" nillable="true" type="xsd:string"/>
|
202 |
+
<xsd:element minOccurs="0" name="type" nillable="true" type="xsd:string"/>
|
203 |
+
<xsd:element minOccurs="1" name="validTill" type="xsd:dateTime"/>
|
204 |
+
</xsd:sequence>
|
205 |
+
</xsd:complexType>
|
206 |
+
<xsd:complexType name="FraudCheckResult">
|
207 |
+
<xsd:sequence>
|
208 |
+
<xsd:element minOccurs="1" name="accountScore" type="xsd:int"/>
|
209 |
+
<xsd:element minOccurs="1" name="checkId" type="xsd:int"/>
|
210 |
+
<xsd:element minOccurs="1" name="name" type="xsd:string"/>
|
211 |
+
</xsd:sequence>
|
212 |
+
</xsd:complexType>
|
213 |
+
<xsd:complexType name="FraudResult">
|
214 |
+
<xsd:sequence>
|
215 |
+
<xsd:element minOccurs="1" name="accountScore" type="xsd:int"/>
|
216 |
+
<xsd:element minOccurs="0" name="results" nillable="true" type="tns:ArrayOfFraudCheckResult"/>
|
217 |
+
</xsd:sequence>
|
218 |
+
</xsd:complexType>
|
219 |
+
<xsd:complexType name="FundTransferRequest">
|
220 |
+
<xsd:sequence>
|
221 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
222 |
+
<xsd:element minOccurs="0" name="authorisationCode" nillable="true" type="xsd:string"/>
|
223 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
224 |
+
<xsd:element minOccurs="0" name="modificationAmount" nillable="true" type="ns1:Amount"/>
|
225 |
+
<xsd:element minOccurs="0" name="originalReference" nillable="true" type="xsd:string"/>
|
226 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
227 |
+
<xsd:element minOccurs="0" name="shopperEmail" nillable="true" type="xsd:string"/>
|
228 |
+
<xsd:element minOccurs="0" name="shopperStatement" nillable="true" type="xsd:string"/>
|
229 |
+
</xsd:sequence>
|
230 |
+
</xsd:complexType>
|
231 |
+
<xsd:complexType name="FundTransferResult">
|
232 |
+
<xsd:sequence>
|
233 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
234 |
+
<xsd:element minOccurs="0" name="pspReference" nillable="true" type="xsd:string"/>
|
235 |
+
<xsd:element minOccurs="0" name="response" nillable="true" type="xsd:string"/>
|
236 |
+
</xsd:sequence>
|
237 |
+
</xsd:complexType>
|
238 |
+
<xsd:complexType name="ModificationRequest">
|
239 |
+
<xsd:sequence>
|
240 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
241 |
+
<xsd:element minOccurs="0" name="authorisationCode" nillable="true" type="xsd:string"/>
|
242 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
243 |
+
<xsd:element minOccurs="0" name="modificationAmount" nillable="true" type="ns1:Amount"/>
|
244 |
+
<xsd:element minOccurs="0" name="originalReference" nillable="true" type="xsd:string"/>
|
245 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
246 |
+
</xsd:sequence>
|
247 |
+
</xsd:complexType>
|
248 |
+
<xsd:complexType name="ModificationResult">
|
249 |
+
<xsd:sequence>
|
250 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
251 |
+
<xsd:element minOccurs="0" name="pspReference" nillable="true" type="xsd:string"/>
|
252 |
+
<xsd:element minOccurs="0" name="response" nillable="true" type="xsd:string"/>
|
253 |
+
</xsd:sequence>
|
254 |
+
</xsd:complexType>
|
255 |
+
<xsd:complexType name="PaymentRequest">
|
256 |
+
<xsd:sequence>
|
257 |
+
<xsd:element minOccurs="0" name="additionalAmount" nillable="true" type="ns1:Amount"/>
|
258 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
259 |
+
<xsd:element minOccurs="0" name="amount" nillable="true" type="ns1:Amount"/>
|
260 |
+
<xsd:element minOccurs="0" name="bankAccount" nillable="true" type="tns:BankAccount"/>
|
261 |
+
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
262 |
+
<xsd:element minOccurs="0" name="browserInfo" nillable="true" type="ns1:BrowserInfo"/>
|
263 |
+
<xsd:element minOccurs="0" name="captureDelayHours" nillable="true" type="xsd:int"/>
|
264 |
+
<xsd:element minOccurs="0" name="card" nillable="true" type="tns:Card"/>
|
265 |
+
<xsd:element minOccurs="0" name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
|
266 |
+
<xsd:element minOccurs="0" name="dccQuote" nillable="true" type="tns:ForexQuote"/>
|
267 |
+
<xsd:element minOccurs="0" name="deliveryAddress" nillable="true" type="ns1:Address"/>
|
268 |
+
<xsd:element minOccurs="0" name="deviceFingerprint" nillable="true" type="xsd:string"/>
|
269 |
+
<xsd:element minOccurs="0" name="elv" nillable="true" type="tns:ELV"/>
|
270 |
+
<xsd:element minOccurs="0" name="fraudOffset" nillable="true" type="xsd:int"/>
|
271 |
+
<xsd:element minOccurs="0" name="installments" nillable="true" type="ns1:Installments"/>
|
272 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
273 |
+
<xsd:element minOccurs="0" name="mpiData" nillable="true" type="tns:ThreeDSecureData"/>
|
274 |
+
<xsd:element minOccurs="0" name="orderReference" nillable="true" type="xsd:string"/>
|
275 |
+
<xsd:element minOccurs="0" name="recurring" nillable="true" type="tns:Recurring"/>
|
276 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
277 |
+
<xsd:element minOccurs="0" name="selectedBrand" nillable="true" type="xsd:string"/>
|
278 |
+
<xsd:element minOccurs="0" name="selectedRecurringDetailReference" nillable="true" type="xsd:string"/>
|
279 |
+
<xsd:element minOccurs="0" name="sessionId" nillable="true" type="xsd:string"/>
|
280 |
+
<xsd:element minOccurs="0" name="shopperEmail" nillable="true" type="xsd:string"/>
|
281 |
+
<xsd:element minOccurs="0" name="shopperIP" nillable="true" type="xsd:string"/>
|
282 |
+
<xsd:element minOccurs="0" name="shopperInteraction" nillable="true" type="xsd:string"/>
|
283 |
+
<xsd:element minOccurs="0" name="shopperLocale" nillable="true" type="xsd:string"/>
|
284 |
+
<xsd:element minOccurs="0" name="shopperName" nillable="true" type="ns1:Name"/>
|
285 |
+
<xsd:element minOccurs="0" name="shopperReference" nillable="true" type="xsd:string"/>
|
286 |
+
<xsd:element minOccurs="0" name="shopperStatement" nillable="true" type="xsd:string"/>
|
287 |
+
<xsd:element minOccurs="0" name="socialSecurityNumber" nillable="true" type="xsd:string"/>
|
288 |
+
<xsd:element minOccurs="0" name="telephoneNumber" nillable="true" type="xsd:string"/>
|
289 |
+
</xsd:sequence>
|
290 |
+
</xsd:complexType>
|
291 |
+
<xsd:complexType name="PaymentRequest3d">
|
292 |
+
<xsd:sequence>
|
293 |
+
<xsd:element minOccurs="0" name="additionalAmount" nillable="true" type="ns1:Amount"/>
|
294 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
295 |
+
<xsd:element minOccurs="0" name="amount" nillable="true" type="ns1:Amount"/>
|
296 |
+
<xsd:element minOccurs="0" name="billingAddress" nillable="true" type="ns1:Address"/>
|
297 |
+
<xsd:element minOccurs="0" name="browserInfo" nillable="true" type="ns1:BrowserInfo"/>
|
298 |
+
<xsd:element minOccurs="0" name="captureDelayHours" nillable="true" type="xsd:int"/>
|
299 |
+
<xsd:element minOccurs="0" name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
|
300 |
+
<xsd:element minOccurs="0" name="dccQuote" nillable="true" type="tns:ForexQuote"/>
|
301 |
+
<xsd:element minOccurs="0" name="deliveryAddress" nillable="true" type="ns1:Address"/>
|
302 |
+
<xsd:element minOccurs="0" name="deviceFingerprint" nillable="true" type="xsd:string"/>
|
303 |
+
<xsd:element minOccurs="0" name="fraudOffset" nillable="true" type="xsd:int"/>
|
304 |
+
<xsd:element minOccurs="0" name="installments" nillable="true" type="ns1:Installments"/>
|
305 |
+
<xsd:element minOccurs="0" name="md" nillable="true" type="xsd:string"/>
|
306 |
+
<xsd:element minOccurs="0" name="merchantAccount" nillable="true" type="xsd:string"/>
|
307 |
+
<xsd:element minOccurs="0" name="orderReference" nillable="true" type="xsd:string"/>
|
308 |
+
<xsd:element minOccurs="0" name="paResponse" nillable="true" type="xsd:string"/>
|
309 |
+
<xsd:element minOccurs="0" name="recurring" nillable="true" type="tns:Recurring"/>
|
310 |
+
<xsd:element minOccurs="0" name="reference" nillable="true" type="xsd:string"/>
|
311 |
+
<xsd:element minOccurs="0" name="selectedBrand" nillable="true" type="xsd:string"/>
|
312 |
+
<xsd:element minOccurs="0" name="selectedRecurringDetailReference" nillable="true" type="xsd:string"/>
|
313 |
+
<xsd:element minOccurs="0" name="sessionId" nillable="true" type="xsd:string"/>
|
314 |
+
<xsd:element minOccurs="0" name="shopperEmail" nillable="true" type="xsd:string"/>
|
315 |
+
<xsd:element minOccurs="0" name="shopperIP" nillable="true" type="xsd:string"/>
|
316 |
+
<xsd:element minOccurs="0" name="shopperInteraction" nillable="true" type="xsd:string"/>
|
317 |
+
<xsd:element minOccurs="0" name="shopperLocale" nillable="true" type="xsd:string"/>
|
318 |
+
<xsd:element minOccurs="0" name="shopperName" nillable="true" type="ns1:Name"/>
|
319 |
+
<xsd:element minOccurs="0" name="shopperReference" nillable="true" type="xsd:string"/>
|
320 |
+
<xsd:element minOccurs="0" name="shopperStatement" nillable="true" type="xsd:string"/>
|
321 |
+
<xsd:element minOccurs="0" name="socialSecurityNumber" nillable="true" type="xsd:string"/>
|
322 |
+
<xsd:element minOccurs="0" name="telephoneNumber" nillable="true" type="xsd:string"/>
|
323 |
+
</xsd:sequence>
|
324 |
+
</xsd:complexType>
|
325 |
+
<xsd:complexType name="PaymentResult">
|
326 |
+
<xsd:sequence>
|
327 |
+
<xsd:element minOccurs="0" name="additionalData" nillable="true" type="tns:anyType2anyTypeMap"/>
|
328 |
+
<xsd:element minOccurs="0" name="authCode" nillable="true" type="xsd:string"/>
|
329 |
+
<xsd:element minOccurs="0" name="dccAmount" nillable="true" type="ns1:Amount"/>
|
330 |
+
<xsd:element minOccurs="0" name="dccSignature" nillable="true" type="xsd:string"/>
|
331 |
+
<xsd:element minOccurs="0" name="fraudResult" nillable="true" type="tns:FraudResult"/>
|
332 |
+
<xsd:element minOccurs="0" name="issuerUrl" nillable="true" type="xsd:string"/>
|
333 |
+
<xsd:element minOccurs="0" name="md" nillable="true" type="xsd:string"/>
|
334 |
+
<xsd:element minOccurs="0" name="paRequest" nillable="true" type="xsd:string"/>
|
335 |
+
<xsd:element minOccurs="0" name="pspReference" nillable="true" type="xsd:string"/>
|
336 |
+
<xsd:element minOccurs="0" name="refusalReason" nillable="true" type="xsd:string"/>
|
337 |
+
<xsd:element minOccurs="0" name="resultCode" nillable="true" type="xsd:string"/>
|
338 |
+
</xsd:sequence>
|
339 |
+
</xsd:complexType>
|
340 |
+
<xsd:complexType name="Recurring">
|
341 |
+
<xsd:sequence>
|
342 |
+
<xsd:element minOccurs="0" name="contract" nillable="true" type="xsd:string"/>
|
343 |
+
<xsd:element minOccurs="0" name="recurringDetailName" nillable="true" type="xsd:string"/>
|
344 |
+
</xsd:sequence>
|
345 |
+
</xsd:complexType>
|
346 |
+
<xsd:complexType name="ThreeDSecureData">
|
347 |
+
<xsd:sequence>
|
348 |
+
<xsd:element minOccurs="0" name="authenticationResponse" nillable="true" type="xsd:string"/>
|
349 |
+
<xsd:element minOccurs="0" name="cavv" nillable="true" type="xsd:base64Binary"/>
|
350 |
+
<xsd:element minOccurs="0" name="cavvAlgorithm" nillable="true" type="xsd:string"/>
|
351 |
+
<xsd:element minOccurs="0" name="directoryResponse" nillable="true" type="xsd:string"/>
|
352 |
+
<xsd:element minOccurs="0" name="eci" nillable="true" type="xsd:string"/>
|
353 |
+
<xsd:element minOccurs="0" name="xid" nillable="true" type="xsd:base64Binary"/>
|
354 |
+
</xsd:sequence>
|
355 |
+
</xsd:complexType>
|
356 |
+
<xsd:complexType name="ArrayOfFraudCheckResult">
|
357 |
+
<xsd:sequence>
|
358 |
+
<xsd:element maxOccurs="unbounded" minOccurs="0" name="FraudCheckResult" nillable="true" type="tns:FraudCheckResult"/>
|
359 |
+
</xsd:sequence>
|
360 |
+
</xsd:complexType>
|
361 |
+
<xsd:complexType name="anyType2anyTypeMap">
|
362 |
+
<xsd:sequence>
|
363 |
+
<xsd:element maxOccurs="unbounded" minOccurs="0" name="entry">
|
364 |
+
<xsd:complexType>
|
365 |
+
<xsd:sequence>
|
366 |
+
<xsd:element maxOccurs="1" minOccurs="0" name="key" type="xsd:anyType"/>
|
367 |
+
<xsd:element maxOccurs="1" minOccurs="0" name="value" type="xsd:anyType"/>
|
368 |
+
</xsd:sequence>
|
369 |
+
</xsd:complexType>
|
370 |
+
</xsd:element>
|
371 |
+
</xsd:sequence>
|
372 |
+
</xsd:complexType>
|
373 |
+
<xsd:element name="ServiceException" type="ns1:ServiceException"/>
|
374 |
+
<xsd:element name="authorise">
|
375 |
+
<xsd:complexType>
|
376 |
+
<xsd:sequence>
|
377 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentRequest" nillable="true" type="tns:PaymentRequest"/>
|
378 |
+
</xsd:sequence>
|
379 |
+
</xsd:complexType>
|
380 |
+
</xsd:element>
|
381 |
+
<xsd:element name="authorise3d">
|
382 |
+
<xsd:complexType>
|
383 |
+
<xsd:sequence>
|
384 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentRequest3d" nillable="true" type="tns:PaymentRequest3d"/>
|
385 |
+
</xsd:sequence>
|
386 |
+
</xsd:complexType>
|
387 |
+
</xsd:element>
|
388 |
+
<xsd:element name="authorise3dResponse">
|
389 |
+
<xsd:complexType>
|
390 |
+
<xsd:sequence>
|
391 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentResult" nillable="true" type="tns:PaymentResult"/>
|
392 |
+
</xsd:sequence>
|
393 |
+
</xsd:complexType>
|
394 |
+
</xsd:element>
|
395 |
+
<xsd:element name="authoriseReferral">
|
396 |
+
<xsd:complexType>
|
397 |
+
<xsd:sequence>
|
398 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="modificationRequest" nillable="true" type="tns:ModificationRequest"/>
|
399 |
+
</xsd:sequence>
|
400 |
+
</xsd:complexType>
|
401 |
+
</xsd:element>
|
402 |
+
<xsd:element name="authoriseReferralResponse">
|
403 |
+
<xsd:complexType>
|
404 |
+
<xsd:sequence>
|
405 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="authoriseReferralResult" nillable="true" type="tns:ModificationResult"/>
|
406 |
+
</xsd:sequence>
|
407 |
+
</xsd:complexType>
|
408 |
+
</xsd:element>
|
409 |
+
<xsd:element name="authoriseResponse">
|
410 |
+
<xsd:complexType>
|
411 |
+
<xsd:sequence>
|
412 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentResult" nillable="true" type="tns:PaymentResult"/>
|
413 |
+
</xsd:sequence>
|
414 |
+
</xsd:complexType>
|
415 |
+
</xsd:element>
|
416 |
+
<xsd:element name="balanceCheck">
|
417 |
+
<xsd:complexType>
|
418 |
+
<xsd:sequence>
|
419 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="request" nillable="true" type="tns:BalanceCheckRequest"/>
|
420 |
+
</xsd:sequence>
|
421 |
+
</xsd:complexType>
|
422 |
+
</xsd:element>
|
423 |
+
<xsd:element name="balanceCheckResponse">
|
424 |
+
<xsd:complexType>
|
425 |
+
<xsd:sequence>
|
426 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="response" nillable="true" type="tns:BalanceCheckResult"/>
|
427 |
+
</xsd:sequence>
|
428 |
+
</xsd:complexType>
|
429 |
+
</xsd:element>
|
430 |
+
<xsd:element name="cancel">
|
431 |
+
<xsd:complexType>
|
432 |
+
<xsd:sequence>
|
433 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="modificationRequest" nillable="true" type="tns:ModificationRequest"/>
|
434 |
+
</xsd:sequence>
|
435 |
+
</xsd:complexType>
|
436 |
+
</xsd:element>
|
437 |
+
<xsd:element name="cancelOrRefund">
|
438 |
+
<xsd:complexType>
|
439 |
+
<xsd:sequence>
|
440 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="modificationRequest" nillable="true" type="tns:ModificationRequest"/>
|
441 |
+
</xsd:sequence>
|
442 |
+
</xsd:complexType>
|
443 |
+
</xsd:element>
|
444 |
+
<xsd:element name="cancelOrRefundResponse">
|
445 |
+
<xsd:complexType>
|
446 |
+
<xsd:sequence>
|
447 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="cancelOrRefundResult" nillable="true" type="tns:ModificationResult"/>
|
448 |
+
</xsd:sequence>
|
449 |
+
</xsd:complexType>
|
450 |
+
</xsd:element>
|
451 |
+
<xsd:element name="cancelResponse">
|
452 |
+
<xsd:complexType>
|
453 |
+
<xsd:sequence>
|
454 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="cancelResult" nillable="true" type="tns:ModificationResult"/>
|
455 |
+
</xsd:sequence>
|
456 |
+
</xsd:complexType>
|
457 |
+
</xsd:element>
|
458 |
+
<xsd:element name="capture">
|
459 |
+
<xsd:complexType>
|
460 |
+
<xsd:sequence>
|
461 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="modificationRequest" nillable="true" type="tns:ModificationRequest"/>
|
462 |
+
</xsd:sequence>
|
463 |
+
</xsd:complexType>
|
464 |
+
</xsd:element>
|
465 |
+
<xsd:element name="captureResponse">
|
466 |
+
<xsd:complexType>
|
467 |
+
<xsd:sequence>
|
468 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="captureResult" nillable="true" type="tns:ModificationResult"/>
|
469 |
+
</xsd:sequence>
|
470 |
+
</xsd:complexType>
|
471 |
+
</xsd:element>
|
472 |
+
<xsd:element name="checkFraud">
|
473 |
+
<xsd:complexType>
|
474 |
+
<xsd:sequence>
|
475 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentRequest" nillable="true" type="tns:PaymentRequest"/>
|
476 |
+
</xsd:sequence>
|
477 |
+
</xsd:complexType>
|
478 |
+
</xsd:element>
|
479 |
+
<xsd:element name="checkFraudResponse">
|
480 |
+
<xsd:complexType>
|
481 |
+
<xsd:sequence>
|
482 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="paymentResult" nillable="true" type="tns:PaymentResult"/>
|
483 |
+
</xsd:sequence>
|
484 |
+
</xsd:complexType>
|
485 |
+
</xsd:element>
|
486 |
+
<xsd:element name="directdebit">
|
487 |
+
<xsd:complexType>
|
488 |
+
<xsd:sequence>
|
489 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="request" nillable="true" type="tns:DirectDebitRequest"/>
|
490 |
+
</xsd:sequence>
|
491 |
+
</xsd:complexType>
|
492 |
+
</xsd:element>
|
493 |
+
<xsd:element name="directdebitResponse">
|
494 |
+
<xsd:complexType>
|
495 |
+
<xsd:sequence>
|
496 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="response" nillable="true" type="tns:DirectDebitResponse"/>
|
497 |
+
</xsd:sequence>
|
498 |
+
</xsd:complexType>
|
499 |
+
</xsd:element>
|
500 |
+
<xsd:element name="fundTransfer">
|
501 |
+
<xsd:complexType>
|
502 |
+
<xsd:sequence>
|
503 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="request" nillable="true" type="tns:FundTransferRequest"/>
|
504 |
+
</xsd:sequence>
|
505 |
+
</xsd:complexType>
|
506 |
+
</xsd:element>
|
507 |
+
<xsd:element name="fundTransferResponse">
|
508 |
+
<xsd:complexType>
|
509 |
+
<xsd:sequence>
|
510 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="result" nillable="true" type="tns:FundTransferResult"/>
|
511 |
+
</xsd:sequence>
|
512 |
+
</xsd:complexType>
|
513 |
+
</xsd:element>
|
514 |
+
<xsd:element name="refund">
|
515 |
+
<xsd:complexType>
|
516 |
+
<xsd:sequence>
|
517 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="modificationRequest" nillable="true" type="tns:ModificationRequest"/>
|
518 |
+
</xsd:sequence>
|
519 |
+
</xsd:complexType>
|
520 |
+
</xsd:element>
|
521 |
+
<xsd:element name="refundResponse">
|
522 |
+
<xsd:complexType>
|
523 |
+
<xsd:sequence>
|
524 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="refundResult" nillable="true" type="tns:ModificationResult"/>
|
525 |
+
</xsd:sequence>
|
526 |
+
</xsd:complexType>
|
527 |
+
</xsd:element>
|
528 |
+
<xsd:element name="refundWithData">
|
529 |
+
<xsd:complexType>
|
530 |
+
<xsd:sequence>
|
531 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="request" nillable="true" type="tns:PaymentRequest"/>
|
532 |
+
</xsd:sequence>
|
533 |
+
</xsd:complexType>
|
534 |
+
</xsd:element>
|
535 |
+
<xsd:element name="refundWithDataResponse">
|
536 |
+
<xsd:complexType>
|
537 |
+
<xsd:sequence>
|
538 |
+
<xsd:element maxOccurs="1" minOccurs="1" name="result" nillable="true" type="tns:PaymentResult"/>
|
539 |
+
</xsd:sequence>
|
540 |
+
</xsd:complexType>
|
541 |
+
</xsd:element>
|
542 |
+
</xsd:schema>
|
543 |
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.services.adyen.com">
|
544 |
+
<xsd:complexType name="Address">
|
545 |
+
<xsd:sequence>
|
546 |
+
<xsd:element minOccurs="0" name="city" nillable="true" type="xsd:string"/>
|
547 |
+
<xsd:element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
548 |
+
<xsd:element minOccurs="0" name="houseNumberOrName" nillable="true" type="xsd:string"/>
|
549 |
+
<xsd:element minOccurs="0" name="postalCode" nillable="true" type="xsd:string"/>
|
550 |
+
<xsd:element minOccurs="0" name="stateOrProvince" nillable="true" type="xsd:string"/>
|
551 |
+
<xsd:element minOccurs="0" name="street" nillable="true" type="xsd:string"/>
|
552 |
+
</xsd:sequence>
|
553 |
+
</xsd:complexType>
|
554 |
+
<xsd:complexType name="Amount">
|
555 |
+
<xsd:sequence>
|
556 |
+
<xsd:element minOccurs="1" name="currency">
|
557 |
+
<xsd:simpleType>
|
558 |
+
<xsd:restriction base="xsd:string">
|
559 |
+
<xsd:minLength value="3"/>
|
560 |
+
<xsd:maxLength value="3"/>
|
561 |
+
</xsd:restriction>
|
562 |
+
</xsd:simpleType>
|
563 |
+
</xsd:element>
|
564 |
+
<xsd:element minOccurs="1" name="value" type="xsd:long"/>
|
565 |
+
</xsd:sequence>
|
566 |
+
</xsd:complexType>
|
567 |
+
<xsd:complexType name="BrowserInfo">
|
568 |
+
<xsd:sequence>
|
569 |
+
<xsd:element minOccurs="1" name="acceptHeader">
|
570 |
+
<xsd:simpleType>
|
571 |
+
<xsd:restriction base="xsd:string">
|
572 |
+
<xsd:minLength value="10"/>
|
573 |
+
<xsd:maxLength value="50"/>
|
574 |
+
</xsd:restriction>
|
575 |
+
</xsd:simpleType>
|
576 |
+
</xsd:element>
|
577 |
+
<xsd:element minOccurs="1" name="userAgent">
|
578 |
+
<xsd:simpleType>
|
579 |
+
<xsd:restriction base="xsd:string">
|
580 |
+
<xsd:minLength value="10"/>
|
581 |
+
<xsd:maxLength value="50"/>
|
582 |
+
</xsd:restriction>
|
583 |
+
</xsd:simpleType>
|
584 |
+
</xsd:element>
|
585 |
+
</xsd:sequence>
|
586 |
+
</xsd:complexType>
|
587 |
+
<xsd:complexType name="Installments">
|
588 |
+
<xsd:sequence>
|
589 |
+
<xsd:element minOccurs="0" name="value" type="xsd:short"/>
|
590 |
+
</xsd:sequence>
|
591 |
+
</xsd:complexType>
|
592 |
+
<xsd:complexType name="Name">
|
593 |
+
<xsd:sequence>
|
594 |
+
<xsd:element minOccurs="0" name="firstName" nillable="true" type="xsd:string"/>
|
595 |
+
<xsd:element minOccurs="0" name="gender" nillable="true" type="ns1:Gender"/>
|
596 |
+
<xsd:element minOccurs="0" name="infix" nillable="true" type="xsd:string"/>
|
597 |
+
<xsd:element minOccurs="0" name="lastName" nillable="true" type="xsd:string"/>
|
598 |
+
</xsd:sequence>
|
599 |
+
</xsd:complexType>
|
600 |
+
<xsd:simpleType name="Gender">
|
601 |
+
<xsd:restriction base="xsd:string">
|
602 |
+
<xsd:enumeration value="MALE"/>
|
603 |
+
<xsd:enumeration value="FEMALE"/>
|
604 |
+
<xsd:enumeration value="UNKNOWN"/>
|
605 |
+
</xsd:restriction>
|
606 |
+
</xsd:simpleType>
|
607 |
+
<xsd:complexType name="ServiceException">
|
608 |
+
<xsd:sequence>
|
609 |
+
<xsd:element minOccurs="0" name="error" nillable="true" type="ns1:Error"/>
|
610 |
+
<xsd:element minOccurs="0" name="type" nillable="true" type="ns1:Type"/>
|
611 |
+
</xsd:sequence>
|
612 |
+
</xsd:complexType>
|
613 |
+
<xsd:simpleType name="Error">
|
614 |
+
<xsd:restriction base="xsd:string">
|
615 |
+
<xsd:enumeration value="Unknown"/>
|
616 |
+
<xsd:enumeration value="NotAllowed"/>
|
617 |
+
<xsd:enumeration value="NoAmountSpecified"/>
|
618 |
+
<xsd:enumeration value="UnableToDetermineVariant"/>
|
619 |
+
<xsd:enumeration value="InvalidMerchantAccount"/>
|
620 |
+
<xsd:enumeration value="RequestMissing"/>
|
621 |
+
<xsd:enumeration value="InternalError"/>
|
622 |
+
<xsd:enumeration value="UnableToProcess"/>
|
623 |
+
<xsd:enumeration value="PaymentDetailsAreNotSupported"/>
|
624 |
+
</xsd:restriction>
|
625 |
+
</xsd:simpleType>
|
626 |
+
<xsd:simpleType name="Type">
|
627 |
+
<xsd:restriction base="xsd:string">
|
628 |
+
<xsd:enumeration value="internal"/>
|
629 |
+
<xsd:enumeration value="validation"/>
|
630 |
+
<xsd:enumeration value="security"/>
|
631 |
+
<xsd:enumeration value="configuration"/>
|
632 |
+
</xsd:restriction>
|
633 |
+
</xsd:simpleType>
|
634 |
+
</xsd:schema>
|
635 |
+
</wsdl:types>
|
636 |
+
<wsdl:message name="ServiceException">
|
637 |
+
<wsdl:part name="ServiceException" element="tns:ServiceException"/>
|
638 |
+
</wsdl:message>
|
639 |
+
<wsdl:message name="authorise3dRequest">
|
640 |
+
<wsdl:part name="parameters" element="tns:authorise3d"/>
|
641 |
+
</wsdl:message>
|
642 |
+
<wsdl:message name="authorise3dResponse">
|
643 |
+
<wsdl:part name="parameters" element="tns:authorise3dResponse"/>
|
644 |
+
</wsdl:message>
|
645 |
+
<wsdl:message name="authoriseReferralRequest">
|
646 |
+
<wsdl:part name="parameters" element="tns:authoriseReferral"/>
|
647 |
+
</wsdl:message>
|
648 |
+
<wsdl:message name="authoriseReferralResponse">
|
649 |
+
<wsdl:part name="parameters" element="tns:authoriseReferralResponse"/>
|
650 |
+
</wsdl:message>
|
651 |
+
<wsdl:message name="authoriseRequest">
|
652 |
+
<wsdl:part name="parameters" element="tns:authorise"/>
|
653 |
+
</wsdl:message>
|
654 |
+
<wsdl:message name="authoriseResponse">
|
655 |
+
<wsdl:part name="parameters" element="tns:authoriseResponse"/>
|
656 |
+
</wsdl:message>
|
657 |
+
<wsdl:message name="balanceCheckRequest">
|
658 |
+
<wsdl:part name="parameters" element="tns:balanceCheck"/>
|
659 |
+
</wsdl:message>
|
660 |
+
<wsdl:message name="balanceCheckResponse">
|
661 |
+
<wsdl:part name="parameters" element="tns:balanceCheckResponse"/>
|
662 |
+
</wsdl:message>
|
663 |
+
<wsdl:message name="cancelOrRefundRequest">
|
664 |
+
<wsdl:part name="parameters" element="tns:cancelOrRefund"/>
|
665 |
+
</wsdl:message>
|
666 |
+
<wsdl:message name="cancelOrRefundResponse">
|
667 |
+
<wsdl:part name="parameters" element="tns:cancelOrRefundResponse"/>
|
668 |
+
</wsdl:message>
|
669 |
+
<wsdl:message name="cancelRequest">
|
670 |
+
<wsdl:part name="parameters" element="tns:cancel"/>
|
671 |
+
</wsdl:message>
|
672 |
+
<wsdl:message name="cancelResponse">
|
673 |
+
<wsdl:part name="parameters" element="tns:cancelResponse"/>
|
674 |
+
</wsdl:message>
|
675 |
+
<wsdl:message name="captureRequest">
|
676 |
+
<wsdl:part name="parameters" element="tns:capture"/>
|
677 |
+
</wsdl:message>
|
678 |
+
<wsdl:message name="captureResponse">
|
679 |
+
<wsdl:part name="parameters" element="tns:captureResponse"/>
|
680 |
+
</wsdl:message>
|
681 |
+
<wsdl:message name="checkFraudRequest">
|
682 |
+
<wsdl:part name="parameters" element="tns:checkFraud"/>
|
683 |
+
</wsdl:message>
|
684 |
+
<wsdl:message name="checkFraudResponse">
|
685 |
+
<wsdl:part name="parameters" element="tns:checkFraudResponse"/>
|
686 |
+
</wsdl:message>
|
687 |
+
<wsdl:message name="directdebitRequest">
|
688 |
+
<wsdl:part name="parameters" element="tns:directdebit"/>
|
689 |
+
</wsdl:message>
|
690 |
+
<wsdl:message name="directdebitResponse">
|
691 |
+
<wsdl:part name="parameters" element="tns:directdebitResponse"/>
|
692 |
+
</wsdl:message>
|
693 |
+
<wsdl:message name="fundTransferRequest">
|
694 |
+
<wsdl:part name="parameters" element="tns:fundTransfer"/>
|
695 |
+
</wsdl:message>
|
696 |
+
<wsdl:message name="fundTransferResponse">
|
697 |
+
<wsdl:part name="parameters" element="tns:fundTransferResponse"/>
|
698 |
+
</wsdl:message>
|
699 |
+
<wsdl:message name="refundRequest">
|
700 |
+
<wsdl:part name="parameters" element="tns:refund"/>
|
701 |
+
</wsdl:message>
|
702 |
+
<wsdl:message name="refundResponse">
|
703 |
+
<wsdl:part name="parameters" element="tns:refundResponse"/>
|
704 |
+
</wsdl:message>
|
705 |
+
<wsdl:message name="refundWithDataRequest">
|
706 |
+
<wsdl:part name="parameters" element="tns:refundWithData"/>
|
707 |
+
</wsdl:message>
|
708 |
+
<wsdl:message name="refundWithDataResponse">
|
709 |
+
<wsdl:part name="parameters" element="tns:refundWithDataResponse"/>
|
710 |
+
</wsdl:message>
|
711 |
+
<wsdl:portType name="PaymentPortType">
|
712 |
+
<wsdl:operation name="authorise">
|
713 |
+
<wsdl:input name="authoriseRequest" message="tns:authoriseRequest"/>
|
714 |
+
<wsdl:output name="authoriseResponse" message="tns:authoriseResponse"/>
|
715 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
716 |
+
</wsdl:operation>
|
717 |
+
<wsdl:operation name="authorise3d">
|
718 |
+
<wsdl:input name="authorise3dRequest" message="tns:authorise3dRequest"/>
|
719 |
+
<wsdl:output name="authorise3dResponse" message="tns:authorise3dResponse"/>
|
720 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
721 |
+
</wsdl:operation>
|
722 |
+
<wsdl:operation name="authoriseReferral">
|
723 |
+
<wsdl:input name="authoriseReferralRequest" message="tns:authoriseReferralRequest"/>
|
724 |
+
<wsdl:output name="authoriseReferralResponse" message="tns:authoriseReferralResponse"/>
|
725 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
726 |
+
</wsdl:operation>
|
727 |
+
<wsdl:operation name="balanceCheck">
|
728 |
+
<wsdl:input name="balanceCheckRequest" message="tns:balanceCheckRequest"/>
|
729 |
+
<wsdl:output name="balanceCheckResponse" message="tns:balanceCheckResponse"/>
|
730 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
731 |
+
</wsdl:operation>
|
732 |
+
<wsdl:operation name="cancel">
|
733 |
+
<wsdl:input name="cancelRequest" message="tns:cancelRequest"/>
|
734 |
+
<wsdl:output name="cancelResponse" message="tns:cancelResponse"/>
|
735 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
736 |
+
</wsdl:operation>
|
737 |
+
<wsdl:operation name="cancelOrRefund">
|
738 |
+
<wsdl:input name="cancelOrRefundRequest" message="tns:cancelOrRefundRequest"/>
|
739 |
+
<wsdl:output name="cancelOrRefundResponse" message="tns:cancelOrRefundResponse"/>
|
740 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
741 |
+
</wsdl:operation>
|
742 |
+
<wsdl:operation name="capture">
|
743 |
+
<wsdl:input name="captureRequest" message="tns:captureRequest"/>
|
744 |
+
<wsdl:output name="captureResponse" message="tns:captureResponse"/>
|
745 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
746 |
+
</wsdl:operation>
|
747 |
+
<wsdl:operation name="checkFraud">
|
748 |
+
<wsdl:input name="checkFraudRequest" message="tns:checkFraudRequest"/>
|
749 |
+
<wsdl:output name="checkFraudResponse" message="tns:checkFraudResponse"/>
|
750 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
751 |
+
</wsdl:operation>
|
752 |
+
<wsdl:operation name="directdebit">
|
753 |
+
<wsdl:input name="directdebitRequest" message="tns:directdebitRequest"/>
|
754 |
+
<wsdl:output name="directdebitResponse" message="tns:directdebitResponse"/>
|
755 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
756 |
+
</wsdl:operation>
|
757 |
+
<wsdl:operation name="fundTransfer">
|
758 |
+
<wsdl:input name="fundTransferRequest" message="tns:fundTransferRequest"/>
|
759 |
+
<wsdl:output name="fundTransferResponse" message="tns:fundTransferResponse"/>
|
760 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
761 |
+
</wsdl:operation>
|
762 |
+
<wsdl:operation name="refund">
|
763 |
+
<wsdl:input name="refundRequest" message="tns:refundRequest"/>
|
764 |
+
<wsdl:output name="refundResponse" message="tns:refundResponse"/>
|
765 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
766 |
+
</wsdl:operation>
|
767 |
+
<wsdl:operation name="refundWithData">
|
768 |
+
<wsdl:input name="refundWithDataRequest" message="tns:refundWithDataRequest"/>
|
769 |
+
<wsdl:output name="refundWithDataResponse" message="tns:refundWithDataResponse"/>
|
770 |
+
<wsdl:fault name="ServiceException" message="tns:ServiceException"/>
|
771 |
+
</wsdl:operation>
|
772 |
+
</wsdl:portType>
|
773 |
+
<wsdl:binding name="PaymentHttpBinding" type="tns:PaymentPortType">
|
774 |
+
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
775 |
+
<wsdl:operation name="authorise">
|
776 |
+
<wsdlsoap:operation soapAction=""/>
|
777 |
+
<wsdl:input name="authoriseRequest">
|
778 |
+
<wsdlsoap:body use="literal"/>
|
779 |
+
</wsdl:input>
|
780 |
+
<wsdl:output name="authoriseResponse">
|
781 |
+
<wsdlsoap:body use="literal"/>
|
782 |
+
</wsdl:output>
|
783 |
+
<wsdl:fault name="ServiceException">
|
784 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
785 |
+
</wsdl:fault>
|
786 |
+
</wsdl:operation>
|
787 |
+
<wsdl:operation name="authorise3d">
|
788 |
+
<wsdlsoap:operation soapAction=""/>
|
789 |
+
<wsdl:input name="authorise3dRequest">
|
790 |
+
<wsdlsoap:body use="literal"/>
|
791 |
+
</wsdl:input>
|
792 |
+
<wsdl:output name="authorise3dResponse">
|
793 |
+
<wsdlsoap:body use="literal"/>
|
794 |
+
</wsdl:output>
|
795 |
+
<wsdl:fault name="ServiceException">
|
796 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
797 |
+
</wsdl:fault>
|
798 |
+
</wsdl:operation>
|
799 |
+
<wsdl:operation name="authoriseReferral">
|
800 |
+
<wsdlsoap:operation soapAction=""/>
|
801 |
+
<wsdl:input name="authoriseReferralRequest">
|
802 |
+
<wsdlsoap:body use="literal"/>
|
803 |
+
</wsdl:input>
|
804 |
+
<wsdl:output name="authoriseReferralResponse">
|
805 |
+
<wsdlsoap:body use="literal"/>
|
806 |
+
</wsdl:output>
|
807 |
+
<wsdl:fault name="ServiceException">
|
808 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
809 |
+
</wsdl:fault>
|
810 |
+
</wsdl:operation>
|
811 |
+
<wsdl:operation name="balanceCheck">
|
812 |
+
<wsdlsoap:operation soapAction=""/>
|
813 |
+
<wsdl:input name="balanceCheckRequest">
|
814 |
+
<wsdlsoap:body use="literal"/>
|
815 |
+
</wsdl:input>
|
816 |
+
<wsdl:output name="balanceCheckResponse">
|
817 |
+
<wsdlsoap:body use="literal"/>
|
818 |
+
</wsdl:output>
|
819 |
+
<wsdl:fault name="ServiceException">
|
820 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
821 |
+
</wsdl:fault>
|
822 |
+
</wsdl:operation>
|
823 |
+
<wsdl:operation name="cancel">
|
824 |
+
<wsdlsoap:operation soapAction=""/>
|
825 |
+
<wsdl:input name="cancelRequest">
|
826 |
+
<wsdlsoap:body use="literal"/>
|
827 |
+
</wsdl:input>
|
828 |
+
<wsdl:output name="cancelResponse">
|
829 |
+
<wsdlsoap:body use="literal"/>
|
830 |
+
</wsdl:output>
|
831 |
+
<wsdl:fault name="ServiceException">
|
832 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
833 |
+
</wsdl:fault>
|
834 |
+
</wsdl:operation>
|
835 |
+
<wsdl:operation name="cancelOrRefund">
|
836 |
+
<wsdlsoap:operation soapAction=""/>
|
837 |
+
<wsdl:input name="cancelOrRefundRequest">
|
838 |
+
<wsdlsoap:body use="literal"/>
|
839 |
+
</wsdl:input>
|
840 |
+
<wsdl:output name="cancelOrRefundResponse">
|
841 |
+
<wsdlsoap:body use="literal"/>
|
842 |
+
</wsdl:output>
|
843 |
+
<wsdl:fault name="ServiceException">
|
844 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
845 |
+
</wsdl:fault>
|
846 |
+
</wsdl:operation>
|
847 |
+
<wsdl:operation name="capture">
|
848 |
+
<wsdlsoap:operation soapAction=""/>
|
849 |
+
<wsdl:input name="captureRequest">
|
850 |
+
<wsdlsoap:body use="literal"/>
|
851 |
+
</wsdl:input>
|
852 |
+
<wsdl:output name="captureResponse">
|
853 |
+
<wsdlsoap:body use="literal"/>
|
854 |
+
</wsdl:output>
|
855 |
+
<wsdl:fault name="ServiceException">
|
856 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
857 |
+
</wsdl:fault>
|
858 |
+
</wsdl:operation>
|
859 |
+
<wsdl:operation name="checkFraud">
|
860 |
+
<wsdlsoap:operation soapAction=""/>
|
861 |
+
<wsdl:input name="checkFraudRequest">
|
862 |
+
<wsdlsoap:body use="literal"/>
|
863 |
+
</wsdl:input>
|
864 |
+
<wsdl:output name="checkFraudResponse">
|
865 |
+
<wsdlsoap:body use="literal"/>
|
866 |
+
</wsdl:output>
|
867 |
+
<wsdl:fault name="ServiceException">
|
868 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
869 |
+
</wsdl:fault>
|
870 |
+
</wsdl:operation>
|
871 |
+
<wsdl:operation name="directdebit">
|
872 |
+
<wsdlsoap:operation soapAction=""/>
|
873 |
+
<wsdl:input name="directdebitRequest">
|
874 |
+
<wsdlsoap:body use="literal"/>
|
875 |
+
</wsdl:input>
|
876 |
+
<wsdl:output name="directdebitResponse">
|
877 |
+
<wsdlsoap:body use="literal"/>
|
878 |
+
</wsdl:output>
|
879 |
+
<wsdl:fault name="ServiceException">
|
880 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
881 |
+
</wsdl:fault>
|
882 |
+
</wsdl:operation>
|
883 |
+
<wsdl:operation name="fundTransfer">
|
884 |
+
<wsdlsoap:operation soapAction=""/>
|
885 |
+
<wsdl:input name="fundTransferRequest">
|
886 |
+
<wsdlsoap:body use="literal"/>
|
887 |
+
</wsdl:input>
|
888 |
+
<wsdl:output name="fundTransferResponse">
|
889 |
+
<wsdlsoap:body use="literal"/>
|
890 |
+
</wsdl:output>
|
891 |
+
<wsdl:fault name="ServiceException">
|
892 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
893 |
+
</wsdl:fault>
|
894 |
+
</wsdl:operation>
|
895 |
+
<wsdl:operation name="refund">
|
896 |
+
<wsdlsoap:operation soapAction=""/>
|
897 |
+
<wsdl:input name="refundRequest">
|
898 |
+
<wsdlsoap:body use="literal"/>
|
899 |
+
</wsdl:input>
|
900 |
+
<wsdl:output name="refundResponse">
|
901 |
+
<wsdlsoap:body use="literal"/>
|
902 |
+
</wsdl:output>
|
903 |
+
<wsdl:fault name="ServiceException">
|
904 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
905 |
+
</wsdl:fault>
|
906 |
+
</wsdl:operation>
|
907 |
+
<wsdl:operation name="refundWithData">
|
908 |
+
<wsdlsoap:operation soapAction=""/>
|
909 |
+
<wsdl:input name="refundWithDataRequest">
|
910 |
+
<wsdlsoap:body use="literal"/>
|
911 |
+
</wsdl:input>
|
912 |
+
<wsdl:output name="refundWithDataResponse">
|
913 |
+
<wsdlsoap:body use="literal"/>
|
914 |
+
</wsdl:output>
|
915 |
+
<wsdl:fault name="ServiceException">
|
916 |
+
<wsdlsoap:fault name="ServiceException" use="literal"/>
|
917 |
+
</wsdl:fault>
|
918 |
+
</wsdl:operation>
|
919 |
+
</wsdl:binding>
|
920 |
+
<wsdl:service name="Payment">
|
921 |
+
<wsdl:port name="PaymentHttpPort" binding="tns:PaymentHttpBinding">
|
922 |
+
<wsdlsoap:address location="https://pal-test.adyen.com/pal/servlet/Payment/V100"/>
|
923 |
+
</wsdl:port>
|
924 |
+
</wsdl:service>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
925 |
Â
</wsdl:definitions>
|
@@ -29,7 +29,7 @@
|
|
29 |
Â
<config>
|
30 |
Â
<modules>
|
31 |
Â
<Adyen_Payment>
|
32 |
-
<version>2.0
|
33 |
Â
</Adyen_Payment>
|
34 |
Â
</modules>
|
35 |
Â
<global>
|
@@ -80,14 +80,81 @@
|
|
80 |
Â
<adyen>
|
81 |
Â
<class>Adyen_Payment_Block</class>
|
82 |
Â
</adyen>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
83 |
Â
</blocks>
|
84 |
Â
<payment>
|
85 |
Â
<groups>
|
86 |
Â
<adyen>Adyen</adyen>
|
87 |
Â
</groups>
|
88 |
-
</payment>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
89 |
Â
</global>
|
90 |
-
|
91 |
Â
<frontend>
|
92 |
Â
<secure_url>
|
93 |
Â
<adyen_process>/adyen/process</adyen_process>
|
@@ -118,7 +185,7 @@
|
|
118 |
Â
</updates>
|
119 |
Â
</layout>
|
120 |
Â
</frontend>
|
121 |
-
|
122 |
Â
<adminhtml>
|
123 |
Â
<layout>
|
124 |
Â
<updates>
|
@@ -145,14 +212,6 @@
|
|
145 |
Â
</adyen_manual_online_capture>
|
146 |
Â
</observers>
|
147 |
Â
</sales_order_invoice_pay>
|
148 |
-
<sales_order_creditmemo_refund>
|
149 |
-
<observers>
|
150 |
-
<adyen_online_refund>
|
151 |
-
<class>adyen/observer</class>
|
152 |
-
<method>refund</method>
|
153 |
-
</adyen_online_refund>
|
154 |
-
</observers>
|
155 |
-
</sales_order_creditmemo_refund>
|
156 |
Â
</events>
|
157 |
Â
</adminhtml>
|
158 |
Â
<default>
|
@@ -173,9 +232,9 @@
|
|
173 |
Â
<payment_pending>pending</payment_pending>
|
174 |
Â
<payment_authorized>processing</payment_authorized>
|
175 |
Â
<capture_mode>auto</capture_mode>
|
176 |
-
<recurringtypes>ONECLICK</recurringtypes>
|
177 |
Â
</adyen_abstract>
|
178 |
-
<adyen_hpp>
|
179 |
Â
<customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
|
180 |
Â
<currency>EUR</currency>
|
181 |
Â
<model>adyen/adyen_hpp</model>
|
@@ -192,14 +251,19 @@
|
|
192 |
Â
<payment_authorized>processing</payment_authorized>
|
193 |
Â
<allowspecific>0</allowspecific>
|
194 |
Â
<disable_hpptypes>0</disable_hpptypes>
|
Â
|
|
Â
|
|
Â
|
|
195 |
Â
</adyen_hpp>
|
196 |
-
<adyen_pos>
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
Â
|
|
Â
|
|
203 |
Â
</adyen_pos>
|
204 |
Â
<adyen_openinvoice translate="title" module="adyen">
|
205 |
Â
<active>0</active>
|
@@ -208,7 +272,10 @@
|
|
208 |
Â
<order_status>pending</order_status>
|
209 |
Â
<title>Adyen Open Invoice</title>
|
210 |
Â
<openinvoicetypes>openinvoice</openinvoicetypes>
|
211 |
-
|
Â
|
|
Â
|
|
Â
|
|
212 |
Â
<adyen_cc translate="title" module="adyen">
|
213 |
Â
<active>0</active>
|
214 |
Â
<model>adyen/adyen_cc</model>
|
@@ -219,28 +286,49 @@
|
|
219 |
Â
<enable_installments>0</enable_installments>
|
220 |
Â
<cse_enabled>0</cse_enabled>
|
221 |
Â
<cse_public_key></cse_public_key>
|
Â
|
|
222 |
Â
<account_id>99999</account_id>
|
223 |
Â
<trxuser_id>99999</trxuser_id>
|
224 |
Â
<trxuser_password>0</trxuser_password>
|
225 |
Â
<adminaction_password>5cfgRT34xsdedtFLdfHxj7tfwx24fe</adminaction_password>
|
226 |
Â
<wsdl>https://pal-test.adyen.com/pal/Payment.wsdl</wsdl>
|
Â
|
|
227 |
Â
</adyen_cc>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
228 |
Â
<adyen_elv translate="title" module="adyen">
|
229 |
Â
<active>0</active>
|
230 |
Â
<model>adyen/adyen_elv</model>
|
231 |
Â
<group>adyen</group>
|
232 |
Â
<order_status>processing</order_status>
|
233 |
Â
<title>Adyen ELV</title>
|
234 |
-
|
Â
|
|
235 |
Â
<adyen_boleto translate="title" module="adyen">
|
236 |
-
|
237 |
Â
<model>adyen/adyen_boleto</model>
|
238 |
Â
<group>adyen</group>
|
239 |
Â
<order_status>processing</order_status>
|
240 |
Â
<title>Adyen Boleto</title>
|
241 |
Â
<delivery_days>5</delivery_days>
|
242 |
-
|
243 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
244 |
Â
<adyen>
|
245 |
Â
<payment>
|
246 |
Â
<cctypes>
|
@@ -274,12 +362,6 @@
|
|
274 |
Â
<order>40</order>
|
275 |
Â
<is_cvv_required>1</is_cvv_required>
|
276 |
Â
</DC>
|
277 |
-
<SS>
|
278 |
-
<code>SS</code>
|
279 |
-
<name>Switch/Solo</name>
|
280 |
-
<order>50</order>
|
281 |
-
<is_cvv_required>1</is_cvv_required>
|
282 |
-
</SS>
|
283 |
Â
<MO>
|
284 |
Â
<code>MO</code>
|
285 |
Â
<name>Maestro</name>
|
@@ -300,12 +382,12 @@
|
|
300 |
Â
</CB>
|
301 |
Â
</cctypes>
|
302 |
Â
<boletotypes>
|
303 |
-
|
304 |
Â
<code>boletobancario_hsbc</code>
|
305 |
Â
<name>boletobancario_hsbc</name>
|
306 |
Â
<order>0</order>
|
307 |
Â
</boletobancario_hsbc>
|
308 |
-
|
309 |
Â
<code>boletobancario_itau</code>
|
310 |
Â
<name>boletobancario_itau</name>
|
311 |
Â
<order>0</order>
|
@@ -327,40 +409,46 @@
|
|
327 |
Â
</boletobancario_bancodobrasil>
|
328 |
Â
</boletotypes>
|
329 |
Â
<openinvoicetypes>
|
330 |
-
|
331 |
Â
<code>openinvoice</code>
|
332 |
Â
<name>AfterPay</name>
|
333 |
Â
<order>10</order>
|
334 |
Â
</afterpay>
|
335 |
-
|
336 |
Â
<code>klarna</code>
|
337 |
Â
<name>Klarna</name>
|
338 |
Â
<order>20</order>
|
339 |
Â
</klarna>
|
340 |
Â
</openinvoicetypes>
|
341 |
Â
<recurringtypes>
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
Â
<name>ONECLICK</name>
|
350 |
Â
<order>20</order>
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
Â
<name>RECURRING</name>
|
355 |
Â
<order>30</order>
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
Â
<name>ONECLICK,RECURRING</name>
|
360 |
Â
<order>40</order>
|
361 |
-
|
362 |
Â
</recurringtypes>
|
363 |
-
</payment>
|
364 |
-
</adyen>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
365 |
Â
</default>
|
366 |
Â
</config>
|
29 |
Â
<config>
|
30 |
Â
<modules>
|
31 |
Â
<Adyen_Payment>
|
32 |
+
<version>2.1.0</version>
|
33 |
Â
</Adyen_Payment>
|
34 |
Â
</modules>
|
35 |
Â
<global>
|
80 |
Â
<adyen>
|
81 |
Â
<class>Adyen_Payment_Block</class>
|
82 |
Â
</adyen>
|
83 |
+
<adminhtml>
|
84 |
+
<rewrite>
|
85 |
+
<sales_order_totals>Adyen_Payment_Block_Adminhtml_Sales_Order_Totals</sales_order_totals>
|
86 |
+
<sales_order_invoice_totals>Adyen_Payment_Block_Adminhtml_Sales_Order_Invoice_Totals</sales_order_invoice_totals>
|
87 |
+
<sales_order_creditmemo_totals>Adyen_Payment_Block_Adminhtml_Sales_Order_Creditmemo_Totals</sales_order_creditmemo_totals>
|
88 |
+
</rewrite>
|
89 |
+
</adminhtml>
|
90 |
+
<sales>
|
91 |
+
<rewrite>
|
92 |
+
<order_totals>Adyen_Payment_Block_Sales_Order_Totals</order_totals>
|
93 |
+
</rewrite>
|
94 |
+
</sales>
|
95 |
Â
</blocks>
|
96 |
Â
<payment>
|
97 |
Â
<groups>
|
98 |
Â
<adyen>Adyen</adyen>
|
99 |
Â
</groups>
|
100 |
+
</payment>
|
101 |
+
<fieldsets>
|
102 |
+
<sales_convert_quote_address>
|
103 |
+
<payment_fee_amount><to_order>*</to_order></payment_fee_amount>
|
104 |
+
<base_payment_fee_amount><to_order>*</to_order></base_payment_fee_amount>
|
105 |
+
<payment_installment_fee_amount><to_order>*</to_order></payment_installment_fee_amount>
|
106 |
+
<base_payment_installment_fee_amount><to_order>*</to_order></base_payment_installment_fee_amount>
|
107 |
+
</sales_convert_quote_address>
|
108 |
+
<sales_convert_order>
|
109 |
+
<payment_fee_amount><to_invoice>*</to_invoice></payment_fee_amount>
|
110 |
+
<base_payment_fee_amount><to_invoice>*</to_invoice></base_payment_fee_amount>
|
111 |
+
<payment_installment_fee_amount><to_invoice>*</to_invoice></payment_installment_fee_amount>
|
112 |
+
<base_payment_installment_fee_amount><to_invoice>*</to_invoice></base_payment_installment_fee_amount>
|
113 |
+
<payment_fee_amount><to_cm>*</to_cm></payment_fee_amount>
|
114 |
+
<base_payment_fee_amount><to_cm>*</to_cm></base_payment_fee_amount>
|
115 |
+
<payment_installment_fee_amount><to_invoice>*</to_invoice></payment_installment_fee_amount>
|
116 |
+
<base_payment_installment_fee_amount><to_invoice>*</to_invoice></base_payment_installment_fee_amount>
|
117 |
+
<payment_installment_fee_amount><to_cm>*</to_cm></payment_installment_fee_amount>
|
118 |
+
<base_payment_installment_fee_amount><to_cm>*</to_cm></base_payment_installment_fee_amount>
|
119 |
+
</sales_convert_order>
|
120 |
+
</fieldsets>
|
121 |
+
<sales>
|
122 |
+
<quote>
|
123 |
+
<totals>
|
124 |
+
<payment_fee>
|
125 |
+
<class>adyen/sales_quote_address_total_paymentFee</class>
|
126 |
+
<after>subtotal,discount</after>
|
127 |
+
<before>grand_total,tax</before>
|
128 |
+
</payment_fee>
|
129 |
+
<payment_installment_fee>
|
130 |
+
<class>adyen/sales_quote_address_total_paymentInstallmentFee</class>
|
131 |
+
<after>grand_total</after>
|
132 |
+
</payment_installment_fee>
|
133 |
+
</totals>
|
134 |
+
</quote>
|
135 |
+
<order_invoice>
|
136 |
+
<totals>
|
137 |
+
<payment_fee>
|
138 |
+
<class>adyen/total_paymentFee_invoice</class>
|
139 |
+
</payment_fee>
|
140 |
+
<payment_installment_fee>
|
141 |
+
<class>adyen/total_paymentInstallmentFee_invoice</class>
|
142 |
+
</payment_installment_fee>
|
143 |
+
</totals>
|
144 |
+
</order_invoice>
|
145 |
+
<order_creditmemo>
|
146 |
+
<totals>
|
147 |
+
<payment_fee>
|
148 |
+
<class>adyen/total_paymentFee_creditmemo</class>
|
149 |
+
</payment_fee>
|
150 |
+
<payment_installment_fee>
|
151 |
+
<class>adyen/total_paymentInstallmentFee_creditmemo</class>
|
152 |
+
</payment_installment_fee>
|
153 |
+
</totals>
|
154 |
+
</order_creditmemo>
|
155 |
+
</sales>
|
156 |
Â
</global>
|
157 |
+
|
158 |
Â
<frontend>
|
159 |
Â
<secure_url>
|
160 |
Â
<adyen_process>/adyen/process</adyen_process>
|
185 |
Â
</updates>
|
186 |
Â
</layout>
|
187 |
Â
</frontend>
|
188 |
+
|
189 |
Â
<adminhtml>
|
190 |
Â
<layout>
|
191 |
Â
<updates>
|
212 |
Â
</adyen_manual_online_capture>
|
213 |
Â
</observers>
|
214 |
Â
</sales_order_invoice_pay>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
215 |
Â
</events>
|
216 |
Â
</adminhtml>
|
217 |
Â
<default>
|
232 |
Â
<payment_pending>pending</payment_pending>
|
233 |
Â
<payment_authorized>processing</payment_authorized>
|
234 |
Â
<capture_mode>auto</capture_mode>
|
235 |
+
<recurringtypes>ONECLICK</recurringtypes>
|
236 |
Â
</adyen_abstract>
|
237 |
+
<adyen_hpp translate="title" module="adyen">
|
238 |
Â
<customer_id backend_model="adminhtml/system_config_backend_encrypted"/>
|
239 |
Â
<currency>EUR</currency>
|
240 |
Â
<model>adyen/adyen_hpp</model>
|
251 |
Â
<payment_authorized>processing</payment_authorized>
|
252 |
Â
<allowspecific>0</allowspecific>
|
253 |
Â
<disable_hpptypes>0</disable_hpptypes>
|
254 |
+
<sort_order>30</sort_order>
|
255 |
+
<cache_directory_lookup>0</cache_directory_lookup>
|
256 |
+
<return_url_in_request>0</return_url_in_request>
|
257 |
Â
</adyen_hpp>
|
258 |
+
<adyen_pos translate="title" module="adyen">
|
259 |
+
<active>0</active>
|
260 |
+
<model>adyen/adyen_pos</model>
|
261 |
+
<title>Adyen POS</title>
|
262 |
+
<recurringtypes>ONECLICK</recurringtypes>
|
263 |
+
<enable_scanner>0</enable_scanner>
|
264 |
+
<express_checkout>0</express_checkout>
|
265 |
+
<allowspecific>0</allowspecific>
|
266 |
+
<sort_order>80</sort_order>
|
267 |
Â
</adyen_pos>
|
268 |
Â
<adyen_openinvoice translate="title" module="adyen">
|
269 |
Â
<active>0</active>
|
272 |
Â
<order_status>pending</order_status>
|
273 |
Â
<title>Adyen Open Invoice</title>
|
274 |
Â
<openinvoicetypes>openinvoice</openinvoicetypes>
|
275 |
+
<gender_show>0</gender_show>
|
276 |
+
<dob_show>0</dob_show>
|
277 |
+
<sort_order>40</sort_order>
|
278 |
+
</adyen_openinvoice>
|
279 |
Â
<adyen_cc translate="title" module="adyen">
|
280 |
Â
<active>0</active>
|
281 |
Â
<model>adyen/adyen_cc</model>
|
286 |
Â
<enable_installments>0</enable_installments>
|
287 |
Â
<cse_enabled>0</cse_enabled>
|
288 |
Â
<cse_public_key></cse_public_key>
|
289 |
+
<enable_moto>0</enable_moto>
|
290 |
Â
<account_id>99999</account_id>
|
291 |
Â
<trxuser_id>99999</trxuser_id>
|
292 |
Â
<trxuser_password>0</trxuser_password>
|
293 |
Â
<adminaction_password>5cfgRT34xsdedtFLdfHxj7tfwx24fe</adminaction_password>
|
294 |
Â
<wsdl>https://pal-test.adyen.com/pal/Payment.wsdl</wsdl>
|
295 |
+
<sort_order>20</sort_order>
|
296 |
Â
</adyen_cc>
|
297 |
+
<adyen_oneclick translate="title" module="adyen">
|
298 |
+
<active>0</active>
|
299 |
+
<model>adyen/adyen_oneclick</model>
|
300 |
+
<group>adyen</group>
|
301 |
+
<order_status>processing</order_status>
|
302 |
+
<title>Adyen OneClick</title>
|
303 |
+
<sort_order>1</sort_order>
|
304 |
+
</adyen_oneclick>
|
305 |
Â
<adyen_elv translate="title" module="adyen">
|
306 |
Â
<active>0</active>
|
307 |
Â
<model>adyen/adyen_elv</model>
|
308 |
Â
<group>adyen</group>
|
309 |
Â
<order_status>processing</order_status>
|
310 |
Â
<title>Adyen ELV</title>
|
311 |
+
<sort_order>50</sort_order>
|
312 |
+
</adyen_elv>
|
313 |
Â
<adyen_boleto translate="title" module="adyen">
|
314 |
+
<active>0</active>
|
315 |
Â
<model>adyen/adyen_boleto</model>
|
316 |
Â
<group>adyen</group>
|
317 |
Â
<order_status>processing</order_status>
|
318 |
Â
<title>Adyen Boleto</title>
|
319 |
Â
<delivery_days>5</delivery_days>
|
320 |
+
<sort_order>70</sort_order>
|
321 |
+
</adyen_boleto>
|
322 |
+
<adyen_sepa translate="title" module="adyen">
|
323 |
+
<active>0</active>
|
324 |
+
<model>adyen/adyen_sepa</model>
|
325 |
+
<group>adyen</group>
|
326 |
+
<order_status>processing</order_status>
|
327 |
+
<title>Adyen SEPA</title>
|
328 |
+
<sort_order>60</sort_order>
|
329 |
+
<validate_iban>0</validate_iban>
|
330 |
+
</adyen_sepa>
|
331 |
+
</payment>
|
332 |
Â
<adyen>
|
333 |
Â
<payment>
|
334 |
Â
<cctypes>
|
362 |
Â
<order>40</order>
|
363 |
Â
<is_cvv_required>1</is_cvv_required>
|
364 |
Â
</DC>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
365 |
Â
<MO>
|
366 |
Â
<code>MO</code>
|
367 |
Â
<name>Maestro</name>
|
382 |
Â
</CB>
|
383 |
Â
</cctypes>
|
384 |
Â
<boletotypes>
|
385 |
+
<boletobancario_hsbc>
|
386 |
Â
<code>boletobancario_hsbc</code>
|
387 |
Â
<name>boletobancario_hsbc</name>
|
388 |
Â
<order>0</order>
|
389 |
Â
</boletobancario_hsbc>
|
390 |
+
<boletobancario_itau>
|
391 |
Â
<code>boletobancario_itau</code>
|
392 |
Â
<name>boletobancario_itau</name>
|
393 |
Â
<order>0</order>
|
409 |
Â
</boletobancario_bancodobrasil>
|
410 |
Â
</boletotypes>
|
411 |
Â
<openinvoicetypes>
|
412 |
+
<afterpay>
|
413 |
Â
<code>openinvoice</code>
|
414 |
Â
<name>AfterPay</name>
|
415 |
Â
<order>10</order>
|
416 |
Â
</afterpay>
|
417 |
+
<klarna>
|
418 |
Â
<code>klarna</code>
|
419 |
Â
<name>Klarna</name>
|
420 |
Â
<order>20</order>
|
421 |
Â
</klarna>
|
422 |
Â
</openinvoicetypes>
|
423 |
Â
<recurringtypes>
|
424 |
+
<none>
|
425 |
+
<code></code>
|
426 |
+
<name>NONE</name>
|
427 |
+
<order>10</order>
|
428 |
+
</none>
|
429 |
+
<oneclick>
|
430 |
+
<code>ONECLICK</code>
|
431 |
Â
<name>ONECLICK</name>
|
432 |
Â
<order>20</order>
|
433 |
+
</oneclick>
|
434 |
+
<recurring>
|
435 |
+
<code>RECURRING</code>
|
436 |
Â
<name>RECURRING</name>
|
437 |
Â
<order>30</order>
|
438 |
+
</recurring>
|
439 |
+
<oneclickrecurring>
|
440 |
+
<code>ONECLICK,RECURRING</code>
|
441 |
Â
<name>ONECLICK,RECURRING</name>
|
442 |
Â
<order>40</order>
|
443 |
+
</oneclickrecurring>
|
444 |
Â
</recurringtypes>
|
445 |
+
</payment>
|
446 |
+
</adyen>
|
447 |
+
<sales>
|
448 |
+
<totals_sort>
|
449 |
+
<payment_fee>15</payment_fee>
|
450 |
+
<payment_installment_fee>16</payment_installment_fee>
|
451 |
+
</totals_sort>
|
452 |
+
</sales>
|
453 |
Â
</default>
|
454 |
Â
</config>
|
@@ -30,7 +30,7 @@
|
|
30 |
Â
<sections>
|
31 |
Â
<payment>
|
32 |
Â
<groups>
|
33 |
-
<!-- @default -->
|
34 |
Â
<adyen_abstract translate="label" module="adyen">
|
35 |
Â
<label>Adyen Default Settings</label>
|
36 |
Â
<frontend_type>text</frontend_type>
|
@@ -38,7 +38,21 @@
|
|
38 |
Â
<show_in_default>1</show_in_default>
|
39 |
Â
<show_in_website>1</show_in_website>
|
40 |
Â
<show_in_store>1</show_in_store>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
41 |
Â
<fields>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
42 |
Â
<merchantAccount translate="label">
|
43 |
Â
<label>Merchant Account</label>
|
44 |
Â
<comment>You can find this in the Adyen backoffice.</comment>
|
@@ -56,6 +70,7 @@
|
|
56 |
Â
<show_in_default>1</show_in_default>
|
57 |
Â
<show_in_website>1</show_in_website>
|
58 |
Â
<show_in_store>1</show_in_store>
|
Â
|
|
59 |
Â
</demoMode>
|
60 |
Â
<order_status translate="label">
|
61 |
Â
<label>New order status</label>
|
@@ -85,7 +100,7 @@
|
|
85 |
Â
<sort_order>50</sort_order>
|
86 |
Â
<show_in_default>1</show_in_default>
|
87 |
Â
<show_in_website>1</show_in_website>
|
88 |
-
<show_in_store>0</show_in_store>
|
89 |
Â
</payment_pre_authorized>
|
90 |
Â
<payment_cancelled translate="label">
|
91 |
Â
<label>Order status cancelled payment</label>
|
@@ -96,7 +111,7 @@
|
|
96 |
Â
<show_in_default>1</show_in_default>
|
97 |
Â
<show_in_website>1</show_in_website>
|
98 |
Â
<show_in_store>0</show_in_store>
|
99 |
-
</payment_cancelled>
|
100 |
Â
<refund_authorized translate="label">
|
101 |
Â
<label>Refund authorise (refund success)</label>
|
102 |
Â
<comment>(optional) leave empty if you are not sure</comment>
|
@@ -106,7 +121,7 @@
|
|
106 |
Â
<show_in_default>1</show_in_default>
|
107 |
Â
<show_in_website>1</show_in_website>
|
108 |
Â
<show_in_store>0</show_in_store>
|
109 |
-
</refund_authorized>
|
110 |
Â
<notification_username translate="label">
|
111 |
Â
<label>Notification Username</label>
|
112 |
Â
<comment>Should match your "notifications settings" in your Adyen account.</comment>
|
@@ -136,14 +151,14 @@
|
|
136 |
Â
<show_in_store>0</show_in_store>
|
137 |
Â
</capture_mode>
|
138 |
Â
<recurringtypes translate="label">
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
Â
<ws_username_test translate="label">
|
148 |
Â
<label>Adyen ws username for Test</label>
|
149 |
Â
<comment>Normally this will be ws@Company.YourCompanyCode</comment>
|
@@ -152,7 +167,7 @@
|
|
152 |
Â
<show_in_default>1</show_in_default>
|
153 |
Â
<show_in_website>1</show_in_website>
|
154 |
Â
<show_in_store>0</show_in_store>
|
155 |
-
</ws_username_test>
|
156 |
Â
<ws_password_test translate="label">
|
157 |
Â
<label>Adyen ws password for Test</label>
|
158 |
Â
<comment>The password of the ws user for Test</comment>
|
@@ -161,7 +176,7 @@
|
|
161 |
Â
<show_in_default>1</show_in_default>
|
162 |
Â
<show_in_website>1</show_in_website>
|
163 |
Â
<show_in_store>0</show_in_store>
|
164 |
-
</ws_password_test>
|
165 |
Â
<ws_username_live translate="label">
|
166 |
Â
<label>Adyen ws username for Live</label>
|
167 |
Â
<comment>Normally this will be ws@Company.YourCompanyCode</comment>
|
@@ -170,7 +185,7 @@
|
|
170 |
Â
<show_in_default>1</show_in_default>
|
171 |
Â
<show_in_website>1</show_in_website>
|
172 |
Â
<show_in_store>0</show_in_store>
|
173 |
-
</ws_username_live>
|
174 |
Â
<ws_password_live translate="label">
|
175 |
Â
<label>Adyen ws password for Live</label>
|
176 |
Â
<comment>The password of the ws user for Live</comment>
|
@@ -217,14 +232,14 @@
|
|
217 |
Â
<show_in_default>1</show_in_default>
|
218 |
Â
<show_in_website>1</show_in_website>
|
219 |
Â
<show_in_store>0</show_in_store>
|
220 |
-
</send_invoice_update_mail>
|
221 |
Â
</fields>
|
222 |
Â
</adyen_abstract>
|
223 |
-
<!-- @Hpp only -->
|
224 |
Â
<adyen_hpp translate="label" module="adyen">
|
225 |
Â
<label>Adyen HPP</label>
|
226 |
Â
<frontend_type>text</frontend_type>
|
227 |
-
<sort_order>
|
228 |
Â
<show_in_default>1</show_in_default>
|
229 |
Â
<show_in_website>1</show_in_website>
|
230 |
Â
<show_in_store>1</show_in_store>
|
@@ -233,33 +248,41 @@
|
|
233 |
Â
<label>Enabled</label>
|
234 |
Â
<frontend_type>select</frontend_type>
|
235 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
236 |
-
<sort_order>
|
237 |
Â
<show_in_default>1</show_in_default>
|
238 |
Â
<show_in_website>1</show_in_website>
|
239 |
-
<show_in_store>1</show_in_store>
|
240 |
Â
</active>
|
241 |
Â
<title translate="label">
|
242 |
Â
<label>Title</label>
|
243 |
Â
<frontend_type>text</frontend_type>
|
244 |
-
<sort_order>
|
245 |
Â
<show_in_default>1</show_in_default>
|
246 |
Â
<show_in_website>1</show_in_website>
|
247 |
Â
<show_in_store>1</show_in_store>
|
248 |
-
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
249 |
Â
<skinCode translate="label">
|
250 |
Â
<label>Skin Code</label>
|
251 |
Â
<comment>The skin code you want to use (You can find this in the admin are of your Adyen account)</comment>
|
252 |
Â
<frontend_type>text</frontend_type>
|
253 |
-
<sort_order>
|
254 |
Â
<show_in_default>1</show_in_default>
|
255 |
Â
<show_in_website>1</show_in_website>
|
256 |
Â
<show_in_store>1</show_in_store>
|
257 |
-
</skinCode>
|
258 |
Â
<secret_wordt translate="label">
|
259 |
Â
<label>HMAC Key for Test</label>
|
260 |
Â
<comment>Should match with the HMAC test key in the Adyen backoffice.</comment>
|
261 |
Â
<frontend_type>text</frontend_type>
|
262 |
-
<sort_order>
|
263 |
Â
<show_in_default>1</show_in_default>
|
264 |
Â
<show_in_website>1</show_in_website>
|
265 |
Â
<show_in_store>1</show_in_store>
|
@@ -268,17 +291,17 @@
|
|
268 |
Â
<label>HMAC Key for Live</label>
|
269 |
Â
<comment>Should match with the HMAC live key in the Adyen backoffice.</comment>
|
270 |
Â
<frontend_type>text</frontend_type>
|
271 |
-
<sort_order>
|
272 |
Â
<show_in_default>1</show_in_default>
|
273 |
Â
<show_in_website>1</show_in_website>
|
274 |
Â
<show_in_store>1</show_in_store>
|
275 |
-
</secret_wordp>
|
276 |
Â
<payment_routines translate="label">
|
277 |
Â
<label>Payment Flow Selection</label>
|
278 |
Â
<comment>Adyen provide you with 2 types of payment routines. Multi-page and Single Page</comment>
|
279 |
Â
<frontend_type>select</frontend_type>
|
280 |
Â
<source_model>adyen/source_PaymentRoutines</source_model>
|
281 |
-
<sort_order>
|
282 |
Â
<show_in_default>1</show_in_default>
|
283 |
Â
<show_in_website>1</show_in_website>
|
284 |
Â
<show_in_store>0</show_in_store>
|
@@ -287,7 +310,7 @@
|
|
287 |
Â
<label>Days for Delivery</label>
|
288 |
Â
<comment>How many days to be added to the current date for delivery. ONLY numbers allowed.</comment>
|
289 |
Â
<frontend_type>text</frontend_type>
|
290 |
-
<sort_order>
|
291 |
Â
<show_in_default>1</show_in_default>
|
292 |
Â
<show_in_website>1</show_in_website>
|
293 |
Â
<show_in_store>0</show_in_store>
|
@@ -297,15 +320,36 @@
|
|
297 |
Â
<comment>If you say yes here, payment methods in the checkout won't be displayed and you will be redirected to the Adyen HPP to make the selection.</comment>
|
298 |
Â
<frontend_type>select</frontend_type>
|
299 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
300 |
-
<sort_order>
|
301 |
Â
<show_in_default>1</show_in_default>
|
302 |
Â
<show_in_website>0</show_in_website>
|
303 |
-
<show_in_store>0</show_in_store>
|
304 |
Â
</disable_hpptypes>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
305 |
Â
<allowspecific translate="label">
|
306 |
Â
<label>Payment to applicable countries</label>
|
307 |
Â
<frontend_type>allowspecific</frontend_type>
|
308 |
-
<sort_order>
|
309 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
310 |
Â
<show_in_default>1</show_in_default>
|
311 |
Â
<show_in_website>1</show_in_website>
|
@@ -314,20 +358,20 @@
|
|
314 |
Â
<specificcountry translate="label">
|
315 |
Â
<label>Payment to Specific countries</label>
|
316 |
Â
<frontend_type>multiselect</frontend_type>
|
317 |
-
<sort_order>
|
318 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
319 |
Â
<show_in_default>1</show_in_default>
|
320 |
Â
<show_in_website>1</show_in_website>
|
321 |
Â
<show_in_store>1</show_in_store>
|
322 |
-
|
323 |
-
</specificcountry>
|
324 |
Â
</fields>
|
325 |
Â
</adyen_hpp>
|
326 |
-
|
327 |
Â
<adyen_pos translate="label" module="adyen">
|
328 |
Â
<label>Adyen POS</label>
|
329 |
Â
<frontend_type>text</frontend_type>
|
330 |
-
<sort_order>
|
331 |
Â
<show_in_default>1</show_in_default>
|
332 |
Â
<show_in_website>1</show_in_website>
|
333 |
Â
<show_in_store>1</show_in_store>
|
@@ -339,7 +383,7 @@
|
|
339 |
Â
<sort_order>10</sort_order>
|
340 |
Â
<show_in_default>1</show_in_default>
|
341 |
Â
<show_in_website>1</show_in_website>
|
342 |
-
<show_in_store>1</show_in_store>
|
343 |
Â
</active>
|
344 |
Â
<title translate="label">
|
345 |
Â
<label>Title</label>
|
@@ -349,16 +393,44 @@
|
|
349 |
Â
<show_in_website>1</show_in_website>
|
350 |
Â
<show_in_store>1</show_in_store>
|
351 |
Â
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
352 |
Â
<recurringtypes translate="label">
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
362 |
Â
<allowspecific translate="label">
|
363 |
Â
<label>Payment to applicable countries</label>
|
364 |
Â
<frontend_type>allowspecific</frontend_type>
|
@@ -376,15 +448,15 @@
|
|
376 |
Â
<show_in_default>1</show_in_default>
|
377 |
Â
<show_in_website>1</show_in_website>
|
378 |
Â
<show_in_store>1</show_in_store>
|
379 |
-
|
380 |
-
</specificcountry>
|
381 |
Â
</fields>
|
382 |
Â
</adyen_pos>
|
383 |
-
<!-- @Openinvoice only -->
|
384 |
Â
<adyen_openinvoice translate="label" module="adyen">
|
385 |
Â
<label>Adyen OpenInvoice</label>
|
386 |
Â
<frontend_type>text</frontend_type>
|
387 |
-
<sort_order>
|
388 |
Â
<show_in_default>1</show_in_default>
|
389 |
Â
<show_in_website>1</show_in_website>
|
390 |
Â
<show_in_store>1</show_in_store>
|
@@ -393,54 +465,89 @@
|
|
393 |
Â
<label>Enabled</label>
|
394 |
Â
<frontend_type>select</frontend_type>
|
395 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
396 |
-
<sort_order>
|
397 |
Â
<show_in_default>1</show_in_default>
|
398 |
Â
<show_in_website>1</show_in_website>
|
399 |
-
<show_in_store>1</show_in_store>
|
400 |
Â
</active>
|
401 |
Â
<title translate="label">
|
402 |
Â
<label>Title</label>
|
403 |
Â
<frontend_type>text</frontend_type>
|
404 |
-
<sort_order>
|
405 |
Â
<show_in_default>1</show_in_default>
|
406 |
Â
<show_in_website>1</show_in_website>
|
407 |
Â
<show_in_store>1</show_in_store>
|
408 |
Â
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
409 |
Â
<openinvoicetypes translate="label">
|
410 |
Â
<label>OpenInvoice Type</label>
|
411 |
Â
<frontend_type>select</frontend_type>
|
412 |
Â
<source_model>adyen/source_openinvoiceType</source_model>
|
413 |
-
<sort_order>
|
414 |
Â
<show_in_default>1</show_in_default>
|
415 |
Â
<show_in_website>1</show_in_website>
|
416 |
Â
<show_in_store>1</show_in_store>
|
417 |
-
</openinvoicetypes>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
418 |
Â
<allowspecific translate="label">
|
419 |
Â
<label>Payment to applicable countries</label>
|
420 |
Â
<frontend_type>allowspecific</frontend_type>
|
421 |
-
<sort_order>
|
422 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
423 |
Â
<show_in_default>1</show_in_default>
|
424 |
Â
<show_in_website>1</show_in_website>
|
425 |
Â
<show_in_store>1</show_in_store>
|
426 |
-
</allowspecific>
|
427 |
Â
<specificcountry translate="label">
|
428 |
Â
<label>Payment to Specific countries</label>
|
429 |
Â
<frontend_type>multiselect</frontend_type>
|
430 |
-
<sort_order>
|
431 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
432 |
Â
<show_in_default>1</show_in_default>
|
433 |
Â
<show_in_website>1</show_in_website>
|
434 |
Â
<show_in_store>1</show_in_store>
|
435 |
-
|
436 |
-
</specificcountry>
|
437 |
Â
</fields>
|
438 |
-
</adyen_openinvoice>
|
439 |
-
<!-- @CC only -->
|
440 |
Â
<adyen_cc translate="label" module="adyen">
|
441 |
Â
<label>Adyen CC</label>
|
442 |
Â
<frontend_type>text</frontend_type>
|
443 |
-
<sort_order>
|
444 |
Â
<show_in_default>1</show_in_default>
|
445 |
Â
<show_in_website>1</show_in_website>
|
446 |
Â
<show_in_store>1</show_in_store>
|
@@ -449,24 +556,32 @@
|
|
449 |
Â
<label>Enabled</label>
|
450 |
Â
<frontend_type>select</frontend_type>
|
451 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
452 |
-
<sort_order>
|
453 |
Â
<show_in_default>1</show_in_default>
|
454 |
Â
<show_in_website>1</show_in_website>
|
455 |
-
<show_in_store>1</show_in_store>
|
456 |
Â
</active>
|
457 |
Â
<title translate="label">
|
458 |
Â
<label>Title</label>
|
459 |
Â
<frontend_type>text</frontend_type>
|
460 |
-
<sort_order>
|
461 |
Â
<show_in_default>1</show_in_default>
|
462 |
Â
<show_in_website>1</show_in_website>
|
463 |
Â
<show_in_store>1</show_in_store>
|
464 |
Â
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
465 |
Â
<cctypes translate="label">
|
466 |
Â
<label>Credit Card Types</label>
|
467 |
Â
<frontend_type>multiselect</frontend_type>
|
468 |
Â
<source_model>adyen/source_ccType</source_model>
|
469 |
-
<sort_order>
|
470 |
Â
<show_in_default>1</show_in_default>
|
471 |
Â
<show_in_website>1</show_in_website>
|
472 |
Â
<show_in_store>1</show_in_store>
|
@@ -475,7 +590,7 @@
|
|
475 |
Â
<label>Enable Client-Side Encryption</label>
|
476 |
Â
<frontend_type>select</frontend_type>
|
477 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
478 |
-
<sort_order>
|
479 |
Â
<show_in_default>1</show_in_default>
|
480 |
Â
<show_in_website>1</show_in_website>
|
481 |
Â
<show_in_store>1</show_in_store>
|
@@ -483,16 +598,16 @@
|
|
483 |
Â
<cse_publickey translate="label">
|
484 |
Â
<label>Client-Side Encryption Public Key</label>
|
485 |
Â
<frontend_type>textarea</frontend_type>
|
486 |
-
<sort_order>
|
487 |
Â
<show_in_default>1</show_in_default>
|
488 |
Â
<show_in_website>1</show_in_website>
|
489 |
Â
<show_in_store>1</show_in_store>
|
490 |
-
|
491 |
Â
</cse_publickey>
|
492 |
Â
<allowspecific translate="label">
|
493 |
Â
<label>Payment to applicable countries</label>
|
494 |
Â
<frontend_type>allowspecific</frontend_type>
|
495 |
-
<sort_order>
|
496 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
497 |
Â
<show_in_default>1</show_in_default>
|
498 |
Â
<show_in_website>1</show_in_website>
|
@@ -501,38 +616,120 @@
|
|
501 |
Â
<specificcountry translate="label">
|
502 |
Â
<label>Payment to Specific countries</label>
|
503 |
Â
<frontend_type>multiselect</frontend_type>
|
504 |
-
<sort_order>
|
505 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
506 |
Â
<show_in_default>1</show_in_default>
|
507 |
Â
<show_in_website>1</show_in_website>
|
508 |
Â
<show_in_store>1</show_in_store>
|
509 |
-
|
510 |
Â
</specificcountry>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
511 |
Â
<enable_installments translate="label">
|
512 |
-
|
513 |
-
|
514 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
515 |
-
<sort_order>
|
516 |
Â
<show_in_default>1</show_in_default>
|
517 |
Â
<show_in_website>1</show_in_website>
|
518 |
Â
<show_in_store>1</show_in_store>
|
519 |
Â
</enable_installments>
|
520 |
Â
<installments translate="label">
|
521 |
-
<label>Installments</label>
|
522 |
Â
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
523 |
Â
<backend_model>adyen/system_config_backend_installments</backend_model>
|
524 |
-
<sort_order>
|
525 |
Â
<show_in_default>1</show_in_default>
|
526 |
Â
<show_in_website>1</show_in_website>
|
527 |
Â
<show_in_store>1</show_in_store>
|
528 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
529 |
Â
</fields>
|
530 |
-
</adyen_cc>
|
531 |
-
|
532 |
-
|
533 |
-
<label>Adyen ELV</label>
|
534 |
Â
<frontend_type>text</frontend_type>
|
535 |
-
<sort_order>
|
536 |
Â
<show_in_default>1</show_in_default>
|
537 |
Â
<show_in_website>1</show_in_website>
|
538 |
Â
<show_in_store>1</show_in_store>
|
@@ -544,7 +741,8 @@
|
|
544 |
Â
<sort_order>1</sort_order>
|
545 |
Â
<show_in_default>1</show_in_default>
|
546 |
Â
<show_in_website>1</show_in_website>
|
547 |
-
<show_in_store>1</show_in_store>
|
Â
|
|
548 |
Â
</active>
|
549 |
Â
<title translate="label">
|
550 |
Â
<label>Title</label>
|
@@ -554,32 +752,68 @@
|
|
554 |
Â
<show_in_website>1</show_in_website>
|
555 |
Â
<show_in_store>1</show_in_store>
|
556 |
Â
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
557 |
Â
<allowspecific translate="label">
|
558 |
Â
<label>Payment to applicable countries</label>
|
559 |
Â
<frontend_type>allowspecific</frontend_type>
|
560 |
-
<sort_order>
|
561 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
562 |
Â
<show_in_default>1</show_in_default>
|
563 |
Â
<show_in_website>1</show_in_website>
|
564 |
Â
<show_in_store>1</show_in_store>
|
565 |
-
</allowspecific>
|
566 |
Â
<specificcountry translate="label">
|
567 |
Â
<label>Payment to Specific countries</label>
|
568 |
Â
<frontend_type>multiselect</frontend_type>
|
569 |
-
<sort_order>
|
570 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
571 |
Â
<show_in_default>1</show_in_default>
|
572 |
Â
<show_in_website>1</show_in_website>
|
573 |
Â
<show_in_store>1</show_in_store>
|
574 |
-
|
575 |
-
</specificcountry>
|
576 |
Â
</fields>
|
577 |
Â
</adyen_elv>
|
578 |
-
<!-- @boleto only -->
|
579 |
Â
<adyen_boleto translate="label" module="adyen">
|
580 |
Â
<label>Adyen Boleto</label>
|
581 |
Â
<frontend_type>text</frontend_type>
|
582 |
-
<sort_order>
|
583 |
Â
<show_in_default>1</show_in_default>
|
584 |
Â
<show_in_website>1</show_in_website>
|
585 |
Â
<show_in_store>1</show_in_store>
|
@@ -588,24 +822,32 @@
|
|
588 |
Â
<label>Enabled</label>
|
589 |
Â
<frontend_type>select</frontend_type>
|
590 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
591 |
-
<sort_order>
|
592 |
Â
<show_in_default>1</show_in_default>
|
593 |
Â
<show_in_website>1</show_in_website>
|
594 |
-
<show_in_store>1</show_in_store>
|
595 |
Â
</active>
|
596 |
Â
<title translate="label">
|
597 |
Â
<label>Title</label>
|
598 |
Â
<frontend_type>text</frontend_type>
|
599 |
-
<sort_order>
|
600 |
Â
<show_in_default>1</show_in_default>
|
601 |
Â
<show_in_website>1</show_in_website>
|
602 |
Â
<show_in_store>1</show_in_store>
|
603 |
Â
</title>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
604 |
Â
<delivery_days translate="label">
|
605 |
Â
<label>Days for Delivery</label>
|
606 |
Â
<comment>How many days to be added to the current date for delivery. ONLY numbers allowed.</comment>
|
607 |
Â
<frontend_type>text</frontend_type>
|
608 |
-
<sort_order>
|
609 |
Â
<show_in_default>1</show_in_default>
|
610 |
Â
<show_in_website>1</show_in_website>
|
611 |
Â
<show_in_store>0</show_in_store>
|
@@ -614,32 +856,117 @@
|
|
614 |
Â
<label>Boleto Types</label>
|
615 |
Â
<frontend_type>multiselect</frontend_type>
|
616 |
Â
<source_model>adyen/source_boletoType</source_model>
|
617 |
-
<sort_order>
|
618 |
Â
<show_in_default>1</show_in_default>
|
619 |
Â
<show_in_website>1</show_in_website>
|
620 |
Â
<show_in_store>1</show_in_store>
|
621 |
Â
</boletotypes>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
622 |
Â
<allowspecific translate="label">
|
623 |
Â
<label>Payment to applicable countries</label>
|
624 |
Â
<frontend_type>allowspecific</frontend_type>
|
625 |
-
<sort_order>
|
626 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
627 |
Â
<show_in_default>1</show_in_default>
|
628 |
Â
<show_in_website>1</show_in_website>
|
629 |
Â
<show_in_store>1</show_in_store>
|
630 |
-
</allowspecific>
|
631 |
Â
<specificcountry translate="label">
|
632 |
Â
<label>Payment to Specific countries</label>
|
633 |
Â
<frontend_type>multiselect</frontend_type>
|
634 |
-
<sort_order>
|
635 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
636 |
Â
<show_in_default>1</show_in_default>
|
637 |
Â
<show_in_website>1</show_in_website>
|
638 |
Â
<show_in_store>1</show_in_store>
|
639 |
Â
<depends><allowspecific>1</allowspecific></depends>
|
640 |
-
</specificcountry>
|
641 |
Â
</fields>
|
642 |
-
|
643 |
Â
</groups>
|
644 |
Â
</payment>
|
645 |
Â
</sections>
|
30 |
Â
<sections>
|
31 |
Â
<payment>
|
32 |
Â
<groups>
|
33 |
+
<!-- @default -->
|
34 |
Â
<adyen_abstract translate="label" module="adyen">
|
35 |
Â
<label>Adyen Default Settings</label>
|
36 |
Â
<frontend_type>text</frontend_type>
|
38 |
Â
<show_in_default>1</show_in_default>
|
39 |
Â
<show_in_website>1</show_in_website>
|
40 |
Â
<show_in_store>1</show_in_store>
|
41 |
+
<!--<comment>Click the following link for an instructional video on how to set up the Adyen Magento plugin, or here to download an integration guide or here to sign up for a test account. The latest version of the Adyen Magento plugin is also available through GitHub. If you have any further questions, please visit the Adyen.com website or email magento@adyen.com.</comment>-->
|
42 |
+
<comment><![CDATA[<p>Click the following link for an <a target="_blank" href="https://www.adyen.com/home/payment-services/plug-ins/magento#video">instructional video on how to set up the Adyen Magento plugin</a>, or <a target="_blank" href="https://www.adyen.com/dam/documentation/manuals/AdyenMagentoExtension.pdf">here to download an integration guide</a> or <a target="_blank" href="https://www.adyen.com/home/payment-services/plug-ins/magento#form">here to sign up for a test account</a>.
|
43 |
+
The latest version of the <a target="_blank" href="https://github.com/adyenpayments/magento/releases">Adyen Magento plugin is also available through GitHub</a>.
|
44 |
+
If you have any further questions, please visit the <a target="_blank" href="http://www.adyen.com">Adyen.com</a> website or email <a href="mailto:magento@adyen.com">magento@adyen.com</a>.
|
45 |
+
</p>]]></comment>
|
46 |
Â
<fields>
|
47 |
+
<version translate="label">
|
48 |
+
            <label>Extension version</label>
|
49 |
+
                    <frontend_type>label</frontend_type>
|
50 |
+
                    <frontend_model>Adyen_Payment_Block_Adminhtml_Version</frontend_model>
|
51 |
+
                    <sort_order>0</sort_order>
|
52 |
+
                    <show_in_default>1</show_in_default>
|
53 |
+
                    <show_in_website>1</show_in_website>
|
54 |
+
                    <show_in_store>1</show_in_store>
|
55 |
+
        </version>
|
56 |
Â
<merchantAccount translate="label">
|
57 |
Â
<label>Merchant Account</label>
|
58 |
Â
<comment>You can find this in the Adyen backoffice.</comment>
|
70 |
Â
<show_in_default>1</show_in_default>
|
71 |
Â
<show_in_website>1</show_in_website>
|
72 |
Â
<show_in_store>1</show_in_store>
|
73 |
+
<comment><![CDATA[In test mode you must use test cards. You can find them <a target="_blank" href="http://adyen.com/test-card-numbers">here</a>]]></comment>
|
74 |
Â
</demoMode>
|
75 |
Â
<order_status translate="label">
|
76 |
Â
<label>New order status</label>
|
100 |
Â
<sort_order>50</sort_order>
|
101 |
Â
<show_in_default>1</show_in_default>
|
102 |
Â
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>0</show_in_store>
|
104 |
Â
</payment_pre_authorized>
|
105 |
Â
<payment_cancelled translate="label">
|
106 |
Â
<label>Order status cancelled payment</label>
|
111 |
Â
<show_in_default>1</show_in_default>
|
112 |
Â
<show_in_website>1</show_in_website>
|
113 |
Â
<show_in_store>0</show_in_store>
|
114 |
+
</payment_cancelled>
|
115 |
Â
<refund_authorized translate="label">
|
116 |
Â
<label>Refund authorise (refund success)</label>
|
117 |
Â
<comment>(optional) leave empty if you are not sure</comment>
|
121 |
Â
<show_in_default>1</show_in_default>
|
122 |
Â
<show_in_website>1</show_in_website>
|
123 |
Â
<show_in_store>0</show_in_store>
|
124 |
+
</refund_authorized>
|
125 |
Â
<notification_username translate="label">
|
126 |
Â
<label>Notification Username</label>
|
127 |
Â
<comment>Should match your "notifications settings" in your Adyen account.</comment>
|
151 |
Â
<show_in_store>0</show_in_store>
|
152 |
Â
</capture_mode>
|
153 |
Â
<recurringtypes translate="label">
|
154 |
+
<label>Recurring Type</label>
|
155 |
+
<frontend_type>select</frontend_type>
|
156 |
+
<source_model>adyen/source_recurringType</source_model>
|
157 |
+
<sort_order>78</sort_order>
|
158 |
+
<show_in_default>1</show_in_default>
|
159 |
+
<show_in_website>1</show_in_website>
|
160 |
+
<show_in_store>1</show_in_store>
|
161 |
+
</recurringtypes>
|
162 |
Â
<ws_username_test translate="label">
|
163 |
Â
<label>Adyen ws username for Test</label>
|
164 |
Â
<comment>Normally this will be ws@Company.YourCompanyCode</comment>
|
167 |
Â
<show_in_default>1</show_in_default>
|
168 |
Â
<show_in_website>1</show_in_website>
|
169 |
Â
<show_in_store>0</show_in_store>
|
170 |
+
</ws_username_test>
|
171 |
Â
<ws_password_test translate="label">
|
172 |
Â
<label>Adyen ws password for Test</label>
|
173 |
Â
<comment>The password of the ws user for Test</comment>
|
176 |
Â
<show_in_default>1</show_in_default>
|
177 |
Â
<show_in_website>1</show_in_website>
|
178 |
Â
<show_in_store>0</show_in_store>
|
179 |
+
</ws_password_test>
|
180 |
Â
<ws_username_live translate="label">
|
181 |
Â
<label>Adyen ws username for Live</label>
|
182 |
Â
<comment>Normally this will be ws@Company.YourCompanyCode</comment>
|
185 |
Â
<show_in_default>1</show_in_default>
|
186 |
Â
<show_in_website>1</show_in_website>
|
187 |
Â
<show_in_store>0</show_in_store>
|
188 |
+
</ws_username_live>
|
189 |
Â
<ws_password_live translate="label">
|
190 |
Â
<label>Adyen ws password for Live</label>
|
191 |
Â
<comment>The password of the ws user for Live</comment>
|
232 |
Â
<show_in_default>1</show_in_default>
|
233 |
Â
<show_in_website>1</show_in_website>
|
234 |
Â
<show_in_store>0</show_in_store>
|
235 |
+
</send_invoice_update_mail>
|
236 |
Â
</fields>
|
237 |
Â
</adyen_abstract>
|
238 |
+
<!-- @Hpp only -->
|
239 |
Â
<adyen_hpp translate="label" module="adyen">
|
240 |
Â
<label>Adyen HPP</label>
|
241 |
Â
<frontend_type>text</frontend_type>
|
242 |
+
<sort_order>310</sort_order>
|
243 |
Â
<show_in_default>1</show_in_default>
|
244 |
Â
<show_in_website>1</show_in_website>
|
245 |
Â
<show_in_store>1</show_in_store>
|
248 |
Â
<label>Enabled</label>
|
249 |
Â
<frontend_type>select</frontend_type>
|
250 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
251 |
+
<sort_order>10</sort_order>
|
252 |
Â
<show_in_default>1</show_in_default>
|
253 |
Â
<show_in_website>1</show_in_website>
|
254 |
+
<show_in_store>1</show_in_store>
|
255 |
Â
</active>
|
256 |
Â
<title translate="label">
|
257 |
Â
<label>Title</label>
|
258 |
Â
<frontend_type>text</frontend_type>
|
259 |
+
<sort_order>20</sort_order>
|
260 |
Â
<show_in_default>1</show_in_default>
|
261 |
Â
<show_in_website>1</show_in_website>
|
262 |
Â
<show_in_store>1</show_in_store>
|
263 |
+
</title>
|
264 |
+
<sort_order translate="label">
|
265 |
+
<label>Sort Order</label>
|
266 |
+
<frontend_type>text</frontend_type>
|
267 |
+
<sort_order>25</sort_order>
|
268 |
+
<show_in_default>1</show_in_default>
|
269 |
+
<show_in_website>1</show_in_website>
|
270 |
+
<show_in_store>0</show_in_store>
|
271 |
+
</sort_order>
|
272 |
Â
<skinCode translate="label">
|
273 |
Â
<label>Skin Code</label>
|
274 |
Â
<comment>The skin code you want to use (You can find this in the admin are of your Adyen account)</comment>
|
275 |
Â
<frontend_type>text</frontend_type>
|
276 |
+
<sort_order>30</sort_order>
|
277 |
Â
<show_in_default>1</show_in_default>
|
278 |
Â
<show_in_website>1</show_in_website>
|
279 |
Â
<show_in_store>1</show_in_store>
|
280 |
+
</skinCode>
|
281 |
Â
<secret_wordt translate="label">
|
282 |
Â
<label>HMAC Key for Test</label>
|
283 |
Â
<comment>Should match with the HMAC test key in the Adyen backoffice.</comment>
|
284 |
Â
<frontend_type>text</frontend_type>
|
285 |
+
<sort_order>40</sort_order>
|
286 |
Â
<show_in_default>1</show_in_default>
|
287 |
Â
<show_in_website>1</show_in_website>
|
288 |
Â
<show_in_store>1</show_in_store>
|
291 |
Â
<label>HMAC Key for Live</label>
|
292 |
Â
<comment>Should match with the HMAC live key in the Adyen backoffice.</comment>
|
293 |
Â
<frontend_type>text</frontend_type>
|
294 |
+
<sort_order>50</sort_order>
|
295 |
Â
<show_in_default>1</show_in_default>
|
296 |
Â
<show_in_website>1</show_in_website>
|
297 |
Â
<show_in_store>1</show_in_store>
|
298 |
+
</secret_wordp>
|
299 |
Â
<payment_routines translate="label">
|
300 |
Â
<label>Payment Flow Selection</label>
|
301 |
Â
<comment>Adyen provide you with 2 types of payment routines. Multi-page and Single Page</comment>
|
302 |
Â
<frontend_type>select</frontend_type>
|
303 |
Â
<source_model>adyen/source_PaymentRoutines</source_model>
|
304 |
+
<sort_order>60</sort_order>
|
305 |
Â
<show_in_default>1</show_in_default>
|
306 |
Â
<show_in_website>1</show_in_website>
|
307 |
Â
<show_in_store>0</show_in_store>
|
310 |
Â
<label>Days for Delivery</label>
|
311 |
Â
<comment>How many days to be added to the current date for delivery. ONLY numbers allowed.</comment>
|
312 |
Â
<frontend_type>text</frontend_type>
|
313 |
+
<sort_order>70</sort_order>
|
314 |
Â
<show_in_default>1</show_in_default>
|
315 |
Â
<show_in_website>1</show_in_website>
|
316 |
Â
<show_in_store>0</show_in_store>
|
320 |
Â
<comment>If you say yes here, payment methods in the checkout won't be displayed and you will be redirected to the Adyen HPP to make the selection.</comment>
|
321 |
Â
<frontend_type>select</frontend_type>
|
322 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
323 |
+
<sort_order>90</sort_order>
|
324 |
Â
<show_in_default>1</show_in_default>
|
325 |
Â
<show_in_website>0</show_in_website>
|
326 |
+
<show_in_store>0</show_in_store>
|
327 |
Â
</disable_hpptypes>
|
328 |
+
<cache_directory_lookup>
|
329 |
+
<label>Cache payment method call</label>
|
330 |
+
<comment>Enable this if you having trouble with performance and you don't have any amount rules setup in your skin in the Adyen backoffice.</comment>
|
331 |
+
<frontend_type>select</frontend_type>
|
332 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
333 |
+
<sort_order>100</sort_order>
|
334 |
+
<show_in_default>1</show_in_default>
|
335 |
+
<show_in_website>1</show_in_website>
|
336 |
+
<show_in_store>1</show_in_store>
|
337 |
+
<depends><disable_hpptypes>0</disable_hpptypes></depends>
|
338 |
+
</cache_directory_lookup>
|
339 |
+
<return_url_in_request>
|
340 |
+
<label>Return url in request</label>
|
341 |
+
<comment>If you have a multi webshop and you want to use one skin only, enable this option</comment>
|
342 |
+
<frontend_type>select</frontend_type>
|
343 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
344 |
+
<sort_order>110</sort_order>
|
345 |
+
<show_in_default>1</show_in_default>
|
346 |
+
<show_in_website>1</show_in_website>
|
347 |
+
<show_in_store>1</show_in_store>
|
348 |
+
</return_url_in_request>
|
349 |
Â
<allowspecific translate="label">
|
350 |
Â
<label>Payment to applicable countries</label>
|
351 |
Â
<frontend_type>allowspecific</frontend_type>
|
352 |
+
<sort_order>120</sort_order>
|
353 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
354 |
Â
<show_in_default>1</show_in_default>
|
355 |
Â
<show_in_website>1</show_in_website>
|
358 |
Â
<specificcountry translate="label">
|
359 |
Â
<label>Payment to Specific countries</label>
|
360 |
Â
<frontend_type>multiselect</frontend_type>
|
361 |
+
<sort_order>130</sort_order>
|
362 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
363 |
Â
<show_in_default>1</show_in_default>
|
364 |
Â
<show_in_website>1</show_in_website>
|
365 |
Â
<show_in_store>1</show_in_store>
|
366 |
+
<depends><allowspecific>1</allowspecific></depends>
|
367 |
+
</specificcountry>
|
368 |
Â
</fields>
|
369 |
Â
</adyen_hpp>
|
370 |
+
<!-- @Pos only -->
|
371 |
Â
<adyen_pos translate="label" module="adyen">
|
372 |
Â
<label>Adyen POS</label>
|
373 |
Â
<frontend_type>text</frontend_type>
|
374 |
+
<sort_order>320</sort_order>
|
375 |
Â
<show_in_default>1</show_in_default>
|
376 |
Â
<show_in_website>1</show_in_website>
|
377 |
Â
<show_in_store>1</show_in_store>
|
383 |
Â
<sort_order>10</sort_order>
|
384 |
Â
<show_in_default>1</show_in_default>
|
385 |
Â
<show_in_website>1</show_in_website>
|
386 |
+
<show_in_store>1</show_in_store>
|
387 |
Â
</active>
|
388 |
Â
<title translate="label">
|
389 |
Â
<label>Title</label>
|
393 |
Â
<show_in_website>1</show_in_website>
|
394 |
Â
<show_in_store>1</show_in_store>
|
395 |
Â
</title>
|
396 |
+
<sort_order translate="label">
|
397 |
+
<label>Sort Order</label>
|
398 |
+
<frontend_type>text</frontend_type>
|
399 |
+
<sort_order>25</sort_order>
|
400 |
+
<show_in_default>1</show_in_default>
|
401 |
+
<show_in_website>1</show_in_website>
|
402 |
+
<show_in_store>0</show_in_store>
|
403 |
+
</sort_order>
|
404 |
Â
<recurringtypes translate="label">
|
405 |
+
<label>Recurring Type</label>
|
406 |
+
<comment>You can set different value for POS because you have to have the permission of the customer</comment>
|
407 |
+
<frontend_type>select</frontend_type>
|
408 |
+
<source_model>adyen/source_recurringType</source_model>
|
409 |
+
<sort_order>30</sort_order>
|
410 |
+
<show_in_default>1</show_in_default>
|
411 |
+
<show_in_website>1</show_in_website>
|
412 |
+
<show_in_store>1</show_in_store>
|
413 |
+
</recurringtypes>
|
414 |
+
<enable_scanner translate="label">
|
415 |
+
<label>Enable Scanner</label>
|
416 |
+
<comment>If you enable this you have the possiblity to scan products with a hand scanner on the shopping cart page and this will automatically add products to the shopping cart based on the same SKU name</comment>
|
417 |
+
<frontend_type>select</frontend_type>
|
418 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
419 |
+
<sort_order>35</sort_order>
|
420 |
+
<show_in_default>1</show_in_default>
|
421 |
+
<show_in_website>1</show_in_website>
|
422 |
+
<show_in_store>1</show_in_store>
|
423 |
+
</enable_scanner>
|
424 |
+
<express_checkout>
|
425 |
+
<label>Express checkout</label>
|
426 |
+
<comment>This will show a checkout buttton on the shopping cart to directly do a POS payment without going to the checkout steps. You must be loged into your account</comment>
|
427 |
+
<frontend_type>select</frontend_type>
|
428 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
429 |
+
<sort_order>36</sort_order>
|
430 |
+
<show_in_default>1</show_in_default>
|
431 |
+
<show_in_website>1</show_in_website>
|
432 |
+
<show_in_store>1</show_in_store>
|
433 |
+
</express_checkout>
|
434 |
Â
<allowspecific translate="label">
|
435 |
Â
<label>Payment to applicable countries</label>
|
436 |
Â
<frontend_type>allowspecific</frontend_type>
|
448 |
Â
<show_in_default>1</show_in_default>
|
449 |
Â
<show_in_website>1</show_in_website>
|
450 |
Â
<show_in_store>1</show_in_store>
|
451 |
+
<depends><allowspecific>1</allowspecific></depends>
|
452 |
+
</specificcountry>
|
453 |
Â
</fields>
|
454 |
Â
</adyen_pos>
|
455 |
+
<!-- @Openinvoice only -->
|
456 |
Â
<adyen_openinvoice translate="label" module="adyen">
|
457 |
Â
<label>Adyen OpenInvoice</label>
|
458 |
Â
<frontend_type>text</frontend_type>
|
459 |
+
<sort_order>330</sort_order>
|
460 |
Â
<show_in_default>1</show_in_default>
|
461 |
Â
<show_in_website>1</show_in_website>
|
462 |
Â
<show_in_store>1</show_in_store>
|
465 |
Â
<label>Enabled</label>
|
466 |
Â
<frontend_type>select</frontend_type>
|
467 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
468 |
+
<sort_order>10</sort_order>
|
469 |
Â
<show_in_default>1</show_in_default>
|
470 |
Â
<show_in_website>1</show_in_website>
|
471 |
+
<show_in_store>1</show_in_store>
|
472 |
Â
</active>
|
473 |
Â
<title translate="label">
|
474 |
Â
<label>Title</label>
|
475 |
Â
<frontend_type>text</frontend_type>
|
476 |
+
<sort_order>20</sort_order>
|
477 |
Â
<show_in_default>1</show_in_default>
|
478 |
Â
<show_in_website>1</show_in_website>
|
479 |
Â
<show_in_store>1</show_in_store>
|
480 |
Â
</title>
|
481 |
+
<sort_order translate="label">
|
482 |
+
<label>Sort Order</label>
|
483 |
+
<frontend_type>text</frontend_type>
|
484 |
+
<sort_order>25</sort_order>
|
485 |
+
<show_in_default>1</show_in_default>
|
486 |
+
<show_in_website>1</show_in_website>
|
487 |
+
<show_in_store>0</show_in_store>
|
488 |
+
</sort_order>
|
489 |
Â
<openinvoicetypes translate="label">
|
490 |
Â
<label>OpenInvoice Type</label>
|
491 |
Â
<frontend_type>select</frontend_type>
|
492 |
Â
<source_model>adyen/source_openinvoiceType</source_model>
|
493 |
+
<sort_order>30</sort_order>
|
494 |
Â
<show_in_default>1</show_in_default>
|
495 |
Â
<show_in_website>1</show_in_website>
|
496 |
Â
<show_in_store>1</show_in_store>
|
497 |
+
</openinvoicetypes>
|
498 |
+
<gender_show translate="label">
|
499 |
+
<label>Show Gender</label>
|
500 |
+
<frontend_type>select</frontend_type>
|
501 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
502 |
+
<sort_order>35</sort_order>
|
503 |
+
<show_in_default>1</show_in_default>
|
504 |
+
<show_in_website>1</show_in_website>
|
505 |
+
<show_in_store>1</show_in_store>
|
506 |
+
</gender_show>
|
507 |
+
<dob_show translate="label">
|
508 |
+
<label>Show Date of Birth</label>
|
509 |
+
<frontend_type>select</frontend_type>
|
510 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
511 |
+
<sort_order>36</sort_order>
|
512 |
+
<show_in_default>1</show_in_default>
|
513 |
+
<show_in_website>1</show_in_website>
|
514 |
+
<show_in_store>1</show_in_store>
|
515 |
+
</dob_show>
|
516 |
+
<fee translate="label">
|
517 |
+
<label>Fee</label>
|
518 |
+
<frontend_type>text</frontend_type>
|
519 |
+
<sort_order>37</sort_order>
|
520 |
+
<show_in_default>1</show_in_default>
|
521 |
+
<show_in_website>1</show_in_website>
|
522 |
+
<show_in_store>1</show_in_store>
|
523 |
+
<validate>validate-number</validate>
|
524 |
+
</fee>
|
525 |
Â
<allowspecific translate="label">
|
526 |
Â
<label>Payment to applicable countries</label>
|
527 |
Â
<frontend_type>allowspecific</frontend_type>
|
528 |
+
<sort_order>40</sort_order>
|
529 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
530 |
Â
<show_in_default>1</show_in_default>
|
531 |
Â
<show_in_website>1</show_in_website>
|
532 |
Â
<show_in_store>1</show_in_store>
|
533 |
+
</allowspecific>
|
534 |
Â
<specificcountry translate="label">
|
535 |
Â
<label>Payment to Specific countries</label>
|
536 |
Â
<frontend_type>multiselect</frontend_type>
|
537 |
+
<sort_order>50</sort_order>
|
538 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
539 |
Â
<show_in_default>1</show_in_default>
|
540 |
Â
<show_in_website>1</show_in_website>
|
541 |
Â
<show_in_store>1</show_in_store>
|
542 |
+
<depends><allowspecific>1</allowspecific></depends>
|
543 |
+
</specificcountry>
|
544 |
Â
</fields>
|
545 |
+
</adyen_openinvoice>
|
546 |
+
<!-- @CC only -->
|
547 |
Â
<adyen_cc translate="label" module="adyen">
|
548 |
Â
<label>Adyen CC</label>
|
549 |
Â
<frontend_type>text</frontend_type>
|
550 |
+
<sort_order>340</sort_order>
|
551 |
Â
<show_in_default>1</show_in_default>
|
552 |
Â
<show_in_website>1</show_in_website>
|
553 |
Â
<show_in_store>1</show_in_store>
|
556 |
Â
<label>Enabled</label>
|
557 |
Â
<frontend_type>select</frontend_type>
|
558 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
559 |
+
<sort_order>10</sort_order>
|
560 |
Â
<show_in_default>1</show_in_default>
|
561 |
Â
<show_in_website>1</show_in_website>
|
562 |
+
<show_in_store>1</show_in_store>
|
563 |
Â
</active>
|
564 |
Â
<title translate="label">
|
565 |
Â
<label>Title</label>
|
566 |
Â
<frontend_type>text</frontend_type>
|
567 |
+
<sort_order>20</sort_order>
|
568 |
Â
<show_in_default>1</show_in_default>
|
569 |
Â
<show_in_website>1</show_in_website>
|
570 |
Â
<show_in_store>1</show_in_store>
|
571 |
Â
</title>
|
572 |
+
<sort_order translate="label">
|
573 |
+
<label>Sort Order</label>
|
574 |
+
<frontend_type>text</frontend_type>
|
575 |
+
<sort_order>25</sort_order>
|
576 |
+
<show_in_default>1</show_in_default>
|
577 |
+
<show_in_website>1</show_in_website>
|
578 |
+
<show_in_store>0</show_in_store>
|
579 |
+
</sort_order>
|
580 |
Â
<cctypes translate="label">
|
581 |
Â
<label>Credit Card Types</label>
|
582 |
Â
<frontend_type>multiselect</frontend_type>
|
583 |
Â
<source_model>adyen/source_ccType</source_model>
|
584 |
+
<sort_order>40</sort_order>
|
585 |
Â
<show_in_default>1</show_in_default>
|
586 |
Â
<show_in_website>1</show_in_website>
|
587 |
Â
<show_in_store>1</show_in_store>
|
590 |
Â
<label>Enable Client-Side Encryption</label>
|
591 |
Â
<frontend_type>select</frontend_type>
|
592 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
593 |
+
<sort_order>60</sort_order>
|
594 |
Â
<show_in_default>1</show_in_default>
|
595 |
Â
<show_in_website>1</show_in_website>
|
596 |
Â
<show_in_store>1</show_in_store>
|
598 |
Â
<cse_publickey translate="label">
|
599 |
Â
<label>Client-Side Encryption Public Key</label>
|
600 |
Â
<frontend_type>textarea</frontend_type>
|
601 |
+
<sort_order>70</sort_order>
|
602 |
Â
<show_in_default>1</show_in_default>
|
603 |
Â
<show_in_website>1</show_in_website>
|
604 |
Â
<show_in_store>1</show_in_store>
|
605 |
+
<depends><cse_enabled>1</cse_enabled></depends>
|
606 |
Â
</cse_publickey>
|
607 |
Â
<allowspecific translate="label">
|
608 |
Â
<label>Payment to applicable countries</label>
|
609 |
Â
<frontend_type>allowspecific</frontend_type>
|
610 |
+
<sort_order>90</sort_order>
|
611 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
612 |
Â
<show_in_default>1</show_in_default>
|
613 |
Â
<show_in_website>1</show_in_website>
|
616 |
Â
<specificcountry translate="label">
|
617 |
Â
<label>Payment to Specific countries</label>
|
618 |
Â
<frontend_type>multiselect</frontend_type>
|
619 |
+
<sort_order>100</sort_order>
|
620 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
621 |
Â
<show_in_default>1</show_in_default>
|
622 |
Â
<show_in_website>1</show_in_website>
|
623 |
Â
<show_in_store>1</show_in_store>
|
624 |
+
<depends><allowspecific>1</allowspecific></depends>
|
625 |
Â
</specificcountry>
|
626 |
+
<enable_moto>
|
627 |
+
<label>Enable MOTO for backend orders</label>
|
628 |
+
<frontend_type>select</frontend_type>
|
629 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
630 |
+
<sort_order>105</sort_order>
|
631 |
+
<show_in_default>1</show_in_default>
|
632 |
+
<show_in_website>1</show_in_website>
|
633 |
+
<show_in_store>1</show_in_store>
|
634 |
+
<comment><![CDATA[Important you have to activate MOTO for your acocunt contact magento@adyen.com. For more information <a target="_blank" href="https://www.adyen.com/dam/documentation/manuals/MotoManual.pdf">check our MOTO manual</a>]]></comment>
|
635 |
+
</enable_moto>
|
636 |
Â
<enable_installments translate="label">
|
637 |
+
<label>Enable Installments</label>
|
638 |
+
<frontend_type>select</frontend_type>
|
639 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
640 |
+
<sort_order>110</sort_order>
|
641 |
Â
<show_in_default>1</show_in_default>
|
642 |
Â
<show_in_website>1</show_in_website>
|
643 |
Â
<show_in_store>1</show_in_store>
|
644 |
Â
</enable_installments>
|
645 |
Â
<installments translate="label">
|
646 |
+
<label>Installments default</label>
|
647 |
Â
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
648 |
Â
<backend_model>adyen/system_config_backend_installments</backend_model>
|
649 |
+
<sort_order>120</sort_order>
|
650 |
Â
<show_in_default>1</show_in_default>
|
651 |
Â
<show_in_website>1</show_in_website>
|
652 |
Â
<show_in_store>1</show_in_store>
|
653 |
+
<comments>This is the fallback if specific credit card type has no installments configured</comments>
|
654 |
+
</installments>
|
655 |
+
<installments_AE translate="label">
|
656 |
+
<label>Installments For American Express</label>
|
657 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
658 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
659 |
+
<sort_order>130</sort_order>
|
660 |
+
<show_in_default>1</show_in_default>
|
661 |
+
<show_in_website>1</show_in_website>
|
662 |
+
<show_in_store>1</show_in_store>
|
663 |
+
</installments_AE>
|
664 |
+
<installments_VI translate="label">
|
665 |
+
<label>Installments For Visa</label>
|
666 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
667 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
668 |
+
<sort_order>140</sort_order>
|
669 |
+
<show_in_default>1</show_in_default>
|
670 |
+
<show_in_website>1</show_in_website>
|
671 |
+
<show_in_store>1</show_in_store>
|
672 |
+
</installments_VI>
|
673 |
+
<installments_MC translate="label">
|
674 |
+
<label>Installments For Master Card</label>
|
675 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
676 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
677 |
+
<sort_order>150</sort_order>
|
678 |
+
<show_in_default>1</show_in_default>
|
679 |
+
<show_in_website>1</show_in_website>
|
680 |
+
<show_in_store>1</show_in_store>
|
681 |
+
</installments_MC>
|
682 |
+
<installments_DI translate="label">
|
683 |
+
<label>Installments For Discover</label>
|
684 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
685 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
686 |
+
<sort_order>160</sort_order>
|
687 |
+
<show_in_default>1</show_in_default>
|
688 |
+
<show_in_website>1</show_in_website>
|
689 |
+
<show_in_store>1</show_in_store>
|
690 |
+
</installments_DI>
|
691 |
+
<installments_DC translate="label">
|
692 |
+
<label>Installments For Diners Club</label>
|
693 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
694 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
695 |
+
<sort_order>170</sort_order>
|
696 |
+
<show_in_default>1</show_in_default>
|
697 |
+
<show_in_website>1</show_in_website>
|
698 |
+
<show_in_store>1</show_in_store>
|
699 |
+
</installments_DC>
|
700 |
+
<installments_MO translate="label">
|
701 |
+
<label>Installments For Maestro</label>
|
702 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
703 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
704 |
+
<sort_order>180</sort_order>
|
705 |
+
<show_in_default>1</show_in_default>
|
706 |
+
<show_in_website>1</show_in_website>
|
707 |
+
<show_in_store>1</show_in_store>
|
708 |
+
</installments_MO>
|
709 |
+
<installments_JC translate="label">
|
710 |
+
<label>Installments For JCB</label>
|
711 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
712 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
713 |
+
<sort_order>190</sort_order>
|
714 |
+
<show_in_default>1</show_in_default>
|
715 |
+
<show_in_website>1</show_in_website>
|
716 |
+
<show_in_store>1</show_in_store>
|
717 |
+
</installments_JC>
|
718 |
+
<installments_CB translate="label">
|
719 |
+
<label>Installments For CarteBleue</label>
|
720 |
+
<frontend_model>adyen/adminhtml_form_field_installments</frontend_model>
|
721 |
+
<backend_model>adyen/system_config_backend_installments</backend_model>
|
722 |
+
<sort_order>200</sort_order>
|
723 |
+
<show_in_default>1</show_in_default>
|
724 |
+
<show_in_website>1</show_in_website>
|
725 |
+
<show_in_store>1</show_in_store>
|
726 |
+
</installments_CB>
|
727 |
Â
</fields>
|
728 |
+
</adyen_cc>
|
729 |
+
<adyen_oneclick>
|
730 |
+
<label>Adyen OneClick</label>
|
Â
|
|
731 |
Â
<frontend_type>text</frontend_type>
|
732 |
+
<sort_order>350</sort_order>
|
733 |
Â
<show_in_default>1</show_in_default>
|
734 |
Â
<show_in_website>1</show_in_website>
|
735 |
Â
<show_in_store>1</show_in_store>
|
741 |
Â
<sort_order>1</sort_order>
|
742 |
Â
<show_in_default>1</show_in_default>
|
743 |
Â
<show_in_website>1</show_in_website>
|
744 |
+
<show_in_store>1</show_in_store>
|
745 |
+
<comment>One Click payments only work if you have Adyen CC enabled</comment>
|
746 |
Â
</active>
|
747 |
Â
<title translate="label">
|
748 |
Â
<label>Title</label>
|
752 |
Â
<show_in_website>1</show_in_website>
|
753 |
Â
<show_in_store>1</show_in_store>
|
754 |
Â
</title>
|
755 |
+
</fields>
|
756 |
+
</adyen_oneclick>
|
757 |
+
<!-- @Elv only -->
|
758 |
+
<adyen_elv translate="label" module="adyen">
|
759 |
+
<label>Adyen ELV</label>
|
760 |
+
<frontend_type>text</frontend_type>
|
761 |
+
<sort_order>360</sort_order>
|
762 |
+
<show_in_default>1</show_in_default>
|
763 |
+
<show_in_website>1</show_in_website>
|
764 |
+
<show_in_store>1</show_in_store>
|
765 |
+
<fields>
|
766 |
+
<active translate="label">
|
767 |
+
<label>Enabled</label>
|
768 |
+
<frontend_type>select</frontend_type>
|
769 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
770 |
+
<sort_order>10</sort_order>
|
771 |
+
<show_in_default>1</show_in_default>
|
772 |
+
<show_in_website>1</show_in_website>
|
773 |
+
<show_in_store>1</show_in_store>
|
774 |
+
</active>
|
775 |
+
<title translate="label">
|
776 |
+
<label>Title</label>
|
777 |
+
<frontend_type>text</frontend_type>
|
778 |
+
<sort_order>20</sort_order>
|
779 |
+
<show_in_default>1</show_in_default>
|
780 |
+
<show_in_website>1</show_in_website>
|
781 |
+
<show_in_store>1</show_in_store>
|
782 |
+
</title>
|
783 |
+
<sort_order translate="label">
|
784 |
+
<label>Sort Order</label>
|
785 |
+
<frontend_type>text</frontend_type>
|
786 |
+
<sort_order>25</sort_order>
|
787 |
+
<show_in_default>1</show_in_default>
|
788 |
+
<show_in_website>1</show_in_website>
|
789 |
+
<show_in_store>0</show_in_store>
|
790 |
+
</sort_order>
|
791 |
Â
<allowspecific translate="label">
|
792 |
Â
<label>Payment to applicable countries</label>
|
793 |
Â
<frontend_type>allowspecific</frontend_type>
|
794 |
+
<sort_order>50</sort_order>
|
795 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
796 |
Â
<show_in_default>1</show_in_default>
|
797 |
Â
<show_in_website>1</show_in_website>
|
798 |
Â
<show_in_store>1</show_in_store>
|
799 |
+
</allowspecific>
|
800 |
Â
<specificcountry translate="label">
|
801 |
Â
<label>Payment to Specific countries</label>
|
802 |
Â
<frontend_type>multiselect</frontend_type>
|
803 |
+
<sort_order>60</sort_order>
|
804 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
805 |
Â
<show_in_default>1</show_in_default>
|
806 |
Â
<show_in_website>1</show_in_website>
|
807 |
Â
<show_in_store>1</show_in_store>
|
808 |
+
<depends><allowspecific>1</allowspecific></depends>
|
809 |
+
</specificcountry>
|
810 |
Â
</fields>
|
811 |
Â
</adyen_elv>
|
812 |
+
<!-- @boleto only -->
|
813 |
Â
<adyen_boleto translate="label" module="adyen">
|
814 |
Â
<label>Adyen Boleto</label>
|
815 |
Â
<frontend_type>text</frontend_type>
|
816 |
+
<sort_order>370</sort_order>
|
817 |
Â
<show_in_default>1</show_in_default>
|
818 |
Â
<show_in_website>1</show_in_website>
|
819 |
Â
<show_in_store>1</show_in_store>
|
822 |
Â
<label>Enabled</label>
|
823 |
Â
<frontend_type>select</frontend_type>
|
824 |
Â
<source_model>adminhtml/system_config_source_yesno</source_model>
|
825 |
+
<sort_order>10</sort_order>
|
826 |
Â
<show_in_default>1</show_in_default>
|
827 |
Â
<show_in_website>1</show_in_website>
|
828 |
+
<show_in_store>1</show_in_store>
|
829 |
Â
</active>
|
830 |
Â
<title translate="label">
|
831 |
Â
<label>Title</label>
|
832 |
Â
<frontend_type>text</frontend_type>
|
833 |
+
<sort_order>20</sort_order>
|
834 |
Â
<show_in_default>1</show_in_default>
|
835 |
Â
<show_in_website>1</show_in_website>
|
836 |
Â
<show_in_store>1</show_in_store>
|
837 |
Â
</title>
|
838 |
+
<sort_order translate="label">
|
839 |
+
<label>Sort Order</label>
|
840 |
+
<frontend_type>text</frontend_type>
|
841 |
+
<sort_order>25</sort_order>
|
842 |
+
<show_in_default>1</show_in_default>
|
843 |
+
<show_in_website>1</show_in_website>
|
844 |
+
<show_in_store>0</show_in_store>
|
845 |
+
</sort_order>
|
846 |
Â
<delivery_days translate="label">
|
847 |
Â
<label>Days for Delivery</label>
|
848 |
Â
<comment>How many days to be added to the current date for delivery. ONLY numbers allowed.</comment>
|
849 |
Â
<frontend_type>text</frontend_type>
|
850 |
+
<sort_order>30</sort_order>
|
851 |
Â
<show_in_default>1</show_in_default>
|
852 |
Â
<show_in_website>1</show_in_website>
|
853 |
Â
<show_in_store>0</show_in_store>
|
856 |
Â
<label>Boleto Types</label>
|
857 |
Â
<frontend_type>multiselect</frontend_type>
|
858 |
Â
<source_model>adyen/source_boletoType</source_model>
|
859 |
+
<sort_order>40</sort_order>
|
860 |
Â
<show_in_default>1</show_in_default>
|
861 |
Â
<show_in_website>1</show_in_website>
|
862 |
Â
<show_in_store>1</show_in_store>
|
863 |
Â
</boletotypes>
|
864 |
+
<order_underpaid_status translate="label">
|
865 |
+
<label>Order status underpaid</label>
|
866 |
+
<comment>With Boleto it is possible to pay less than the full amount. Select here the status if this is the case. If you leave this empty it will take the Order status authorised payment as default status</comment>
|
867 |
+
<frontend_type>select</frontend_type>
|
868 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
869 |
+
<sort_order>45</sort_order>
|
870 |
+
<show_in_default>1</show_in_default>
|
871 |
+
<show_in_website>1</show_in_website>
|
872 |
+
<show_in_store>0</show_in_store>
|
873 |
+
</order_underpaid_status>
|
874 |
+
<order_overpaid_status translate="label">
|
875 |
+
<label>Order status overpaid</label>
|
876 |
+
<comment>With Boleto it is possible to pay more than the total amount. Select here the status if this is the case. If you leave this empty it will take the Order status authorised payment as default status</comment>
|
877 |
+
<frontend_type>select</frontend_type>
|
878 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
879 |
+
<sort_order>45</sort_order>
|
880 |
+
<show_in_default>1</show_in_default>
|
881 |
+
<show_in_website>1</show_in_website>
|
882 |
+
<show_in_store>0</show_in_store>
|
883 |
+
</order_overpaid_status>
|
884 |
+
<allowspecific translate="label">
|
885 |
+
<label>Payment to applicable countries</label>
|
886 |
+
<frontend_type>allowspecific</frontend_type>
|
887 |
+
<sort_order>50</sort_order>
|
888 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
889 |
+
<show_in_default>1</show_in_default>
|
890 |
+
<show_in_website>1</show_in_website>
|
891 |
+
<show_in_store>1</show_in_store>
|
892 |
+
</allowspecific>
|
893 |
+
<specificcountry translate="label">
|
894 |
+
<label>Payment to Specific countries</label>
|
895 |
+
<frontend_type>multiselect</frontend_type>
|
896 |
+
<sort_order>60</sort_order>
|
897 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
898 |
+
<show_in_default>1</show_in_default>
|
899 |
+
<show_in_website>1</show_in_website>
|
900 |
+
<show_in_store>1</show_in_store>
|
901 |
+
<depends><allowspecific>1</allowspecific></depends>
|
902 |
+
</specificcountry>
|
903 |
+
</fields>
|
904 |
+
</adyen_boleto>
|
905 |
+
<!-- @SEPA only -->
|
906 |
+
<adyen_sepa translate="label" module="adyen">
|
907 |
+
<label>Adyen SEPA</label>
|
908 |
+
<frontend_type>text</frontend_type>
|
909 |
+
<sort_order>380</sort_order>
|
910 |
+
<show_in_default>1</show_in_default>
|
911 |
+
<show_in_website>1</show_in_website>
|
912 |
+
<show_in_store>1</show_in_store>
|
913 |
+
<fields>
|
914 |
+
<active translate="label">
|
915 |
+
<label>Enabled</label>
|
916 |
+
<frontend_type>select</frontend_type>
|
917 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
918 |
+
<sort_order>10</sort_order>
|
919 |
+
<show_in_default>1</show_in_default>
|
920 |
+
<show_in_website>1</show_in_website>
|
921 |
+
<show_in_store>1</show_in_store>
|
922 |
+
</active>
|
923 |
+
<title translate="label">
|
924 |
+
<label>Title</label>
|
925 |
+
<frontend_type>text</frontend_type>
|
926 |
+
<sort_order>20</sort_order>
|
927 |
+
<show_in_default>1</show_in_default>
|
928 |
+
<show_in_website>1</show_in_website>
|
929 |
+
<show_in_store>1</show_in_store>
|
930 |
+
</title>
|
931 |
+
<sort_order translate="label">
|
932 |
+
<label>Sort Order</label>
|
933 |
+
<frontend_type>text</frontend_type>
|
934 |
+
<sort_order>25</sort_order>
|
935 |
+
<show_in_default>1</show_in_default>
|
936 |
+
<show_in_website>1</show_in_website>
|
937 |
+
<show_in_store>0</show_in_store>
|
938 |
+
</sort_order>
|
939 |
+
<validate_iban>
|
940 |
+
<label>Validate Iban</label>
|
941 |
+
<frontend_type>select</frontend_type>
|
942 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
943 |
+
<sort_order>30</sort_order>
|
944 |
+
<comment>This is a basic validation on the Iban number.</comment>
|
945 |
+
<show_in_default>1</show_in_default>
|
946 |
+
<show_in_website>1</show_in_website>
|
947 |
+
<show_in_store>1</show_in_store>
|
948 |
+
</validate_iban>
|
949 |
Â
<allowspecific translate="label">
|
950 |
Â
<label>Payment to applicable countries</label>
|
951 |
Â
<frontend_type>allowspecific</frontend_type>
|
952 |
+
<sort_order>50</sort_order>
|
953 |
Â
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
954 |
Â
<show_in_default>1</show_in_default>
|
955 |
Â
<show_in_website>1</show_in_website>
|
956 |
Â
<show_in_store>1</show_in_store>
|
957 |
+
</allowspecific>
|
958 |
Â
<specificcountry translate="label">
|
959 |
Â
<label>Payment to Specific countries</label>
|
960 |
Â
<frontend_type>multiselect</frontend_type>
|
961 |
+
<sort_order>60</sort_order>
|
962 |
Â
<source_model>adminhtml/system_config_source_country</source_model>
|
963 |
Â
<show_in_default>1</show_in_default>
|
964 |
Â
<show_in_website>1</show_in_website>
|
965 |
Â
<show_in_store>1</show_in_store>
|
966 |
Â
<depends><allowspecific>1</allowspecific></depends>
|
967 |
+
</specificcountry>
|
968 |
Â
</fields>
|
969 |
+
</adyen_sepa>
|
970 |
Â
</groups>
|
971 |
Â
</payment>
|
972 |
Â
</sections>
|
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
/* @var $installer Adyen_Payment_Model_Entity_Setup */
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$installer->getConnection()->addColumn($this->getTable('sales/quote_address'), 'payment_fee_amount', "decimal(12,4) null default null");
|
9 |
+
$installer->getConnection()->addColumn($this->getTable('sales/quote_address'), 'base_payment_fee_amount', "decimal(12,4) null default null");
|
10 |
+
|
11 |
+
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'payment_fee_amount', "decimal(12,4) null default null");
|
12 |
+
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'base_payment_fee_amount', "decimal(12,4) null default null");
|
13 |
+
|
14 |
+
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'payment_fee_amount', "decimal(12,4) null default null");
|
15 |
+
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'base_payment_fee_amount', "decimal(12,4) null default null");
|
16 |
+
|
17 |
+
$installer->getConnection()->addColumn($this->getTable('sales/creditmemo'), 'payment_fee_amount', "decimal(12,4) null default null");
|
18 |
+
$installer->getConnection()->addColumn($this->getTable('sales/creditmemo'), 'base_payment_fee_amount', "decimal(12,4) null default null");
|
19 |
+
|
20 |
+
$installer->getConnection()->addColumn($this->getTable('adyen/event'), 'success', "tinyint(1) null default null");
|
21 |
+
|
22 |
+
$installer->addAttribute('order_payment', 'adyen_klarna_number', array());
|
23 |
+
|
24 |
+
$installer->getConnection()->addColumn($this->getTable('sales/quote_address'), 'payment_installment_fee_amount', "decimal(12,4) null default null");
|
25 |
+
$installer->getConnection()->addColumn($this->getTable('sales/quote_address'), 'base_payment_installment_fee_amount', "decimal(12,4) null default null");
|
26 |
+
|
27 |
+
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'payment_installment_fee_amount', "decimal(12,4) null default null");
|
28 |
+
$installer->getConnection()->addColumn($this->getTable('sales/order'), 'base_payment_installment_fee_amount', "decimal(12,4) null default null");
|
29 |
+
|
30 |
+
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'payment_installment_fee_amount', "decimal(12,4) null default null");
|
31 |
+
$installer->getConnection()->addColumn($this->getTable('sales/invoice'), 'base_payment_installment_fee_amount', "decimal(12,4) null default null");
|
32 |
+
|
33 |
+
$installer->getConnection()->addColumn($this->getTable('sales/creditmemo'), 'payment_installment_fee_amount', "decimal(12,4) null default null");
|
34 |
+
$installer->getConnection()->addColumn($this->getTable('sales/creditmemo'), 'base_payment_installment_fee_amount', "decimal(12,4) null default null");
|
35 |
+
|
36 |
+
$installer->addAttribute('order_payment', 'adyen_avs_result', array());
|
37 |
+
$installer->addAttribute('order_payment', 'adyen_cvc_result', array());
|
38 |
+
|
39 |
+
$installer->addAttribute('order_payment', 'adyen_boleto_paid_amount', array());
|
40 |
+
|
41 |
+
$installer->endSetup();
|
@@ -27,7 +27,7 @@
|
|
27 |
Â
?>
|
28 |
Â
<?php $_code = $this->getMethodCode() ?>
|
29 |
Â
|
30 |
-
<?php $disabled = $this->
|
31 |
Â
<?php $enabledTypes = $this->getHppAvailableTypes(); ?>
|
32 |
Â
<?php $idealList = $this->getIdealAvailableTypes();?>
|
33 |
Â
|
27 |
Â
?>
|
28 |
Â
<?php $_code = $this->getMethodCode() ?>
|
29 |
Â
|
30 |
+
<?php $disabled = $this->getHppOptionsDisabled(); ?>
|
31 |
Â
<?php $enabledTypes = $this->getHppAvailableTypes(); ?>
|
32 |
Â
<?php $idealList = $this->getIdealAvailableTypes();?>
|
33 |
Â
|
@@ -0,0 +1,110 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
16 |
+
* @package Adyen_Payment
|
17 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* @category Payment Gateway
|
22 |
+
* @package Adyen_Payment
|
23 |
+
* @author Adyen
|
24 |
+
* @property Adyen B.V
|
25 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
26 |
+
*/
|
27 |
+
$_code=$this->getMethodCode();
|
28 |
+
?>
|
29 |
+
|
30 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
31 |
+
|
32 |
+
<li>
|
33 |
+
<div class="input-box">
|
34 |
+
<label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Bank account holder name') ?> <span class="required">*</span></label><br />
|
35 |
+
<input
|
36 |
+
type="text" id="<?php echo $_code ?>_account_name" name="payment[account_name]"
|
37 |
+
title="<?php echo $this->__('Bank account holder name') ?>"
|
38 |
+
class="validate-ipayment-sepa-account-name required-entry input-text"
|
39 |
+
value="" autocomplete="off"
|
40 |
+
/>
|
41 |
+
</div>
|
42 |
+
</li>
|
43 |
+
<li>
|
44 |
+
<div class="input-box">
|
45 |
+
<label for="<?php echo $_code ?>_iban"><?php echo $this->__('IBAN') ?> <span class="required">*</span></label><br />
|
46 |
+
<input
|
47 |
+
type="text" id="<?php echo $_code ?>_iban" name="payment[iban]"
|
48 |
+
title="<?php echo $this->__('IBAN') ?>"
|
49 |
+
class="validate-ipayment-sepa-iban required-entry input-text"
|
50 |
+
value="" autocomplete="off"
|
51 |
+
/>
|
52 |
+
</div>
|
53 |
+
</li>
|
54 |
+
|
55 |
+
<li>
|
56 |
+
<div class="input-box">
|
57 |
+
<label for="<?php echo $_code ?>_country"><?php echo $this->__('Country') ?> <span class="required">*</span></label><br />
|
58 |
+
|
59 |
+
|
60 |
+
<select id="<?php echo $_code ?>_country" name="payment[country]" name="payment[country]" title="<?php echo $this->__('Country') ?>" class="validate-ipayment-sepa-country required-entry input-select">
|
61 |
+
<option value="">--</option>
|
62 |
+
<option value="AT">Austria</option>
|
63 |
+
<option value="BE">Belgium</option>
|
64 |
+
<option value="BG">Bulgaria</option>
|
65 |
+
<option value="CH">Switzerland</option>
|
66 |
+
<option value="CY">Cyprus</option>
|
67 |
+
<option value="CZ">Czech Republic</option>
|
68 |
+
<option value="DE">Germany</option>
|
69 |
+
<option value="DK">Denmark</option>
|
70 |
+
<option value="EE">Estonia</option>
|
71 |
+
<option value="ES">Spain</option>
|
72 |
+
<option value="FI">Finland</option>
|
73 |
+
<option value="FR">France</option>
|
74 |
+
<option value="GB">United Kingdom</option>
|
75 |
+
<option value="GF">French Guiana</option>
|
76 |
+
<option value="GI">Gibraltar</option>
|
77 |
+
<option value="GP">Guadeloupe</option>
|
78 |
+
<option value="GR">Greece</option>
|
79 |
+
<option value="HR">Croatia</option>
|
80 |
+
<option value="HU">Hungary</option>
|
81 |
+
<option value="IE">Ireland</option>
|
82 |
+
<option value="IS">Iceland</option>
|
83 |
+
<option value="IT">Italy</option>
|
84 |
+
<option value="LI">Liechtenstein</option>
|
85 |
+
<option value="LT">Lithuania</option>
|
86 |
+
<option value="LU">Luxembourg</option>
|
87 |
+
<option value="LV">Latvia</option>
|
88 |
+
<option value="MC">Monaco</option>
|
89 |
+
<option value="MQ">Martinique</option>
|
90 |
+
<option value="MT">Malta</option>
|
91 |
+
<option value="NL">Netherlands</option>
|
92 |
+
<option value="NO">Norway</option>
|
93 |
+
<option value="PL">Poland</option>
|
94 |
+
<option value="PT">Portugal</option>
|
95 |
+
<option value="RE">Réunion</option>
|
96 |
+
<option value="RO">Romania</option>
|
97 |
+
<option value="SE">Sweden</option>
|
98 |
+
<option value="SI">Slovenia</option>
|
99 |
+
<option value="SK">Slovakia</option>
|
100 |
+
</select>
|
101 |
+
</div>
|
102 |
+
</li>
|
103 |
+
</ul>
|
104 |
+
|
105 |
+
<div>
|
106 |
+
<span id="ipayment-sepa-please-wait" style="display:none;" class="opc-please-wait">
|
107 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt=""/> <?php echo $this->__('Submitting payment information...') ?>
|
108 |
+
</span>
|
109 |
+
</div>
|
110 |
+
|
@@ -47,4 +47,7 @@
|
|
47 |
Â
<?php echo Mage::helper('adyen')->__('Firstname: %s', $this->htmlEscape($boleto['firstname'])) ?><br/>
|
48 |
Â
<?php echo Mage::helper('adyen')->__('Lastname: %s', $this->htmlEscape($boleto['lastname'])) ?><br/>
|
49 |
Â
<?php echo Mage::helper('adyen')->__('Boleto PDf: <a target="_blank" href="%s" title="Boleto PDF">Download</a>', $this->getInfo()->getOrder()->getAdyenBoletoPdf()) ?><br/>
|
Â
|
|
Â
|
|
Â
|
|
50 |
Â
<?php endif;?>
|
47 |
Â
<?php echo Mage::helper('adyen')->__('Firstname: %s', $this->htmlEscape($boleto['firstname'])) ?><br/>
|
48 |
Â
<?php echo Mage::helper('adyen')->__('Lastname: %s', $this->htmlEscape($boleto['lastname'])) ?><br/>
|
49 |
Â
<?php echo Mage::helper('adyen')->__('Boleto PDf: <a target="_blank" href="%s" title="Boleto PDF">Download</a>', $this->getInfo()->getOrder()->getAdyenBoletoPdf()) ?><br/>
|
50 |
+
<?php if($_info->getAdyenBoletoPaidAmount() != null && $_info->getAdyenBoletoPaidAmount() != ""): ?>
|
51 |
+
<?php echo Mage::helper('adyen')->__('Paid amount: %s', $this->htmlEscape($_info->getAdyenBoletoPaidAmount())) ?> <br/>
|
52 |
+
<?php endif; ?>
|
53 |
Â
<?php endif;?>
|
@@ -37,7 +37,7 @@ echo ($cseEnabled ? " (with Client-Side Encryption)" : "");
|
|
37 |
Â
<?php else :?>
|
38 |
Â
<?php if($this->getMethod()->getConfigDataDemoMode()): ?>
|
39 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-test.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
40 |
-
|
41 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
42 |
Â
<?php endif; ?>
|
43 |
Â
<?php endif;?>
|
@@ -50,5 +50,17 @@ echo ($cseEnabled ? " (with Client-Side Encryption)" : "");
|
|
50 |
Â
<?php echo Mage::helper('adyen')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
|
51 |
Â
<?php echo Mage::helper('adyen')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
|
52 |
Â
<?php echo Mage::helper('adyen')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?><br/>
|
Â
|
|
Â
|
|
Â
|
|
53 |
Â
<?php endif;?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
54 |
Â
<?php endif;?>
|
37 |
Â
<?php else :?>
|
38 |
Â
<?php if($this->getMethod()->getConfigDataDemoMode()): ?>
|
39 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-test.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
40 |
+
<?php else : ?>
|
41 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
42 |
Â
<?php endif; ?>
|
43 |
Â
<?php endif;?>
|
50 |
Â
<?php echo Mage::helper('adyen')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
|
51 |
Â
<?php echo Mage::helper('adyen')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
|
52 |
Â
<?php echo Mage::helper('adyen')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?><br/>
|
53 |
+
<?php else : ?>
|
54 |
+
<?php echo Mage::helper('adyen')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
|
55 |
+
<?php echo Mage::helper('adyen')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
|
56 |
Â
<?php endif;?>
|
57 |
+
|
58 |
+
<?php if($this->htmlEscape($this->getInfo()->getAdyenAvsResult()) != ""): ?>
|
59 |
+
<?php echo Mage::helper('adyen')->__('Avs result: %s', $this->htmlEscape($this->getInfo()->getAdyenAvsResult())) ?><br/>
|
60 |
+
<?php endif; ?>
|
61 |
+
|
62 |
+
<?php if($this->htmlEscape($this->getInfo()->getAdyenCvcResult()) != ""): ?>
|
63 |
+
<?php echo Mage::helper('adyen')->__('Cvc result: %s', $this->htmlEscape($this->getInfo()->getAdyenCvcResult())) ?><br/>
|
64 |
+
<?php endif; ?>
|
65 |
+
|
66 |
Â
<?php endif;?>
|
@@ -49,5 +49,8 @@
|
|
49 |
Â
?>
|
50 |
Â
<?php echo $this->__('Bank: %s', $this->htmlEscape($label)) ?><br/>
|
51 |
Â
<?php endif; ?>
|
52 |
-
<?php endif; ?>
|
Â
|
|
Â
|
|
Â
|
|
53 |
Â
<?php endif; ?>
|
49 |
Â
?>
|
50 |
Â
<?php echo $this->__('Bank: %s', $this->htmlEscape($label)) ?><br/>
|
51 |
Â
<?php endif; ?>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if($_info->getAdyenKlarnaNumber() != null && $_info->getAdyenKlarnaNumber() != ""): ?>
|
54 |
+
<?php echo Mage::helper('adyen')->__('Klarna reservation number: %s', $this->htmlEscape($_info->getAdyenKlarnaNumber())) ?> <br/>
|
55 |
+
<?php endif; ?>
|
56 |
Â
<?php endif; ?>
|
@@ -36,6 +36,11 @@
|
|
36 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
37 |
Â
<?php endif; ?>
|
38 |
Â
<?php endif;?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
39 |
Â
<?php $paymentMethod = $_info->getAdyenPaymentMethod() ?>
|
40 |
Â
<?php if (!empty($paymentMethod)): ?>
|
41 |
Â
<?php echo $this->__('Payment Method: %s', $this->htmlEscape($paymentMethod)) ?><br/>
|
36 |
Â
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
37 |
Â
<?php endif; ?>
|
38 |
Â
<?php endif;?>
|
39 |
+
|
40 |
+
<?php if($_info->getAdyenKlarnaNumber() != null && $_info->getAdyenKlarnaNumber() != ""): ?>
|
41 |
+
<?php echo Mage::helper('adyen')->__('Klarna reservation number: %s', $this->htmlEscape($_info->getAdyenKlarnaNumber())) ?> <br/>
|
42 |
+
<?php endif; ?>
|
43 |
+
|
44 |
Â
<?php $paymentMethod = $_info->getAdyenPaymentMethod() ?>
|
45 |
Â
<?php if (!empty($paymentMethod)): ?>
|
46 |
Â
<?php echo $this->__('Payment Method: %s', $this->htmlEscape($paymentMethod)) ?><br/>
|
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
16 |
+
* @package Adyen_Payment
|
17 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* @category Payment Gateway
|
22 |
+
* @package Adyen_Payment
|
23 |
+
* @author Adyen
|
24 |
+
* @property Adyen B.V
|
25 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?><br/>
|
29 |
+
<?php if ($_info = $this->getInfo()): ?>
|
30 |
+
<?php if ($_info->getAdyenPspReference() == ''): ?>
|
31 |
+
<?php echo Mage::helper('adyen')->__('Payment has not been processed yet.') ?> <br/>
|
32 |
+
<?php else :?>
|
33 |
+
<?php if($this->getMethod()->getConfigDataDemoMode()): ?>
|
34 |
+
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-test.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
35 |
+
<?php else : ?>
|
36 |
+
<?php echo Mage::helper('adyen')->__('Adyen PSP Reference: <a href="https://ca-live.adyen.com/ca/ca/payments/searchPayments.shtml?query=%s&skipList=firstResult" target="__blank">%s</a>', $this->htmlEscape($_info->getAdyenPspReference()), $this->htmlEscape($_info->getAdyenPspReference())) ?> <br/>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php endif;?>
|
39 |
+
<?php $paymentMethod = $_info->getAdyenPaymentMethod() ?>
|
40 |
+
<?php if (!empty($paymentMethod)): ?>
|
41 |
+
<?php echo $this->__('Payment Method: %s', $this->htmlEscape($paymentMethod)) ?><br/>
|
42 |
+
<?php endif; ?>
|
43 |
+
|
44 |
+
|
45 |
+
<?php $elv = unserialize($this->getInfo()->getPoNumber())?>
|
46 |
+
<?php echo Mage::helper('adyen')->__('Account holder: %s', $this->htmlEscape($elv['account_name'])) ?><br/>
|
47 |
+
<?php echo Mage::helper('adyen')->__('IBAN: %s', $this->htmlEscape($elv['iban'])) ?><br/>
|
48 |
+
<?php echo Mage::helper('adyen')->__('Country: %s', $this->htmlEscape($elv['country'])) ?><br/>
|
49 |
+
<?php endif;?>
|
@@ -0,0 +1,80 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="order_history_block">
|
28 |
+
<?php if ($this->canAddComment()):?>
|
29 |
+
<div id="history_form" class="order-history-form">
|
30 |
+
<div><?php echo Mage::helper('sales')->__('Add Order Comments') ?></div>
|
31 |
+
<span class="field-row">
|
32 |
+
<label class="normal" for="history_status"><?php echo Mage::helper('sales')->__('Status') ?></label><br/>
|
33 |
+
<select name="history[status]" class="select" id="history_status">
|
34 |
+
<?php foreach ($this->getStatuses() as $_code=>$_label): ?>
|
35 |
+
<option value="<?php echo $_code ?>"<?php if($_code==$this->getOrder()->getStatus()): ?> selected="selected"<?php endif; ?>><?php echo $_label ?></option>
|
36 |
+
<?php endforeach; ?>
|
37 |
+
</select>
|
38 |
+
</span>
|
39 |
+
<span class="field-row">
|
40 |
+
<label class="normal" for="history_comment"><?php echo Mage::helper('sales')->__('Comment') ?></label>
|
41 |
+
<textarea name="history[comment]" rows="3" cols="5" style="height:6em; width:99%;" id="history_comment"></textarea>
|
42 |
+
</span>
|
43 |
+
<div class="f-left">
|
44 |
+
<?php if ($this->canSendCommentEmail()): ?>
|
45 |
+
<input name="history[is_customer_notified]" type="checkbox" id="history_notify" value="1" /><label class="normal" for="history_notify"> <?php echo Mage::helper('sales')->__('Notify Customer by Email') ?></label><br />
|
46 |
+
<?php endif; ?>
|
47 |
+
<input name="history[is_visible_on_front]" type="checkbox" id="history_visible" value="1" /><label class="normal" for="history_visible"> <?php echo Mage::helper('sales')->__('Visible on Frontend') ?></label>
|
48 |
+
</div>
|
49 |
+
<div class="f-right">
|
50 |
+
<?php echo $this->getChildHtml('submit_button') ?>
|
51 |
+
</div>
|
52 |
+
<div class="clear"></div>
|
53 |
+
</div>
|
54 |
+
<div class="divider"></div>
|
55 |
+
<?php endif;?>
|
56 |
+
<ul class="note-list">
|
57 |
+
<?php foreach ($this->getOrder()->getStatusHistoryCollection(true) as $_item): ?>
|
58 |
+
<li>
|
59 |
+
<strong><?php echo $this->helper('core')->formatDate($_item->getCreatedAtDate(), 'medium') ?></strong>
|
60 |
+
<?php echo $this->helper('core')->formatTime($_item->getCreatedAtDate(), 'medium') ?><span class="separator">|</span><strong><?php echo $_item->getStatusLabel() ?></strong><br/><small><?php echo $this->helper('sales')->__('Customer') ?>
|
61 |
+
<strong class="subdue">
|
62 |
+
<?php if ($this->isCustomerNotificationNotApplicable($_item)): ?>
|
63 |
+
<?php echo $this->helper('sales')->__('Notification Not Applicable') ?>
|
64 |
+
<?php elseif ($_item->getIsCustomerNotified()): ?>
|
65 |
+
<?php echo $this->helper('sales')->__('Notified') ?>
|
66 |
+
<img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" />
|
67 |
+
<?php else: ?>
|
68 |
+
<?php echo $this->helper('sales')->__('Not Notified') ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
</strong></small>
|
71 |
+
<?php if ($_item->getComment()): ?>
|
72 |
+
<br/><?php echo $_item->getComment()) ?>
|
73 |
+
<?php endif; ?>
|
74 |
+
</li>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</ul>
|
77 |
+
<script type="text/javascript">
|
78 |
+
if($('order_status'))$('order_status').update('<?php echo $this->getOrder()->getStatusLabel() ?>');
|
79 |
+
</script>
|
80 |
+
</div>
|
@@ -27,12 +27,34 @@
|
|
27 |
Â
*/
|
28 |
Â
-->
|
29 |
Â
<layout version="0.1.0">
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
30 |
Â
<checkout_onepage_index>
|
31 |
Â
<reference name="head">
|
32 |
Â
<action method="addJs"><script>adyen/payment/elv.js</script></action>
|
33 |
Â
<action method="addCss"><stylesheet>css/adyenstyle.css</stylesheet></action>
|
34 |
Â
</reference>
|
35 |
Â
</checkout_onepage_index>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
36 |
Â
<checkout_multishipping_billing>
|
37 |
Â
<reference name="head">
|
38 |
Â
<action method="addJs"><script>adyen/payment/elv.js</script></action>
|
27 |
Â
*/
|
28 |
Â
-->
|
29 |
Â
<layout version="0.1.0">
|
30 |
+
|
31 |
+
<adyen_updatecart_index>
|
32 |
+
<update handle="checkout_cart_index" />
|
33 |
+
</adyen_updatecart_index>
|
34 |
+
|
35 |
+
<checkout_cart_index>
|
36 |
+
<reference name="top.container">
|
37 |
+
<block type="adyen/scanProduct" name="adyen.scanProduct" template="adyen/scanProduct.phtml"/>
|
38 |
+
</reference>
|
39 |
+
<reference name="checkout.cart.methods">
|
40 |
+
<block type="adyen/posExpressCheckout" before="-" name="adyen.pos.express.checkout" template="adyen/posExpressCheckout.phtml"/>
|
41 |
+
</reference>
|
42 |
+
</checkout_cart_index>
|
43 |
+
|
44 |
Â
<checkout_onepage_index>
|
45 |
Â
<reference name="head">
|
46 |
Â
<action method="addJs"><script>adyen/payment/elv.js</script></action>
|
47 |
Â
<action method="addCss"><stylesheet>css/adyenstyle.css</stylesheet></action>
|
48 |
Â
</reference>
|
49 |
Â
</checkout_onepage_index>
|
50 |
+
|
51 |
+
<onestepcheckout_index_index>
|
52 |
+
<reference name="head">
|
53 |
+
<action method="addJs"><script>adyen/payment/elv.js</script></action>
|
54 |
+
<action method="addCss"><stylesheet>css/adyenstyle.css</stylesheet></action>
|
55 |
+
</reference>
|
56 |
+
</onestepcheckout_index_index>
|
57 |
+
|
58 |
Â
<checkout_multishipping_billing>
|
59 |
Â
<reference name="head">
|
60 |
Â
<action method="addJs"><script>adyen/payment/elv.js</script></action>
|
@@ -59,7 +59,7 @@ $_code=$this->getMethodCode();
|
|
59 |
Â
type="text" id="<?php echo $_code ?>?>_firstname" name="payment[firstname]"
|
60 |
Â
title="<?php echo $this->__('Firstname') ?>"
|
61 |
Â
class="validate-ipayment-boleto-firstname required-entry input-text"
|
62 |
-
value="" />
|
63 |
Â
</div>
|
64 |
Â
</li>
|
65 |
Â
<li>
|
@@ -69,7 +69,7 @@ $_code=$this->getMethodCode();
|
|
69 |
Â
type="text" id="<?php echo $_code ?>_lastname" name="payment[lastname]"
|
70 |
Â
title="<?php echo $this->__('Lastname') ?>"
|
71 |
Â
class="validate-ipayment-boleto-lastname required-entry input-text"
|
72 |
-
value="" />
|
73 |
Â
</div>
|
74 |
Â
</li>
|
75 |
Â
</ul>
|
59 |
Â
type="text" id="<?php echo $_code ?>?>_firstname" name="payment[firstname]"
|
60 |
Â
title="<?php echo $this->__('Firstname') ?>"
|
61 |
Â
class="validate-ipayment-boleto-firstname required-entry input-text"
|
62 |
+
value="<?php echo $this->getFirstname() ?>" />
|
63 |
Â
</div>
|
64 |
Â
</li>
|
65 |
Â
<li>
|
69 |
Â
type="text" id="<?php echo $_code ?>_lastname" name="payment[lastname]"
|
70 |
Â
title="<?php echo $this->__('Lastname') ?>"
|
71 |
Â
class="validate-ipayment-boleto-lastname required-entry input-text"
|
72 |
+
value="<?php echo $this->getLastname() ?>" />
|
73 |
Â
</div>
|
74 |
Â
</li>
|
75 |
Â
</ul>
|
@@ -99,6 +99,48 @@
|
|
99 |
Â
</li>
|
100 |
Â
<?php endif;?>
|
101 |
Â
</ul>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
102 |
Â
<?php if ($this->isCseEnabled()): ?>
|
103 |
Â
<input type="hidden" id="<?php echo $_code ?>_encrypted_form_expiry_generationtime" value="<?php echo date("c"); ?>" data-encrypted-name="generationtime" />
|
104 |
Â
<input type="hidden" id="adyen-cse-form" />
|
@@ -142,6 +184,13 @@
|
|
142 |
Â
originalSaveMethod();
|
143 |
Â
});
|
144 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
145 |
Â
}
|
146 |
Â
|
147 |
Â
if (document.readyState === "complete") {
|
99 |
Â
</li>
|
100 |
Â
<?php endif;?>
|
101 |
Â
</ul>
|
102 |
+
|
103 |
+
<script type="text/javascript">
|
104 |
+
|
105 |
+
var ChangeCCType= function(event) {
|
106 |
+
|
107 |
+
// clear the select box
|
108 |
+
document.getElementById('<?php echo $_code ?>_installments').options.length = 0;
|
109 |
+
|
110 |
+
// get the installments for this cardtype
|
111 |
+
var ccType = $('<?php echo $_code?>_cc_type').value;
|
112 |
+
|
113 |
+
var url = '<?php echo $this->getUrl('adyen/GetInstallments'); ?>';
|
114 |
+
|
115 |
+
new Ajax.Request(url, {
|
116 |
+
parameters: {ccType: ccType, isAjax: 1, method: 'POST'},
|
117 |
+
onSuccess: function(transport) {
|
118 |
+
|
119 |
+
if(transport.status == 200) {
|
120 |
+
|
121 |
+
var response = transport.responseText.evalJSON();
|
122 |
+
|
123 |
+
for (var key in response) {
|
124 |
+
|
125 |
+
// change the installments
|
126 |
+
var opt = document.createElement('option');
|
127 |
+
opt.text = response[key]
|
128 |
+
opt.value = key;
|
129 |
+
$('<?php echo $_code ?>_installments').options.add(opt);
|
130 |
+
|
131 |
+
}
|
132 |
+
}
|
133 |
+
},
|
134 |
+
onFailure: function(){
|
135 |
+
alert('<?php echo $this->jsQuoteEscape($this->__('Server Error. Please try again.')) ?>');
|
136 |
+
}
|
137 |
+
});
|
138 |
+
}
|
139 |
+
// event on change Credit Card Type
|
140 |
+
Event.observe($('<?php echo $_code?>_cc_type'), 'change', ChangeCCType);
|
141 |
+
|
142 |
+
</script>
|
143 |
+
|
144 |
Â
<?php if ($this->isCseEnabled()): ?>
|
145 |
Â
<input type="hidden" id="<?php echo $_code ?>_encrypted_form_expiry_generationtime" value="<?php echo date("c"); ?>" data-encrypted-name="generationtime" />
|
146 |
Â
<input type="hidden" id="adyen-cse-form" />
|
184 |
Â
originalSaveMethod();
|
185 |
Â
});
|
186 |
Â
}
|
187 |
+
|
188 |
+
// Fix for the onestepcheckout plugins
|
189 |
+
if($('onestepcheckout-place-order')) {
|
190 |
+
$('onestepcheckout-place-order').observe('click', function(e) {
|
191 |
+
cse.call(this);
|
192 |
+
});
|
193 |
+
}
|
194 |
Â
}
|
195 |
Â
|
196 |
Â
if (document.readyState === "complete") {
|
@@ -27,86 +27,117 @@
|
|
27 |
Â
?>
|
28 |
Â
<?php $_code = $this->getMethodCode() ?>
|
29 |
Â
|
30 |
-
<?php $disabled = $this->
|
31 |
-
<?php $enabledTypes = $this->getHppAvailableTypes(); ?>
|
32 |
-
<?php //$idealList = $this->getIdealAvailableTypes();?>
|
33 |
Â
|
Â
|
|
Â
|
|
Â
|
|
34 |
Â
|
Â
|
|
Â
|
|
35 |
Â
|
36 |
-
|
37 |
-
<ul id="
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
<
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<?php
|
67 |
-
foreach ($_type['issuers'] as $_issueId => $_IssueLabel): ?>
|
68 |
Â
<?php
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
$('
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
110 |
Â
<?php endif; ?>
|
111 |
Â
</ul>
|
112 |
Â
</fieldset>
|
27 |
Â
?>
|
28 |
Â
<?php $_code = $this->getMethodCode() ?>
|
29 |
Â
|
30 |
+
<?php $disabled = $this->getHppOptionsDisabled();?>
|
Â
|
|
Â
|
|
31 |
Â
|
32 |
+
<fieldset class="">
|
33 |
+
<?php $hidePaymentMethod = ($disabled) ? ' style="display: none;"' : '';?>
|
34 |
+
<?php
|
35 |
Â
|
36 |
+
// use a different name if hpp options is in the checkout, then this form must always be visable so change the id from basic to let this ignore in the switchMethod javascript call of Magento
|
37 |
+
$paymentmethodId = ($disabled) ? "payment_form_" : "hpp_payment_form_";
|
38 |
Â
|
39 |
+
?>
|
40 |
+
<ul id="<?php echo $paymentmethodId . $_code ?>"<?php echo $hidePaymentMethod; ?>>
|
41 |
+
<?php
|
42 |
+
if(empty($disabled)):
|
43 |
+
$enabledTypes = $this->getHppAvailableTypes();
|
44 |
+
if(!empty($enabledTypes)):
|
45 |
+
?>
|
46 |
+
<li>
|
47 |
+
<div class="input-box required-entry">
|
48 |
+
<?php foreach ($enabledTypes as $_typeCode=>$_type): ?>
|
49 |
+
<?php $_typeName = $_type['name']; ?>
|
50 |
+
<?php $filename = Mage::getBaseDir().DS.'skin'.DS.'frontend'.DS.'base'.DS.'default'.DS.'images'.DS.'adyen'.DS."$_typeCode.png" ?>
|
51 |
+
<table>
|
52 |
+
<tr>
|
53 |
+
<td width="20px">
|
54 |
+
<input type="radio" id="hpp_type_<?php echo $_typeCode ?>" name="payment[hpp_type]" value="<?php echo $_typeCode ?>"/>
|
55 |
+
</td>
|
56 |
+
<?php if (file_exists($filename)): ?>
|
57 |
+
<td width="80px"><img src="<?php echo $this->getSkinUrl('images'.DS.'adyen'.DS."$_typeCode.png") ?>" alt="<?php echo $_typeName ?>" /></td>
|
58 |
+
<?php endif ?>
|
59 |
+
|
60 |
+
<?php if ($_typeName == "pm.c_cash.buttonName"):
|
61 |
+
$_typeName = "Cash";
|
62 |
+
endif; ?>
|
63 |
+
<td><?php echo $this->__($_typeName) ?></td>
|
64 |
+
|
65 |
+
<?php if ($_typeCode == 'ideal' && !empty($_type['issuers'])): ?>
|
66 |
+
<td class="payment_form_ideal">
|
67 |
+
<fieldset class="form-list">
|
68 |
+
<ul id="payment_form_ideal" style="display:none">
|
Â
|
|
Â
|
|
69 |
Â
<?php
|
70 |
+
foreach ($_type['issuers'] as $_issueId => $_IssueLabel): ?>
|
71 |
+
<?php
|
72 |
+
$_bankFile = strtoupper(str_replace(" ", '', $_IssueLabel));
|
73 |
+
$_filename = Mage::getBaseDir().DS.'skin'.DS.'frontend'.DS.'base'.DS.'default'.DS.'images'.DS.'adyen'.DS."$_bankFile.png";
|
74 |
+
if (empty($_issueId) || empty($_IssueLabel)) continue;
|
75 |
+
?>
|
76 |
+
<table class="banks">
|
77 |
+
<tr>
|
78 |
+
<td width="20px">
|
79 |
+
<input type="radio" id="hpp_ideal_type_<?php echo $_issueId ?>" name="payment[hpp_ideal_type]" value="<?php echo $_issueId .DS. $_IssueLabel ?>"/>
|
80 |
+
</td>
|
81 |
+
<?php if (file_exists($_filename)): ?>
|
82 |
+
<td width="80px"><img src="<?php echo $this->getSkinUrl('images'.DS.'adyen'.DS."$_bankFile.png") ?>" alt="<?php echo $_IssueLabel ?>" label="<?php echo $_IssueLabel ?>" /></td>
|
83 |
+
<?php else: ?>
|
84 |
+
<td width="80px" class="label_hpp_ideal_type"><label width="80px" for="ideal_type_label_<?php echo $_issueId ?>"><?php echo $_IssueLabel ?></label></td>
|
85 |
+
<?php endif; ?>
|
86 |
+
</tr>
|
87 |
+
</table>
|
88 |
+
<?php endforeach ?>
|
89 |
+
</ul>
|
90 |
+
</fieldset>
|
91 |
+
</td>
|
92 |
+
<?php endif; ?>
|
93 |
+
</tr>
|
94 |
+
</table>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
|
98 |
+
var IdealChecked= function() {
|
99 |
+
|
100 |
+
// uncheck hpp_oneclick if exists
|
101 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
102 |
+
{
|
103 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
104 |
+
var elements = form.getElementsByTagName('input');
|
105 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
106 |
+
|
107 |
+
// hide open cvc field
|
108 |
+
$$('.cvc_block').each(
|
109 |
+
function (e) {
|
110 |
+
e.setStyle({display:'none'});
|
111 |
+
}
|
112 |
+
);
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
var method = $('hpp_type_<?php echo $_typeCode?>');
|
117 |
+
|
118 |
+
// set the adyen_hpp payment method
|
119 |
+
$('p_method_adyen_hpp').checked = true;
|
120 |
+
|
121 |
+
payment.switchMethod("adyen_hpp");
|
122 |
+
|
123 |
+
|
124 |
+
if (method.value == 'ideal') {
|
125 |
+
$('payment_form_ideal').show();
|
126 |
+
} else {
|
127 |
+
$('payment_form_ideal').hide();
|
128 |
+
}
|
129 |
+
};
|
130 |
+
Event.observe($('hpp_type_<?php echo $_typeCode?>'), 'change', IdealChecked);
|
131 |
+
//]]>
|
132 |
+
</script>
|
133 |
+
<?php endforeach ?>
|
134 |
+
</div>
|
135 |
+
</li>
|
136 |
+
<?php endif; ?>
|
137 |
+
<?php else: ?>
|
138 |
+
<li>
|
139 |
+
<?php echo $this->__('You will be redirected to Adyen website when you place an order.') ?>
|
140 |
+
</li>
|
141 |
Â
<?php endif; ?>
|
142 |
Â
</ul>
|
143 |
Â
</fieldset>
|
@@ -0,0 +1,340 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
16 |
+
* @package Adyen_Payment
|
17 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* @category Payment Gateway
|
22 |
+
* @package Adyen_Payment
|
23 |
+
* @author Adyen
|
24 |
+
* @property Adyen B.V
|
25 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<?php $_code=$this->getMethodCode() ?>
|
29 |
+
|
30 |
+
|
31 |
+
<div id="oneclick-cse" class="">
|
32 |
+
|
33 |
+
<?php $_listRecurringDetails = $this->getlistRecurringDetails(); ?>
|
34 |
+
|
35 |
+
<?php if(!empty($_listRecurringDetails)): ?>
|
36 |
+
|
37 |
+
<h3><?php echo $this->__('Pay using previously stored details') ?></h3>
|
38 |
+
<ul id="oneclick_payment_form_<?php echo $_code ?>" class="recurring-creditcards">
|
39 |
+
<?php
|
40 |
+
$count = 0;
|
41 |
+
foreach($_listRecurringDetails as $key => $value):?>
|
42 |
+
<?php if(isset($value["recurringDetailReference"]) && isset($value["variant"]) && isset($value["card_number"]) && isset($value["card_expiryMonth"]) && isset($value["card_expiryYear"])): ?>
|
43 |
+
<li>
|
44 |
+
<input id="recurring_type_<?php echo $key; ?>" class="recurring_type" type="radio" name="payment[recurring]" value="<?php echo $key; ?>" />
|
45 |
+
<input type="hidden" name="payment[recurringDetailReference_<?php echo $key; ?>]" value="<?php echo $value["recurringDetailReference"] ?>" />
|
46 |
+
|
47 |
+
<input type="hidden" name="payment[oneclick_owner_<?php echo $key; ?>]" value="<?php echo $value["card_holderName"] ?>" />
|
48 |
+
<input type="hidden" name="payment[oneclick_type_<?php echo $key; ?>]" value="<?php echo $value["variant"] ?>" />
|
49 |
+
<input type="hidden" name="payment[oneclick_last_4_<?php echo $key; ?>]" value="<?php echo $value["card_number"] ?>" />
|
50 |
+
|
51 |
+
<input type="hidden" id="card_expiry_month_<?php echo $key; ?>" name="card_expiry_month_<?php echo $key; ?>" value="<?php echo $value["card_expiryMonth"] ?>" />
|
52 |
+
<input type="hidden" id="card_expiry_year_<?php echo $key; ?>" name="card_expiry_year_<?php echo $key; ?>" value="<?php echo $value["card_expiryYear"] ?>" />
|
53 |
+
|
54 |
+
<div class="creditcard-block">
|
55 |
+
<?php
|
56 |
+
$_bankFile = $value["variant"];
|
57 |
+
$_filename = Mage::getBaseDir().DS.'skin'.DS.'frontend'.DS.'base'.DS.'default'.DS.'images'.DS.'adyen'.DS. $_bankFile ."_small.png";
|
58 |
+
|
59 |
+
?>
|
60 |
+
<?php if (file_exists($_filename)){ ?>
|
61 |
+
<img src="<?php echo $this->getSkinUrl('images'.DS.'adyen'.DS. $_bankFile . "_small.png") ?>" alt="<?php echo $_bankFile ?>" label="<?php echo $_bankFile ?>" />
|
62 |
+
<?php } ?>
|
63 |
+
|
64 |
+
|
65 |
+
<div class="columns three a">
|
66 |
+
<label><?php echo $this->__('Credit Card Number') ?></label>
|
67 |
+
<span>****</span> <?php echo $value["card_number"]; ?>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="columns three b">
|
71 |
+
<label><?php echo $this->__('Expiration Date') ?><a href="#" id="update-expiration-date-<?php echo $key; ?>" class="update-expiration-date" style="display:none;"><?php echo $this->__('(update)') ?></a></label>
|
72 |
+
|
73 |
+
<div id="static-card-expiry-<?php echo $key; ?>" class="static-card-expiry">
|
74 |
+
<?php echo $value["card_expiryMonth"] . " /" . $value["card_expiryYear"]; ?>
|
75 |
+
</div>
|
76 |
+
<div id="changable-card-expiry-<?php echo $key; ?>" class="changable-card-expiry" style="display:none;">
|
77 |
+
<select id="<?php echo $_code ?>_expiration_<?php echo $key; ?>" <?php echo (!$this->isCseEnabled() ? "name=\"payment[oneclick_exp_month_".$key."]\"" : ""); ?> class="month validate-oneclick-exp required-entry">
|
78 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
79 |
+
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$value["card_expiryMonth"]): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
80 |
+
<?php endforeach ?>
|
81 |
+
</select>
|
82 |
+
|
83 |
+
<select id="<?php echo $_code ?>_expiration_yr_<?php echo $key; ?>" <?php echo (!$this->isCseEnabled() ? "name=\"payment[oneclick_exp_year_".$key."]\"" : ""); ?> class="year required-entry">
|
84 |
+
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
85 |
+
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$value["card_expiryYear"]): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
86 |
+
<?php endforeach ?>
|
87 |
+
</select>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
|
92 |
+
<?php if($this->isNotRecurring()): ?>
|
93 |
+
<div class="columns three c">
|
94 |
+
<label><?php echo $this->__('Card Verification Number') ?></label>
|
95 |
+
<?php if($this->hasVerification()): ?>
|
96 |
+
<div style="display:none;" class="cvc_block" id="cvc_block_<?php echo $key;?>">
|
97 |
+
<input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry" id="<?php echo $_code ?>_oneclick_cid_<?php echo $key; ?>" <?php echo (!$this->isCseEnabled() ? "name=\"payment[oneclick_cid_".$key."]\"" : ""); ?> value="" />
|
98 |
+
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
99 |
+
</div>
|
100 |
+
<?php endif; ?>
|
101 |
+
</div>
|
102 |
+
<?php endif; ?>
|
103 |
+
|
104 |
+
<div style="clear:both;"></div>
|
105 |
+
|
106 |
+
<div class="creditcard-holder-name"><?php echo $value["card_holderName"]; ?></div>
|
107 |
+
|
108 |
+
<div style="clear:both;"></div>
|
109 |
+
</div>
|
110 |
+
<?php ++$count; ?>
|
111 |
+
</li>
|
112 |
+
<?php endif; ?>
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</ul>
|
115 |
+
|
116 |
+
<h3 class="other-payment"><?php echo $this->__('Or pay using one of the methods below') ?></h3>
|
117 |
+
|
118 |
+
<script type="text/javascript">
|
119 |
+
|
120 |
+
// update-expiration-date action
|
121 |
+
$$('.update-expiration-date').each(function(element) {
|
122 |
+
element.observe('click', updateExpirationDate);
|
123 |
+
});
|
124 |
+
|
125 |
+
// show the expiration month and year
|
126 |
+
function updateExpirationDate(event) {
|
127 |
+
|
128 |
+
// hide the link
|
129 |
+
this.hide();
|
130 |
+
|
131 |
+
// show expiration month and year
|
132 |
+
var id = this.id.replace("update-expiration-date-", "");
|
133 |
+
var changableId = "changable-card-expiry-" + id;
|
134 |
+
var staticId = "static-card-expiry-" + id;
|
135 |
+
|
136 |
+
// show changeble card expiry
|
137 |
+
$(staticId).hide();
|
138 |
+
$(changableId).show();
|
139 |
+
|
140 |
+
event.preventDefault();
|
141 |
+
}
|
142 |
+
|
143 |
+
// change selection of recurring card
|
144 |
+
$$(".recurring_type").invoke('observe', 'change', function() {
|
145 |
+
|
146 |
+
// set the adyen_oneclick payment method
|
147 |
+
$('p_method_adyen_oneclick').checked = true;
|
148 |
+
payment.switchMethod("adyen_oneclick");
|
149 |
+
|
150 |
+
// uncheck hpp_method if exists
|
151 |
+
if($('hpp_payment_form_adyen_hpp'))
|
152 |
+
{
|
153 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
154 |
+
var elements = form.getElementsByTagName('input');
|
155 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
156 |
+
}
|
157 |
+
|
158 |
+
// remove all the data-encrypted-name="cvc" for CSE
|
159 |
+
removeAllAttributeCvc();
|
160 |
+
|
161 |
+
// remove all the data-encrypted-name="expiryMonth" and data-encrypted-name="expiryYear" for CSE
|
162 |
+
removeAllAttributeExpiryMonthAndYear();
|
163 |
+
|
164 |
+
// hide all the open blocks
|
165 |
+
hideCvcBlocks();
|
166 |
+
|
167 |
+
// open the selected block
|
168 |
+
var key = this.value;
|
169 |
+
var id = "cvc_block_" + key;
|
170 |
+
|
171 |
+
// hide changeble card and show static expiration date
|
172 |
+
hideChangableCardExpiry()
|
173 |
+
|
174 |
+
// show static version of expiry month and year when switching creditcard
|
175 |
+
showStaticCardExpiry();
|
176 |
+
|
177 |
+
// hide the update expiration date link for recurring cards
|
178 |
+
hideExpirationDate();
|
179 |
+
|
180 |
+
// show current recurring block update link
|
181 |
+
var updateLink = "update-expiration-date-"+key;
|
182 |
+
$(updateLink).setStyle({
|
183 |
+
display: 'inline'
|
184 |
+
});
|
185 |
+
|
186 |
+
// set data-encrypted-name="cvc" to this element
|
187 |
+
var cvv = "adyen_oneclick_oneclick_cid_"+key;
|
188 |
+
var expiryMonth = "adyen_oneclick_expiration_" + key;
|
189 |
+
var expiryYear = "adyen_oneclick_expiration_yr_"+key;
|
190 |
+
|
191 |
+
// reset the custom input datemonth and dateyear by the static version (could be changed by customer)
|
192 |
+
var card_expiry_month = 'card_expiry_month_'+key;
|
193 |
+
var card_expiry_year = 'card_expiry_year_'+key;
|
194 |
+
$(expiryMonth).value = $(card_expiry_month).value;
|
195 |
+
$(expiryYear).value = $(card_expiry_year).value;
|
196 |
+
|
197 |
+
// only set data-encrypted-name="expiryMonth" and data-encrypted-name="expiryYear" for the selected card
|
198 |
+
$(expiryMonth).setAttribute('data-encrypted-name-oneclick', "expiryMonth");
|
199 |
+
$(expiryYear).setAttribute('data-encrypted-name-oneclick', "expiryYear");
|
200 |
+
$(cvv).setAttribute('data-encrypted-name-oneclick', "cvc");
|
201 |
+
|
202 |
+
// show the cvc input field
|
203 |
+
$(id).show();
|
204 |
+
});
|
205 |
+
|
206 |
+
// remove all cvc data-encrypted-name attributes
|
207 |
+
// and uncheck HPP payment method selection
|
208 |
+
function removeAllAttributeCvc() {
|
209 |
+
|
210 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
211 |
+
if(form)
|
212 |
+
{
|
213 |
+
var elements = form.getElementsByTagName('input');
|
214 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
215 |
+
}
|
216 |
+
|
217 |
+
$$('.cvv').each(
|
218 |
+
function (e) {
|
219 |
+
e.removeAttribute("data-encrypted-name-oneclick");
|
220 |
+
}
|
221 |
+
);
|
222 |
+
}
|
223 |
+
|
224 |
+
// remove all the data-encrypted-name="expiryMonth" and data-encrypted-name="expiryYear" for CSE
|
225 |
+
function removeAllAttributeExpiryMonthAndYear() {
|
226 |
+
$$('.month').each(
|
227 |
+
function (e) {
|
228 |
+
e.removeAttribute("data-encrypted-name-oneclick");
|
229 |
+
}
|
230 |
+
);
|
231 |
+
|
232 |
+
$$('.year').each(
|
233 |
+
function (e) {
|
234 |
+
e.removeAttribute("data-encrypted-name-oneclick");
|
235 |
+
}
|
236 |
+
);
|
237 |
+
}
|
238 |
+
|
239 |
+
// hide all the cvc blocks for the recurring cards
|
240 |
+
function hideCvcBlocks() {
|
241 |
+
$$('.cvc_block').each(
|
242 |
+
function (e) {
|
243 |
+
e.setStyle({display:'none'});
|
244 |
+
}
|
245 |
+
);
|
246 |
+
}
|
247 |
+
|
248 |
+
function hideChangableCardExpiry() {
|
249 |
+
$$('.changable-card-expiry').each(
|
250 |
+
function (e) {
|
251 |
+
e.setStyle({display:'none'});
|
252 |
+
}
|
253 |
+
);
|
254 |
+
}
|
255 |
+
|
256 |
+
// show the non changable card expiry month and ydaear
|
257 |
+
function showStaticCardExpiry() {
|
258 |
+
$$('.static-card-expiry').each(
|
259 |
+
function (e) {
|
260 |
+
e.setStyle({display:'block'});
|
261 |
+
}
|
262 |
+
);
|
263 |
+
}
|
264 |
+
|
265 |
+
// hide the update expiration date link for recurring cards
|
266 |
+
function hideExpirationDate() {
|
267 |
+
$$('.update-expiration-date').each(
|
268 |
+
function (e) {
|
269 |
+
e.hide();
|
270 |
+
}
|
271 |
+
);
|
272 |
+
}
|
273 |
+
</script>
|
274 |
+
<?php endif; ?>
|
275 |
+
|
276 |
+
<?php if ($this->isCseEnabled()): ?>
|
277 |
+
<input type="hidden" id="<?php echo $_code ?>_encrypted_form_expiry_generationtime" value="<?php echo date("c"); ?>" data-encrypted-name-oneclick="generationtime" />
|
278 |
+
<input type="hidden" id="adyen-cse-form" />
|
279 |
+
<script type="text/javascript">
|
280 |
+
//<![CDATA[
|
281 |
+
var cse_form = document.getElementById('adyen-cse-form').form;
|
282 |
+
var cse_key = <?php echo json_encode($this->getCsePublicKey()); ?>;
|
283 |
+
var cse_options_oneclick = {
|
284 |
+
name: 'payment[encrypted_data_oneclick]',
|
285 |
+
force: true,
|
286 |
+
dataEncryptedName: "data-encrypted-name-oneclick"
|
287 |
+
};
|
288 |
+
var cseOneClick = function() {
|
289 |
+
if (payment.currentMethod && payment.currentMethod == '<?php echo $_code ?>') {
|
290 |
+
try {
|
291 |
+
adyen.encrypt.createEncryptedForm(cse_form, cse_key, cse_options_oneclick);
|
292 |
+
} catch (e) {
|
293 |
+
var encryptionFailed = true;
|
294 |
+
}
|
295 |
+
var encryptedForm = document.getElementById(cse_options_oneclick.name);
|
296 |
+
if (encryptionFailed || !encryptedForm || encryptedForm.value.length == 0) {
|
297 |
+
alert("Warning: Adyen Client Side Encryption cannot succeed.");
|
298 |
+
}
|
299 |
+
}
|
300 |
+
}
|
301 |
+
var cse_oneclick_initialize = function() {
|
302 |
+
if (typeof adyen === 'undefined') {
|
303 |
+
js = document.createElement("script");
|
304 |
+
js.type = "text/javascript";
|
305 |
+
js.src = "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>adyen/payment/adyen.encrypt.js";
|
306 |
+
document.body.appendChild(js);
|
307 |
+
}
|
308 |
+
if (typeof payment.save !== 'undefined') {
|
309 |
+
payment.save = payment.save.wrap(function(originalSaveMethod) {
|
310 |
+
cseOneClick.call(this);
|
311 |
+
originalSaveMethod();
|
312 |
+
});
|
313 |
+
}
|
314 |
+
if (typeof checkout.save !== 'undefined') {
|
315 |
+
checkout.save = checkout.save.wrap(function(originalSaveMethod) {
|
316 |
+
cseOneClick.call(this);
|
317 |
+
originalSaveMethod();
|
318 |
+
});
|
319 |
+
}
|
320 |
+
|
321 |
+
// Fix for the onestepcheckout plugins
|
322 |
+
if($('onestepcheckout-place-order')) {
|
323 |
+
$('onestepcheckout-place-order').observe('click', function(e) {
|
324 |
+
cseOneClick.call(this);
|
325 |
+
});
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
if (document.readyState === "complete") {
|
330 |
+
cse_oneclick_initialize();
|
331 |
+
}
|
332 |
+
else {
|
333 |
+
Event.observe(window, 'load', cse_oneclick_initialize);
|
334 |
+
}
|
335 |
+
//]]>
|
336 |
+
</script>
|
337 |
+
<?php endif;?>
|
338 |
+
|
339 |
+
|
340 |
+
</div>
|
@@ -27,16 +27,66 @@
|
|
27 |
Â
?>
|
28 |
Â
<?php //TODO add a form to add data here, currently only on Adyen. ?>
|
29 |
Â
<?php $_code = $this->getMethodCode(); ?>
|
30 |
-
<fieldset class="form-list">
|
31 |
-
<ul
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
32 |
Â
<li>
|
33 |
-
<?php echo $this->__('You will be redirected to Adyen website when you place an order.') ?>
|
34 |
Â
</li>
|
35 |
Â
</ul>
|
36 |
Â
</fieldset>
|
37 |
-
<div>
|
38 |
-
<span id="ipayment-elv-please-wait" style="display:none;" class="opc-please-wait">
|
39 |
-
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt=""/> <?php echo $this->__('Submitting payment information...') ?>
|
40 |
-
</span>
|
41 |
-
</div>
|
42 |
-
|
27 |
Â
?>
|
28 |
Â
<?php //TODO add a form to add data here, currently only on Adyen. ?>
|
29 |
Â
<?php $_code = $this->getMethodCode(); ?>
|
30 |
+
<fieldset class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
|
31 |
+
<ul>
|
32 |
+
|
33 |
+
<?php if($this->genderShow()):?>
|
34 |
+
<li><label for="gender" class="required"><em>*</em><?php echo $this->__('Gender') ?></label>
|
35 |
+
<div class="input-box">
|
36 |
+
<select id="gender" name="payment[gender]" title="<?php echo $this->__('Gender') ?>" class="validate-select">
|
37 |
+
<?php $options = Mage::getResourceSingleton('customer/customer')->getAttribute('gender')->getSource()->getAllOptions();?>
|
38 |
+
<?php $value = $this->getGender();?>
|
39 |
+
<?php foreach ($options as $option):?>
|
40 |
+
<option value="<?php echo $option['value'] ?>"<?php if ($option['value'] == $value) echo ' selected="selected"' ?>><?php echo $option['label'] ?></option>
|
41 |
+
<?php endforeach;?>
|
42 |
+
</select>
|
43 |
+
</div>
|
44 |
+
</li>
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
<?php if($this->dobShow()):?>
|
48 |
+
<li>
|
49 |
+
<label for="month" class="required"><em>*</em><?php echo $this->__('Date of Birth') ?></label>
|
50 |
+
<div class="input-box customer-dob">
|
51 |
+
<?php
|
52 |
+
$this->setDateInput('d',
|
53 |
+
'<div class="dob-day">
|
54 |
+
<input type="text" id="day" name="payment[day]" value="' . $this->getDay() . '" title="' . $this->__('Day') . '" class="input-text validate-custom" />
|
55 |
+
<label for="' . $this->getFieldId('day') . '">' . $this->__('DD') . '</label>
|
56 |
+
</div>'
|
57 |
+
);
|
58 |
+
|
59 |
+
$this->setDateInput('m',
|
60 |
+
'<div class="dob-month">
|
61 |
+
<input type="text" id="month" name="payment[month]" value="' . $this->getMonth() . '" title="' . $this->__('Month') . '" class="input-text validate-custom" ' . $this->getFieldParams() . ' />
|
62 |
+
<label for="' . $this->getFieldId('month') . '">' . $this->__('MM') . '</label>
|
63 |
+
</div>'
|
64 |
+
);
|
65 |
+
|
66 |
+
$this->setDateInput('y',
|
67 |
+
'<div class="dob-year">
|
68 |
+
<input type="text" id="year" name="payment[year]" value="' . $this->getYear() . '" title="' . $this->__('Year') . '" class="input-text validate-custom" ' . $this->getFieldParams() . ' />
|
69 |
+
<label for="' . $this->getFieldId('year') . '">' . $this->__('YYYY') . '</label>
|
70 |
+
</div>'
|
71 |
+
);
|
72 |
+
?>
|
73 |
+
<?php echo $this->getSortedDateInputs() ?>
|
74 |
+
<div class="dob-full" style="display:none;">
|
75 |
+
<input type="hidden" id="dob" name="payment[dob]" />
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<div class="validation-advice" style="display:none;"></div>
|
79 |
+
</div>
|
80 |
+
<script type="text/javascript">
|
81 |
+
//<![CDATA[
|
82 |
+
var customer_dob = new Varien.DOB('.customer-dob', true, '<?php echo $this->getDateFormat() ?>');
|
83 |
+
//]]>
|
84 |
+
</script>
|
85 |
+
</li>
|
86 |
+
<?php endif; ?>
|
87 |
+
|
88 |
Â
<li>
|
89 |
+
<?php echo $this->__('You will be redirected to Adyen website when you place an order.') ?>
|
90 |
Â
</li>
|
91 |
Â
</ul>
|
92 |
Â
</fieldset>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
@@ -0,0 +1,108 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
16 |
+
* @package Adyen_Payment
|
17 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* @category Payment Gateway
|
22 |
+
* @package Adyen_Payment
|
23 |
+
* @author Adyen
|
24 |
+
* @property Adyen B.V
|
25 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
26 |
+
*/
|
27 |
+
$_code=$this->getMethodCode();
|
28 |
+
?>
|
29 |
+
<fieldset class="form-list">
|
30 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
31 |
+
|
32 |
+
<li>
|
33 |
+
<div class="input-box">
|
34 |
+
<label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Bank account holder name') ?> <span class="required">*</span></label><br />
|
35 |
+
<input
|
36 |
+
type="text" id="<?php echo $_code ?>_account_name" name="payment[account_name]"
|
37 |
+
title="<?php echo $this->__('Bank account holder name') ?>"
|
38 |
+
class="validate-ipayment-sepa-account-name required-entry input-text"
|
39 |
+
value="" autocomplete="off"
|
40 |
+
/>
|
41 |
+
</div>
|
42 |
+
</li>
|
43 |
+
<li>
|
44 |
+
<div class="input-box">
|
45 |
+
<label for="<?php echo $_code ?>_iban"><?php echo $this->__('IBAN') ?> <span class="required">*</span></label><br />
|
46 |
+
<input
|
47 |
+
type="text" id="<?php echo $_code ?>_iban" name="payment[iban]"
|
48 |
+
title="<?php echo $this->__('IBAN') ?>"
|
49 |
+
class="validate-ipayment-sepa-iban required-entry input-text"
|
50 |
+
value="" autocomplete="off"
|
51 |
+
/>
|
52 |
+
</div>
|
53 |
+
</li>
|
54 |
+
|
55 |
+
<li>
|
56 |
+
<div class="input-box">
|
57 |
+
<label for="<?php echo $_code ?>_country"><?php echo $this->__('Country') ?> <span class="required">*</span></label><br />
|
58 |
+
<select id="<?php echo $_code ?>_country" name="payment[country]" name="payment[country]" title="<?php echo $this->__('Country') ?>" class="validate-ipayment-sepa-country required-entry input-√√√">
|
59 |
+
<option value="">--</option>
|
60 |
+
<option value="AT">Austria</option>
|
61 |
+
<option value="BE">Belgium</option>
|
62 |
+
<option value="BG">Bulgaria</option>
|
63 |
+
<option value="CH">Switzerland</option>
|
64 |
+
<option value="CY">Cyprus</option>
|
65 |
+
<option value="CZ">Czech Republic</option>
|
66 |
+
<option value="DE">Germany</option>
|
67 |
+
<option value="DK">Denmark</option>
|
68 |
+
<option value="EE">Estonia</option>
|
69 |
+
<option value="ES">Spain</option>
|
70 |
+
<option value="FI">Finland</option>
|
71 |
+
<option value="FR">France</option>
|
72 |
+
<option value="GB">United Kingdom</option>
|
73 |
+
<option value="GF">French Guiana</option>
|
74 |
+
<option value="GI">Gibraltar</option>
|
75 |
+
<option value="GP">Guadeloupe</option>
|
76 |
+
<option value="GR">Greece</option>
|
77 |
+
<option value="HR">Croatia</option>
|
78 |
+
<option value="HU">Hungary</option>
|
79 |
+
<option value="IE">Ireland</option>
|
80 |
+
<option value="IS">Iceland</option>
|
81 |
+
<option value="IT">Italy</option>
|
82 |
+
<option value="LI">Liechtenstein</option>
|
83 |
+
<option value="LT">Lithuania</option>
|
84 |
+
<option value="LU">Luxembourg</option>
|
85 |
+
<option value="LV">Latvia</option>
|
86 |
+
<option value="MC">Monaco</option>
|
87 |
+
<option value="MQ">Martinique</option>
|
88 |
+
<option value="MT">Malta</option>
|
89 |
+
<option value="NL">Netherlands</option>
|
90 |
+
<option value="NO">Norway</option>
|
91 |
+
<option value="PL">Poland</option>
|
92 |
+
<option value="PT">Portugal</option>
|
93 |
+
<option value="RE">Réunion</option>
|
94 |
+
<option value="RO">Romania</option>
|
95 |
+
<option value="SE">Sweden</option>
|
96 |
+
<option value="SI">Slovenia</option>
|
97 |
+
<option value="SK">Slovakia</option>
|
98 |
+
</select>
|
99 |
+
</div>
|
100 |
+
</li>
|
101 |
+
</ul>
|
102 |
+
</fieldset>
|
103 |
+
<div>
|
104 |
+
<span id="ipayment-sepa-please-wait" style="display:none;" class="opc-please-wait">
|
105 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt=""/> <?php echo $this->__('Submitting payment information...') ?>
|
106 |
+
</span>
|
107 |
+
</div>
|
108 |
+
|
@@ -0,0 +1,33 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adyen Payment Module
|
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 |
+
* @category Adyen
|
16 |
+
* @package Adyen_Payment
|
17 |
+
* @copyright Copyright (c) 2011 Adyen (http://www.adyen.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* @category Payment Gateway
|
22 |
+
* @package Adyen_Payment
|
23 |
+
* @author Adyen
|
24 |
+
* @property Adyen B.V
|
25 |
+
* @copyright Copyright (c) 2014 Adyen BV (http://www.adyen.com)
|
26 |
+
*/
|
27 |
+
?>
|
28 |
+
<?php if ($_info = $this->getInfo()): ?>
|
29 |
+
<?php $sepa = unserialize($this->getInfo()->getPoNumber())?>
|
30 |
+
<?php echo Mage::helper('adyen')->__('Bank account holder name: %s', $this->htmlEscape($sepa['account_name'])) ?><br/>
|
31 |
+
<?php echo Mage::helper('adyen')->__('IBAN: %s', $this->htmlEscape($sepa['iban'])) ?><br/>
|
32 |
+
<?php echo Mage::helper('adyen')->__('Country: %s', $this->htmlEscape($sepa['country'])) ?><br/>
|
33 |
+
<?php endif; ?>
|
@@ -0,0 +1,14 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
|
2 |
+
<?php if($this->hasExpressCheckout()): ?>
|
3 |
+
|
4 |
+
<form action="<?php echo $this->getUrl("adyen/checkoutPos"); ?>" method="post">
|
5 |
+
<input style="width:250px;" type="text" class="input-text" name="adyenPosEmail" id="adyenPosEmail" value="" size="60" placeholder="Email" autocapitalize="off"/>
|
6 |
+
|
7 |
+
<button id="StartScan" style="" type="submit" title="Start Auto Scanning" class="button btn-proceed-checkout btn-checkout">
|
8 |
+
<span><span>Checkout with POS</span></span>
|
9 |
+
</button>
|
10 |
+
|
11 |
+
</form>
|
12 |
+
<div>-OR-</div>
|
13 |
+
|
14 |
+
<?php endif; ?>
|
@@ -0,0 +1,143 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
|
2 |
+
<?php if($this->hasEnableScanner()): ?>
|
3 |
+
<div id="adyenCustomScanWrapper">
|
4 |
+
<form id="addToCartBarCode" method='post' action="<?php echo $this->getUrl("adyen/updateCart/index"); ?>">
|
5 |
+
|
6 |
+
<h3>Barcode scanner</h3>
|
7 |
+
|
8 |
+
<div id="scan">
|
9 |
+
<input type="text" class="input-text" name="code" id="inpscan" value="" size="60" placeholder="Scan barcode with scanner" autofocus/>
|
10 |
+
</div>
|
11 |
+
|
12 |
+
<div id="customscan" style="display:none;">
|
13 |
+
<input type="text" class="input-text" name="customcode" id="inpcustomscan" value="" size="60" placeholder="Fil in custom barcode">
|
14 |
+
<button id="SubmitCustomScan" type="button" title="Submit" class="button btn-proceed-checkout btn-checkout">
|
15 |
+
<span><span>Add</span></span>
|
16 |
+
</button>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<br />
|
20 |
+
<button id="StopCustomScan" type="button" title="Custom barcode" class="button btn-proceed-checkout btn-checkout">
|
21 |
+
<span><span>Custom barcode</span></span>
|
22 |
+
</button>
|
23 |
+
|
24 |
+
<button id="StartScan" style="display:none; margin:0;" type="button" title="Start Auto Scanning" class="button btn-proceed-checkout btn-checkout">
|
25 |
+
<span><span>Start Auto Scanning</span></span>
|
26 |
+
</button>
|
27 |
+
|
28 |
+
</form>
|
29 |
+
|
30 |
+
|
31 |
+
<script type="text/javascript">
|
32 |
+
|
33 |
+
|
34 |
+
var intervalId;
|
35 |
+
var scanInProgress = false;
|
36 |
+
|
37 |
+
// show autostart button for IOS because they block the onload focus event
|
38 |
+
var iOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false );
|
39 |
+
if(iOS) {
|
40 |
+
// show auto startscan buttton
|
41 |
+
$('StartScan').show();
|
42 |
+
}
|
43 |
+
|
44 |
+
$('inpscan').observe('focus', function(e){
|
45 |
+
$('StartScan').hide();
|
46 |
+
intervalId = setInterval('scan()', 250);
|
47 |
+
});
|
48 |
+
|
49 |
+
$('inpscan').observe('blur', function(e){
|
50 |
+
|
51 |
+
clearInterval(intervalId);
|
52 |
+
$('StartScan').show();
|
53 |
+
});
|
54 |
+
|
55 |
+
$('StartScan').observe('click', function(e){
|
56 |
+
|
57 |
+
$('scan').show();
|
58 |
+
$('customscan').hide();
|
59 |
+
|
60 |
+
$('StopCustomScan').show();
|
61 |
+
|
62 |
+
$('inpscan').focus();
|
63 |
+
intervalId = setInterval('scan()', 250);
|
64 |
+
$('StartScan').hide();
|
65 |
+
|
66 |
+
});
|
67 |
+
|
68 |
+
$('StopCustomScan').observe('click', function(e){
|
69 |
+
$('scan').hide();
|
70 |
+
$('customscan').show();
|
71 |
+
$('inpcustomscan').focus();
|
72 |
+
$('StopCustomScan').hide();
|
73 |
+
$('StartScan').show();
|
74 |
+
|
75 |
+
});
|
76 |
+
|
77 |
+
$('SubmitCustomScan').observe('click', function(e){
|
78 |
+
var value = $('inpcustomscan').value;;
|
79 |
+
ajaxCall(value);
|
80 |
+
$('inpcustomscan').value = "";
|
81 |
+
$('inpcustomscan').focus();
|
82 |
+
e.preventDefault();
|
83 |
+
});
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
// check if scan is done with scanning
|
88 |
+
function checkValueInput(value) {
|
89 |
+
|
90 |
+
var currentValue = $('inpscan').value;
|
91 |
+
|
92 |
+
if(value == currentValue) {
|
93 |
+
// DO ajax call
|
94 |
+
ajaxCall(value);
|
95 |
+
$('inpscan').value = "";
|
96 |
+
this.scanInProgress = false;
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
+
// call same function after certain period of time
|
101 |
+
var test = setTimeout("checkValueInput($('inpscan').value)", 100);
|
102 |
+
}
|
103 |
+
|
104 |
+
|
105 |
+
function scan() {
|
106 |
+
|
107 |
+
if(this.scanInProgress === false) {
|
108 |
+
|
109 |
+
// get value
|
110 |
+
var value = $('inpscan').value;
|
111 |
+
if(value) {
|
112 |
+
this.scanInProgress = true;
|
113 |
+
|
114 |
+
// extra check for full input from scanner
|
115 |
+
setTimeout("checkValueInput($('inpscan').value)", 250);
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
function ajaxCall(code) {
|
121 |
+
|
122 |
+
var form = document.getElementById("addToCartBarCode");
|
123 |
+
new Ajax.Request(form.action, {
|
124 |
+
parameters: {code: code, isAjax: 1, method: 'POST'},
|
125 |
+
onSuccess: function(transport) {
|
126 |
+
|
127 |
+
var response = transport.responseText;
|
128 |
+
// update
|
129 |
+
$$('.col-main').each(
|
130 |
+
function (e) {
|
131 |
+
e.update(response);
|
132 |
+
}
|
133 |
+
);
|
134 |
+
},
|
135 |
+
onFailure: function(){
|
136 |
+
alert('<?php echo $this->jsQuoteEscape($this->__('Server Error. Please try again.')) ?>');
|
137 |
+
}
|
138 |
+
});
|
139 |
+
|
140 |
+
}
|
141 |
+
</script>
|
142 |
+
</div>
|
143 |
+
<?php endif; ?>
|
@@ -0,0 +1,149 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @var $this Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<?php
|
36 |
+
$methods = $this->getMethods();
|
37 |
+
$oneMethod = count($methods) <= 1;
|
38 |
+
?>
|
39 |
+
<?php if (empty($methods)): ?>
|
40 |
+
<dt>
|
41 |
+
<?php echo $this->__('No Payment Methods') ?>
|
42 |
+
</dt>
|
43 |
+
<?php else:
|
44 |
+
foreach ($methods as $_method):
|
45 |
+
$_code = $_method->getCode();
|
46 |
+
|
47 |
+
$_style = "";
|
48 |
+
if($_code == "adyen_hpp") {
|
49 |
+
|
50 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
51 |
+
$disabled = $_method->getHppOptionsDisabled();
|
52 |
+
if(!$disabled) {
|
53 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
54 |
+
}
|
55 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
56 |
+
$_style = "display:none";
|
57 |
+
}
|
58 |
+
|
59 |
+
?>
|
60 |
+
<dt style="<?php echo $_style; ?>">
|
61 |
+
<?php if(!$oneMethod): ?>
|
62 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
63 |
+
<?php else: ?>
|
64 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
65 |
+
<?php $oneMethod = $_code; ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
|
68 |
+
<?php if(($_code == "adyen_hpp" && $disabled) || ($_code != "adyen_hpp")): ?>
|
69 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
70 |
+
<?php endif; ?>
|
71 |
+
</dt>
|
72 |
+
|
73 |
+
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
74 |
+
<dd>
|
75 |
+
<?php echo $html; ?>
|
76 |
+
</dd>
|
77 |
+
<?php endif; ?>
|
78 |
+
<script type="text/javascript">
|
79 |
+
//<![CDATA[
|
80 |
+
|
81 |
+
var SwitchMethod= function() {
|
82 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
83 |
+
|
84 |
+
if(method != "adyen_hpp") {
|
85 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
86 |
+
if($('hpp_payment_form_adyen_hpp'))
|
87 |
+
{
|
88 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
89 |
+
var elements = form.getElementsByTagName('input');
|
90 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
// check if adyen_oneclick is enabled
|
95 |
+
if(method != "adyen_oneclick") {
|
96 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
97 |
+
{
|
98 |
+
// if so clear the selected option because you select different payment method
|
99 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
100 |
+
var elements = form.getElementsByTagName('input');
|
101 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
102 |
+
|
103 |
+
// don't show the cvc field
|
104 |
+
$$('.cvc_block').each(
|
105 |
+
function (e) {
|
106 |
+
e.setStyle({display:'none'});
|
107 |
+
}
|
108 |
+
);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
payment.switchMethod(method);
|
112 |
+
};
|
113 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
114 |
+
|
115 |
+
//]]>
|
116 |
+
</script>
|
117 |
+
<?php endforeach;
|
118 |
+
endif;
|
119 |
+
?>
|
120 |
+
<?php echo $this->getChildChildHtml('additional'); ?>
|
121 |
+
<script type="text/javascript">
|
122 |
+
//<![CDATA[
|
123 |
+
<?php echo $this->getChildChildHtml('scripts'); ?>
|
124 |
+
payment.init();
|
125 |
+
<?php if (is_string($oneMethod)): ?>
|
126 |
+
payment.switchMethod('<?php echo $oneMethod ?>');
|
127 |
+
<?php endif; ?>
|
128 |
+
|
129 |
+
// always enable the hpp payment options if this payment method is on
|
130 |
+
if($('hpp_payment_form_adyen_hpp'))
|
131 |
+
{
|
132 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
133 |
+
var elements = form.getElementsByTagName('input');
|
134 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
135 |
+
}
|
136 |
+
|
137 |
+
// always enable the oneclick payments options if this payment method is on
|
138 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
139 |
+
{
|
140 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
141 |
+
var elements = form.getElementsByTagName('input');
|
142 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
143 |
+
|
144 |
+
// always enable the selectboxes for the oneclick creditcards
|
145 |
+
var elements = form.getElementsByTagName('select');
|
146 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
147 |
+
}
|
148 |
+
//]]>
|
149 |
+
</script>
|
@@ -0,0 +1,1319 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$step_counter = 1;
|
4 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
5 |
+
|
6 |
+
?>
|
7 |
+
<?php if(!$this->canCheckout() || !$this->validateMinimumAmount()): ?>
|
8 |
+
<?php if($this->settings['checkout_title']): ?>
|
9 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
10 |
+
<?php endif; ?>
|
11 |
+
|
12 |
+
<?php if($this->canCheckout() && !$this->validateMinimumAmount()): ?>
|
13 |
+
<p><?php echo Mage::getStoreConfig('sales/minimum_order/description'); ?></p>
|
14 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
15 |
+
<?php else: ?>
|
16 |
+
<p><?php echo $this->__('You need to have products in your cart to checkout, and your cart is empty.'); ?></p>
|
17 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php else: ?>
|
20 |
+
|
21 |
+
<form id="onestepcheckout-form" method="post" action="<?php echo $this->getUrl('onestepcheckout', array('_secure'=>true)); ?>">
|
22 |
+
<fieldset class="group-select" style="margin: 0;">
|
23 |
+
|
24 |
+
<?php if($this->settings['checkout_title']): ?>
|
25 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
26 |
+
<?php endif; ?>
|
27 |
+
|
28 |
+
<?php if($this->settings['checkout_description']): ?>
|
29 |
+
<p class="onestepcheckout-description"><?php echo $this->settings['checkout_description']; ?></p>
|
30 |
+
<?php endif; ?>
|
31 |
+
|
32 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
33 |
+
<p class="onestepcheckout-login-link">
|
34 |
+
<a id="onestepcheckout-login-link" href="javascript:void(0); return: false;"><?php echo $this->__('Already registered? Click here to login.'); ?></a>
|
35 |
+
</p>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php if(isset($this->formErrors['unknown_source_error'])): ?>
|
39 |
+
<div class="onestepcheckout-error">
|
40 |
+
<?php echo $this->formErrors['unknown_source_error']; ?>
|
41 |
+
</div>
|
42 |
+
<?php endif; ?>
|
43 |
+
<div class="onestepcheckout-threecolumns checkoutcontainer onestepcheckout-skin-<?php echo $this->settings['skin']; ?> <?php if(Mage::helper('onestepcheckout')->isEnterprise()): ?>onestepcheckout-enterprise<?php endif; ?>">
|
44 |
+
<div class="onestepcheckout-column-left">
|
45 |
+
<div id="billing_address">
|
46 |
+
<script type="text/javascript">
|
47 |
+
var billing = new Billing();
|
48 |
+
|
49 |
+
</script>
|
50 |
+
<ul>
|
51 |
+
<li>
|
52 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Billing address'); ?></p>
|
53 |
+
<?php if(isset($this->formErrors['billing_error']) && count($this->formErrors['billing_errors']) > 0): ?>
|
54 |
+
<div class="onestepcheckout-error">
|
55 |
+
<?php echo $this->__('Please check red fields below and try again.'); ?>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
</li>
|
59 |
+
<?php if ($this->customerHasAddresses()): ?>
|
60 |
+
<li>
|
61 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
62 |
+
<div class="input-box">
|
63 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
<?php endif; ?>
|
67 |
+
<li>
|
68 |
+
<div>
|
69 |
+
<ul id="billing_address_list" <?php echo (($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('billing')) ? 'style = "display:none"' : false ); ?>>
|
70 |
+
<?php echo $this->getChildHtml('billing_address');?>
|
71 |
+
<?php $addressAttributes = $this->getChild('customer_form_billing_address_user_defined_attributes');?>
|
72 |
+
<?php if ($addressAttributes): ?>
|
73 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getBillingAddress())->setEntityType('customer_address');?>
|
74 |
+
<?php $addressAttributes->setFieldIdFormat('billing:%1$s')->setFieldNameFormat('billing[%1$s]');?>
|
75 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
76 |
+
<?php endif;?>
|
77 |
+
<?php $customerAttributes = $this->getChild('customer_form_customer_user_defined_attributes');?>
|
78 |
+
<?php if ($customerAttributes): ?>
|
79 |
+
<?php $customerAttributes->setEntityModelClass('customer/customer')->setFieldIdFormat('billing:%1$s');?>
|
80 |
+
<?php $customerAttributes->setFieldNameFormat('billing[%1$s]')->setShowContainer(false);?>
|
81 |
+
<?php echo $customerAttributes->setExcludeFileAttributes(true)->toHtml()?>
|
82 |
+
<?php endif;?>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
</li>
|
86 |
+
<li>
|
87 |
+
<?php $uncheck = (!empty($_POST['billing']) && empty($_POST['billing']['use_for_shipping']));?>
|
88 |
+
<?php if($this->differentShippingAvailable()): ?>
|
89 |
+
<div class="input-box input-different-shipping">
|
90 |
+
<input type="checkbox" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'checked="checked" ':'')?>/>
|
91 |
+
<label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to the same address')?></label>
|
92 |
+
</div>
|
93 |
+
<?php else: ?>
|
94 |
+
<input type="hidden" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" />
|
95 |
+
<?php endif; ?>
|
96 |
+
</li>
|
97 |
+
</ul>
|
98 |
+
</div>
|
99 |
+
<?php if($this->differentShippingAvailable()): ?>
|
100 |
+
<div id="shipping_address" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'style="display: none"': false);?>>
|
101 |
+
<script type="text/javascript">
|
102 |
+
var shipping = new Shipping();
|
103 |
+
</script>
|
104 |
+
<ul>
|
105 |
+
<li class="shipping-address-title">
|
106 |
+
<?php echo $this->__('Shipping address'); ?>
|
107 |
+
</li>
|
108 |
+
<?php if ($this->customerHasAddresses()): ?>
|
109 |
+
<li class="form-alt">
|
110 |
+
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
111 |
+
<div class="input-box"><?php echo $this->getAddressesHtmlSelect('shipping') ?></div>
|
112 |
+
</li>
|
113 |
+
<?php endif ?>
|
114 |
+
<li id="shipping_address_list" <?php if($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('shipping')) { echo ' style="display: none;" '; } ?>>
|
115 |
+
<div id="">
|
116 |
+
<ul>
|
117 |
+
<?php echo $this->getChildHtml('shipping_address');?>
|
118 |
+
<?php $addressAttributes = $this->getChild('customer_form_shipping_address_user_defined_attributes');?>
|
119 |
+
<?php if ($addressAttributes): ?>
|
120 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getShippingAddress())->setEntityType('customer_address');?>
|
121 |
+
<?php $addressAttributes->setFieldIdFormat('shipping:%1$s')->setFieldNameFormat('shipping[%1$s]');?>
|
122 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
123 |
+
<?php endif;?>
|
124 |
+
</ul>
|
125 |
+
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getQuote()->getShippingAddress()->getId() ?>" id="shipping:address_id" />
|
126 |
+
<!-- END LIST OF SHIPPIING FIELDS -->
|
127 |
+
</div>
|
128 |
+
</li>
|
129 |
+
</ul>
|
130 |
+
</div>
|
131 |
+
<?php endif; ?>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<div class="onestepcheckout-column-middle">
|
135 |
+
|
136 |
+
|
137 |
+
<?php if(!$this->isVirtual()): ?>
|
138 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_shipping_method')):?>
|
139 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
140 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
141 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
142 |
+
</div>
|
143 |
+
<?php endif; ?>
|
144 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
145 |
+
<?php else:?>
|
146 |
+
<div class="onestepcheckout-shipping-method">
|
147 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Shipping method'); ?></p>
|
148 |
+
|
149 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
150 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
151 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
152 |
+
</div>
|
153 |
+
<?php endif; ?>
|
154 |
+
|
155 |
+
<div class="onestepcheckout-shipping-method-block">
|
156 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<?php endif; ?>
|
160 |
+
<?php endif; ?>
|
161 |
+
|
162 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
163 |
+
<?php if(!empty($this->formErrors['payment_method'])): ?>
|
164 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
165 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
166 |
+
</div>
|
167 |
+
<?php endif; ?>
|
168 |
+
<?php if(!empty($this->formErrors['payment_method_error'])): ?>
|
169 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
170 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
171 |
+
</div>
|
172 |
+
<?php endif; ?>
|
173 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
174 |
+
<?php else: ?>
|
175 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Payment method'); ?></p>
|
176 |
+
<?php if(isset($this->formErrors['payment_method']) && $this->formErrors['payment_method']): ?>
|
177 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
178 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
179 |
+
</div>
|
180 |
+
<?php else: ?>
|
181 |
+
<?php if(isset($this->formErrors['payment_method_error'])): ?>
|
182 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
183 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
184 |
+
</div>
|
185 |
+
<?php endif; ?>
|
186 |
+
<?php endif; ?>
|
187 |
+
|
188 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
189 |
+
|
190 |
+
<div class="tool-tip" id="payment-tool-tip" style="display:none;">
|
191 |
+
<div class="btn-close">
|
192 |
+
<a href="javascript:void(0);" id="payment-tool-tip-close"><img src="<?php echo $this->getSkinUrl('images/btn_window_close.gif') ?>" alt="<?php echo $this->__('Close') ?>" /></a>
|
193 |
+
</div>
|
194 |
+
<div class="block-content">
|
195 |
+
<img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" />
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
<?php endif; ?>
|
199 |
+
</div>
|
200 |
+
|
201 |
+
<div class="onestepcheckout-column-right">
|
202 |
+
|
203 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-4"><?php echo $this->__('Review your order'); ?></p>
|
204 |
+
|
205 |
+
<div class="onestepcheckout-summary">
|
206 |
+
<?php echo $this->getChildHtml('summary'); ?>
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<?php if($this->settings['enable_discount']): ?>
|
210 |
+
<div class="onestepcheckout-coupons">
|
211 |
+
<div id="coupon-notice" style="display: none;"></div>
|
212 |
+
<?php $_couponcode = $this->getQuote()->getCouponCode(); ?>
|
213 |
+
<label for="id_couponcode"><?php echo $this->__('Coupon code:'); ?></label><br/>
|
214 |
+
<input class="input-text" type="text" name="onestepcheckout-couponcode" id="id_couponcode" value="<?php echo Mage::helper('core')->escapeHtml($_couponcode); ?>" />
|
215 |
+
<br/>
|
216 |
+
<button id="onestepcheckout-coupon-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply Coupon'); ?></span></span></button>
|
217 |
+
<button id="onestepcheckout-coupon-remove" class="form-button-alt button" type="button" style="<?php if($_couponcode == '') { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel Coupon'); ?></span></span></button>
|
218 |
+
<script>
|
219 |
+
Event.observe(window, 'load', function() {
|
220 |
+
$('onestepcheckout-coupon-add').observe('click', function(e) {
|
221 |
+
|
222 |
+
var coupon = $('id_couponcode').getValue();
|
223 |
+
var couponNotice = $('coupon-notice');
|
224 |
+
|
225 |
+
couponNotice.hide();
|
226 |
+
|
227 |
+
if(coupon == '') {
|
228 |
+
alert('<?php echo $this->__('Please enter a valid coupon code.'); ?>');
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
|
232 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
233 |
+
var parameters = {code: coupon};
|
234 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
235 |
+
|
236 |
+
var form = $('onestepcheckout-form');
|
237 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
238 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
239 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
240 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
241 |
+
var payment_methods = $$('div.payment-methods').first();
|
242 |
+
|
243 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
244 |
+
|
245 |
+
if(shipping_methods){
|
246 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
247 |
+
}
|
248 |
+
|
249 |
+
if(payment_methods){
|
250 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
251 |
+
}
|
252 |
+
|
253 |
+
summary.update('<div class="loading-ajax"> </div>');
|
254 |
+
|
255 |
+
new Ajax.Request(url, {
|
256 |
+
method: 'post',
|
257 |
+
parameters: parameters,
|
258 |
+
onSuccess: function(transport) {
|
259 |
+
if(transport.status == 200) {
|
260 |
+
|
261 |
+
var response = transport.responseText.evalJSON();
|
262 |
+
|
263 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
264 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
265 |
+
|
266 |
+
if(shipping_methods){
|
267 |
+
shipping_methods.hide();
|
268 |
+
shipping_methods.update(response.shipping_method);
|
269 |
+
shipping_methods.show();
|
270 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
271 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
272 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
273 |
+
new Effect.Fade(item);
|
274 |
+
});
|
275 |
+
});
|
276 |
+
}
|
277 |
+
|
278 |
+
if(payment_methods){
|
279 |
+
payment_methods.hide();
|
280 |
+
payment_methods.replace(response.payment_method);
|
281 |
+
payment_methods.show();
|
282 |
+
|
283 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
284 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
285 |
+
var payment_method = $RF(form, 'payment[method]');
|
286 |
+
|
287 |
+
if(paymentContainer != null){
|
288 |
+
paymentContainer.show();
|
289 |
+
}
|
290 |
+
if(paymentForm != null){
|
291 |
+
paymentForm.show();
|
292 |
+
} else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
293 |
+
// set sub payment method back
|
294 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
295 |
+
|
296 |
+
// check if ideal payment bank is chosen
|
297 |
+
if(payment_hpp_type == "ideal") {
|
298 |
+
if(payment_hpp_ideal_type) {
|
299 |
+
// get issue_id this is before the slash
|
300 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
301 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
302 |
+
}
|
303 |
+
$('payment_form_ideal').show();
|
304 |
+
}
|
305 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
306 |
+
// set sub payment method back
|
307 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
308 |
+
// set back the cvc code
|
309 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
310 |
+
// show the cvc code block
|
311 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
312 |
+
$(cvc_block).show();
|
313 |
+
}
|
314 |
+
|
315 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
316 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
317 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
318 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
319 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
320 |
+
new Effect.Fade(item);
|
321 |
+
});
|
322 |
+
});
|
323 |
+
}
|
324 |
+
|
325 |
+
summary.hide();
|
326 |
+
summary.update(response.summary);
|
327 |
+
summary.show();
|
328 |
+
|
329 |
+
if(response.success) {
|
330 |
+
|
331 |
+
couponNotice.update(response.message);
|
332 |
+
couponNotice.removeClassName('error-msg');
|
333 |
+
couponNotice.addClassName('success-msg');
|
334 |
+
couponNotice.show();
|
335 |
+
/* Show remove button */
|
336 |
+
$('onestepcheckout-coupon-remove').show();
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
|
340 |
+
couponNotice.update(response.message);
|
341 |
+
couponNotice.removeClassName('success-msg');
|
342 |
+
couponNotice.addClassName('error-msg');
|
343 |
+
couponNotice.show();
|
344 |
+
/* Hide remove button */
|
345 |
+
$('onestepcheckout-coupon-remove').hide();
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
});
|
350 |
+
});
|
351 |
+
|
352 |
+
$('onestepcheckout-coupon-remove').observe('click', function(e) {
|
353 |
+
|
354 |
+
var coupon = $('id_couponcode').getValue();
|
355 |
+
var couponNotice = $('coupon-notice');
|
356 |
+
|
357 |
+
couponNotice.hide();
|
358 |
+
|
359 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
360 |
+
var parameters = {code: coupon, remove: '1'};
|
361 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
362 |
+
var payment_methods = $$('div.payment-methods').first();
|
363 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
364 |
+
|
365 |
+
if(shipping_methods){
|
366 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
367 |
+
}
|
368 |
+
|
369 |
+
if(payment_methods){
|
370 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
371 |
+
}
|
372 |
+
summary.update('<div class="loading-ajax"> </div>');
|
373 |
+
|
374 |
+
new Ajax.Request(url, {
|
375 |
+
method: 'post',
|
376 |
+
parameters: parameters,
|
377 |
+
onSuccess: function(transport) {
|
378 |
+
if(transport.status == 200) {
|
379 |
+
var response = transport.responseText.evalJSON();
|
380 |
+
|
381 |
+
if(response.success){
|
382 |
+
$('id_couponcode').setValue('')
|
383 |
+
$('onestepcheckout-coupon-remove').hide();
|
384 |
+
}
|
385 |
+
|
386 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
387 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
388 |
+
|
389 |
+
if(shipping_methods){
|
390 |
+
shipping_methods.hide();
|
391 |
+
shipping_methods.update(response.shipping_method);
|
392 |
+
shipping_methods.show();
|
393 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
394 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
395 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
396 |
+
new Effect.Fade(item);
|
397 |
+
});
|
398 |
+
});
|
399 |
+
}
|
400 |
+
|
401 |
+
if(payment_methods){
|
402 |
+
payment_methods.hide();
|
403 |
+
payment_methods.replace(response.payment_method);
|
404 |
+
payment_methods.show();
|
405 |
+
|
406 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
407 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
408 |
+
|
409 |
+
if(paymentContainer != null){
|
410 |
+
paymentContainer.show();
|
411 |
+
}
|
412 |
+
|
413 |
+
if(paymentForm != null){
|
414 |
+
paymentForm.show();
|
415 |
+
}
|
416 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
417 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
418 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
419 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
420 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
421 |
+
new Effect.Fade(item);
|
422 |
+
});
|
423 |
+
});
|
424 |
+
}
|
425 |
+
|
426 |
+
summary.hide();
|
427 |
+
summary.update(response.summary);
|
428 |
+
summary.show();
|
429 |
+
|
430 |
+
couponNotice.hide();
|
431 |
+
couponNotice.update(response.message);
|
432 |
+
couponNotice.removeClassName('error-msg');
|
433 |
+
couponNotice.addClassName('success-msg');
|
434 |
+
couponNotice.show();
|
435 |
+
}
|
436 |
+
}
|
437 |
+
});
|
438 |
+
});
|
439 |
+
});
|
440 |
+
</script>
|
441 |
+
</div>
|
442 |
+
<?php endif; ?>
|
443 |
+
|
444 |
+
<?php if($this->settings['enable_giftcard']): ?>
|
445 |
+
<div class="onestepcheckout-giftcards">
|
446 |
+
<div id="giftcard-notice" style="display: none;"></div>
|
447 |
+
<?php
|
448 |
+
$_hasGiftCards = unserialize($this->getQuote()->getGiftCards());
|
449 |
+
$_giftcardcode = $this->getQuote()->getgiftcardCode(); ?>
|
450 |
+
<label for="id_giftcardcode"><?php echo $this->__('giftcard code:'); ?></label><br/>
|
451 |
+
<input class="input-text" type="text" name="onestepcheckout-giftcardcode" id="id_giftcardcode" value="<?php echo Mage::helper('core')->escapeHtml($_giftcardcode); ?>" />
|
452 |
+
<br/>
|
453 |
+
<button id="onestepcheckout-giftcard-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply gift card'); ?></span></span></button>
|
454 |
+
<button id="onestepcheckout-giftcard-remove" class="form-button-alt button" type="button" style="<?php if(empty($_hasGiftCards)) { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel gift card'); ?></span></span></button>
|
455 |
+
<script>
|
456 |
+
document.observe('dom:loaded', function() {
|
457 |
+
$('onestepcheckout-giftcard-add').observe('click', function(e) {
|
458 |
+
var giftcard = $('id_giftcardcode').getValue();
|
459 |
+
var giftcardNotice = $('giftcard-notice');
|
460 |
+
giftcardNotice.hide();
|
461 |
+
if(giftcard == '') {
|
462 |
+
alert('<?php echo $this->__('Please enter a valid giftcard code.'); ?>');
|
463 |
+
return;
|
464 |
+
}
|
465 |
+
|
466 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
467 |
+
var parameters = {code: giftcard};
|
468 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
469 |
+
var payment_methods = $$('div.payment-methods').first();
|
470 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
471 |
+
|
472 |
+
if(shipping_methods){
|
473 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
474 |
+
}
|
475 |
+
|
476 |
+
if(payment_methods){
|
477 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
478 |
+
}
|
479 |
+
summary.update('<div class="loading-ajax"> </div>');
|
480 |
+
|
481 |
+
new Ajax.Request(url+Math.random(1000), {
|
482 |
+
method: 'post',
|
483 |
+
parameters: parameters,
|
484 |
+
onSuccess: function(transport) {
|
485 |
+
if(transport.status == 200) {
|
486 |
+
|
487 |
+
var response = transport.responseText.evalJSON();
|
488 |
+
|
489 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
490 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
491 |
+
|
492 |
+
if(shipping_methods){
|
493 |
+
shipping_methods.hide();
|
494 |
+
shipping_methods.update(response.shipping_method);
|
495 |
+
shipping_methods.show();
|
496 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
497 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
498 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
499 |
+
new Effect.Fade(item);
|
500 |
+
});
|
501 |
+
});
|
502 |
+
}
|
503 |
+
|
504 |
+
if(payment_methods){
|
505 |
+
//payment_methods.hide();
|
506 |
+
payment_methods.replace(response.payment_method);
|
507 |
+
//payment_methods.show();
|
508 |
+
|
509 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
510 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
511 |
+
|
512 |
+
if(paymentContainer != null){
|
513 |
+
paymentContainer.show();
|
514 |
+
}
|
515 |
+
if(paymentForm != null){
|
516 |
+
paymentForm.show();
|
517 |
+
}
|
518 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
519 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
520 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
521 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
522 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
523 |
+
new Effect.Fade(item);
|
524 |
+
});
|
525 |
+
});
|
526 |
+
}
|
527 |
+
|
528 |
+
if(response.success) {
|
529 |
+
summary.update(response.summary);
|
530 |
+
giftcardNotice.update(response.message);
|
531 |
+
giftcardNotice.removeClassName('error-msg');
|
532 |
+
giftcardNotice.addClassName('success-msg');
|
533 |
+
giftcardNotice.show();
|
534 |
+
/* Show remove button */
|
535 |
+
$('onestepcheckout-giftcard-remove').show();
|
536 |
+
}
|
537 |
+
else {
|
538 |
+
summary.update(response.summary);
|
539 |
+
giftcardNotice.update(response.message);
|
540 |
+
giftcardNotice.removeClassName('success-msg');
|
541 |
+
giftcardNotice.addClassName('error-msg');
|
542 |
+
giftcardNotice.show();
|
543 |
+
/* Hide remove button */
|
544 |
+
//$('onestepcheckout-giftcard-remove').hide();
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
});
|
549 |
+
});
|
550 |
+
|
551 |
+
$('onestepcheckout-giftcard-remove').observe('click', function(e) {
|
552 |
+
var giftcard = $('id_giftcardcode').getValue();
|
553 |
+
var giftcardNotice = $('giftcard-notice');
|
554 |
+
giftcardNotice.hide();
|
555 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
556 |
+
var parameters = {code: giftcard, remove: '1'};
|
557 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
558 |
+
var payment_methods = $$('div.payment-methods').first();
|
559 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
560 |
+
|
561 |
+
if(shipping_methods){
|
562 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
563 |
+
}
|
564 |
+
|
565 |
+
if(payment_methods){
|
566 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
567 |
+
}
|
568 |
+
summary.update('<div class="loading-ajax"> </div>');
|
569 |
+
|
570 |
+
new Ajax.Request(url, {
|
571 |
+
method: 'post',
|
572 |
+
parameters: parameters,
|
573 |
+
onSuccess: function(transport) {
|
574 |
+
if(transport.status == 200) {
|
575 |
+
var response = transport.responseText.evalJSON();
|
576 |
+
|
577 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
578 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
579 |
+
|
580 |
+
if(shipping_methods){
|
581 |
+
shipping_methods.hide();
|
582 |
+
shipping_methods.update(response.shipping_method);
|
583 |
+
shipping_methods.show();
|
584 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
585 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
586 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
587 |
+
new Effect.Fade(item);
|
588 |
+
});
|
589 |
+
});
|
590 |
+
}
|
591 |
+
|
592 |
+
if(payment_methods){
|
593 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
594 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
595 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
596 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
597 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
598 |
+
new Effect.Fade(item);
|
599 |
+
});
|
600 |
+
});
|
601 |
+
payment_methods.hide();
|
602 |
+
payment_methods.replace(response.payment_method);
|
603 |
+
payment_methods.show();
|
604 |
+
|
605 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
606 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
607 |
+
|
608 |
+
if(paymentContainer != null){
|
609 |
+
paymentContainer.show();
|
610 |
+
}
|
611 |
+
if(paymentForm != null){
|
612 |
+
paymentForm.show();
|
613 |
+
}
|
614 |
+
}
|
615 |
+
|
616 |
+
if(response.success){
|
617 |
+
$('id_giftcardcode').setValue('')
|
618 |
+
$('onestepcheckout-giftcard-remove').hide();
|
619 |
+
}
|
620 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
621 |
+
|
622 |
+
summary.hide();
|
623 |
+
summary.update(response.summary);
|
624 |
+
summary.show();
|
625 |
+
|
626 |
+
giftcardNotice.hide();
|
627 |
+
giftcardNotice.update(response.message);
|
628 |
+
giftcardNotice.removeClassName('error-msg');
|
629 |
+
giftcardNotice.addClassName('success-msg');
|
630 |
+
giftcardNotice.show();
|
631 |
+
}
|
632 |
+
}
|
633 |
+
});
|
634 |
+
});
|
635 |
+
});
|
636 |
+
</script>
|
637 |
+
</div>
|
638 |
+
<?php endif; ?>
|
639 |
+
|
640 |
+
<?php if($this->settings['enable_comments']): ?>
|
641 |
+
<div class="onestepcheckout-comments">
|
642 |
+
<label for="id_comments"><?php echo $this->__('Comments'); ?></label><br/>
|
643 |
+
<textarea id="id_comments" name="onestepcheckout_comments"><?php if(isset($_POST['onestepcheckout_comments'])) { echo Mage::helper('core')->escapeHtml($_POST['onestepcheckout_comments']); } ?></textarea>
|
644 |
+
</div>
|
645 |
+
<?php endif; ?>
|
646 |
+
|
647 |
+
<?php if($this->settings['enable_gift_messages']): ?>
|
648 |
+
<div id="onestepcheckout-giftmessages">
|
649 |
+
<div class="onestepcheckout-giftmessagecontainer">
|
650 |
+
<?php echo $this->helper('onestepcheckout/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
<?php endif; ?>
|
654 |
+
|
655 |
+
<?php $customerEmail = (($this->isCustomerLoggedIn())) ? $this->getQuote()->getCustomer()->getEmail() : false ;?>
|
656 |
+
<?php if($this->settings['enable_newsletter'] && !$this->isSubScribed($customerEmail)): ?>
|
657 |
+
<div class="onestepcheckout-enable-newsletter">
|
658 |
+
<input type="checkbox" id="id_subscribe_newsletter" name="subscribe_newsletter" value="1" <?php if($this->settings['newsletter_default_checked']): ?>checked="checked"<?php endif; ?> />
|
659 |
+
<label for="id_subscribe_newsletter"><?php echo $this->__('Subscribe to our newsletter'); ?></label>
|
660 |
+
</div>
|
661 |
+
<?php endif; ?>
|
662 |
+
|
663 |
+
<?php $_extraProductsHelper = Mage::helper('onestepcheckout/extraproducts'); ?>
|
664 |
+
<?php if($_extraProductsHelper->hasExtraProducts()): ?>
|
665 |
+
<div class="onestepcheckout-extraproducts">
|
666 |
+
<ul>
|
667 |
+
<?php foreach($_extraProductsHelper->getExtraProducts() as $product): ?>
|
668 |
+
<li><input type="checkbox" class="onestepcheckout-extra-product"
|
669 |
+
<?php if($_extraProductsHelper->productInCart($product->getId())): ?>
|
670 |
+
checked="checked" <?php endif; ?>
|
671 |
+
name="extra_products_<?php echo $product->getId(); ?>"
|
672 |
+
id="id_extra_product_<?php echo $product->getId(); ?>" />
|
673 |
+
<label for="id_extra_product_<?php echo $product->getId(); ?>"> <?php echo $product->getName(); ?>
|
674 |
+
<span><?php echo Mage::helper('checkout')->formatPrice($product->getPrice()); ?></span>
|
675 |
+
</label></li>
|
676 |
+
<?php endforeach; ?>
|
677 |
+
</ul>
|
678 |
+
</div>
|
679 |
+
|
680 |
+
<script>
|
681 |
+
Event.observe(window, 'load', function() {
|
682 |
+
$$('input.onestepcheckout-extra-product').invoke('observe', 'click', function(e) {
|
683 |
+
var id_temp = e.element().id.split('id_extra_product_');
|
684 |
+
if(id_temp.length == 2) {
|
685 |
+
var product_id = id_temp[1];
|
686 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_extra_product'); ?>';
|
687 |
+
var parameters = {
|
688 |
+
product_id: product_id
|
689 |
+
}
|
690 |
+
|
691 |
+
if(!e.element().checked) {
|
692 |
+
parameters['remove'] = 1;
|
693 |
+
}
|
694 |
+
|
695 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
696 |
+
summary.update('<div class="loading-ajax"> </div>');
|
697 |
+
|
698 |
+
new Ajax.Request(url, {
|
699 |
+
method: 'post',
|
700 |
+
parameters: parameters,
|
701 |
+
onSuccess: function(transport) {
|
702 |
+
summary.update(transport.responseText);
|
703 |
+
}
|
704 |
+
});
|
705 |
+
};
|
706 |
+
});
|
707 |
+
});
|
708 |
+
</script>
|
709 |
+
<?php endif; ?>
|
710 |
+
|
711 |
+
<?php
|
712 |
+
/**
|
713 |
+
* Feedbackdropdown start
|
714 |
+
*/
|
715 |
+
?>
|
716 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback']) && !empty($this->settings['feedback']['feedback_values'])):?>
|
717 |
+
<?php
|
718 |
+
$selectedFeedBackFields = $this->getRequest()->getPost('onestepcheckout-feedback', false);
|
719 |
+
$feedbackValues = unserialize($this->settings['feedback']['feedback_values']);
|
720 |
+
?>
|
721 |
+
<div class="onestepcheckout-feedback" id="">
|
722 |
+
<label for="id_feedback"><?php echo $this->__('How did you hear about us?'); ?></label><br>
|
723 |
+
<select style="" name="onestepcheckout-feedback" id="id_feedback" defaultvalue="">
|
724 |
+
<option value=""><?php echo $this->__('Please choose'); ?></option>
|
725 |
+
<?php foreach($feedbackValues as $value => $label):
|
726 |
+
$selected= (!empty($selectedFeedBackFields) && $selectedFeedBackFields == $value) ? ' selected' : '';
|
727 |
+
?>
|
728 |
+
<option value="<?php echo $value?>" <?php echo $selected;?>><?php echo $label['value']?></option>
|
729 |
+
<?php endforeach;?>
|
730 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):
|
731 |
+
$selected= (empty($feedbackValues[$selectedFeedBackFields]) && $selectedFeedBackFields != '') ? ' selected' : '';
|
732 |
+
?>
|
733 |
+
<option value="freetext" <?php echo $selected;?>><?php echo $this->__('Other'); ?></option>
|
734 |
+
<?php endif;?>
|
735 |
+
</select>
|
736 |
+
</div>
|
737 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):?>
|
738 |
+
<script type="text/javascript">
|
739 |
+
$('id_feedback').observe('change', function (event){
|
740 |
+
if(this.getValue() == 'freetext'){
|
741 |
+
$('id_feedback_freetext_div').show();
|
742 |
+
} else {
|
743 |
+
$('id_feedback_freetext_div').hide();
|
744 |
+
}
|
745 |
+
});
|
746 |
+
</script>
|
747 |
+
<div id='id_feedback_freetext_div' class="onestepcheckout-feedback-freetext"<?php echo ((!empty($selectedFeedBackFields) && $selectedFeedBackFields == 'freetext') ? '' : ' style="display: none;"'); ?>>
|
748 |
+
<label for="id_feedback_freetext"><?php echo $this->__('Please specify:'); ?></label><br/>
|
749 |
+
<textarea id="id_feedback_freetext" name="onestepcheckout-feedback-freetext"><?php echo Mage::helper('core')->escapeHtml($this->getRequest()->getPost('onestepcheckout-feedback-freetext', false));?></textarea>
|
750 |
+
</div>
|
751 |
+
<?php endif; ?>
|
752 |
+
<?php endif; ?>
|
753 |
+
<?php
|
754 |
+
/**
|
755 |
+
* Feedbackdropdown end
|
756 |
+
*/
|
757 |
+
?>
|
758 |
+
|
759 |
+
<?php if($this->settings['enable_terms']): //deprecated?>
|
760 |
+
<div class="onestepcheckout-enable-terms">
|
761 |
+
<?php
|
762 |
+
|
763 |
+
if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']) {
|
764 |
+
$terms_error = true;
|
765 |
+
}
|
766 |
+
else {
|
767 |
+
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
768 |
+
$terms_error = false;
|
769 |
+
}
|
770 |
+
else {
|
771 |
+
$terms_error = true;
|
772 |
+
}
|
773 |
+
}
|
774 |
+
?>
|
775 |
+
|
776 |
+
<input class="required-entry" type="checkbox" id="id_accept_terms" name="accept_terms" value="1" <?php if(!$terms_error) echo "checked=\"checked\""; ?> />
|
777 |
+
<label for="id_accept_terms"><?php echo $this->__('I accept the <a id="onestepcheckout-toc-link" target="_blank" href="javascript:void(0);">Terms and Conditions</a>'); ?></label>
|
778 |
+
|
779 |
+
<?php if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']): ?>
|
780 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
781 |
+
<?php echo $this->__('You must accept our terms to continue.'); ?>
|
782 |
+
</div>
|
783 |
+
<?php endif; ?>
|
784 |
+
|
785 |
+
</div>
|
786 |
+
<?php endif; ?>
|
787 |
+
|
788 |
+
<?php
|
789 |
+
/**
|
790 |
+
* Default magento agreements
|
791 |
+
*/
|
792 |
+
?>
|
793 |
+
<?php if($this->settings['enable_default_terms']): ?>
|
794 |
+
<?php if(!empty($this->formErrors['agreements_error'])):?>
|
795 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
796 |
+
<?php echo $this->__('Please agree to all the terms and conditions before placing the order.'); ?>
|
797 |
+
</div>
|
798 |
+
<?php endif;?>
|
799 |
+
<?php echo $this->getChildHtml('agreements') ?>
|
800 |
+
<script type="text/javascript">
|
801 |
+
|
802 |
+
var termsmodals = new Object;
|
803 |
+
|
804 |
+
document.observe('dom:loaded', function() {
|
805 |
+
$$('.checkout-agreements li p input').each(
|
806 |
+
function(elem){
|
807 |
+
elem.addClassName('required-entry');
|
808 |
+
}
|
809 |
+
);
|
810 |
+
});
|
811 |
+
|
812 |
+
<?php if($this->settings['enable_textarea']):?>
|
813 |
+
document.observe('dom:loaded', function() {
|
814 |
+
$$('.checkout-agreements li p label').each(
|
815 |
+
function(elem){
|
816 |
+
elem.up().insert('<a href="javascript:void(0);" onclick="termsmodals[\'' + elem.htmlFor + '\'].open();">' + elem.innerHTML + '</a>');
|
817 |
+
elem.hide();
|
818 |
+
}
|
819 |
+
);
|
820 |
+
$$('div.agreement-content').each(
|
821 |
+
function(element){
|
822 |
+
element.id = 'agreement-div-' + element.up('li').down('input').id;
|
823 |
+
$$('body')[0].insert(element);
|
824 |
+
}
|
825 |
+
);
|
826 |
+
$$('.checkout-agreements li p input').each(
|
827 |
+
function(elem){
|
828 |
+
window.termsmodals[elem.id] = new Control.Modal($('agreement-div-' + elem.id),{
|
829 |
+
overlayOpacity: 0.75,
|
830 |
+
className: 'oscmodal',
|
831 |
+
fade: true,
|
832 |
+
closeOnClick: true,
|
833 |
+
height: 400,
|
834 |
+
width: 700
|
835 |
+
});
|
836 |
+
}
|
837 |
+
);
|
838 |
+
});
|
839 |
+
<?php endif;?>
|
840 |
+
|
841 |
+
</script>
|
842 |
+
<?php endif;?>
|
843 |
+
<?php
|
844 |
+
/**
|
845 |
+
* Default magento agreements end
|
846 |
+
*/
|
847 |
+
?>
|
848 |
+
|
849 |
+
<div class="onestepcheckout-place-order-wrapper">
|
850 |
+
<button type="button" title="<?php echo $this->__('Place order now'); ?>" id="onestepcheckout-place-order" class="large orange onestepcheckout-button onestepcheckout-place-order" onclick="javascript:void(0);"><span><span><?php echo $this->__('Place order now'); ?></span></span></button>
|
851 |
+
</div>
|
852 |
+
</div>
|
853 |
+
<div style="clear: both;"> </div>
|
854 |
+
</div>
|
855 |
+
</fieldset>
|
856 |
+
</form>
|
857 |
+
|
858 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
859 |
+
<?php echo $this->getChildHtml('login-popup'); ?>
|
860 |
+
<?php endif; ?>
|
861 |
+
|
862 |
+
<?php if($helper->isValidateEmail()): ?>
|
863 |
+
<script>
|
864 |
+
$('billing:email').observe('blur', function(e) {
|
865 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
866 |
+
var email = e.element().getValue();
|
867 |
+
var parameters = { email: email };
|
868 |
+
|
869 |
+
new Ajax.Request(url, {
|
870 |
+
parameters: parameters,
|
871 |
+
onComplete: function(response) {
|
872 |
+
if(response.status == 200) {
|
873 |
+
var result = response.responseText.evalJSON().result;
|
874 |
+
if(result == 'invalid') {
|
875 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Invalid email address.'); ?>');
|
876 |
+
$('onestepcheckout-email-error').show();
|
877 |
+
}
|
878 |
+
else if(result == 'exists') {
|
879 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
880 |
+
// Remove the password fields if the email exists in database
|
881 |
+
$('onestepcheckout-li-password').hide();
|
882 |
+
<?php endif; ?>
|
883 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
884 |
+
$('onestepcheckout-email-error').show();
|
885 |
+
$('id_onestepcheckout_username').value = email;
|
886 |
+
}
|
887 |
+
else {
|
888 |
+
$('onestepcheckout-email-error').hide();
|
889 |
+
}
|
890 |
+
}
|
891 |
+
}
|
892 |
+
})
|
893 |
+
|
894 |
+
});
|
895 |
+
Validation.add('validate-email', '<?php echo $this->__('This is a required field.') ?>', function(v) {
|
896 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
897 |
+
var email = v;
|
898 |
+
var parameters = { email: email };
|
899 |
+
var value = Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
|
900 |
+
|
901 |
+
new Ajax.Request(url, {
|
902 |
+
parameters: parameters,
|
903 |
+
asynchronous: false,
|
904 |
+
onComplete: function(response) {
|
905 |
+
if(response.status == 200) {
|
906 |
+
var result = response.responseText.evalJSON().result;
|
907 |
+
if(result == 'invalid') {
|
908 |
+
value = false;
|
909 |
+
} else if(result == 'exists') {
|
910 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
911 |
+
$('onestepcheckout-li-password').hide();
|
912 |
+
<?php endif; ?>
|
913 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
914 |
+
$('onestepcheckout-email-error').show();
|
915 |
+
$('id_onestepcheckout_username').value = email;
|
916 |
+
value = false;
|
917 |
+
}
|
918 |
+
}
|
919 |
+
}
|
920 |
+
})
|
921 |
+
return value;
|
922 |
+
});
|
923 |
+
</script>
|
924 |
+
<?php endif; ?>
|
925 |
+
|
926 |
+
<?php if($this->settings['enable_terms']): ?>
|
927 |
+
<div id="onestepcheckout-toc-popup" style="display: none;">
|
928 |
+
|
929 |
+
<div class="onestepcheckout-popup-wrapper">
|
930 |
+
<div class="onestepcheckout-popup-wrapper-inner">
|
931 |
+
<h1><?php echo $this->settings['terms_title']; ?></h1>
|
932 |
+
|
933 |
+
<div class="onestepcheckout-toc-terms">
|
934 |
+
<?php echo $this->settings['terms_contents']; ?>
|
935 |
+
</div>
|
936 |
+
|
937 |
+
<p class="close"><a href="javascript:void(0);"><?php echo $this->__('Close'); ?></a></p>
|
938 |
+
</div>
|
939 |
+
</div>
|
940 |
+
<div class="onestepcheckout-popup-footer"> </div>
|
941 |
+
</div>
|
942 |
+
<script>
|
943 |
+
Event.observe(window, 'load', function() {
|
944 |
+
|
945 |
+
var termsPopup = new Control.Modal($('onestepcheckout-toc-popup'), {
|
946 |
+
overlayOpacity: 0.65,
|
947 |
+
fade: true,
|
948 |
+
fadeDuration: 0.3
|
949 |
+
});
|
950 |
+
|
951 |
+
$('onestepcheckout-toc-link').observe('click', function(e) {
|
952 |
+
e.preventDefault();
|
953 |
+
termsPopup.open();
|
954 |
+
});
|
955 |
+
|
956 |
+
$$('div#onestepcheckout-toc-popup p.close a').invoke('observe', 'click', function(e) {
|
957 |
+
e.preventDefault();
|
958 |
+
termsPopup.close();
|
959 |
+
});
|
960 |
+
|
961 |
+
});
|
962 |
+
|
963 |
+
/*
|
964 |
+
var popup;
|
965 |
+
Event.observe(window, 'load', function() {
|
966 |
+
popup = new OneStepCheckout_Popup('onestepcheckout-toc-popup','onestepcheckout-toc-link', 'div#onestepcheckout-toc-popup p.close a');
|
967 |
+
});
|
968 |
+
*/
|
969 |
+
</script>
|
970 |
+
<?php endif; ?>
|
971 |
+
|
972 |
+
|
973 |
+
|
974 |
+
|
975 |
+
|
976 |
+
<script>
|
977 |
+
<?php if($this->hasFormErrors()): ?>
|
978 |
+
if($$('div.input-error').length > 0) {
|
979 |
+
var input = $$('div.input-error')[0].select('input');
|
980 |
+
if(input.length == 1) {
|
981 |
+
input[0].focus();
|
982 |
+
}
|
983 |
+
}
|
984 |
+
<?php endif; ?>
|
985 |
+
</script>
|
986 |
+
|
987 |
+
<?php if(!$this->settings['exclude_region']): ?>
|
988 |
+
<script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
|
989 |
+
<script type="text/javascript">
|
990 |
+
//<![CDATA[
|
991 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
992 |
+
|
993 |
+
<?php if($this->settings['enable_different_shipping'] && !$this->isVirtual()): ?>
|
994 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
|
995 |
+
<?php endif; ?>
|
996 |
+
//]]>
|
997 |
+
</script>
|
998 |
+
<?php endif; ?>
|
999 |
+
|
1000 |
+
|
1001 |
+
<script type="text/javascript">
|
1002 |
+
|
1003 |
+
Event.observe(window, 'load', function() {
|
1004 |
+
if ($$('div.shopping-cart-totals').length == 1) {
|
1005 |
+
}
|
1006 |
+
else {
|
1007 |
+
|
1008 |
+
already_placing_order = false;
|
1009 |
+
review = false;
|
1010 |
+
reviewmodal = false;
|
1011 |
+
|
1012 |
+
/* Handle place order click event */
|
1013 |
+
$$('.onestepcheckout-place-order').each(function(elem){
|
1014 |
+
elem.observe('click', function(e) {
|
1015 |
+
Event.stop(e);
|
1016 |
+
|
1017 |
+
// First validate the form
|
1018 |
+
var form = new VarienForm('onestepcheckout-form');
|
1019 |
+
|
1020 |
+
if(!form.validator.validate()) {
|
1021 |
+
Event.stop(e);
|
1022 |
+
} else {
|
1023 |
+
|
1024 |
+
if(!already_placing_order && $$('.loading-ajax').length <= 0 ) {
|
1025 |
+
<?php if(!empty($helper->settings['addressreview']['enable_addressreview'])):?>
|
1026 |
+
var addressTemplates = {
|
1027 |
+
shipping: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['shipping_template']));?>',
|
1028 |
+
billing: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['billing_template']));?>'
|
1029 |
+
};
|
1030 |
+
addressPreview(addressTemplates, 'addressreview');
|
1031 |
+
if(!review){
|
1032 |
+
review = true;
|
1033 |
+
if(!reviewmodal){
|
1034 |
+
reviewmodal = new Control.Modal($('addressreview'),{
|
1035 |
+
overlayOpacity: 0.75,
|
1036 |
+
className: 'oscmodal',
|
1037 |
+
fade: true,
|
1038 |
+
closeOnClick: false
|
1039 |
+
});
|
1040 |
+
}
|
1041 |
+
reviewmodal.open();
|
1042 |
+
reviewmodal.observe('beforeClose',function(){
|
1043 |
+
review = false;
|
1044 |
+
});
|
1045 |
+
return true;
|
1046 |
+
Event.stop(e);
|
1047 |
+
} else {
|
1048 |
+
reviewmodal.close();
|
1049 |
+
}
|
1050 |
+
<?php endif;?>
|
1051 |
+
already_placing_order = true;
|
1052 |
+
|
1053 |
+
var submitelement = $('onestepcheckout-place-order');
|
1054 |
+
/* Disable button to avoid multiple clicks */
|
1055 |
+
submitelement.removeClassName('orange').addClassName('grey');
|
1056 |
+
submitelement.disabled = true;
|
1057 |
+
|
1058 |
+
var loaderelement = new Element('span').
|
1059 |
+
addClassName('onestepcheckout-place-order-loading').
|
1060 |
+
update('<?php echo $this->__('Please wait, processing your order...'); ?>');
|
1061 |
+
|
1062 |
+
submitelement.parentNode.appendChild(loaderelement);
|
1063 |
+
|
1064 |
+
/* Submit the form */
|
1065 |
+
$('onestepcheckout-form').submit();
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
});
|
1069 |
+
});
|
1070 |
+
|
1071 |
+
|
1072 |
+
// This is a separate page
|
1073 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1074 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1075 |
+
|
1076 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
1077 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
1078 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
1079 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
1080 |
+
|
1081 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
1082 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
1083 |
+
new Effect.Fade(item);
|
1084 |
+
});
|
1085 |
+
});
|
1086 |
+
|
1087 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
1088 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
1089 |
+
new Effect.Fade(item);
|
1090 |
+
});
|
1091 |
+
});
|
1092 |
+
|
1093 |
+
var has_hidden_terms = false;
|
1094 |
+
|
1095 |
+
if($('id_accept_terms') != null) {
|
1096 |
+
|
1097 |
+
$('id_accept_terms').observe('click', function(e) {
|
1098 |
+
var element = e.element();
|
1099 |
+
|
1100 |
+
if(element.checked) {
|
1101 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1102 |
+
new Effect.Fade(item);
|
1103 |
+
has_hidden_terms = true;
|
1104 |
+
});
|
1105 |
+
}
|
1106 |
+
else {
|
1107 |
+
if(has_hidden_terms) {
|
1108 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1109 |
+
new Effect.Appear(item);
|
1110 |
+
has_hidden_terms = false;
|
1111 |
+
});
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
});
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
var form = $('onestepcheckout-form');
|
1119 |
+
|
1120 |
+
/* Highlight selected payment method if one set */
|
1121 |
+
if($RF(form, 'payment[method]') != null) {
|
1122 |
+
try {
|
1123 |
+
var payment_method = $RF(form, 'payment[method]');
|
1124 |
+
$('container_payment_method_' + payment_method).show();
|
1125 |
+
$('payment_form_' + payment_method).show();
|
1126 |
+
} catch(err) {
|
1127 |
+
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/* Set default shipping method if not set */
|
1132 |
+
if($RF(form, 'shipping_method') == null) {
|
1133 |
+
try {
|
1134 |
+
var method = '<?php echo $this->_getDefaultShippingMethod(); ?>';
|
1135 |
+
if(method != '') {
|
1136 |
+
$('s_method_' + method).checked = true;
|
1137 |
+
get_separate_save_methods_function(url);
|
1138 |
+
}
|
1139 |
+
} catch(err) {
|
1140 |
+
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
//submit what's available on load
|
1144 |
+
get_separate_save_methods_function(url)();
|
1145 |
+
|
1146 |
+
<?php if($this->differentShippingAvailable()): ?>
|
1147 |
+
$('billing:use_for_shipping_yes').observe('click', function(e) {
|
1148 |
+
var element = e.element();
|
1149 |
+
if(element.checked){
|
1150 |
+
$('shipping_address').hide();
|
1151 |
+
} else {
|
1152 |
+
if($('shipping-address-select') && $('shipping-address-select').value == ''){
|
1153 |
+
$('shipping_address_list').show()
|
1154 |
+
}
|
1155 |
+
$('shipping_address').show();
|
1156 |
+
<?php if(!$this->isCustomerLoggedIn()):?>
|
1157 |
+
$('shipping_address_list').show()
|
1158 |
+
<?php endif;?>
|
1159 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1160 |
+
if(!$('shipping-address-select') && $('shipping_address_list').getStyle('display')=='none'){
|
1161 |
+
$('shipping_address_list').show()
|
1162 |
+
}
|
1163 |
+
<?php endif;?>
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
<?php if($this->settings['enable_ajax_save_billing']): ?>
|
1167 |
+
get_save_billing_function('<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>', '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>', <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>, true)();
|
1168 |
+
<?php endif; ?>
|
1169 |
+
|
1170 |
+
});
|
1171 |
+
<?php endif; ?>
|
1172 |
+
<?php
|
1173 |
+
$triggers = Mage::getStoreConfig('onestepcheckout/ajax_update/ajax_save_billing_fields');
|
1174 |
+
if(!empty($triggers)){
|
1175 |
+
$triggers = str_replace('country', 'country_id', $triggers);
|
1176 |
+
$triggers = str_replace('state/region', 'region_id', $triggers);
|
1177 |
+
$triggers = explode(',',$triggers);
|
1178 |
+
if(in_array('region_id',$triggers)){
|
1179 |
+
$triggers[] = 'region';
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
?>
|
1183 |
+
|
1184 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/ajax_update/enable_ajax_save_billing') && !empty($triggers)):?>
|
1185 |
+
|
1186 |
+
var url_save_billing = '<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>';
|
1187 |
+
var url_set_methods = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1188 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1189 |
+
var update_on_initial = false;
|
1190 |
+
|
1191 |
+
var euvat = $('euvat_action_validate_taxvat');
|
1192 |
+
|
1193 |
+
if(euvat !== null){
|
1194 |
+
euvat.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
var euvatid = $('billing:vat_id');
|
1198 |
+
|
1199 |
+
if(euvatid !== null){
|
1200 |
+
euvatid.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
triggers = ['<?php echo implode ('\',\'',$triggers)?>'];
|
1204 |
+
btriggered = [];
|
1205 |
+
striggered = [];
|
1206 |
+
|
1207 |
+
<?php
|
1208 |
+
foreach($triggers as $value){
|
1209 |
+
echo (($this->getQuote()->getBillingAddress()->getData($value)) ? 'btriggered.push(\'billing:'.$value.'\');' : '');
|
1210 |
+
echo (($this->getQuote()->getShippingAddress()->getData($value)) ? 'striggered.push(\'shipping:'.$value.'\');' : '');
|
1211 |
+
}
|
1212 |
+
?>
|
1213 |
+
|
1214 |
+
|
1215 |
+
bcountry_id = $('billing:country_id');
|
1216 |
+
if(bcountry_id){
|
1217 |
+
if(bcountry_id.getValue()){
|
1218 |
+
if(!btriggered.include('billing:country_id')){
|
1219 |
+
btriggered.push('billing:country_id');
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
}
|
1223 |
+
scountry_id = $('shipping:country_id');
|
1224 |
+
if(scountry_id){
|
1225 |
+
if(scountry_id.getValue()){
|
1226 |
+
if(!striggered.include('shipping:country_id')){
|
1227 |
+
striggered.push('shipping:country_id');
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
batriggered = false;
|
1233 |
+
satriggered = false;
|
1234 |
+
|
1235 |
+
changeTimer = false;
|
1236 |
+
changeInterval = 1000;
|
1237 |
+
|
1238 |
+
triggers.each(function(item){
|
1239 |
+
var belement = $('billing:'+item);
|
1240 |
+
if(belement){
|
1241 |
+
belement.observe('change', function(e){
|
1242 |
+
var element = e.element();
|
1243 |
+
var id = element.id;
|
1244 |
+
var tagname = element.tagName;
|
1245 |
+
if(tagname === 'SELECT'){
|
1246 |
+
clearTimeout(changeTimer);
|
1247 |
+
changeTimer = setTimeout(bcallbackEvent, changeInterval, id);
|
1248 |
+
}Â else {
|
1249 |
+
bcallbackEvent(id);
|
1250 |
+
}
|
1251 |
+
});
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
var selement = $('shipping:'+item);
|
1255 |
+
if(selement){
|
1256 |
+
selement.observe('change', function(e){
|
1257 |
+
var element = e.element();
|
1258 |
+
var id = element.id;
|
1259 |
+
var tagname = element.tagName;
|
1260 |
+
if(tagname === 'SELECT'){
|
1261 |
+
clearTimeout(changeTimer);
|
1262 |
+
changeTimer = setTimeout(scallbackEvent, changeInterval, id);
|
1263 |
+
}Â else {
|
1264 |
+
scallbackEvent(id);
|
1265 |
+
}
|
1266 |
+
});
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
|
1270 |
+
function scallbackEvent (id){
|
1271 |
+
if(!striggered.include(id)){
|
1272 |
+
striggered.push(id);
|
1273 |
+
}
|
1274 |
+
if(striggered.length >= triggers.length-1){
|
1275 |
+
satriggered = true;
|
1276 |
+
}
|
1277 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, satriggered)();
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
|
1281 |
+
function bcallbackEvent (id){
|
1282 |
+
if(!btriggered.include(id)){
|
1283 |
+
btriggered.push(id);
|
1284 |
+
}
|
1285 |
+
if(btriggered.length >= triggers.length-1){
|
1286 |
+
batriggered = true;
|
1287 |
+
}
|
1288 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, batriggered)();
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
|
1292 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1293 |
+
var bselect = $('billing-address-select');
|
1294 |
+
var sselect = $('shipping-address-select');
|
1295 |
+
if(bselect){
|
1296 |
+
bselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1297 |
+
}
|
1298 |
+
if(sselect){
|
1299 |
+
sselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1300 |
+
}
|
1301 |
+
<?php endif;?>
|
1302 |
+
|
1303 |
+
<?php endif; ?>
|
1304 |
+
|
1305 |
+
});
|
1306 |
+
|
1307 |
+
if($('payment-tool-tip-close')){
|
1308 |
+
Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
</script>
|
1312 |
+
|
1313 |
+
|
1314 |
+
<?php endif; ?>
|
1315 |
+
|
1316 |
+
<div id="onestepcheckout_popup_overlay" style="display: none;"> </div>
|
1317 |
+
|
1318 |
+
|
1319 |
+
<div id="loading-process" style="display: none;"></div>
|
@@ -0,0 +1,217 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$methods = $this->getMethods();
|
38 |
+
$oneMethod = count($methods) <= 1;
|
39 |
+
|
40 |
+
|
41 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
42 |
+
$hide_nonfree_methods = false;
|
43 |
+
if($helper->settings['hide_nonfree_payment_methods']) {
|
44 |
+
foreach($this->getMethods() as $_method) {
|
45 |
+
if($_method->getCode() == 'free') {
|
46 |
+
$hide_nonfree_methods = true;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
?>
|
53 |
+
|
54 |
+
<div class="payment-methods">
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
<?php echo $this->getChildHtml('reward.scripts'); ?>
|
58 |
+
<?php echo $this->getChildHtml('customerbalance_scripts'); ?>
|
59 |
+
var payment = new Payment('checkout-payment-method-load', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
|
60 |
+
payment.currentMethod = "<?php echo $this->getQuote()->getPayment()->getMethod() ?>";
|
61 |
+
//]]>
|
62 |
+
</script>
|
63 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise()):?>
|
64 |
+
<?php echo $this->getChildHtml('customerbalance'); ?>
|
65 |
+
<?php echo $this->getChildHtml('reward.points'); ?>
|
66 |
+
<?php endif;?>
|
67 |
+
|
68 |
+
<?php if (count($this->getMethods())=='1' && Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
69 |
+
<dl id="checkout-payment-method-load" style="display: none">
|
70 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
71 |
+
|
72 |
+
<dt>
|
73 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="hidden" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
74 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label></dt>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</dl>
|
77 |
+
<?php else:?>
|
78 |
+
|
79 |
+
<dl id="checkout-payment-method-load">
|
80 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
81 |
+
<?php if($hide_nonfree_methods && $_code != 'free') continue;
|
82 |
+
|
83 |
+
$_style = "";
|
84 |
+
if($_code == "adyen_hpp") {
|
85 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
86 |
+
$disabled = $_method->getHppOptionsDisabled();
|
87 |
+
if(!$disabled) {
|
88 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
89 |
+
}
|
90 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
91 |
+
$_style = "display:none";
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
|
95 |
+
<dt style="<?php echo $_style; ?>">
|
96 |
+
<?php if( sizeof($this->getMethods()) > 1 ): ?>
|
97 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio validate-one-required-by-name" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
98 |
+
<?php else: ?>
|
99 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" /></span>
|
100 |
+
<?php endif; ?>
|
101 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label>
|
102 |
+
</dt>
|
103 |
+
<?php if($html = $this->getChildHtml('payment.method.'.$_code)): ?>
|
104 |
+
<?php $class = ($_code == "adyen_hpp" || $_code == "adyen_oneclick") ? "" : "payment-method"; ?>
|
105 |
+
<dd id="container_payment_method_<?php echo $_code; ?>" class="<?php echo $class; ?>">
|
106 |
+
<?php echo $html; ?>
|
107 |
+
</dd>
|
108 |
+
<?php endif; ?>
|
109 |
+
<script type="text/javascript">
|
110 |
+
//<![CDATA[
|
111 |
+
|
112 |
+
var SwitchMethod= function() {
|
113 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
114 |
+
|
115 |
+
if(method != "adyen_hpp") {
|
116 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
117 |
+
if($('hpp_payment_form_adyen_hpp'))
|
118 |
+
{
|
119 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
120 |
+
var elements = form.getElementsByTagName('input');
|
121 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
// check if oneclick is enabled if so clear the selected option because you select different payment method
|
126 |
+
if(method != "adyen_oneclick") {
|
127 |
+
// always enable the oneclick payments options if this payment method is on
|
128 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
129 |
+
{
|
130 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
131 |
+
var elements = form.getElementsByTagName('input');
|
132 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
payment.switchMethod(method);
|
137 |
+
};
|
138 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
139 |
+
|
140 |
+
//]]>
|
141 |
+
</script>
|
142 |
+
<?php endforeach; ?>
|
143 |
+
</dl>
|
144 |
+
<?php endif;?>
|
145 |
+
</div>
|
146 |
+
<script type="text/javascript">
|
147 |
+
//<![CDATA[
|
148 |
+
|
149 |
+
$$('.cvv-what-is-this').each(function(element){
|
150 |
+
Event.observe(element, 'click', toggleToolTip);
|
151 |
+
});
|
152 |
+
|
153 |
+
function toggleToolTip(event){
|
154 |
+
if($('payment-tool-tip')){
|
155 |
+
$('payment-tool-tip').setStyle({
|
156 |
+
left: (Event.pointerX(event)-100)+'px',
|
157 |
+
top: (Event.pointerY(event)-300)+'px'
|
158 |
+
});
|
159 |
+
$('payment-tool-tip').toggle();
|
160 |
+
}
|
161 |
+
Event.stop(event);
|
162 |
+
}
|
163 |
+
|
164 |
+
var checkout = new Checkout();
|
165 |
+
$$('#checkout-payment-method-load dt input').invoke('observe', 'click', function(e) {
|
166 |
+
|
167 |
+
var element = e.element();
|
168 |
+
var name = 'payment_form_' + element.getValue();
|
169 |
+
payment.currentMethod = element.getValue();
|
170 |
+
/* Hide all other forms */
|
171 |
+
$$('dd.payment-method').invoke('hide');
|
172 |
+
|
173 |
+
if(element.checked) {
|
174 |
+
payment.switchMethod(payment.currentMethod);
|
175 |
+
var form = $(name);
|
176 |
+
var container = $('container_payment_method_' + element.getValue());
|
177 |
+
|
178 |
+
if(element !== null && container !== null) {
|
179 |
+
container.show();
|
180 |
+
$(name).show();
|
181 |
+
}
|
182 |
+
}
|
183 |
+
});
|
184 |
+
|
185 |
+
// ADYEN: set current method as well if you click on hpp and oneclick
|
186 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', function(e) {
|
187 |
+
payment.currentMethod = "adyen_hpp";
|
188 |
+
});
|
189 |
+
|
190 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', function(e) {
|
191 |
+
payment.currentMethod = "adyen_oneclick";
|
192 |
+
});
|
193 |
+
|
194 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise() && Mage::helper('customer')->isLoggedIn()):?>
|
195 |
+
//if we have a enterprise version we should include this
|
196 |
+
|
197 |
+
rPoints = $('use_reward_points');
|
198 |
+
if(rPoints){
|
199 |
+
if(rPoints.checked){
|
200 |
+
payment.switchRewardPointsCheckbox();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
cBalance = $('use_customer_balance');
|
204 |
+
if(cBalance){
|
205 |
+
if(cBalance.checked){
|
206 |
+
payment.switchCustomerBalanceCheckbox();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
//if we have a enterprise version we should include this end
|
210 |
+
<?php endif;?>
|
211 |
+
|
212 |
+
payment.switchMethod(payment.currentMethod);
|
213 |
+
|
214 |
+
|
215 |
+
<?php echo $this->getChildHtml('giftcardaccount_scripts');?>
|
216 |
+
//]]>
|
217 |
+
</script>
|
@@ -0,0 +1,139 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Enterprise Edition
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Magento Enterprise Edition License
|
8 |
+
* that is bundled with this package in the file LICENSE_EE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://www.magentocommerce.com/license/enterprise-edition
|
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 |
+
* 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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://www.magentocommerce.com/license/enterprise-edition
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
$methods = $this->getMethods();
|
34 |
+
$oneMethod = count($methods) <= 1;
|
35 |
+
?>
|
36 |
+
<dl class="sp-methods" id="checkout-payment-method-load">
|
37 |
+
<?php foreach ($methods as $_method):
|
38 |
+
$_code = $_method->getCode();
|
39 |
+
|
40 |
+
$_style = "";
|
41 |
+
if($_code == "adyen_hpp") {
|
42 |
+
|
43 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
44 |
+
$disabled = $_method->getHppOptionsDisabled();
|
45 |
+
if(!$disabled) {
|
46 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
47 |
+
}
|
48 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
49 |
+
$_style = "display:none";
|
50 |
+
}
|
51 |
+
?>
|
52 |
+
<dt style="<?php echo $_style; ?>">
|
53 |
+
<?php if( sizeof($this->getMethods()) > 1 ): ?>
|
54 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
55 |
+
<?php else: ?>
|
56 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
57 |
+
<?php endif; ?>
|
58 |
+
|
59 |
+
<?php if(($_code == "adyen_hpp" && $disabled) || ($_code != "adyen_hpp")): ?>
|
60 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->getMethodTitle($_method) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
61 |
+
<?php endif; ?>
|
62 |
+
|
63 |
+
</dt>
|
64 |
+
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
65 |
+
<dd>
|
66 |
+
<?php echo $html; ?>
|
67 |
+
</dd>
|
68 |
+
<?php endif; ?>
|
69 |
+
<script type="text/javascript">
|
70 |
+
//<![CDATA[
|
71 |
+
|
72 |
+
var SwitchMethod= function() {
|
73 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
74 |
+
|
75 |
+
if(method != "adyen_hpp") {
|
76 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
77 |
+
if($('hpp_payment_form_adyen_hpp'))
|
78 |
+
{
|
79 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
80 |
+
var elements = form.getElementsByTagName('input');
|
81 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
// check if adyen_oneclick is enabled
|
86 |
+
if(method != "adyen_oneclick") {
|
87 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
88 |
+
{
|
89 |
+
// if so clear the selected option because you select different payment method
|
90 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
91 |
+
var elements = form.getElementsByTagName('input');
|
92 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
93 |
+
|
94 |
+
// don't show the cvc field
|
95 |
+
$$('.cvc_block').each(
|
96 |
+
function (e) {
|
97 |
+
e.setStyle({display:'none'});
|
98 |
+
}
|
99 |
+
);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
payment.switchMethod(method);
|
103 |
+
};
|
104 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
105 |
+
|
106 |
+
//]]>
|
107 |
+
</script>
|
108 |
+
<?php endforeach; ?>
|
109 |
+
</dl>
|
110 |
+
<?php echo $this->getChildChildHtml('additional'); ?>
|
111 |
+
<script type="text/javascript">
|
112 |
+
//<![CDATA[
|
113 |
+
<?php echo $this->getChildChildHtml('scripts'); ?>
|
114 |
+
payment.init();
|
115 |
+
<?php if (is_string($oneMethod)): ?>
|
116 |
+
payment.switchMethod('<?php echo $oneMethod ?>');
|
117 |
+
<?php endif; ?>
|
118 |
+
|
119 |
+
// always enable the hpp payment options if this payment method is on
|
120 |
+
if($('hpp_payment_form_adyen_hpp'))
|
121 |
+
{
|
122 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
123 |
+
var elements = form.getElementsByTagName('input');
|
124 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
125 |
+
}
|
126 |
+
|
127 |
+
// always enable the oneclick payments options if this payment method is on
|
128 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
129 |
+
{
|
130 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
131 |
+
var elements = form.getElementsByTagName('input');
|
132 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
133 |
+
|
134 |
+
// always enable the selectboxes for the oneclick creditcards
|
135 |
+
var elements = form.getElementsByTagName('select');
|
136 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
137 |
+
}
|
138 |
+
//]]>
|
139 |
+
</script>
|
@@ -0,0 +1,1319 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$step_counter = 1;
|
4 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
5 |
+
|
6 |
+
?>
|
7 |
+
<?php if(!$this->canCheckout() || !$this->validateMinimumAmount()): ?>
|
8 |
+
<?php if($this->settings['checkout_title']): ?>
|
9 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
10 |
+
<?php endif; ?>
|
11 |
+
|
12 |
+
<?php if($this->canCheckout() && !$this->validateMinimumAmount()): ?>
|
13 |
+
<p><?php echo Mage::getStoreConfig('sales/minimum_order/description'); ?></p>
|
14 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
15 |
+
<?php else: ?>
|
16 |
+
<p><?php echo $this->__('You need to have products in your cart to checkout, and your cart is empty.'); ?></p>
|
17 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php else: ?>
|
20 |
+
|
21 |
+
<form id="onestepcheckout-form" method="post" action="<?php echo $this->getUrl('onestepcheckout', array('_secure'=>true)); ?>">
|
22 |
+
<fieldset class="group-select" style="margin: 0;">
|
23 |
+
|
24 |
+
<?php if($this->settings['checkout_title']): ?>
|
25 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
26 |
+
<?php endif; ?>
|
27 |
+
|
28 |
+
<?php if($this->settings['checkout_description']): ?>
|
29 |
+
<p class="onestepcheckout-description"><?php echo $this->settings['checkout_description']; ?></p>
|
30 |
+
<?php endif; ?>
|
31 |
+
|
32 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
33 |
+
<p class="onestepcheckout-login-link">
|
34 |
+
<a id="onestepcheckout-login-link" href="javascript:void(0); return: false;"><?php echo $this->__('Already registered? Click here to login.'); ?></a>
|
35 |
+
</p>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php if(isset($this->formErrors['unknown_source_error'])): ?>
|
39 |
+
<div class="onestepcheckout-error">
|
40 |
+
<?php echo $this->formErrors['unknown_source_error']; ?>
|
41 |
+
</div>
|
42 |
+
<?php endif; ?>
|
43 |
+
<div class="onestepcheckout-threecolumns checkoutcontainer onestepcheckout-skin-<?php echo $this->settings['skin']; ?> <?php if(Mage::helper('onestepcheckout')->isEnterprise()): ?>onestepcheckout-enterprise<?php endif; ?>">
|
44 |
+
<div class="onestepcheckout-column-left">
|
45 |
+
<div id="billing_address">
|
46 |
+
<script type="text/javascript">
|
47 |
+
var billing = new Billing();
|
48 |
+
|
49 |
+
</script>
|
50 |
+
<ul>
|
51 |
+
<li>
|
52 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Billing address'); ?></p>
|
53 |
+
<?php if(isset($this->formErrors['billing_error']) && count($this->formErrors['billing_errors']) > 0): ?>
|
54 |
+
<div class="onestepcheckout-error">
|
55 |
+
<?php echo $this->__('Please check red fields below and try again.'); ?>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
</li>
|
59 |
+
<?php if ($this->customerHasAddresses()): ?>
|
60 |
+
<li>
|
61 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
62 |
+
<div class="input-box">
|
63 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
<?php endif; ?>
|
67 |
+
<li>
|
68 |
+
<div>
|
69 |
+
<ul id="billing_address_list" <?php echo (($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('billing')) ? 'style = "display:none"' : false ); ?>>
|
70 |
+
<?php echo $this->getChildHtml('billing_address');?>
|
71 |
+
<?php $addressAttributes = $this->getChild('customer_form_billing_address_user_defined_attributes');?>
|
72 |
+
<?php if ($addressAttributes): ?>
|
73 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getBillingAddress())->setEntityType('customer_address');?>
|
74 |
+
<?php $addressAttributes->setFieldIdFormat('billing:%1$s')->setFieldNameFormat('billing[%1$s]');?>
|
75 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
76 |
+
<?php endif;?>
|
77 |
+
<?php $customerAttributes = $this->getChild('customer_form_customer_user_defined_attributes');?>
|
78 |
+
<?php if ($customerAttributes): ?>
|
79 |
+
<?php $customerAttributes->setEntityModelClass('customer/customer')->setFieldIdFormat('billing:%1$s');?>
|
80 |
+
<?php $customerAttributes->setFieldNameFormat('billing[%1$s]')->setShowContainer(false);?>
|
81 |
+
<?php echo $customerAttributes->setExcludeFileAttributes(true)->toHtml()?>
|
82 |
+
<?php endif;?>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
</li>
|
86 |
+
<li>
|
87 |
+
<?php $uncheck = (!empty($_POST['billing']) && empty($_POST['billing']['use_for_shipping']));?>
|
88 |
+
<?php if($this->differentShippingAvailable()): ?>
|
89 |
+
<div class="input-box input-different-shipping">
|
90 |
+
<input type="checkbox" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'checked="checked" ':'')?>/>
|
91 |
+
<label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to the same address')?></label>
|
92 |
+
</div>
|
93 |
+
<?php else: ?>
|
94 |
+
<input type="hidden" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" />
|
95 |
+
<?php endif; ?>
|
96 |
+
</li>
|
97 |
+
</ul>
|
98 |
+
</div>
|
99 |
+
<?php if($this->differentShippingAvailable()): ?>
|
100 |
+
<div id="shipping_address" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'style="display: none"': false);?>>
|
101 |
+
<script type="text/javascript">
|
102 |
+
var shipping = new Shipping();
|
103 |
+
</script>
|
104 |
+
<ul>
|
105 |
+
<li class="shipping-address-title">
|
106 |
+
<?php echo $this->__('Shipping address'); ?>
|
107 |
+
</li>
|
108 |
+
<?php if ($this->customerHasAddresses()): ?>
|
109 |
+
<li class="form-alt">
|
110 |
+
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
111 |
+
<div class="input-box"><?php echo $this->getAddressesHtmlSelect('shipping') ?></div>
|
112 |
+
</li>
|
113 |
+
<?php endif ?>
|
114 |
+
<li id="shipping_address_list" <?php if($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('shipping')) { echo ' style="display: none;" '; } ?>>
|
115 |
+
<div id="">
|
116 |
+
<ul>
|
117 |
+
<?php echo $this->getChildHtml('shipping_address');?>
|
118 |
+
<?php $addressAttributes = $this->getChild('customer_form_shipping_address_user_defined_attributes');?>
|
119 |
+
<?php if ($addressAttributes): ?>
|
120 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getShippingAddress())->setEntityType('customer_address');?>
|
121 |
+
<?php $addressAttributes->setFieldIdFormat('shipping:%1$s')->setFieldNameFormat('shipping[%1$s]');?>
|
122 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
123 |
+
<?php endif;?>
|
124 |
+
</ul>
|
125 |
+
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getQuote()->getShippingAddress()->getId() ?>" id="shipping:address_id" />
|
126 |
+
<!-- END LIST OF SHIPPIING FIELDS -->
|
127 |
+
</div>
|
128 |
+
</li>
|
129 |
+
</ul>
|
130 |
+
</div>
|
131 |
+
<?php endif; ?>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<div class="onestepcheckout-column-middle">
|
135 |
+
|
136 |
+
|
137 |
+
<?php if(!$this->isVirtual()): ?>
|
138 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_shipping_method')):?>
|
139 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
140 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
141 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
142 |
+
</div>
|
143 |
+
<?php endif; ?>
|
144 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
145 |
+
<?php else:?>
|
146 |
+
<div class="onestepcheckout-shipping-method">
|
147 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Shipping method'); ?></p>
|
148 |
+
|
149 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
150 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
151 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
152 |
+
</div>
|
153 |
+
<?php endif; ?>
|
154 |
+
|
155 |
+
<div class="onestepcheckout-shipping-method-block">
|
156 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<?php endif; ?>
|
160 |
+
<?php endif; ?>
|
161 |
+
|
162 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
163 |
+
<?php if(!empty($this->formErrors['payment_method'])): ?>
|
164 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
165 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
166 |
+
</div>
|
167 |
+
<?php endif; ?>
|
168 |
+
<?php if(!empty($this->formErrors['payment_method_error'])): ?>
|
169 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
170 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
171 |
+
</div>
|
172 |
+
<?php endif; ?>
|
173 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
174 |
+
<?php else: ?>
|
175 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Payment method'); ?></p>
|
176 |
+
<?php if(isset($this->formErrors['payment_method']) && $this->formErrors['payment_method']): ?>
|
177 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
178 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
179 |
+
</div>
|
180 |
+
<?php else: ?>
|
181 |
+
<?php if(isset($this->formErrors['payment_method_error'])): ?>
|
182 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
183 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
184 |
+
</div>
|
185 |
+
<?php endif; ?>
|
186 |
+
<?php endif; ?>
|
187 |
+
|
188 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
189 |
+
|
190 |
+
<div class="tool-tip" id="payment-tool-tip" style="display:none;">
|
191 |
+
<div class="btn-close">
|
192 |
+
<a href="javascript:void(0);" id="payment-tool-tip-close"><img src="<?php echo $this->getSkinUrl('images/btn_window_close.gif') ?>" alt="<?php echo $this->__('Close') ?>" /></a>
|
193 |
+
</div>
|
194 |
+
<div class="block-content">
|
195 |
+
<img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" />
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
<?php endif; ?>
|
199 |
+
</div>
|
200 |
+
|
201 |
+
<div class="onestepcheckout-column-right">
|
202 |
+
|
203 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-4"><?php echo $this->__('Review your order'); ?></p>
|
204 |
+
|
205 |
+
<div class="onestepcheckout-summary">
|
206 |
+
<?php echo $this->getChildHtml('summary'); ?>
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<?php if($this->settings['enable_discount']): ?>
|
210 |
+
<div class="onestepcheckout-coupons">
|
211 |
+
<div id="coupon-notice" style="display: none;"></div>
|
212 |
+
<?php $_couponcode = $this->getQuote()->getCouponCode(); ?>
|
213 |
+
<label for="id_couponcode"><?php echo $this->__('Coupon code:'); ?></label><br/>
|
214 |
+
<input class="input-text" type="text" name="onestepcheckout-couponcode" id="id_couponcode" value="<?php echo Mage::helper('core')->escapeHtml($_couponcode); ?>" />
|
215 |
+
<br/>
|
216 |
+
<button id="onestepcheckout-coupon-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply Coupon'); ?></span></span></button>
|
217 |
+
<button id="onestepcheckout-coupon-remove" class="form-button-alt button" type="button" style="<?php if($_couponcode == '') { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel Coupon'); ?></span></span></button>
|
218 |
+
<script>
|
219 |
+
Event.observe(window, 'load', function() {
|
220 |
+
$('onestepcheckout-coupon-add').observe('click', function(e) {
|
221 |
+
|
222 |
+
var coupon = $('id_couponcode').getValue();
|
223 |
+
var couponNotice = $('coupon-notice');
|
224 |
+
|
225 |
+
couponNotice.hide();
|
226 |
+
|
227 |
+
if(coupon == '') {
|
228 |
+
alert('<?php echo $this->__('Please enter a valid coupon code.'); ?>');
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
|
232 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
233 |
+
var parameters = {code: coupon};
|
234 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
235 |
+
|
236 |
+
var form = $('onestepcheckout-form');
|
237 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
238 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
239 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
240 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
241 |
+
var payment_methods = $$('div.payment-methods').first();
|
242 |
+
|
243 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
244 |
+
|
245 |
+
if(shipping_methods){
|
246 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
247 |
+
}
|
248 |
+
|
249 |
+
if(payment_methods){
|
250 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
251 |
+
}
|
252 |
+
|
253 |
+
summary.update('<div class="loading-ajax"> </div>');
|
254 |
+
|
255 |
+
new Ajax.Request(url, {
|
256 |
+
method: 'post',
|
257 |
+
parameters: parameters,
|
258 |
+
onSuccess: function(transport) {
|
259 |
+
if(transport.status == 200) {
|
260 |
+
|
261 |
+
var response = transport.responseText.evalJSON();
|
262 |
+
|
263 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
264 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
265 |
+
|
266 |
+
if(shipping_methods){
|
267 |
+
shipping_methods.hide();
|
268 |
+
shipping_methods.update(response.shipping_method);
|
269 |
+
shipping_methods.show();
|
270 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
271 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
272 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
273 |
+
new Effect.Fade(item);
|
274 |
+
});
|
275 |
+
});
|
276 |
+
}
|
277 |
+
|
278 |
+
if(payment_methods){
|
279 |
+
payment_methods.hide();
|
280 |
+
payment_methods.replace(response.payment_method);
|
281 |
+
payment_methods.show();
|
282 |
+
|
283 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
284 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
285 |
+
var payment_method = $RF(form, 'payment[method]');
|
286 |
+
|
287 |
+
if(paymentContainer != null){
|
288 |
+
paymentContainer.show();
|
289 |
+
}
|
290 |
+
if(paymentForm != null){
|
291 |
+
paymentForm.show();
|
292 |
+
} else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
293 |
+
// set sub payment method back
|
294 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
295 |
+
|
296 |
+
// check if ideal payment bank is chosen
|
297 |
+
if(payment_hpp_type == "ideal") {
|
298 |
+
if(payment_hpp_ideal_type) {
|
299 |
+
// get issue_id this is before the slash
|
300 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
301 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
302 |
+
}
|
303 |
+
$('payment_form_ideal').show();
|
304 |
+
}
|
305 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
306 |
+
// set sub payment method back
|
307 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
308 |
+
// set back the cvc code
|
309 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
310 |
+
// show the cvc code block
|
311 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
312 |
+
$(cvc_block).show();
|
313 |
+
}
|
314 |
+
|
315 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
316 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
317 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
318 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
319 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
320 |
+
new Effect.Fade(item);
|
321 |
+
});
|
322 |
+
});
|
323 |
+
}
|
324 |
+
|
325 |
+
summary.hide();
|
326 |
+
summary.update(response.summary);
|
327 |
+
summary.show();
|
328 |
+
|
329 |
+
if(response.success) {
|
330 |
+
|
331 |
+
couponNotice.update(response.message);
|
332 |
+
couponNotice.removeClassName('error-msg');
|
333 |
+
couponNotice.addClassName('success-msg');
|
334 |
+
couponNotice.show();
|
335 |
+
/* Show remove button */
|
336 |
+
$('onestepcheckout-coupon-remove').show();
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
|
340 |
+
couponNotice.update(response.message);
|
341 |
+
couponNotice.removeClassName('success-msg');
|
342 |
+
couponNotice.addClassName('error-msg');
|
343 |
+
couponNotice.show();
|
344 |
+
/* Hide remove button */
|
345 |
+
$('onestepcheckout-coupon-remove').hide();
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
});
|
350 |
+
});
|
351 |
+
|
352 |
+
$('onestepcheckout-coupon-remove').observe('click', function(e) {
|
353 |
+
|
354 |
+
var coupon = $('id_couponcode').getValue();
|
355 |
+
var couponNotice = $('coupon-notice');
|
356 |
+
|
357 |
+
couponNotice.hide();
|
358 |
+
|
359 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
360 |
+
var parameters = {code: coupon, remove: '1'};
|
361 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
362 |
+
var payment_methods = $$('div.payment-methods').first();
|
363 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
364 |
+
|
365 |
+
if(shipping_methods){
|
366 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
367 |
+
}
|
368 |
+
|
369 |
+
if(payment_methods){
|
370 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
371 |
+
}
|
372 |
+
summary.update('<div class="loading-ajax"> </div>');
|
373 |
+
|
374 |
+
new Ajax.Request(url, {
|
375 |
+
method: 'post',
|
376 |
+
parameters: parameters,
|
377 |
+
onSuccess: function(transport) {
|
378 |
+
if(transport.status == 200) {
|
379 |
+
var response = transport.responseText.evalJSON();
|
380 |
+
|
381 |
+
if(response.success){
|
382 |
+
$('id_couponcode').setValue('')
|
383 |
+
$('onestepcheckout-coupon-remove').hide();
|
384 |
+
}
|
385 |
+
|
386 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
387 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
388 |
+
|
389 |
+
if(shipping_methods){
|
390 |
+
shipping_methods.hide();
|
391 |
+
shipping_methods.update(response.shipping_method);
|
392 |
+
shipping_methods.show();
|
393 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
394 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
395 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
396 |
+
new Effect.Fade(item);
|
397 |
+
});
|
398 |
+
});
|
399 |
+
}
|
400 |
+
|
401 |
+
if(payment_methods){
|
402 |
+
payment_methods.hide();
|
403 |
+
payment_methods.replace(response.payment_method);
|
404 |
+
payment_methods.show();
|
405 |
+
|
406 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
407 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
408 |
+
|
409 |
+
if(paymentContainer != null){
|
410 |
+
paymentContainer.show();
|
411 |
+
}
|
412 |
+
|
413 |
+
if(paymentForm != null){
|
414 |
+
paymentForm.show();
|
415 |
+
}
|
416 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
417 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
418 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
419 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
420 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
421 |
+
new Effect.Fade(item);
|
422 |
+
});
|
423 |
+
});
|
424 |
+
}
|
425 |
+
|
426 |
+
summary.hide();
|
427 |
+
summary.update(response.summary);
|
428 |
+
summary.show();
|
429 |
+
|
430 |
+
couponNotice.hide();
|
431 |
+
couponNotice.update(response.message);
|
432 |
+
couponNotice.removeClassName('error-msg');
|
433 |
+
couponNotice.addClassName('success-msg');
|
434 |
+
couponNotice.show();
|
435 |
+
}
|
436 |
+
}
|
437 |
+
});
|
438 |
+
});
|
439 |
+
});
|
440 |
+
</script>
|
441 |
+
</div>
|
442 |
+
<?php endif; ?>
|
443 |
+
|
444 |
+
<?php if($this->settings['enable_giftcard']): ?>
|
445 |
+
<div class="onestepcheckout-giftcards">
|
446 |
+
<div id="giftcard-notice" style="display: none;"></div>
|
447 |
+
<?php
|
448 |
+
$_hasGiftCards = unserialize($this->getQuote()->getGiftCards());
|
449 |
+
$_giftcardcode = $this->getQuote()->getgiftcardCode(); ?>
|
450 |
+
<label for="id_giftcardcode"><?php echo $this->__('giftcard code:'); ?></label><br/>
|
451 |
+
<input class="input-text" type="text" name="onestepcheckout-giftcardcode" id="id_giftcardcode" value="<?php echo Mage::helper('core')->escapeHtml($_giftcardcode); ?>" />
|
452 |
+
<br/>
|
453 |
+
<button id="onestepcheckout-giftcard-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply gift card'); ?></span></span></button>
|
454 |
+
<button id="onestepcheckout-giftcard-remove" class="form-button-alt button" type="button" style="<?php if(empty($_hasGiftCards)) { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel gift card'); ?></span></span></button>
|
455 |
+
<script>
|
456 |
+
document.observe('dom:loaded', function() {
|
457 |
+
$('onestepcheckout-giftcard-add').observe('click', function(e) {
|
458 |
+
var giftcard = $('id_giftcardcode').getValue();
|
459 |
+
var giftcardNotice = $('giftcard-notice');
|
460 |
+
giftcardNotice.hide();
|
461 |
+
if(giftcard == '') {
|
462 |
+
alert('<?php echo $this->__('Please enter a valid giftcard code.'); ?>');
|
463 |
+
return;
|
464 |
+
}
|
465 |
+
|
466 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
467 |
+
var parameters = {code: giftcard};
|
468 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
469 |
+
var payment_methods = $$('div.payment-methods').first();
|
470 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
471 |
+
|
472 |
+
if(shipping_methods){
|
473 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
474 |
+
}
|
475 |
+
|
476 |
+
if(payment_methods){
|
477 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
478 |
+
}
|
479 |
+
summary.update('<div class="loading-ajax"> </div>');
|
480 |
+
|
481 |
+
new Ajax.Request(url+Math.random(1000), {
|
482 |
+
method: 'post',
|
483 |
+
parameters: parameters,
|
484 |
+
onSuccess: function(transport) {
|
485 |
+
if(transport.status == 200) {
|
486 |
+
|
487 |
+
var response = transport.responseText.evalJSON();
|
488 |
+
|
489 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
490 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
491 |
+
|
492 |
+
if(shipping_methods){
|
493 |
+
shipping_methods.hide();
|
494 |
+
shipping_methods.update(response.shipping_method);
|
495 |
+
shipping_methods.show();
|
496 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
497 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
498 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
499 |
+
new Effect.Fade(item);
|
500 |
+
});
|
501 |
+
});
|
502 |
+
}
|
503 |
+
|
504 |
+
if(payment_methods){
|
505 |
+
//payment_methods.hide();
|
506 |
+
payment_methods.replace(response.payment_method);
|
507 |
+
//payment_methods.show();
|
508 |
+
|
509 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
510 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
511 |
+
|
512 |
+
if(paymentContainer != null){
|
513 |
+
paymentContainer.show();
|
514 |
+
}
|
515 |
+
if(paymentForm != null){
|
516 |
+
paymentForm.show();
|
517 |
+
}
|
518 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
519 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
520 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
521 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
522 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
523 |
+
new Effect.Fade(item);
|
524 |
+
});
|
525 |
+
});
|
526 |
+
}
|
527 |
+
|
528 |
+
if(response.success) {
|
529 |
+
summary.update(response.summary);
|
530 |
+
giftcardNotice.update(response.message);
|
531 |
+
giftcardNotice.removeClassName('error-msg');
|
532 |
+
giftcardNotice.addClassName('success-msg');
|
533 |
+
giftcardNotice.show();
|
534 |
+
/* Show remove button */
|
535 |
+
$('onestepcheckout-giftcard-remove').show();
|
536 |
+
}
|
537 |
+
else {
|
538 |
+
summary.update(response.summary);
|
539 |
+
giftcardNotice.update(response.message);
|
540 |
+
giftcardNotice.removeClassName('success-msg');
|
541 |
+
giftcardNotice.addClassName('error-msg');
|
542 |
+
giftcardNotice.show();
|
543 |
+
/* Hide remove button */
|
544 |
+
//$('onestepcheckout-giftcard-remove').hide();
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
});
|
549 |
+
});
|
550 |
+
|
551 |
+
$('onestepcheckout-giftcard-remove').observe('click', function(e) {
|
552 |
+
var giftcard = $('id_giftcardcode').getValue();
|
553 |
+
var giftcardNotice = $('giftcard-notice');
|
554 |
+
giftcardNotice.hide();
|
555 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
556 |
+
var parameters = {code: giftcard, remove: '1'};
|
557 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
558 |
+
var payment_methods = $$('div.payment-methods').first();
|
559 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
560 |
+
|
561 |
+
if(shipping_methods){
|
562 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
563 |
+
}
|
564 |
+
|
565 |
+
if(payment_methods){
|
566 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
567 |
+
}
|
568 |
+
summary.update('<div class="loading-ajax"> </div>');
|
569 |
+
|
570 |
+
new Ajax.Request(url, {
|
571 |
+
method: 'post',
|
572 |
+
parameters: parameters,
|
573 |
+
onSuccess: function(transport) {
|
574 |
+
if(transport.status == 200) {
|
575 |
+
var response = transport.responseText.evalJSON();
|
576 |
+
|
577 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
578 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
579 |
+
|
580 |
+
if(shipping_methods){
|
581 |
+
shipping_methods.hide();
|
582 |
+
shipping_methods.update(response.shipping_method);
|
583 |
+
shipping_methods.show();
|
584 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
585 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
586 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
587 |
+
new Effect.Fade(item);
|
588 |
+
});
|
589 |
+
});
|
590 |
+
}
|
591 |
+
|
592 |
+
if(payment_methods){
|
593 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
594 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
595 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
596 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
597 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
598 |
+
new Effect.Fade(item);
|
599 |
+
});
|
600 |
+
});
|
601 |
+
payment_methods.hide();
|
602 |
+
payment_methods.replace(response.payment_method);
|
603 |
+
payment_methods.show();
|
604 |
+
|
605 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
606 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
607 |
+
|
608 |
+
if(paymentContainer != null){
|
609 |
+
paymentContainer.show();
|
610 |
+
}
|
611 |
+
if(paymentForm != null){
|
612 |
+
paymentForm.show();
|
613 |
+
}
|
614 |
+
}
|
615 |
+
|
616 |
+
if(response.success){
|
617 |
+
$('id_giftcardcode').setValue('')
|
618 |
+
$('onestepcheckout-giftcard-remove').hide();
|
619 |
+
}
|
620 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
621 |
+
|
622 |
+
summary.hide();
|
623 |
+
summary.update(response.summary);
|
624 |
+
summary.show();
|
625 |
+
|
626 |
+
giftcardNotice.hide();
|
627 |
+
giftcardNotice.update(response.message);
|
628 |
+
giftcardNotice.removeClassName('error-msg');
|
629 |
+
giftcardNotice.addClassName('success-msg');
|
630 |
+
giftcardNotice.show();
|
631 |
+
}
|
632 |
+
}
|
633 |
+
});
|
634 |
+
});
|
635 |
+
});
|
636 |
+
</script>
|
637 |
+
</div>
|
638 |
+
<?php endif; ?>
|
639 |
+
|
640 |
+
<?php if($this->settings['enable_comments']): ?>
|
641 |
+
<div class="onestepcheckout-comments">
|
642 |
+
<label for="id_comments"><?php echo $this->__('Comments'); ?></label><br/>
|
643 |
+
<textarea id="id_comments" name="onestepcheckout_comments"><?php if(isset($_POST['onestepcheckout_comments'])) { echo Mage::helper('core')->escapeHtml($_POST['onestepcheckout_comments']); } ?></textarea>
|
644 |
+
</div>
|
645 |
+
<?php endif; ?>
|
646 |
+
|
647 |
+
<?php if($this->settings['enable_gift_messages']): ?>
|
648 |
+
<div id="onestepcheckout-giftmessages">
|
649 |
+
<div class="onestepcheckout-giftmessagecontainer">
|
650 |
+
<?php echo $this->helper('onestepcheckout/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
<?php endif; ?>
|
654 |
+
|
655 |
+
<?php $customerEmail = (($this->isCustomerLoggedIn())) ? $this->getQuote()->getCustomer()->getEmail() : false ;?>
|
656 |
+
<?php if($this->settings['enable_newsletter'] && !$this->isSubScribed($customerEmail)): ?>
|
657 |
+
<div class="onestepcheckout-enable-newsletter">
|
658 |
+
<input type="checkbox" id="id_subscribe_newsletter" name="subscribe_newsletter" value="1" <?php if($this->settings['newsletter_default_checked']): ?>checked="checked"<?php endif; ?> />
|
659 |
+
<label for="id_subscribe_newsletter"><?php echo $this->__('Subscribe to our newsletter'); ?></label>
|
660 |
+
</div>
|
661 |
+
<?php endif; ?>
|
662 |
+
|
663 |
+
<?php $_extraProductsHelper = Mage::helper('onestepcheckout/extraproducts'); ?>
|
664 |
+
<?php if($_extraProductsHelper->hasExtraProducts()): ?>
|
665 |
+
<div class="onestepcheckout-extraproducts">
|
666 |
+
<ul>
|
667 |
+
<?php foreach($_extraProductsHelper->getExtraProducts() as $product): ?>
|
668 |
+
<li><input type="checkbox" class="onestepcheckout-extra-product"
|
669 |
+
<?php if($_extraProductsHelper->productInCart($product->getId())): ?>
|
670 |
+
checked="checked" <?php endif; ?>
|
671 |
+
name="extra_products_<?php echo $product->getId(); ?>"
|
672 |
+
id="id_extra_product_<?php echo $product->getId(); ?>" />
|
673 |
+
<label for="id_extra_product_<?php echo $product->getId(); ?>"> <?php echo $product->getName(); ?>
|
674 |
+
<span><?php echo Mage::helper('checkout')->formatPrice($product->getPrice()); ?></span>
|
675 |
+
</label></li>
|
676 |
+
<?php endforeach; ?>
|
677 |
+
</ul>
|
678 |
+
</div>
|
679 |
+
|
680 |
+
<script>
|
681 |
+
Event.observe(window, 'load', function() {
|
682 |
+
$$('input.onestepcheckout-extra-product').invoke('observe', 'click', function(e) {
|
683 |
+
var id_temp = e.element().id.split('id_extra_product_');
|
684 |
+
if(id_temp.length == 2) {
|
685 |
+
var product_id = id_temp[1];
|
686 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_extra_product'); ?>';
|
687 |
+
var parameters = {
|
688 |
+
product_id: product_id
|
689 |
+
}
|
690 |
+
|
691 |
+
if(!e.element().checked) {
|
692 |
+
parameters['remove'] = 1;
|
693 |
+
}
|
694 |
+
|
695 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
696 |
+
summary.update('<div class="loading-ajax"> </div>');
|
697 |
+
|
698 |
+
new Ajax.Request(url, {
|
699 |
+
method: 'post',
|
700 |
+
parameters: parameters,
|
701 |
+
onSuccess: function(transport) {
|
702 |
+
summary.update(transport.responseText);
|
703 |
+
}
|
704 |
+
});
|
705 |
+
};
|
706 |
+
});
|
707 |
+
});
|
708 |
+
</script>
|
709 |
+
<?php endif; ?>
|
710 |
+
|
711 |
+
<?php
|
712 |
+
/**
|
713 |
+
* Feedbackdropdown start
|
714 |
+
*/
|
715 |
+
?>
|
716 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback']) && !empty($this->settings['feedback']['feedback_values'])):?>
|
717 |
+
<?php
|
718 |
+
$selectedFeedBackFields = $this->getRequest()->getPost('onestepcheckout-feedback', false);
|
719 |
+
$feedbackValues = unserialize($this->settings['feedback']['feedback_values']);
|
720 |
+
?>
|
721 |
+
<div class="onestepcheckout-feedback" id="">
|
722 |
+
<label for="id_feedback"><?php echo $this->__('How did you hear about us?'); ?></label><br>
|
723 |
+
<select style="" name="onestepcheckout-feedback" id="id_feedback" defaultvalue="">
|
724 |
+
<option value=""><?php echo $this->__('Please choose'); ?></option>
|
725 |
+
<?php foreach($feedbackValues as $value => $label):
|
726 |
+
$selected= (!empty($selectedFeedBackFields) && $selectedFeedBackFields == $value) ? ' selected' : '';
|
727 |
+
?>
|
728 |
+
<option value="<?php echo $value?>" <?php echo $selected;?>><?php echo $label['value']?></option>
|
729 |
+
<?php endforeach;?>
|
730 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):
|
731 |
+
$selected= (empty($feedbackValues[$selectedFeedBackFields]) && $selectedFeedBackFields != '') ? ' selected' : '';
|
732 |
+
?>
|
733 |
+
<option value="freetext" <?php echo $selected;?>><?php echo $this->__('Other'); ?></option>
|
734 |
+
<?php endif;?>
|
735 |
+
</select>
|
736 |
+
</div>
|
737 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):?>
|
738 |
+
<script type="text/javascript">
|
739 |
+
$('id_feedback').observe('change', function (event){
|
740 |
+
if(this.getValue() == 'freetext'){
|
741 |
+
$('id_feedback_freetext_div').show();
|
742 |
+
} else {
|
743 |
+
$('id_feedback_freetext_div').hide();
|
744 |
+
}
|
745 |
+
});
|
746 |
+
</script>
|
747 |
+
<div id='id_feedback_freetext_div' class="onestepcheckout-feedback-freetext"<?php echo ((!empty($selectedFeedBackFields) && $selectedFeedBackFields == 'freetext') ? '' : ' style="display: none;"'); ?>>
|
748 |
+
<label for="id_feedback_freetext"><?php echo $this->__('Please specify:'); ?></label><br/>
|
749 |
+
<textarea id="id_feedback_freetext" name="onestepcheckout-feedback-freetext"><?php echo Mage::helper('core')->escapeHtml($this->getRequest()->getPost('onestepcheckout-feedback-freetext', false));?></textarea>
|
750 |
+
</div>
|
751 |
+
<?php endif; ?>
|
752 |
+
<?php endif; ?>
|
753 |
+
<?php
|
754 |
+
/**
|
755 |
+
* Feedbackdropdown end
|
756 |
+
*/
|
757 |
+
?>
|
758 |
+
|
759 |
+
<?php if($this->settings['enable_terms']): //deprecated?>
|
760 |
+
<div class="onestepcheckout-enable-terms">
|
761 |
+
<?php
|
762 |
+
|
763 |
+
if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']) {
|
764 |
+
$terms_error = true;
|
765 |
+
}
|
766 |
+
else {
|
767 |
+
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
768 |
+
$terms_error = false;
|
769 |
+
}
|
770 |
+
else {
|
771 |
+
$terms_error = true;
|
772 |
+
}
|
773 |
+
}
|
774 |
+
?>
|
775 |
+
|
776 |
+
<input class="required-entry" type="checkbox" id="id_accept_terms" name="accept_terms" value="1" <?php if(!$terms_error) echo "checked=\"checked\""; ?> />
|
777 |
+
<label for="id_accept_terms"><?php echo $this->__('I accept the <a id="onestepcheckout-toc-link" target="_blank" href="javascript:void(0);">Terms and Conditions</a>'); ?></label>
|
778 |
+
|
779 |
+
<?php if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']): ?>
|
780 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
781 |
+
<?php echo $this->__('You must accept our terms to continue.'); ?>
|
782 |
+
</div>
|
783 |
+
<?php endif; ?>
|
784 |
+
|
785 |
+
</div>
|
786 |
+
<?php endif; ?>
|
787 |
+
|
788 |
+
<?php
|
789 |
+
/**
|
790 |
+
* Default magento agreements
|
791 |
+
*/
|
792 |
+
?>
|
793 |
+
<?php if($this->settings['enable_default_terms']): ?>
|
794 |
+
<?php if(!empty($this->formErrors['agreements_error'])):?>
|
795 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
796 |
+
<?php echo $this->__('Please agree to all the terms and conditions before placing the order.'); ?>
|
797 |
+
</div>
|
798 |
+
<?php endif;?>
|
799 |
+
<?php echo $this->getChildHtml('agreements') ?>
|
800 |
+
<script type="text/javascript">
|
801 |
+
|
802 |
+
var termsmodals = new Object;
|
803 |
+
|
804 |
+
document.observe('dom:loaded', function() {
|
805 |
+
$$('.checkout-agreements li p input').each(
|
806 |
+
function(elem){
|
807 |
+
elem.addClassName('required-entry');
|
808 |
+
}
|
809 |
+
);
|
810 |
+
});
|
811 |
+
|
812 |
+
<?php if($this->settings['enable_textarea']):?>
|
813 |
+
document.observe('dom:loaded', function() {
|
814 |
+
$$('.checkout-agreements li p label').each(
|
815 |
+
function(elem){
|
816 |
+
elem.up().insert('<a href="javascript:void(0);" onclick="termsmodals[\'' + elem.htmlFor + '\'].open();">' + elem.innerHTML + '</a>');
|
817 |
+
elem.hide();
|
818 |
+
}
|
819 |
+
);
|
820 |
+
$$('div.agreement-content').each(
|
821 |
+
function(element){
|
822 |
+
element.id = 'agreement-div-' + element.up('li').down('input').id;
|
823 |
+
$$('body')[0].insert(element);
|
824 |
+
}
|
825 |
+
);
|
826 |
+
$$('.checkout-agreements li p input').each(
|
827 |
+
function(elem){
|
828 |
+
window.termsmodals[elem.id] = new Control.Modal($('agreement-div-' + elem.id),{
|
829 |
+
overlayOpacity: 0.75,
|
830 |
+
className: 'oscmodal',
|
831 |
+
fade: true,
|
832 |
+
closeOnClick: true,
|
833 |
+
height: 400,
|
834 |
+
width: 700
|
835 |
+
});
|
836 |
+
}
|
837 |
+
);
|
838 |
+
});
|
839 |
+
<?php endif;?>
|
840 |
+
|
841 |
+
</script>
|
842 |
+
<?php endif;?>
|
843 |
+
<?php
|
844 |
+
/**
|
845 |
+
* Default magento agreements end
|
846 |
+
*/
|
847 |
+
?>
|
848 |
+
|
849 |
+
<div class="onestepcheckout-place-order-wrapper">
|
850 |
+
<button type="button" title="<?php echo $this->__('Place order now'); ?>" id="onestepcheckout-place-order" class="large orange onestepcheckout-button onestepcheckout-place-order" onclick="javascript:void(0);"><span><span><?php echo $this->__('Place order now'); ?></span></span></button>
|
851 |
+
</div>
|
852 |
+
</div>
|
853 |
+
<div style="clear: both;"> </div>
|
854 |
+
</div>
|
855 |
+
</fieldset>
|
856 |
+
</form>
|
857 |
+
|
858 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
859 |
+
<?php echo $this->getChildHtml('login-popup'); ?>
|
860 |
+
<?php endif; ?>
|
861 |
+
|
862 |
+
<?php if($helper->isValidateEmail()): ?>
|
863 |
+
<script>
|
864 |
+
$('billing:email').observe('blur', function(e) {
|
865 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
866 |
+
var email = e.element().getValue();
|
867 |
+
var parameters = { email: email };
|
868 |
+
|
869 |
+
new Ajax.Request(url, {
|
870 |
+
parameters: parameters,
|
871 |
+
onComplete: function(response) {
|
872 |
+
if(response.status == 200) {
|
873 |
+
var result = response.responseText.evalJSON().result;
|
874 |
+
if(result == 'invalid') {
|
875 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Invalid email address.'); ?>');
|
876 |
+
$('onestepcheckout-email-error').show();
|
877 |
+
}
|
878 |
+
else if(result == 'exists') {
|
879 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
880 |
+
// Remove the password fields if the email exists in database
|
881 |
+
$('onestepcheckout-li-password').hide();
|
882 |
+
<?php endif; ?>
|
883 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
884 |
+
$('onestepcheckout-email-error').show();
|
885 |
+
$('id_onestepcheckout_username').value = email;
|
886 |
+
}
|
887 |
+
else {
|
888 |
+
$('onestepcheckout-email-error').hide();
|
889 |
+
}
|
890 |
+
}
|
891 |
+
}
|
892 |
+
})
|
893 |
+
|
894 |
+
});
|
895 |
+
Validation.add('validate-email', '<?php echo $this->__('This is a required field.') ?>', function(v) {
|
896 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
897 |
+
var email = v;
|
898 |
+
var parameters = { email: email };
|
899 |
+
var value = Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
|
900 |
+
|
901 |
+
new Ajax.Request(url, {
|
902 |
+
parameters: parameters,
|
903 |
+
asynchronous: false,
|
904 |
+
onComplete: function(response) {
|
905 |
+
if(response.status == 200) {
|
906 |
+
var result = response.responseText.evalJSON().result;
|
907 |
+
if(result == 'invalid') {
|
908 |
+
value = false;
|
909 |
+
} else if(result == 'exists') {
|
910 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
911 |
+
$('onestepcheckout-li-password').hide();
|
912 |
+
<?php endif; ?>
|
913 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
914 |
+
$('onestepcheckout-email-error').show();
|
915 |
+
$('id_onestepcheckout_username').value = email;
|
916 |
+
value = false;
|
917 |
+
}
|
918 |
+
}
|
919 |
+
}
|
920 |
+
})
|
921 |
+
return value;
|
922 |
+
});
|
923 |
+
</script>
|
924 |
+
<?php endif; ?>
|
925 |
+
|
926 |
+
<?php if($this->settings['enable_terms']): ?>
|
927 |
+
<div id="onestepcheckout-toc-popup" style="display: none;">
|
928 |
+
|
929 |
+
<div class="onestepcheckout-popup-wrapper">
|
930 |
+
<div class="onestepcheckout-popup-wrapper-inner">
|
931 |
+
<h1><?php echo $this->settings['terms_title']; ?></h1>
|
932 |
+
|
933 |
+
<div class="onestepcheckout-toc-terms">
|
934 |
+
<?php echo $this->settings['terms_contents']; ?>
|
935 |
+
</div>
|
936 |
+
|
937 |
+
<p class="close"><a href="javascript:void(0);"><?php echo $this->__('Close'); ?></a></p>
|
938 |
+
</div>
|
939 |
+
</div>
|
940 |
+
<div class="onestepcheckout-popup-footer"> </div>
|
941 |
+
</div>
|
942 |
+
<script>
|
943 |
+
Event.observe(window, 'load', function() {
|
944 |
+
|
945 |
+
var termsPopup = new Control.Modal($('onestepcheckout-toc-popup'), {
|
946 |
+
overlayOpacity: 0.65,
|
947 |
+
fade: true,
|
948 |
+
fadeDuration: 0.3
|
949 |
+
});
|
950 |
+
|
951 |
+
$('onestepcheckout-toc-link').observe('click', function(e) {
|
952 |
+
e.preventDefault();
|
953 |
+
termsPopup.open();
|
954 |
+
});
|
955 |
+
|
956 |
+
$$('div#onestepcheckout-toc-popup p.close a').invoke('observe', 'click', function(e) {
|
957 |
+
e.preventDefault();
|
958 |
+
termsPopup.close();
|
959 |
+
});
|
960 |
+
|
961 |
+
});
|
962 |
+
|
963 |
+
/*
|
964 |
+
var popup;
|
965 |
+
Event.observe(window, 'load', function() {
|
966 |
+
popup = new OneStepCheckout_Popup('onestepcheckout-toc-popup','onestepcheckout-toc-link', 'div#onestepcheckout-toc-popup p.close a');
|
967 |
+
});
|
968 |
+
*/
|
969 |
+
</script>
|
970 |
+
<?php endif; ?>
|
971 |
+
|
972 |
+
|
973 |
+
|
974 |
+
|
975 |
+
|
976 |
+
<script>
|
977 |
+
<?php if($this->hasFormErrors()): ?>
|
978 |
+
if($$('div.input-error').length > 0) {
|
979 |
+
var input = $$('div.input-error')[0].select('input');
|
980 |
+
if(input.length == 1) {
|
981 |
+
input[0].focus();
|
982 |
+
}
|
983 |
+
}
|
984 |
+
<?php endif; ?>
|
985 |
+
</script>
|
986 |
+
|
987 |
+
<?php if(!$this->settings['exclude_region']): ?>
|
988 |
+
<script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
|
989 |
+
<script type="text/javascript">
|
990 |
+
//<![CDATA[
|
991 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
992 |
+
|
993 |
+
<?php if($this->settings['enable_different_shipping'] && !$this->isVirtual()): ?>
|
994 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
|
995 |
+
<?php endif; ?>
|
996 |
+
//]]>
|
997 |
+
</script>
|
998 |
+
<?php endif; ?>
|
999 |
+
|
1000 |
+
|
1001 |
+
<script type="text/javascript">
|
1002 |
+
|
1003 |
+
Event.observe(window, 'load', function() {
|
1004 |
+
if ($$('div.shopping-cart-totals').length == 1) {
|
1005 |
+
}
|
1006 |
+
else {
|
1007 |
+
|
1008 |
+
already_placing_order = false;
|
1009 |
+
review = false;
|
1010 |
+
reviewmodal = false;
|
1011 |
+
|
1012 |
+
/* Handle place order click event */
|
1013 |
+
$$('.onestepcheckout-place-order').each(function(elem){
|
1014 |
+
elem.observe('click', function(e) {
|
1015 |
+
Event.stop(e);
|
1016 |
+
|
1017 |
+
// First validate the form
|
1018 |
+
var form = new VarienForm('onestepcheckout-form');
|
1019 |
+
|
1020 |
+
if(!form.validator.validate()) {
|
1021 |
+
Event.stop(e);
|
1022 |
+
} else {
|
1023 |
+
|
1024 |
+
if(!already_placing_order && $$('.loading-ajax').length <= 0 ) {
|
1025 |
+
<?php if(!empty($helper->settings['addressreview']['enable_addressreview'])):?>
|
1026 |
+
var addressTemplates = {
|
1027 |
+
shipping: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['shipping_template']));?>',
|
1028 |
+
billing: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['billing_template']));?>'
|
1029 |
+
};
|
1030 |
+
addressPreview(addressTemplates, 'addressreview');
|
1031 |
+
if(!review){
|
1032 |
+
review = true;
|
1033 |
+
if(!reviewmodal){
|
1034 |
+
reviewmodal = new Control.Modal($('addressreview'),{
|
1035 |
+
overlayOpacity: 0.75,
|
1036 |
+
className: 'oscmodal',
|
1037 |
+
fade: true,
|
1038 |
+
closeOnClick: false
|
1039 |
+
});
|
1040 |
+
}
|
1041 |
+
reviewmodal.open();
|
1042 |
+
reviewmodal.observe('beforeClose',function(){
|
1043 |
+
review = false;
|
1044 |
+
});
|
1045 |
+
return true;
|
1046 |
+
Event.stop(e);
|
1047 |
+
} else {
|
1048 |
+
reviewmodal.close();
|
1049 |
+
}
|
1050 |
+
<?php endif;?>
|
1051 |
+
already_placing_order = true;
|
1052 |
+
|
1053 |
+
var submitelement = $('onestepcheckout-place-order');
|
1054 |
+
/* Disable button to avoid multiple clicks */
|
1055 |
+
submitelement.removeClassName('orange').addClassName('grey');
|
1056 |
+
submitelement.disabled = true;
|
1057 |
+
|
1058 |
+
var loaderelement = new Element('span').
|
1059 |
+
addClassName('onestepcheckout-place-order-loading').
|
1060 |
+
update('<?php echo $this->__('Please wait, processing your order...'); ?>');
|
1061 |
+
|
1062 |
+
submitelement.parentNode.appendChild(loaderelement);
|
1063 |
+
|
1064 |
+
/* Submit the form */
|
1065 |
+
$('onestepcheckout-form').submit();
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
});
|
1069 |
+
});
|
1070 |
+
|
1071 |
+
|
1072 |
+
// This is a separate page
|
1073 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1074 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1075 |
+
|
1076 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
1077 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
1078 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
1079 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
1080 |
+
|
1081 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
1082 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
1083 |
+
new Effect.Fade(item);
|
1084 |
+
});
|
1085 |
+
});
|
1086 |
+
|
1087 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
1088 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
1089 |
+
new Effect.Fade(item);
|
1090 |
+
});
|
1091 |
+
});
|
1092 |
+
|
1093 |
+
var has_hidden_terms = false;
|
1094 |
+
|
1095 |
+
if($('id_accept_terms') != null) {
|
1096 |
+
|
1097 |
+
$('id_accept_terms').observe('click', function(e) {
|
1098 |
+
var element = e.element();
|
1099 |
+
|
1100 |
+
if(element.checked) {
|
1101 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1102 |
+
new Effect.Fade(item);
|
1103 |
+
has_hidden_terms = true;
|
1104 |
+
});
|
1105 |
+
}
|
1106 |
+
else {
|
1107 |
+
if(has_hidden_terms) {
|
1108 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1109 |
+
new Effect.Appear(item);
|
1110 |
+
has_hidden_terms = false;
|
1111 |
+
});
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
});
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
var form = $('onestepcheckout-form');
|
1119 |
+
|
1120 |
+
/* Highlight selected payment method if one set */
|
1121 |
+
if($RF(form, 'payment[method]') != null) {
|
1122 |
+
try {
|
1123 |
+
var payment_method = $RF(form, 'payment[method]');
|
1124 |
+
$('container_payment_method_' + payment_method).show();
|
1125 |
+
$('payment_form_' + payment_method).show();
|
1126 |
+
} catch(err) {
|
1127 |
+
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/* Set default shipping method if not set */
|
1132 |
+
if($RF(form, 'shipping_method') == null) {
|
1133 |
+
try {
|
1134 |
+
var method = '<?php echo $this->_getDefaultShippingMethod(); ?>';
|
1135 |
+
if(method != '') {
|
1136 |
+
$('s_method_' + method).checked = true;
|
1137 |
+
get_separate_save_methods_function(url);
|
1138 |
+
}
|
1139 |
+
} catch(err) {
|
1140 |
+
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
//submit what's available on load
|
1144 |
+
get_separate_save_methods_function(url)();
|
1145 |
+
|
1146 |
+
<?php if($this->differentShippingAvailable()): ?>
|
1147 |
+
$('billing:use_for_shipping_yes').observe('click', function(e) {
|
1148 |
+
var element = e.element();
|
1149 |
+
if(element.checked){
|
1150 |
+
$('shipping_address').hide();
|
1151 |
+
} else {
|
1152 |
+
if($('shipping-address-select') && $('shipping-address-select').value == ''){
|
1153 |
+
$('shipping_address_list').show()
|
1154 |
+
}
|
1155 |
+
$('shipping_address').show();
|
1156 |
+
<?php if(!$this->isCustomerLoggedIn()):?>
|
1157 |
+
$('shipping_address_list').show()
|
1158 |
+
<?php endif;?>
|
1159 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1160 |
+
if(!$('shipping-address-select') && $('shipping_address_list').getStyle('display')=='none'){
|
1161 |
+
$('shipping_address_list').show()
|
1162 |
+
}
|
1163 |
+
<?php endif;?>
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
<?php if($this->settings['enable_ajax_save_billing']): ?>
|
1167 |
+
get_save_billing_function('<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>', '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>', <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>, true)();
|
1168 |
+
<?php endif; ?>
|
1169 |
+
|
1170 |
+
});
|
1171 |
+
<?php endif; ?>
|
1172 |
+
<?php
|
1173 |
+
$triggers = Mage::getStoreConfig('onestepcheckout/ajax_update/ajax_save_billing_fields');
|
1174 |
+
if(!empty($triggers)){
|
1175 |
+
$triggers = str_replace('country', 'country_id', $triggers);
|
1176 |
+
$triggers = str_replace('state/region', 'region_id', $triggers);
|
1177 |
+
$triggers = explode(',',$triggers);
|
1178 |
+
if(in_array('region_id',$triggers)){
|
1179 |
+
$triggers[] = 'region';
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
?>
|
1183 |
+
|
1184 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/ajax_update/enable_ajax_save_billing') && !empty($triggers)):?>
|
1185 |
+
|
1186 |
+
var url_save_billing = '<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>';
|
1187 |
+
var url_set_methods = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1188 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1189 |
+
var update_on_initial = false;
|
1190 |
+
|
1191 |
+
var euvat = $('euvat_action_validate_taxvat');
|
1192 |
+
|
1193 |
+
if(euvat !== null){
|
1194 |
+
euvat.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
var euvatid = $('billing:vat_id');
|
1198 |
+
|
1199 |
+
if(euvatid !== null){
|
1200 |
+
euvatid.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
triggers = ['<?php echo implode ('\',\'',$triggers)?>'];
|
1204 |
+
btriggered = [];
|
1205 |
+
striggered = [];
|
1206 |
+
|
1207 |
+
<?php
|
1208 |
+
foreach($triggers as $value){
|
1209 |
+
echo (($this->getQuote()->getBillingAddress()->getData($value)) ? 'btriggered.push(\'billing:'.$value.'\');' : '');
|
1210 |
+
echo (($this->getQuote()->getShippingAddress()->getData($value)) ? 'striggered.push(\'shipping:'.$value.'\');' : '');
|
1211 |
+
}
|
1212 |
+
?>
|
1213 |
+
|
1214 |
+
|
1215 |
+
bcountry_id = $('billing:country_id');
|
1216 |
+
if(bcountry_id){
|
1217 |
+
if(bcountry_id.getValue()){
|
1218 |
+
if(!btriggered.include('billing:country_id')){
|
1219 |
+
btriggered.push('billing:country_id');
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
}
|
1223 |
+
scountry_id = $('shipping:country_id');
|
1224 |
+
if(scountry_id){
|
1225 |
+
if(scountry_id.getValue()){
|
1226 |
+
if(!striggered.include('shipping:country_id')){
|
1227 |
+
striggered.push('shipping:country_id');
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
batriggered = false;
|
1233 |
+
satriggered = false;
|
1234 |
+
|
1235 |
+
changeTimer = false;
|
1236 |
+
changeInterval = 1000;
|
1237 |
+
|
1238 |
+
triggers.each(function(item){
|
1239 |
+
var belement = $('billing:'+item);
|
1240 |
+
if(belement){
|
1241 |
+
belement.observe('change', function(e){
|
1242 |
+
var element = e.element();
|
1243 |
+
var id = element.id;
|
1244 |
+
var tagname = element.tagName;
|
1245 |
+
if(tagname === 'SELECT'){
|
1246 |
+
clearTimeout(changeTimer);
|
1247 |
+
changeTimer = setTimeout(bcallbackEvent, changeInterval, id);
|
1248 |
+
}Â else {
|
1249 |
+
bcallbackEvent(id);
|
1250 |
+
}
|
1251 |
+
});
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
var selement = $('shipping:'+item);
|
1255 |
+
if(selement){
|
1256 |
+
selement.observe('change', function(e){
|
1257 |
+
var element = e.element();
|
1258 |
+
var id = element.id;
|
1259 |
+
var tagname = element.tagName;
|
1260 |
+
if(tagname === 'SELECT'){
|
1261 |
+
clearTimeout(changeTimer);
|
1262 |
+
changeTimer = setTimeout(scallbackEvent, changeInterval, id);
|
1263 |
+
}Â else {
|
1264 |
+
scallbackEvent(id);
|
1265 |
+
}
|
1266 |
+
});
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
|
1270 |
+
function scallbackEvent (id){
|
1271 |
+
if(!striggered.include(id)){
|
1272 |
+
striggered.push(id);
|
1273 |
+
}
|
1274 |
+
if(striggered.length >= triggers.length-1){
|
1275 |
+
satriggered = true;
|
1276 |
+
}
|
1277 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, satriggered)();
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
|
1281 |
+
function bcallbackEvent (id){
|
1282 |
+
if(!btriggered.include(id)){
|
1283 |
+
btriggered.push(id);
|
1284 |
+
}
|
1285 |
+
if(btriggered.length >= triggers.length-1){
|
1286 |
+
batriggered = true;
|
1287 |
+
}
|
1288 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, batriggered)();
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
|
1292 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1293 |
+
var bselect = $('billing-address-select');
|
1294 |
+
var sselect = $('shipping-address-select');
|
1295 |
+
if(bselect){
|
1296 |
+
bselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1297 |
+
}
|
1298 |
+
if(sselect){
|
1299 |
+
sselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1300 |
+
}
|
1301 |
+
<?php endif;?>
|
1302 |
+
|
1303 |
+
<?php endif; ?>
|
1304 |
+
|
1305 |
+
});
|
1306 |
+
|
1307 |
+
if($('payment-tool-tip-close')){
|
1308 |
+
Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
</script>
|
1312 |
+
|
1313 |
+
|
1314 |
+
<?php endif; ?>
|
1315 |
+
|
1316 |
+
<div id="onestepcheckout_popup_overlay" style="display: none;"> </div>
|
1317 |
+
|
1318 |
+
|
1319 |
+
<div id="loading-process" style="display: none;"></div>
|
@@ -0,0 +1,217 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$methods = $this->getMethods();
|
38 |
+
$oneMethod = count($methods) <= 1;
|
39 |
+
|
40 |
+
|
41 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
42 |
+
$hide_nonfree_methods = false;
|
43 |
+
if($helper->settings['hide_nonfree_payment_methods']) {
|
44 |
+
foreach($this->getMethods() as $_method) {
|
45 |
+
if($_method->getCode() == 'free') {
|
46 |
+
$hide_nonfree_methods = true;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
?>
|
53 |
+
|
54 |
+
<div class="payment-methods">
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
<?php echo $this->getChildHtml('reward.scripts'); ?>
|
58 |
+
<?php echo $this->getChildHtml('customerbalance_scripts'); ?>
|
59 |
+
var payment = new Payment('checkout-payment-method-load', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
|
60 |
+
payment.currentMethod = "<?php echo $this->getQuote()->getPayment()->getMethod() ?>";
|
61 |
+
//]]>
|
62 |
+
</script>
|
63 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise()):?>
|
64 |
+
<?php echo $this->getChildHtml('customerbalance'); ?>
|
65 |
+
<?php echo $this->getChildHtml('reward.points'); ?>
|
66 |
+
<?php endif;?>
|
67 |
+
|
68 |
+
<?php if (count($this->getMethods())=='1' && Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
69 |
+
<dl id="checkout-payment-method-load" style="display: none">
|
70 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
71 |
+
|
72 |
+
<dt>
|
73 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="hidden" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
74 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label></dt>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</dl>
|
77 |
+
<?php else:?>
|
78 |
+
|
79 |
+
<dl id="checkout-payment-method-load">
|
80 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
81 |
+
<?php if($hide_nonfree_methods && $_code != 'free') continue;
|
82 |
+
|
83 |
+
$_style = "";
|
84 |
+
if($_code == "adyen_hpp") {
|
85 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
86 |
+
$disabled = $_method->getHppOptionsDisabled();
|
87 |
+
if(!$disabled) {
|
88 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
89 |
+
}
|
90 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
91 |
+
$_style = "display:none";
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
|
95 |
+
<dt style="<?php echo $_style; ?>">
|
96 |
+
<?php if( sizeof($this->getMethods()) > 1 ): ?>
|
97 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio validate-one-required-by-name" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
98 |
+
<?php else: ?>
|
99 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" /></span>
|
100 |
+
<?php endif; ?>
|
101 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label>
|
102 |
+
</dt>
|
103 |
+
<?php if($html = $this->getChildHtml('payment.method.'.$_code)): ?>
|
104 |
+
<?php $class = ($_code == "adyen_hpp" || $_code == "adyen_oneclick") ? "" : "payment-method"; ?>
|
105 |
+
<dd id="container_payment_method_<?php echo $_code; ?>" class="<?php echo $class; ?>">
|
106 |
+
<?php echo $html; ?>
|
107 |
+
</dd>
|
108 |
+
<?php endif; ?>
|
109 |
+
<script type="text/javascript">
|
110 |
+
//<![CDATA[
|
111 |
+
|
112 |
+
var SwitchMethod= function() {
|
113 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
114 |
+
|
115 |
+
if(method != "adyen_hpp") {
|
116 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
117 |
+
if($('hpp_payment_form_adyen_hpp'))
|
118 |
+
{
|
119 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
120 |
+
var elements = form.getElementsByTagName('input');
|
121 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
// check if oneclick is enabled if so clear the selected option because you select different payment method
|
126 |
+
if(method != "adyen_oneclick") {
|
127 |
+
// always enable the oneclick payments options if this payment method is on
|
128 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
129 |
+
{
|
130 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
131 |
+
var elements = form.getElementsByTagName('input');
|
132 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
payment.switchMethod(method);
|
137 |
+
};
|
138 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
139 |
+
|
140 |
+
//]]>
|
141 |
+
</script>
|
142 |
+
<?php endforeach; ?>
|
143 |
+
</dl>
|
144 |
+
<?php endif;?>
|
145 |
+
</div>
|
146 |
+
<script type="text/javascript">
|
147 |
+
//<![CDATA[
|
148 |
+
|
149 |
+
$$('.cvv-what-is-this').each(function(element){
|
150 |
+
Event.observe(element, 'click', toggleToolTip);
|
151 |
+
});
|
152 |
+
|
153 |
+
function toggleToolTip(event){
|
154 |
+
if($('payment-tool-tip')){
|
155 |
+
$('payment-tool-tip').setStyle({
|
156 |
+
left: (Event.pointerX(event)-100)+'px',
|
157 |
+
top: (Event.pointerY(event)-300)+'px'
|
158 |
+
});
|
159 |
+
$('payment-tool-tip').toggle();
|
160 |
+
}
|
161 |
+
Event.stop(event);
|
162 |
+
}
|
163 |
+
|
164 |
+
var checkout = new Checkout();
|
165 |
+
$$('#checkout-payment-method-load dt input').invoke('observe', 'click', function(e) {
|
166 |
+
|
167 |
+
var element = e.element();
|
168 |
+
var name = 'payment_form_' + element.getValue();
|
169 |
+
payment.currentMethod = element.getValue();
|
170 |
+
/* Hide all other forms */
|
171 |
+
$$('dd.payment-method').invoke('hide');
|
172 |
+
|
173 |
+
if(element.checked) {
|
174 |
+
payment.switchMethod(payment.currentMethod);
|
175 |
+
var form = $(name);
|
176 |
+
var container = $('container_payment_method_' + element.getValue());
|
177 |
+
|
178 |
+
if(element !== null && container !== null) {
|
179 |
+
container.show();
|
180 |
+
$(name).show();
|
181 |
+
}
|
182 |
+
}
|
183 |
+
});
|
184 |
+
|
185 |
+
// ADYEN: set current method as well if you click on hpp and oneclick
|
186 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', function(e) {
|
187 |
+
payment.currentMethod = "adyen_hpp";
|
188 |
+
});
|
189 |
+
|
190 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', function(e) {
|
191 |
+
payment.currentMethod = "adyen_oneclick";
|
192 |
+
});
|
193 |
+
|
194 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise() && Mage::helper('customer')->isLoggedIn()):?>
|
195 |
+
//if we have a enterprise version we should include this
|
196 |
+
|
197 |
+
rPoints = $('use_reward_points');
|
198 |
+
if(rPoints){
|
199 |
+
if(rPoints.checked){
|
200 |
+
payment.switchRewardPointsCheckbox();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
cBalance = $('use_customer_balance');
|
204 |
+
if(cBalance){
|
205 |
+
if(cBalance.checked){
|
206 |
+
payment.switchCustomerBalanceCheckbox();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
//if we have a enterprise version we should include this end
|
210 |
+
<?php endif;?>
|
211 |
+
|
212 |
+
payment.switchMethod(payment.currentMethod);
|
213 |
+
|
214 |
+
|
215 |
+
<?php echo $this->getChildHtml('giftcardaccount_scripts');?>
|
216 |
+
//]]>
|
217 |
+
</script>
|
@@ -0,0 +1,149 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @var $this Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<?php
|
36 |
+
$methods = $this->getMethods();
|
37 |
+
$oneMethod = count($methods) <= 1;
|
38 |
+
?>
|
39 |
+
<?php if (empty($methods)): ?>
|
40 |
+
<dt>
|
41 |
+
<?php echo $this->__('No Payment Methods') ?>
|
42 |
+
</dt>
|
43 |
+
<?php else:
|
44 |
+
foreach ($methods as $_method):
|
45 |
+
$_code = $_method->getCode();
|
46 |
+
|
47 |
+
$_style = "";
|
48 |
+
if($_code == "adyen_hpp") {
|
49 |
+
|
50 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
51 |
+
$disabled = $_method->getHppOptionsDisabled();
|
52 |
+
if(!$disabled) {
|
53 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
54 |
+
}
|
55 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
56 |
+
$_style = "display:none";
|
57 |
+
}
|
58 |
+
|
59 |
+
?>
|
60 |
+
<dt style="<?php echo $_style; ?>">
|
61 |
+
<?php if(!$oneMethod): ?>
|
62 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
63 |
+
<?php else: ?>
|
64 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
65 |
+
<?php $oneMethod = $_code; ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
|
68 |
+
<?php if(($_code == "adyen_hpp" && $disabled) || ($_code != "adyen_hpp")): ?>
|
69 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
70 |
+
<?php endif; ?>
|
71 |
+
</dt>
|
72 |
+
|
73 |
+
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
74 |
+
<dd>
|
75 |
+
<?php echo $html; ?>
|
76 |
+
</dd>
|
77 |
+
<?php endif; ?>
|
78 |
+
<script type="text/javascript">
|
79 |
+
//<![CDATA[
|
80 |
+
|
81 |
+
var SwitchMethod= function() {
|
82 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
83 |
+
|
84 |
+
if(method != "adyen_hpp") {
|
85 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
86 |
+
if($('hpp_payment_form_adyen_hpp'))
|
87 |
+
{
|
88 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
89 |
+
var elements = form.getElementsByTagName('input');
|
90 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
// check if adyen_oneclick is enabled
|
95 |
+
if(method != "adyen_oneclick") {
|
96 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
97 |
+
{
|
98 |
+
// if so clear the selected option because you select different payment method
|
99 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
100 |
+
var elements = form.getElementsByTagName('input');
|
101 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
102 |
+
|
103 |
+
// don't show the cvc field
|
104 |
+
$$('.cvc_block').each(
|
105 |
+
function (e) {
|
106 |
+
e.setStyle({display:'none'});
|
107 |
+
}
|
108 |
+
);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
payment.switchMethod(method);
|
112 |
+
};
|
113 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
114 |
+
|
115 |
+
//]]>
|
116 |
+
</script>
|
117 |
+
<?php endforeach;
|
118 |
+
endif;
|
119 |
+
?>
|
120 |
+
<?php echo $this->getChildChildHtml('additional'); ?>
|
121 |
+
<script type="text/javascript">
|
122 |
+
//<![CDATA[
|
123 |
+
<?php echo $this->getChildChildHtml('scripts'); ?>
|
124 |
+
payment.init();
|
125 |
+
<?php if (is_string($oneMethod)): ?>
|
126 |
+
payment.switchMethod('<?php echo $oneMethod ?>');
|
127 |
+
<?php endif; ?>
|
128 |
+
|
129 |
+
// always enable the hpp payment options if this payment method is on
|
130 |
+
if($('hpp_payment_form_adyen_hpp'))
|
131 |
+
{
|
132 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
133 |
+
var elements = form.getElementsByTagName('input');
|
134 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
135 |
+
}
|
136 |
+
|
137 |
+
// always enable the oneclick payments options if this payment method is on
|
138 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
139 |
+
{
|
140 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
141 |
+
var elements = form.getElementsByTagName('input');
|
142 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
143 |
+
|
144 |
+
// always enable the selectboxes for the oneclick creditcards
|
145 |
+
var elements = form.getElementsByTagName('select');
|
146 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
147 |
+
}
|
148 |
+
//]]>
|
149 |
+
</script>
|
@@ -0,0 +1,1319 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$step_counter = 1;
|
4 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
5 |
+
|
6 |
+
?>
|
7 |
+
<?php if(!$this->canCheckout() || !$this->validateMinimumAmount()): ?>
|
8 |
+
<?php if($this->settings['checkout_title']): ?>
|
9 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
10 |
+
<?php endif; ?>
|
11 |
+
|
12 |
+
<?php if($this->canCheckout() && !$this->validateMinimumAmount()): ?>
|
13 |
+
<p><?php echo Mage::getStoreConfig('sales/minimum_order/description'); ?></p>
|
14 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
15 |
+
<?php else: ?>
|
16 |
+
<p><?php echo $this->__('You need to have products in your cart to checkout, and your cart is empty.'); ?></p>
|
17 |
+
<p><a href="<?php echo $this->getUrl(''); ?>"><?php echo $this->__('Back to homepage'); ?></a></p>
|
18 |
+
<?php endif; ?>
|
19 |
+
<?php else: ?>
|
20 |
+
|
21 |
+
<form id="onestepcheckout-form" method="post" action="<?php echo $this->getUrl('onestepcheckout', array('_secure'=>true)); ?>">
|
22 |
+
<fieldset class="group-select" style="margin: 0;">
|
23 |
+
|
24 |
+
<?php if($this->settings['checkout_title']): ?>
|
25 |
+
<h1 class="onestepcheckout-title"><?php echo $this->settings['checkout_title']; ?></h1>
|
26 |
+
<?php endif; ?>
|
27 |
+
|
28 |
+
<?php if($this->settings['checkout_description']): ?>
|
29 |
+
<p class="onestepcheckout-description"><?php echo $this->settings['checkout_description']; ?></p>
|
30 |
+
<?php endif; ?>
|
31 |
+
|
32 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
33 |
+
<p class="onestepcheckout-login-link">
|
34 |
+
<a id="onestepcheckout-login-link" href="javascript:void(0); return: false;"><?php echo $this->__('Already registered? Click here to login.'); ?></a>
|
35 |
+
</p>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php if(isset($this->formErrors['unknown_source_error'])): ?>
|
39 |
+
<div class="onestepcheckout-error">
|
40 |
+
<?php echo $this->formErrors['unknown_source_error']; ?>
|
41 |
+
</div>
|
42 |
+
<?php endif; ?>
|
43 |
+
<div class="onestepcheckout-threecolumns checkoutcontainer onestepcheckout-skin-<?php echo $this->settings['skin']; ?> <?php if(Mage::helper('onestepcheckout')->isEnterprise()): ?>onestepcheckout-enterprise<?php endif; ?>">
|
44 |
+
<div class="onestepcheckout-column-left">
|
45 |
+
<div id="billing_address">
|
46 |
+
<script type="text/javascript">
|
47 |
+
var billing = new Billing();
|
48 |
+
|
49 |
+
</script>
|
50 |
+
<ul>
|
51 |
+
<li>
|
52 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Billing address'); ?></p>
|
53 |
+
<?php if(isset($this->formErrors['billing_error']) && count($this->formErrors['billing_errors']) > 0): ?>
|
54 |
+
<div class="onestepcheckout-error">
|
55 |
+
<?php echo $this->__('Please check red fields below and try again.'); ?>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
</li>
|
59 |
+
<?php if ($this->customerHasAddresses()): ?>
|
60 |
+
<li>
|
61 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
62 |
+
<div class="input-box">
|
63 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
<?php endif; ?>
|
67 |
+
<li>
|
68 |
+
<div>
|
69 |
+
<ul id="billing_address_list" <?php echo (($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('billing')) ? 'style = "display:none"' : false ); ?>>
|
70 |
+
<?php echo $this->getChildHtml('billing_address');?>
|
71 |
+
<?php $addressAttributes = $this->getChild('customer_form_billing_address_user_defined_attributes');?>
|
72 |
+
<?php if ($addressAttributes): ?>
|
73 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getBillingAddress())->setEntityType('customer_address');?>
|
74 |
+
<?php $addressAttributes->setFieldIdFormat('billing:%1$s')->setFieldNameFormat('billing[%1$s]');?>
|
75 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
76 |
+
<?php endif;?>
|
77 |
+
<?php $customerAttributes = $this->getChild('customer_form_customer_user_defined_attributes');?>
|
78 |
+
<?php if ($customerAttributes): ?>
|
79 |
+
<?php $customerAttributes->setEntityModelClass('customer/customer')->setFieldIdFormat('billing:%1$s');?>
|
80 |
+
<?php $customerAttributes->setFieldNameFormat('billing[%1$s]')->setShowContainer(false);?>
|
81 |
+
<?php echo $customerAttributes->setExcludeFileAttributes(true)->toHtml()?>
|
82 |
+
<?php endif;?>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
</li>
|
86 |
+
<li>
|
87 |
+
<?php $uncheck = (!empty($_POST['billing']) && empty($_POST['billing']['use_for_shipping']));?>
|
88 |
+
<?php if($this->differentShippingAvailable()): ?>
|
89 |
+
<div class="input-box input-different-shipping">
|
90 |
+
<input type="checkbox" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'checked="checked" ':'')?>/>
|
91 |
+
<label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to the same address')?></label>
|
92 |
+
</div>
|
93 |
+
<?php else: ?>
|
94 |
+
<input type="hidden" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" />
|
95 |
+
<?php endif; ?>
|
96 |
+
</li>
|
97 |
+
</ul>
|
98 |
+
</div>
|
99 |
+
<?php if($this->differentShippingAvailable()): ?>
|
100 |
+
<div id="shipping_address" <?php echo (($this->sameAsBilling() && !$uncheck) ? 'style="display: none"': false);?>>
|
101 |
+
<script type="text/javascript">
|
102 |
+
var shipping = new Shipping();
|
103 |
+
</script>
|
104 |
+
<ul>
|
105 |
+
<li class="shipping-address-title">
|
106 |
+
<?php echo $this->__('Shipping address'); ?>
|
107 |
+
</li>
|
108 |
+
<?php if ($this->customerHasAddresses()): ?>
|
109 |
+
<li class="form-alt">
|
110 |
+
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
111 |
+
<div class="input-box"><?php echo $this->getAddressesHtmlSelect('shipping') ?></div>
|
112 |
+
</li>
|
113 |
+
<?php endif ?>
|
114 |
+
<li id="shipping_address_list" <?php if($this->customerHasAddresses() && !$this->getNewAddressSelectValueOnError('shipping')) { echo ' style="display: none;" '; } ?>>
|
115 |
+
<div id="">
|
116 |
+
<ul>
|
117 |
+
<?php echo $this->getChildHtml('shipping_address');?>
|
118 |
+
<?php $addressAttributes = $this->getChild('customer_form_shipping_address_user_defined_attributes');?>
|
119 |
+
<?php if ($addressAttributes): ?>
|
120 |
+
<?php $addressAttributes->setEntity($this->getQuote()->getShippingAddress())->setEntityType('customer_address');?>
|
121 |
+
<?php $addressAttributes->setFieldIdFormat('shipping:%1$s')->setFieldNameFormat('shipping[%1$s]');?>
|
122 |
+
<?php echo $addressAttributes->setExcludeFileAttributes(true)->setShowContainer(false)->toHtml()?>
|
123 |
+
<?php endif;?>
|
124 |
+
</ul>
|
125 |
+
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getQuote()->getShippingAddress()->getId() ?>" id="shipping:address_id" />
|
126 |
+
<!-- END LIST OF SHIPPIING FIELDS -->
|
127 |
+
</div>
|
128 |
+
</li>
|
129 |
+
</ul>
|
130 |
+
</div>
|
131 |
+
<?php endif; ?>
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<div class="onestepcheckout-column-middle">
|
135 |
+
|
136 |
+
|
137 |
+
<?php if(!$this->isVirtual()): ?>
|
138 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_shipping_method')):?>
|
139 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
140 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
141 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
142 |
+
</div>
|
143 |
+
<?php endif; ?>
|
144 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
145 |
+
<?php else:?>
|
146 |
+
<div class="onestepcheckout-shipping-method">
|
147 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Shipping method'); ?></p>
|
148 |
+
|
149 |
+
<?php if(isset($this->formErrors['shipping_method']) && $this->formErrors['shipping_method']): ?>
|
150 |
+
<div class="onestepcheckout-error onestepcheckout-shipment-method-error">
|
151 |
+
<?php echo $this->__('Please choose a shipping method.'); ?>
|
152 |
+
</div>
|
153 |
+
<?php endif; ?>
|
154 |
+
|
155 |
+
<div class="onestepcheckout-shipping-method-block">
|
156 |
+
<?php echo $this->getChildHtml('choose-shipping-method'); ?>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
<?php endif; ?>
|
160 |
+
<?php endif; ?>
|
161 |
+
|
162 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
163 |
+
<?php if(!empty($this->formErrors['payment_method'])): ?>
|
164 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
165 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
166 |
+
</div>
|
167 |
+
<?php endif; ?>
|
168 |
+
<?php if(!empty($this->formErrors['payment_method_error'])): ?>
|
169 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
170 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
171 |
+
</div>
|
172 |
+
<?php endif; ?>
|
173 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
174 |
+
<?php else: ?>
|
175 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-<?php echo $step_counter++; ?>"><?php echo $this->__('Payment method'); ?></p>
|
176 |
+
<?php if(isset($this->formErrors['payment_method']) && $this->formErrors['payment_method']): ?>
|
177 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
178 |
+
<?php echo $this->__('Please choose a payment method.'); ?>
|
179 |
+
</div>
|
180 |
+
<?php else: ?>
|
181 |
+
<?php if(isset($this->formErrors['payment_method_error'])): ?>
|
182 |
+
<div class="onestepcheckout-error onestepcheckout-payment-method-error">
|
183 |
+
<?php echo $this->__('Please enter valid details below.'); ?>
|
184 |
+
</div>
|
185 |
+
<?php endif; ?>
|
186 |
+
<?php endif; ?>
|
187 |
+
|
188 |
+
<?php echo $this->getChildHtml('choose-payment-method'); ?>
|
189 |
+
|
190 |
+
<div class="tool-tip" id="payment-tool-tip" style="display:none;">
|
191 |
+
<div class="btn-close">
|
192 |
+
<a href="javascript:void(0);" id="payment-tool-tip-close"><img src="<?php echo $this->getSkinUrl('images/btn_window_close.gif') ?>" alt="<?php echo $this->__('Close') ?>" /></a>
|
193 |
+
</div>
|
194 |
+
<div class="block-content">
|
195 |
+
<img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" />
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
<?php endif; ?>
|
199 |
+
</div>
|
200 |
+
|
201 |
+
<div class="onestepcheckout-column-right">
|
202 |
+
|
203 |
+
<p class="onestepcheckout-numbers onestepcheckout-numbers-4"><?php echo $this->__('Review your order'); ?></p>
|
204 |
+
|
205 |
+
<div class="onestepcheckout-summary">
|
206 |
+
<?php echo $this->getChildHtml('summary'); ?>
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<?php if($this->settings['enable_discount']): ?>
|
210 |
+
<div class="onestepcheckout-coupons">
|
211 |
+
<div id="coupon-notice" style="display: none;"></div>
|
212 |
+
<?php $_couponcode = $this->getQuote()->getCouponCode(); ?>
|
213 |
+
<label for="id_couponcode"><?php echo $this->__('Coupon code:'); ?></label><br/>
|
214 |
+
<input class="input-text" type="text" name="onestepcheckout-couponcode" id="id_couponcode" value="<?php echo Mage::helper('core')->escapeHtml($_couponcode); ?>" />
|
215 |
+
<br/>
|
216 |
+
<button id="onestepcheckout-coupon-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply Coupon'); ?></span></span></button>
|
217 |
+
<button id="onestepcheckout-coupon-remove" class="form-button-alt button" type="button" style="<?php if($_couponcode == '') { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel Coupon'); ?></span></span></button>
|
218 |
+
<script>
|
219 |
+
Event.observe(window, 'load', function() {
|
220 |
+
$('onestepcheckout-coupon-add').observe('click', function(e) {
|
221 |
+
|
222 |
+
var coupon = $('id_couponcode').getValue();
|
223 |
+
var couponNotice = $('coupon-notice');
|
224 |
+
|
225 |
+
couponNotice.hide();
|
226 |
+
|
227 |
+
if(coupon == '') {
|
228 |
+
alert('<?php echo $this->__('Please enter a valid coupon code.'); ?>');
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
|
232 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
233 |
+
var parameters = {code: coupon};
|
234 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
235 |
+
|
236 |
+
var form = $('onestepcheckout-form');
|
237 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
238 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
239 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
240 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
241 |
+
var payment_methods = $$('div.payment-methods').first();
|
242 |
+
|
243 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
244 |
+
|
245 |
+
if(shipping_methods){
|
246 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
247 |
+
}
|
248 |
+
|
249 |
+
if(payment_methods){
|
250 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
251 |
+
}
|
252 |
+
|
253 |
+
summary.update('<div class="loading-ajax"> </div>');
|
254 |
+
|
255 |
+
new Ajax.Request(url, {
|
256 |
+
method: 'post',
|
257 |
+
parameters: parameters,
|
258 |
+
onSuccess: function(transport) {
|
259 |
+
if(transport.status == 200) {
|
260 |
+
|
261 |
+
var response = transport.responseText.evalJSON();
|
262 |
+
|
263 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
264 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
265 |
+
|
266 |
+
if(shipping_methods){
|
267 |
+
shipping_methods.hide();
|
268 |
+
shipping_methods.update(response.shipping_method);
|
269 |
+
shipping_methods.show();
|
270 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
271 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
272 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
273 |
+
new Effect.Fade(item);
|
274 |
+
});
|
275 |
+
});
|
276 |
+
}
|
277 |
+
|
278 |
+
if(payment_methods){
|
279 |
+
payment_methods.hide();
|
280 |
+
payment_methods.replace(response.payment_method);
|
281 |
+
payment_methods.show();
|
282 |
+
|
283 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
284 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
285 |
+
var payment_method = $RF(form, 'payment[method]');
|
286 |
+
|
287 |
+
if(paymentContainer != null){
|
288 |
+
paymentContainer.show();
|
289 |
+
}
|
290 |
+
if(paymentForm != null){
|
291 |
+
paymentForm.show();
|
292 |
+
} else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
293 |
+
// set sub payment method back
|
294 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
295 |
+
|
296 |
+
// check if ideal payment bank is chosen
|
297 |
+
if(payment_hpp_type == "ideal") {
|
298 |
+
if(payment_hpp_ideal_type) {
|
299 |
+
// get issue_id this is before the slash
|
300 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
301 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
302 |
+
}
|
303 |
+
$('payment_form_ideal').show();
|
304 |
+
}
|
305 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
306 |
+
// set sub payment method back
|
307 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
308 |
+
// set back the cvc code
|
309 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
310 |
+
// show the cvc code block
|
311 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
312 |
+
$(cvc_block).show();
|
313 |
+
}
|
314 |
+
|
315 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
316 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
317 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
318 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
319 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
320 |
+
new Effect.Fade(item);
|
321 |
+
});
|
322 |
+
});
|
323 |
+
}
|
324 |
+
|
325 |
+
summary.hide();
|
326 |
+
summary.update(response.summary);
|
327 |
+
summary.show();
|
328 |
+
|
329 |
+
if(response.success) {
|
330 |
+
|
331 |
+
couponNotice.update(response.message);
|
332 |
+
couponNotice.removeClassName('error-msg');
|
333 |
+
couponNotice.addClassName('success-msg');
|
334 |
+
couponNotice.show();
|
335 |
+
/* Show remove button */
|
336 |
+
$('onestepcheckout-coupon-remove').show();
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
|
340 |
+
couponNotice.update(response.message);
|
341 |
+
couponNotice.removeClassName('success-msg');
|
342 |
+
couponNotice.addClassName('error-msg');
|
343 |
+
couponNotice.show();
|
344 |
+
/* Hide remove button */
|
345 |
+
$('onestepcheckout-coupon-remove').hide();
|
346 |
+
}
|
347 |
+
}
|
348 |
+
}
|
349 |
+
});
|
350 |
+
});
|
351 |
+
|
352 |
+
$('onestepcheckout-coupon-remove').observe('click', function(e) {
|
353 |
+
|
354 |
+
var coupon = $('id_couponcode').getValue();
|
355 |
+
var couponNotice = $('coupon-notice');
|
356 |
+
|
357 |
+
couponNotice.hide();
|
358 |
+
|
359 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_coupon', array('_secure'=>true)); ?>';
|
360 |
+
var parameters = {code: coupon, remove: '1'};
|
361 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
362 |
+
var payment_methods = $$('div.payment-methods').first();
|
363 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
364 |
+
|
365 |
+
if(shipping_methods){
|
366 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
367 |
+
}
|
368 |
+
|
369 |
+
if(payment_methods){
|
370 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
371 |
+
}
|
372 |
+
summary.update('<div class="loading-ajax"> </div>');
|
373 |
+
|
374 |
+
new Ajax.Request(url, {
|
375 |
+
method: 'post',
|
376 |
+
parameters: parameters,
|
377 |
+
onSuccess: function(transport) {
|
378 |
+
if(transport.status == 200) {
|
379 |
+
var response = transport.responseText.evalJSON();
|
380 |
+
|
381 |
+
if(response.success){
|
382 |
+
$('id_couponcode').setValue('')
|
383 |
+
$('onestepcheckout-coupon-remove').hide();
|
384 |
+
}
|
385 |
+
|
386 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
387 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
388 |
+
|
389 |
+
if(shipping_methods){
|
390 |
+
shipping_methods.hide();
|
391 |
+
shipping_methods.update(response.shipping_method);
|
392 |
+
shipping_methods.show();
|
393 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
394 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
395 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
396 |
+
new Effect.Fade(item);
|
397 |
+
});
|
398 |
+
});
|
399 |
+
}
|
400 |
+
|
401 |
+
if(payment_methods){
|
402 |
+
payment_methods.hide();
|
403 |
+
payment_methods.replace(response.payment_method);
|
404 |
+
payment_methods.show();
|
405 |
+
|
406 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
407 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
408 |
+
|
409 |
+
if(paymentContainer != null){
|
410 |
+
paymentContainer.show();
|
411 |
+
}
|
412 |
+
|
413 |
+
if(paymentForm != null){
|
414 |
+
paymentForm.show();
|
415 |
+
}
|
416 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
417 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
418 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
419 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
420 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
421 |
+
new Effect.Fade(item);
|
422 |
+
});
|
423 |
+
});
|
424 |
+
}
|
425 |
+
|
426 |
+
summary.hide();
|
427 |
+
summary.update(response.summary);
|
428 |
+
summary.show();
|
429 |
+
|
430 |
+
couponNotice.hide();
|
431 |
+
couponNotice.update(response.message);
|
432 |
+
couponNotice.removeClassName('error-msg');
|
433 |
+
couponNotice.addClassName('success-msg');
|
434 |
+
couponNotice.show();
|
435 |
+
}
|
436 |
+
}
|
437 |
+
});
|
438 |
+
});
|
439 |
+
});
|
440 |
+
</script>
|
441 |
+
</div>
|
442 |
+
<?php endif; ?>
|
443 |
+
|
444 |
+
<?php if($this->settings['enable_giftcard']): ?>
|
445 |
+
<div class="onestepcheckout-giftcards">
|
446 |
+
<div id="giftcard-notice" style="display: none;"></div>
|
447 |
+
<?php
|
448 |
+
$_hasGiftCards = unserialize($this->getQuote()->getGiftCards());
|
449 |
+
$_giftcardcode = $this->getQuote()->getgiftcardCode(); ?>
|
450 |
+
<label for="id_giftcardcode"><?php echo $this->__('giftcard code:'); ?></label><br/>
|
451 |
+
<input class="input-text" type="text" name="onestepcheckout-giftcardcode" id="id_giftcardcode" value="<?php echo Mage::helper('core')->escapeHtml($_giftcardcode); ?>" />
|
452 |
+
<br/>
|
453 |
+
<button id="onestepcheckout-giftcard-add" class="form-button-alt button" type="button"><span><span><?php echo $this->__('Apply gift card'); ?></span></span></button>
|
454 |
+
<button id="onestepcheckout-giftcard-remove" class="form-button-alt button" type="button" style="<?php if(empty($_hasGiftCards)) { echo 'display: none;'; } ?>"><span><span><?php echo $this->__('Cancel gift card'); ?></span></span></button>
|
455 |
+
<script>
|
456 |
+
document.observe('dom:loaded', function() {
|
457 |
+
$('onestepcheckout-giftcard-add').observe('click', function(e) {
|
458 |
+
var giftcard = $('id_giftcardcode').getValue();
|
459 |
+
var giftcardNotice = $('giftcard-notice');
|
460 |
+
giftcardNotice.hide();
|
461 |
+
if(giftcard == '') {
|
462 |
+
alert('<?php echo $this->__('Please enter a valid giftcard code.'); ?>');
|
463 |
+
return;
|
464 |
+
}
|
465 |
+
|
466 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
467 |
+
var parameters = {code: giftcard};
|
468 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
469 |
+
var payment_methods = $$('div.payment-methods').first();
|
470 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
471 |
+
|
472 |
+
if(shipping_methods){
|
473 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
474 |
+
}
|
475 |
+
|
476 |
+
if(payment_methods){
|
477 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
478 |
+
}
|
479 |
+
summary.update('<div class="loading-ajax"> </div>');
|
480 |
+
|
481 |
+
new Ajax.Request(url+Math.random(1000), {
|
482 |
+
method: 'post',
|
483 |
+
parameters: parameters,
|
484 |
+
onSuccess: function(transport) {
|
485 |
+
if(transport.status == 200) {
|
486 |
+
|
487 |
+
var response = transport.responseText.evalJSON();
|
488 |
+
|
489 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
490 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
491 |
+
|
492 |
+
if(shipping_methods){
|
493 |
+
shipping_methods.hide();
|
494 |
+
shipping_methods.update(response.shipping_method);
|
495 |
+
shipping_methods.show();
|
496 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
497 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
498 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
499 |
+
new Effect.Fade(item);
|
500 |
+
});
|
501 |
+
});
|
502 |
+
}
|
503 |
+
|
504 |
+
if(payment_methods){
|
505 |
+
//payment_methods.hide();
|
506 |
+
payment_methods.replace(response.payment_method);
|
507 |
+
//payment_methods.show();
|
508 |
+
|
509 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
510 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
511 |
+
|
512 |
+
if(paymentContainer != null){
|
513 |
+
paymentContainer.show();
|
514 |
+
}
|
515 |
+
if(paymentForm != null){
|
516 |
+
paymentForm.show();
|
517 |
+
}
|
518 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
519 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
520 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
521 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
522 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
523 |
+
new Effect.Fade(item);
|
524 |
+
});
|
525 |
+
});
|
526 |
+
}
|
527 |
+
|
528 |
+
if(response.success) {
|
529 |
+
summary.update(response.summary);
|
530 |
+
giftcardNotice.update(response.message);
|
531 |
+
giftcardNotice.removeClassName('error-msg');
|
532 |
+
giftcardNotice.addClassName('success-msg');
|
533 |
+
giftcardNotice.show();
|
534 |
+
/* Show remove button */
|
535 |
+
$('onestepcheckout-giftcard-remove').show();
|
536 |
+
}
|
537 |
+
else {
|
538 |
+
summary.update(response.summary);
|
539 |
+
giftcardNotice.update(response.message);
|
540 |
+
giftcardNotice.removeClassName('success-msg');
|
541 |
+
giftcardNotice.addClassName('error-msg');
|
542 |
+
giftcardNotice.show();
|
543 |
+
/* Hide remove button */
|
544 |
+
//$('onestepcheckout-giftcard-remove').hide();
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
});
|
549 |
+
});
|
550 |
+
|
551 |
+
$('onestepcheckout-giftcard-remove').observe('click', function(e) {
|
552 |
+
var giftcard = $('id_giftcardcode').getValue();
|
553 |
+
var giftcardNotice = $('giftcard-notice');
|
554 |
+
giftcardNotice.hide();
|
555 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_giftcard', array('_secure'=>true)); ?>';
|
556 |
+
var parameters = {code: giftcard, remove: '1'};
|
557 |
+
var shipping_methods = $$('dl.shipment-methods').first();
|
558 |
+
var payment_methods = $$('div.payment-methods').first();
|
559 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
560 |
+
|
561 |
+
if(shipping_methods){
|
562 |
+
shipping_methods.update('<div class="loading-ajax"> </div>');
|
563 |
+
}
|
564 |
+
|
565 |
+
if(payment_methods){
|
566 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
567 |
+
}
|
568 |
+
summary.update('<div class="loading-ajax"> </div>');
|
569 |
+
|
570 |
+
new Ajax.Request(url, {
|
571 |
+
method: 'post',
|
572 |
+
parameters: parameters,
|
573 |
+
onSuccess: function(transport) {
|
574 |
+
if(transport.status == 200) {
|
575 |
+
var response = transport.responseText.evalJSON();
|
576 |
+
|
577 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
578 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
579 |
+
|
580 |
+
if(shipping_methods){
|
581 |
+
shipping_methods.hide();
|
582 |
+
shipping_methods.update(response.shipping_method);
|
583 |
+
shipping_methods.show();
|
584 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
585 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
586 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
587 |
+
new Effect.Fade(item);
|
588 |
+
});
|
589 |
+
});
|
590 |
+
}
|
591 |
+
|
592 |
+
if(payment_methods){
|
593 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
594 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
595 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
596 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
597 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
598 |
+
new Effect.Fade(item);
|
599 |
+
});
|
600 |
+
});
|
601 |
+
payment_methods.hide();
|
602 |
+
payment_methods.replace(response.payment_method);
|
603 |
+
payment_methods.show();
|
604 |
+
|
605 |
+
paymentContainer = $('container_payment_method_' + payment.currentMethod)
|
606 |
+
paymentForm = $('payment_form_' + payment.currentMethod)
|
607 |
+
|
608 |
+
if(paymentContainer != null){
|
609 |
+
paymentContainer.show();
|
610 |
+
}
|
611 |
+
if(paymentForm != null){
|
612 |
+
paymentForm.show();
|
613 |
+
}
|
614 |
+
}
|
615 |
+
|
616 |
+
if(response.success){
|
617 |
+
$('id_giftcardcode').setValue('')
|
618 |
+
$('onestepcheckout-giftcard-remove').hide();
|
619 |
+
}
|
620 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
621 |
+
|
622 |
+
summary.hide();
|
623 |
+
summary.update(response.summary);
|
624 |
+
summary.show();
|
625 |
+
|
626 |
+
giftcardNotice.hide();
|
627 |
+
giftcardNotice.update(response.message);
|
628 |
+
giftcardNotice.removeClassName('error-msg');
|
629 |
+
giftcardNotice.addClassName('success-msg');
|
630 |
+
giftcardNotice.show();
|
631 |
+
}
|
632 |
+
}
|
633 |
+
});
|
634 |
+
});
|
635 |
+
});
|
636 |
+
</script>
|
637 |
+
</div>
|
638 |
+
<?php endif; ?>
|
639 |
+
|
640 |
+
<?php if($this->settings['enable_comments']): ?>
|
641 |
+
<div class="onestepcheckout-comments">
|
642 |
+
<label for="id_comments"><?php echo $this->__('Comments'); ?></label><br/>
|
643 |
+
<textarea id="id_comments" name="onestepcheckout_comments"><?php if(isset($_POST['onestepcheckout_comments'])) { echo Mage::helper('core')->escapeHtml($_POST['onestepcheckout_comments']); } ?></textarea>
|
644 |
+
</div>
|
645 |
+
<?php endif; ?>
|
646 |
+
|
647 |
+
<?php if($this->settings['enable_gift_messages']): ?>
|
648 |
+
<div id="onestepcheckout-giftmessages">
|
649 |
+
<div class="onestepcheckout-giftmessagecontainer">
|
650 |
+
<?php echo $this->helper('onestepcheckout/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
<?php endif; ?>
|
654 |
+
|
655 |
+
<?php $customerEmail = (($this->isCustomerLoggedIn())) ? $this->getQuote()->getCustomer()->getEmail() : false ;?>
|
656 |
+
<?php if($this->settings['enable_newsletter'] && !$this->isSubScribed($customerEmail)): ?>
|
657 |
+
<div class="onestepcheckout-enable-newsletter">
|
658 |
+
<input type="checkbox" id="id_subscribe_newsletter" name="subscribe_newsletter" value="1" <?php if($this->settings['newsletter_default_checked']): ?>checked="checked"<?php endif; ?> />
|
659 |
+
<label for="id_subscribe_newsletter"><?php echo $this->__('Subscribe to our newsletter'); ?></label>
|
660 |
+
</div>
|
661 |
+
<?php endif; ?>
|
662 |
+
|
663 |
+
<?php $_extraProductsHelper = Mage::helper('onestepcheckout/extraproducts'); ?>
|
664 |
+
<?php if($_extraProductsHelper->hasExtraProducts()): ?>
|
665 |
+
<div class="onestepcheckout-extraproducts">
|
666 |
+
<ul>
|
667 |
+
<?php foreach($_extraProductsHelper->getExtraProducts() as $product): ?>
|
668 |
+
<li><input type="checkbox" class="onestepcheckout-extra-product"
|
669 |
+
<?php if($_extraProductsHelper->productInCart($product->getId())): ?>
|
670 |
+
checked="checked" <?php endif; ?>
|
671 |
+
name="extra_products_<?php echo $product->getId(); ?>"
|
672 |
+
id="id_extra_product_<?php echo $product->getId(); ?>" />
|
673 |
+
<label for="id_extra_product_<?php echo $product->getId(); ?>"> <?php echo $product->getName(); ?>
|
674 |
+
<span><?php echo Mage::helper('checkout')->formatPrice($product->getPrice()); ?></span>
|
675 |
+
</label></li>
|
676 |
+
<?php endforeach; ?>
|
677 |
+
</ul>
|
678 |
+
</div>
|
679 |
+
|
680 |
+
<script>
|
681 |
+
Event.observe(window, 'load', function() {
|
682 |
+
$$('input.onestepcheckout-extra-product').invoke('observe', 'click', function(e) {
|
683 |
+
var id_temp = e.element().id.split('id_extra_product_');
|
684 |
+
if(id_temp.length == 2) {
|
685 |
+
var product_id = id_temp[1];
|
686 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/add_extra_product'); ?>';
|
687 |
+
var parameters = {
|
688 |
+
product_id: product_id
|
689 |
+
}
|
690 |
+
|
691 |
+
if(!e.element().checked) {
|
692 |
+
parameters['remove'] = 1;
|
693 |
+
}
|
694 |
+
|
695 |
+
var summary = $$('div.onestepcheckout-summary').first();
|
696 |
+
summary.update('<div class="loading-ajax"> </div>');
|
697 |
+
|
698 |
+
new Ajax.Request(url, {
|
699 |
+
method: 'post',
|
700 |
+
parameters: parameters,
|
701 |
+
onSuccess: function(transport) {
|
702 |
+
summary.update(transport.responseText);
|
703 |
+
}
|
704 |
+
});
|
705 |
+
};
|
706 |
+
});
|
707 |
+
});
|
708 |
+
</script>
|
709 |
+
<?php endif; ?>
|
710 |
+
|
711 |
+
<?php
|
712 |
+
/**
|
713 |
+
* Feedbackdropdown start
|
714 |
+
*/
|
715 |
+
?>
|
716 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback']) && !empty($this->settings['feedback']['feedback_values'])):?>
|
717 |
+
<?php
|
718 |
+
$selectedFeedBackFields = $this->getRequest()->getPost('onestepcheckout-feedback', false);
|
719 |
+
$feedbackValues = unserialize($this->settings['feedback']['feedback_values']);
|
720 |
+
?>
|
721 |
+
<div class="onestepcheckout-feedback" id="">
|
722 |
+
<label for="id_feedback"><?php echo $this->__('How did you hear about us?'); ?></label><br>
|
723 |
+
<select style="" name="onestepcheckout-feedback" id="id_feedback" defaultvalue="">
|
724 |
+
<option value=""><?php echo $this->__('Please choose'); ?></option>
|
725 |
+
<?php foreach($feedbackValues as $value => $label):
|
726 |
+
$selected= (!empty($selectedFeedBackFields) && $selectedFeedBackFields == $value) ? ' selected' : '';
|
727 |
+
?>
|
728 |
+
<option value="<?php echo $value?>" <?php echo $selected;?>><?php echo $label['value']?></option>
|
729 |
+
<?php endforeach;?>
|
730 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):
|
731 |
+
$selected= (empty($feedbackValues[$selectedFeedBackFields]) && $selectedFeedBackFields != '') ? ' selected' : '';
|
732 |
+
?>
|
733 |
+
<option value="freetext" <?php echo $selected;?>><?php echo $this->__('Other'); ?></option>
|
734 |
+
<?php endif;?>
|
735 |
+
</select>
|
736 |
+
</div>
|
737 |
+
<?php if(!empty($this->settings['feedback']['enable_feedback_freetext'])):?>
|
738 |
+
<script type="text/javascript">
|
739 |
+
$('id_feedback').observe('change', function (event){
|
740 |
+
if(this.getValue() == 'freetext'){
|
741 |
+
$('id_feedback_freetext_div').show();
|
742 |
+
} else {
|
743 |
+
$('id_feedback_freetext_div').hide();
|
744 |
+
}
|
745 |
+
});
|
746 |
+
</script>
|
747 |
+
<div id='id_feedback_freetext_div' class="onestepcheckout-feedback-freetext"<?php echo ((!empty($selectedFeedBackFields) && $selectedFeedBackFields == 'freetext') ? '' : ' style="display: none;"'); ?>>
|
748 |
+
<label for="id_feedback_freetext"><?php echo $this->__('Please specify:'); ?></label><br/>
|
749 |
+
<textarea id="id_feedback_freetext" name="onestepcheckout-feedback-freetext"><?php echo Mage::helper('core')->escapeHtml($this->getRequest()->getPost('onestepcheckout-feedback-freetext', false));?></textarea>
|
750 |
+
</div>
|
751 |
+
<?php endif; ?>
|
752 |
+
<?php endif; ?>
|
753 |
+
<?php
|
754 |
+
/**
|
755 |
+
* Feedbackdropdown end
|
756 |
+
*/
|
757 |
+
?>
|
758 |
+
|
759 |
+
<?php if($this->settings['enable_terms']): //deprecated?>
|
760 |
+
<div class="onestepcheckout-enable-terms">
|
761 |
+
<?php
|
762 |
+
|
763 |
+
if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']) {
|
764 |
+
$terms_error = true;
|
765 |
+
}
|
766 |
+
else {
|
767 |
+
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
768 |
+
$terms_error = false;
|
769 |
+
}
|
770 |
+
else {
|
771 |
+
$terms_error = true;
|
772 |
+
}
|
773 |
+
}
|
774 |
+
?>
|
775 |
+
|
776 |
+
<input class="required-entry" type="checkbox" id="id_accept_terms" name="accept_terms" value="1" <?php if(!$terms_error) echo "checked=\"checked\""; ?> />
|
777 |
+
<label for="id_accept_terms"><?php echo $this->__('I accept the <a id="onestepcheckout-toc-link" target="_blank" href="javascript:void(0);">Terms and Conditions</a>'); ?></label>
|
778 |
+
|
779 |
+
<?php if(isset($this->formErrors['terms_error']) && $this->formErrors['terms_error']): ?>
|
780 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
781 |
+
<?php echo $this->__('You must accept our terms to continue.'); ?>
|
782 |
+
</div>
|
783 |
+
<?php endif; ?>
|
784 |
+
|
785 |
+
</div>
|
786 |
+
<?php endif; ?>
|
787 |
+
|
788 |
+
<?php
|
789 |
+
/**
|
790 |
+
* Default magento agreements
|
791 |
+
*/
|
792 |
+
?>
|
793 |
+
<?php if($this->settings['enable_default_terms']): ?>
|
794 |
+
<?php if(!empty($this->formErrors['agreements_error'])):?>
|
795 |
+
<div class="onestepcheckout-error onestepcheckout-terms-error">
|
796 |
+
<?php echo $this->__('Please agree to all the terms and conditions before placing the order.'); ?>
|
797 |
+
</div>
|
798 |
+
<?php endif;?>
|
799 |
+
<?php echo $this->getChildHtml('agreements') ?>
|
800 |
+
<script type="text/javascript">
|
801 |
+
|
802 |
+
var termsmodals = new Object;
|
803 |
+
|
804 |
+
document.observe('dom:loaded', function() {
|
805 |
+
$$('.checkout-agreements li p input').each(
|
806 |
+
function(elem){
|
807 |
+
elem.addClassName('required-entry');
|
808 |
+
}
|
809 |
+
);
|
810 |
+
});
|
811 |
+
|
812 |
+
<?php if($this->settings['enable_textarea']):?>
|
813 |
+
document.observe('dom:loaded', function() {
|
814 |
+
$$('.checkout-agreements li p label').each(
|
815 |
+
function(elem){
|
816 |
+
elem.up().insert('<a href="javascript:void(0);" onclick="termsmodals[\'' + elem.htmlFor + '\'].open();">' + elem.innerHTML + '</a>');
|
817 |
+
elem.hide();
|
818 |
+
}
|
819 |
+
);
|
820 |
+
$$('div.agreement-content').each(
|
821 |
+
function(element){
|
822 |
+
element.id = 'agreement-div-' + element.up('li').down('input').id;
|
823 |
+
$$('body')[0].insert(element);
|
824 |
+
}
|
825 |
+
);
|
826 |
+
$$('.checkout-agreements li p input').each(
|
827 |
+
function(elem){
|
828 |
+
window.termsmodals[elem.id] = new Control.Modal($('agreement-div-' + elem.id),{
|
829 |
+
overlayOpacity: 0.75,
|
830 |
+
className: 'oscmodal',
|
831 |
+
fade: true,
|
832 |
+
closeOnClick: true,
|
833 |
+
height: 400,
|
834 |
+
width: 700
|
835 |
+
});
|
836 |
+
}
|
837 |
+
);
|
838 |
+
});
|
839 |
+
<?php endif;?>
|
840 |
+
|
841 |
+
</script>
|
842 |
+
<?php endif;?>
|
843 |
+
<?php
|
844 |
+
/**
|
845 |
+
* Default magento agreements end
|
846 |
+
*/
|
847 |
+
?>
|
848 |
+
|
849 |
+
<div class="onestepcheckout-place-order-wrapper">
|
850 |
+
<button type="button" title="<?php echo $this->__('Place order now'); ?>" id="onestepcheckout-place-order" class="large orange onestepcheckout-button onestepcheckout-place-order" onclick="javascript:void(0);"><span><span><?php echo $this->__('Place order now'); ?></span></span></button>
|
851 |
+
</div>
|
852 |
+
</div>
|
853 |
+
<div style="clear: both;"> </div>
|
854 |
+
</div>
|
855 |
+
</fieldset>
|
856 |
+
</form>
|
857 |
+
|
858 |
+
<?php if(!$this->isCustomerLoggedIn() && $helper->showLoginLink()): ?>
|
859 |
+
<?php echo $this->getChildHtml('login-popup'); ?>
|
860 |
+
<?php endif; ?>
|
861 |
+
|
862 |
+
<?php if($helper->isValidateEmail()): ?>
|
863 |
+
<script>
|
864 |
+
$('billing:email').observe('blur', function(e) {
|
865 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
866 |
+
var email = e.element().getValue();
|
867 |
+
var parameters = { email: email };
|
868 |
+
|
869 |
+
new Ajax.Request(url, {
|
870 |
+
parameters: parameters,
|
871 |
+
onComplete: function(response) {
|
872 |
+
if(response.status == 200) {
|
873 |
+
var result = response.responseText.evalJSON().result;
|
874 |
+
if(result == 'invalid') {
|
875 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Invalid email address.'); ?>');
|
876 |
+
$('onestepcheckout-email-error').show();
|
877 |
+
}
|
878 |
+
else if(result == 'exists') {
|
879 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
880 |
+
// Remove the password fields if the email exists in database
|
881 |
+
$('onestepcheckout-li-password').hide();
|
882 |
+
<?php endif; ?>
|
883 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
884 |
+
$('onestepcheckout-email-error').show();
|
885 |
+
$('id_onestepcheckout_username').value = email;
|
886 |
+
}
|
887 |
+
else {
|
888 |
+
$('onestepcheckout-email-error').hide();
|
889 |
+
}
|
890 |
+
}
|
891 |
+
}
|
892 |
+
})
|
893 |
+
|
894 |
+
});
|
895 |
+
Validation.add('validate-email', '<?php echo $this->__('This is a required field.') ?>', function(v) {
|
896 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/check_email', array('_secure'=>true)); ?>';
|
897 |
+
var email = v;
|
898 |
+
var parameters = { email: email };
|
899 |
+
var value = Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
|
900 |
+
|
901 |
+
new Ajax.Request(url, {
|
902 |
+
parameters: parameters,
|
903 |
+
asynchronous: false,
|
904 |
+
onComplete: function(response) {
|
905 |
+
if(response.status == 200) {
|
906 |
+
var result = response.responseText.evalJSON().result;
|
907 |
+
if(result == 'invalid') {
|
908 |
+
value = false;
|
909 |
+
} else if(result == 'exists') {
|
910 |
+
<?php if($this->settings['registration_order_without_password']): ?>
|
911 |
+
$('onestepcheckout-li-password').hide();
|
912 |
+
<?php endif; ?>
|
913 |
+
$('onestepcheckout-email-error-message').update('<?php echo $this->__('Email address already registered. Please <a href="javascript:void(0);" onclick="login_popup.show(); return false;">login now</a> or use a different email address.'); ?>');
|
914 |
+
$('onestepcheckout-email-error').show();
|
915 |
+
$('id_onestepcheckout_username').value = email;
|
916 |
+
value = false;
|
917 |
+
}
|
918 |
+
}
|
919 |
+
}
|
920 |
+
})
|
921 |
+
return value;
|
922 |
+
});
|
923 |
+
</script>
|
924 |
+
<?php endif; ?>
|
925 |
+
|
926 |
+
<?php if($this->settings['enable_terms']): ?>
|
927 |
+
<div id="onestepcheckout-toc-popup" style="display: none;">
|
928 |
+
|
929 |
+
<div class="onestepcheckout-popup-wrapper">
|
930 |
+
<div class="onestepcheckout-popup-wrapper-inner">
|
931 |
+
<h1><?php echo $this->settings['terms_title']; ?></h1>
|
932 |
+
|
933 |
+
<div class="onestepcheckout-toc-terms">
|
934 |
+
<?php echo $this->settings['terms_contents']; ?>
|
935 |
+
</div>
|
936 |
+
|
937 |
+
<p class="close"><a href="javascript:void(0);"><?php echo $this->__('Close'); ?></a></p>
|
938 |
+
</div>
|
939 |
+
</div>
|
940 |
+
<div class="onestepcheckout-popup-footer"> </div>
|
941 |
+
</div>
|
942 |
+
<script>
|
943 |
+
Event.observe(window, 'load', function() {
|
944 |
+
|
945 |
+
var termsPopup = new Control.Modal($('onestepcheckout-toc-popup'), {
|
946 |
+
overlayOpacity: 0.65,
|
947 |
+
fade: true,
|
948 |
+
fadeDuration: 0.3
|
949 |
+
});
|
950 |
+
|
951 |
+
$('onestepcheckout-toc-link').observe('click', function(e) {
|
952 |
+
e.preventDefault();
|
953 |
+
termsPopup.open();
|
954 |
+
});
|
955 |
+
|
956 |
+
$$('div#onestepcheckout-toc-popup p.close a').invoke('observe', 'click', function(e) {
|
957 |
+
e.preventDefault();
|
958 |
+
termsPopup.close();
|
959 |
+
});
|
960 |
+
|
961 |
+
});
|
962 |
+
|
963 |
+
/*
|
964 |
+
var popup;
|
965 |
+
Event.observe(window, 'load', function() {
|
966 |
+
popup = new OneStepCheckout_Popup('onestepcheckout-toc-popup','onestepcheckout-toc-link', 'div#onestepcheckout-toc-popup p.close a');
|
967 |
+
});
|
968 |
+
*/
|
969 |
+
</script>
|
970 |
+
<?php endif; ?>
|
971 |
+
|
972 |
+
|
973 |
+
|
974 |
+
|
975 |
+
|
976 |
+
<script>
|
977 |
+
<?php if($this->hasFormErrors()): ?>
|
978 |
+
if($$('div.input-error').length > 0) {
|
979 |
+
var input = $$('div.input-error')[0].select('input');
|
980 |
+
if(input.length == 1) {
|
981 |
+
input[0].focus();
|
982 |
+
}
|
983 |
+
}
|
984 |
+
<?php endif; ?>
|
985 |
+
</script>
|
986 |
+
|
987 |
+
<?php if(!$this->settings['exclude_region']): ?>
|
988 |
+
<script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
|
989 |
+
<script type="text/javascript">
|
990 |
+
//<![CDATA[
|
991 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
992 |
+
|
993 |
+
<?php if($this->settings['enable_different_shipping'] && !$this->isVirtual()): ?>
|
994 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
|
995 |
+
<?php endif; ?>
|
996 |
+
//]]>
|
997 |
+
</script>
|
998 |
+
<?php endif; ?>
|
999 |
+
|
1000 |
+
|
1001 |
+
<script type="text/javascript">
|
1002 |
+
|
1003 |
+
Event.observe(window, 'load', function() {
|
1004 |
+
if ($$('div.shopping-cart-totals').length == 1) {
|
1005 |
+
}
|
1006 |
+
else {
|
1007 |
+
|
1008 |
+
already_placing_order = false;
|
1009 |
+
review = false;
|
1010 |
+
reviewmodal = false;
|
1011 |
+
|
1012 |
+
/* Handle place order click event */
|
1013 |
+
$$('.onestepcheckout-place-order').each(function(elem){
|
1014 |
+
elem.observe('click', function(e) {
|
1015 |
+
Event.stop(e);
|
1016 |
+
|
1017 |
+
// First validate the form
|
1018 |
+
var form = new VarienForm('onestepcheckout-form');
|
1019 |
+
|
1020 |
+
if(!form.validator.validate()) {
|
1021 |
+
Event.stop(e);
|
1022 |
+
} else {
|
1023 |
+
|
1024 |
+
if(!already_placing_order && $$('.loading-ajax').length <= 0 ) {
|
1025 |
+
<?php if(!empty($helper->settings['addressreview']['enable_addressreview'])):?>
|
1026 |
+
var addressTemplates = {
|
1027 |
+
shipping: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['shipping_template']));?>',
|
1028 |
+
billing: '<?php echo str_replace("\r", '', str_replace("\n", '', $helper->settings['addressreview']['billing_template']));?>'
|
1029 |
+
};
|
1030 |
+
addressPreview(addressTemplates, 'addressreview');
|
1031 |
+
if(!review){
|
1032 |
+
review = true;
|
1033 |
+
if(!reviewmodal){
|
1034 |
+
reviewmodal = new Control.Modal($('addressreview'),{
|
1035 |
+
overlayOpacity: 0.75,
|
1036 |
+
className: 'oscmodal',
|
1037 |
+
fade: true,
|
1038 |
+
closeOnClick: false
|
1039 |
+
});
|
1040 |
+
}
|
1041 |
+
reviewmodal.open();
|
1042 |
+
reviewmodal.observe('beforeClose',function(){
|
1043 |
+
review = false;
|
1044 |
+
});
|
1045 |
+
return true;
|
1046 |
+
Event.stop(e);
|
1047 |
+
} else {
|
1048 |
+
reviewmodal.close();
|
1049 |
+
}
|
1050 |
+
<?php endif;?>
|
1051 |
+
already_placing_order = true;
|
1052 |
+
|
1053 |
+
var submitelement = $('onestepcheckout-place-order');
|
1054 |
+
/* Disable button to avoid multiple clicks */
|
1055 |
+
submitelement.removeClassName('orange').addClassName('grey');
|
1056 |
+
submitelement.disabled = true;
|
1057 |
+
|
1058 |
+
var loaderelement = new Element('span').
|
1059 |
+
addClassName('onestepcheckout-place-order-loading').
|
1060 |
+
update('<?php echo $this->__('Please wait, processing your order...'); ?>');
|
1061 |
+
|
1062 |
+
submitelement.parentNode.appendChild(loaderelement);
|
1063 |
+
|
1064 |
+
/* Submit the form */
|
1065 |
+
$('onestepcheckout-form').submit();
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
});
|
1069 |
+
});
|
1070 |
+
|
1071 |
+
|
1072 |
+
// This is a separate page
|
1073 |
+
var url = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1074 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1075 |
+
|
1076 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(url, update_payments));
|
1077 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
1078 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
1079 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
1080 |
+
|
1081 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
1082 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
1083 |
+
new Effect.Fade(item);
|
1084 |
+
});
|
1085 |
+
});
|
1086 |
+
|
1087 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
1088 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
1089 |
+
new Effect.Fade(item);
|
1090 |
+
});
|
1091 |
+
});
|
1092 |
+
|
1093 |
+
var has_hidden_terms = false;
|
1094 |
+
|
1095 |
+
if($('id_accept_terms') != null) {
|
1096 |
+
|
1097 |
+
$('id_accept_terms').observe('click', function(e) {
|
1098 |
+
var element = e.element();
|
1099 |
+
|
1100 |
+
if(element.checked) {
|
1101 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1102 |
+
new Effect.Fade(item);
|
1103 |
+
has_hidden_terms = true;
|
1104 |
+
});
|
1105 |
+
}
|
1106 |
+
else {
|
1107 |
+
if(has_hidden_terms) {
|
1108 |
+
$$('div.onestepcheckout-terms-error').each(function(item) {
|
1109 |
+
new Effect.Appear(item);
|
1110 |
+
has_hidden_terms = false;
|
1111 |
+
});
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
});
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
var form = $('onestepcheckout-form');
|
1119 |
+
|
1120 |
+
/* Highlight selected payment method if one set */
|
1121 |
+
if($RF(form, 'payment[method]') != null) {
|
1122 |
+
try {
|
1123 |
+
var payment_method = $RF(form, 'payment[method]');
|
1124 |
+
$('container_payment_method_' + payment_method).show();
|
1125 |
+
$('payment_form_' + payment_method).show();
|
1126 |
+
} catch(err) {
|
1127 |
+
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/* Set default shipping method if not set */
|
1132 |
+
if($RF(form, 'shipping_method') == null) {
|
1133 |
+
try {
|
1134 |
+
var method = '<?php echo $this->_getDefaultShippingMethod(); ?>';
|
1135 |
+
if(method != '') {
|
1136 |
+
$('s_method_' + method).checked = true;
|
1137 |
+
get_separate_save_methods_function(url);
|
1138 |
+
}
|
1139 |
+
} catch(err) {
|
1140 |
+
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
//submit what's available on load
|
1144 |
+
get_separate_save_methods_function(url)();
|
1145 |
+
|
1146 |
+
<?php if($this->differentShippingAvailable()): ?>
|
1147 |
+
$('billing:use_for_shipping_yes').observe('click', function(e) {
|
1148 |
+
var element = e.element();
|
1149 |
+
if(element.checked){
|
1150 |
+
$('shipping_address').hide();
|
1151 |
+
} else {
|
1152 |
+
if($('shipping-address-select') && $('shipping-address-select').value == ''){
|
1153 |
+
$('shipping_address_list').show()
|
1154 |
+
}
|
1155 |
+
$('shipping_address').show();
|
1156 |
+
<?php if(!$this->isCustomerLoggedIn()):?>
|
1157 |
+
$('shipping_address_list').show()
|
1158 |
+
<?php endif;?>
|
1159 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1160 |
+
if(!$('shipping-address-select') && $('shipping_address_list').getStyle('display')=='none'){
|
1161 |
+
$('shipping_address_list').show()
|
1162 |
+
}
|
1163 |
+
<?php endif;?>
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
<?php if($this->settings['enable_ajax_save_billing']): ?>
|
1167 |
+
get_save_billing_function('<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>', '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>', <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>, true)();
|
1168 |
+
<?php endif; ?>
|
1169 |
+
|
1170 |
+
});
|
1171 |
+
<?php endif; ?>
|
1172 |
+
<?php
|
1173 |
+
$triggers = Mage::getStoreConfig('onestepcheckout/ajax_update/ajax_save_billing_fields');
|
1174 |
+
if(!empty($triggers)){
|
1175 |
+
$triggers = str_replace('country', 'country_id', $triggers);
|
1176 |
+
$triggers = str_replace('state/region', 'region_id', $triggers);
|
1177 |
+
$triggers = explode(',',$triggers);
|
1178 |
+
if(in_array('region_id',$triggers)){
|
1179 |
+
$triggers[] = 'region';
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
?>
|
1183 |
+
|
1184 |
+
<?php if(Mage::getStoreConfig('onestepcheckout/ajax_update/enable_ajax_save_billing') && !empty($triggers)):?>
|
1185 |
+
|
1186 |
+
var url_save_billing = '<?php echo $this->getUrl('onestepcheckout/ajax/save_billing', array('_secure'=>true)); ?>';
|
1187 |
+
var url_set_methods = '<?php echo $this->getUrl('onestepcheckout/ajax/set_methods_separate', array('_secure'=>true)); ?>';
|
1188 |
+
var update_payments = <?php echo $this->settings['enable_update_payment_on_shipping'] ? 'true' : 'false'; ?>;
|
1189 |
+
var update_on_initial = false;
|
1190 |
+
|
1191 |
+
var euvat = $('euvat_action_validate_taxvat');
|
1192 |
+
|
1193 |
+
if(euvat !== null){
|
1194 |
+
euvat.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
var euvatid = $('billing:vat_id');
|
1198 |
+
|
1199 |
+
if(euvatid !== null){
|
1200 |
+
euvatid.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
triggers = ['<?php echo implode ('\',\'',$triggers)?>'];
|
1204 |
+
btriggered = [];
|
1205 |
+
striggered = [];
|
1206 |
+
|
1207 |
+
<?php
|
1208 |
+
foreach($triggers as $value){
|
1209 |
+
echo (($this->getQuote()->getBillingAddress()->getData($value)) ? 'btriggered.push(\'billing:'.$value.'\');' : '');
|
1210 |
+
echo (($this->getQuote()->getShippingAddress()->getData($value)) ? 'striggered.push(\'shipping:'.$value.'\');' : '');
|
1211 |
+
}
|
1212 |
+
?>
|
1213 |
+
|
1214 |
+
|
1215 |
+
bcountry_id = $('billing:country_id');
|
1216 |
+
if(bcountry_id){
|
1217 |
+
if(bcountry_id.getValue()){
|
1218 |
+
if(!btriggered.include('billing:country_id')){
|
1219 |
+
btriggered.push('billing:country_id');
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
}
|
1223 |
+
scountry_id = $('shipping:country_id');
|
1224 |
+
if(scountry_id){
|
1225 |
+
if(scountry_id.getValue()){
|
1226 |
+
if(!striggered.include('shipping:country_id')){
|
1227 |
+
striggered.push('shipping:country_id');
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
batriggered = false;
|
1233 |
+
satriggered = false;
|
1234 |
+
|
1235 |
+
changeTimer = false;
|
1236 |
+
changeInterval = 1000;
|
1237 |
+
|
1238 |
+
triggers.each(function(item){
|
1239 |
+
var belement = $('billing:'+item);
|
1240 |
+
if(belement){
|
1241 |
+
belement.observe('change', function(e){
|
1242 |
+
var element = e.element();
|
1243 |
+
var id = element.id;
|
1244 |
+
var tagname = element.tagName;
|
1245 |
+
if(tagname === 'SELECT'){
|
1246 |
+
clearTimeout(changeTimer);
|
1247 |
+
changeTimer = setTimeout(bcallbackEvent, changeInterval, id);
|
1248 |
+
}Â else {
|
1249 |
+
bcallbackEvent(id);
|
1250 |
+
}
|
1251 |
+
});
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
var selement = $('shipping:'+item);
|
1255 |
+
if(selement){
|
1256 |
+
selement.observe('change', function(e){
|
1257 |
+
var element = e.element();
|
1258 |
+
var id = element.id;
|
1259 |
+
var tagname = element.tagName;
|
1260 |
+
if(tagname === 'SELECT'){
|
1261 |
+
clearTimeout(changeTimer);
|
1262 |
+
changeTimer = setTimeout(scallbackEvent, changeInterval, id);
|
1263 |
+
}Â else {
|
1264 |
+
scallbackEvent(id);
|
1265 |
+
}
|
1266 |
+
});
|
1267 |
+
}
|
1268 |
+
});
|
1269 |
+
|
1270 |
+
function scallbackEvent (id){
|
1271 |
+
if(!striggered.include(id)){
|
1272 |
+
striggered.push(id);
|
1273 |
+
}
|
1274 |
+
if(striggered.length >= triggers.length-1){
|
1275 |
+
satriggered = true;
|
1276 |
+
}
|
1277 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, satriggered)();
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
|
1281 |
+
function bcallbackEvent (id){
|
1282 |
+
if(!btriggered.include(id)){
|
1283 |
+
btriggered.push(id);
|
1284 |
+
}
|
1285 |
+
if(btriggered.length >= triggers.length-1){
|
1286 |
+
batriggered = true;
|
1287 |
+
}
|
1288 |
+
get_save_billing_function(url_save_billing, url_set_methods, update_payments, batriggered)();
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
|
1292 |
+
<?php if($this->isCustomerLoggedIn()):?>
|
1293 |
+
var bselect = $('billing-address-select');
|
1294 |
+
var sselect = $('shipping-address-select');
|
1295 |
+
if(bselect){
|
1296 |
+
bselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1297 |
+
}
|
1298 |
+
if(sselect){
|
1299 |
+
sselect.observe('change', get_save_billing_function(url_save_billing, url_set_methods, update_payments, true));
|
1300 |
+
}
|
1301 |
+
<?php endif;?>
|
1302 |
+
|
1303 |
+
<?php endif; ?>
|
1304 |
+
|
1305 |
+
});
|
1306 |
+
|
1307 |
+
if($('payment-tool-tip-close')){
|
1308 |
+
Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
</script>
|
1312 |
+
|
1313 |
+
|
1314 |
+
<?php endif; ?>
|
1315 |
+
|
1316 |
+
<div id="onestepcheckout_popup_overlay" style="display: none;"> </div>
|
1317 |
+
|
1318 |
+
|
1319 |
+
<div id="loading-process" style="display: none;"></div>
|
@@ -0,0 +1,217 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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@magentocommerce.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.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design_default
|
22 |
+
* @package Mage
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$methods = $this->getMethods();
|
38 |
+
$oneMethod = count($methods) <= 1;
|
39 |
+
|
40 |
+
|
41 |
+
$helper = Mage::helper('onestepcheckout/checkout');
|
42 |
+
$hide_nonfree_methods = false;
|
43 |
+
if($helper->settings['hide_nonfree_payment_methods']) {
|
44 |
+
foreach($this->getMethods() as $_method) {
|
45 |
+
if($_method->getCode() == 'free') {
|
46 |
+
$hide_nonfree_methods = true;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
?>
|
53 |
+
|
54 |
+
<div class="payment-methods">
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
<?php echo $this->getChildHtml('reward.scripts'); ?>
|
58 |
+
<?php echo $this->getChildHtml('customerbalance_scripts'); ?>
|
59 |
+
var payment = new Payment('checkout-payment-method-load', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
|
60 |
+
payment.currentMethod = "<?php echo $this->getQuote()->getPayment()->getMethod() ?>";
|
61 |
+
//]]>
|
62 |
+
</script>
|
63 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise()):?>
|
64 |
+
<?php echo $this->getChildHtml('customerbalance'); ?>
|
65 |
+
<?php echo $this->getChildHtml('reward.points'); ?>
|
66 |
+
<?php endif;?>
|
67 |
+
|
68 |
+
<?php if (count($this->getMethods())=='1' && Mage::getStoreConfig('onestepcheckout/general/hide_payment_method')):?>
|
69 |
+
<dl id="checkout-payment-method-load" style="display: none">
|
70 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
71 |
+
|
72 |
+
<dt>
|
73 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="hidden" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
74 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label></dt>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</dl>
|
77 |
+
<?php else:?>
|
78 |
+
|
79 |
+
<dl id="checkout-payment-method-load">
|
80 |
+
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
|
81 |
+
<?php if($hide_nonfree_methods && $_code != 'free') continue;
|
82 |
+
|
83 |
+
$_style = "";
|
84 |
+
if($_code == "adyen_hpp") {
|
85 |
+
// get method and check if config payment/adyen_hpp/disable_hpptypes is set
|
86 |
+
$disabled = $_method->getHppOptionsDisabled();
|
87 |
+
if(!$disabled) {
|
88 |
+
$_style = ($_code == "adyen_hpp" && !$oneMethod) ? "display:none" : "";
|
89 |
+
}
|
90 |
+
} else if ($_code == "adyen_oneclick" && !$oneMethod) {
|
91 |
+
$_style = "display:none";
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
|
95 |
+
<dt style="<?php echo $_style; ?>">
|
96 |
+
<?php if( sizeof($this->getMethods()) > 1 ): ?>
|
97 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" class="radio validate-one-required-by-name" <?php if($this->getSelectedMethodCode()==$_code || ($hide_nonfree_methods && $_code == 'free')): ?> checked="checked"<?php endif; ?> />
|
98 |
+
<?php else: ?>
|
99 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" /></span>
|
100 |
+
<?php endif; ?>
|
101 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label>
|
102 |
+
</dt>
|
103 |
+
<?php if($html = $this->getChildHtml('payment.method.'.$_code)): ?>
|
104 |
+
<?php $class = ($_code == "adyen_hpp" || $_code == "adyen_oneclick") ? "" : "payment-method"; ?>
|
105 |
+
<dd id="container_payment_method_<?php echo $_code; ?>" class="<?php echo $class; ?>">
|
106 |
+
<?php echo $html; ?>
|
107 |
+
</dd>
|
108 |
+
<?php endif; ?>
|
109 |
+
<script type="text/javascript">
|
110 |
+
//<![CDATA[
|
111 |
+
|
112 |
+
var SwitchMethod= function() {
|
113 |
+
var method = $('p_method_<?php echo $_code?>').value;
|
114 |
+
|
115 |
+
if(method != "adyen_hpp") {
|
116 |
+
// check if hpp is enabled if so clear the selected option because you select different payment method
|
117 |
+
if($('hpp_payment_form_adyen_hpp'))
|
118 |
+
{
|
119 |
+
var form = $('hpp_payment_form_adyen_hpp');
|
120 |
+
var elements = form.getElementsByTagName('input');
|
121 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
// check if oneclick is enabled if so clear the selected option because you select different payment method
|
126 |
+
if(method != "adyen_oneclick") {
|
127 |
+
// always enable the oneclick payments options if this payment method is on
|
128 |
+
if($('oneclick_payment_form_adyen_oneclick'))
|
129 |
+
{
|
130 |
+
var form = $('oneclick_payment_form_adyen_oneclick');
|
131 |
+
var elements = form.getElementsByTagName('input');
|
132 |
+
for (var i=0; i<elements.length; i++) elements[i].checked = false;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
payment.switchMethod(method);
|
137 |
+
};
|
138 |
+
Event.observe($('p_method_<?php echo $_code ?>'), 'change', SwitchMethod);
|
139 |
+
|
140 |
+
//]]>
|
141 |
+
</script>
|
142 |
+
<?php endforeach; ?>
|
143 |
+
</dl>
|
144 |
+
<?php endif;?>
|
145 |
+
</div>
|
146 |
+
<script type="text/javascript">
|
147 |
+
//<![CDATA[
|
148 |
+
|
149 |
+
$$('.cvv-what-is-this').each(function(element){
|
150 |
+
Event.observe(element, 'click', toggleToolTip);
|
151 |
+
});
|
152 |
+
|
153 |
+
function toggleToolTip(event){
|
154 |
+
if($('payment-tool-tip')){
|
155 |
+
$('payment-tool-tip').setStyle({
|
156 |
+
left: (Event.pointerX(event)-100)+'px',
|
157 |
+
top: (Event.pointerY(event)-300)+'px'
|
158 |
+
});
|
159 |
+
$('payment-tool-tip').toggle();
|
160 |
+
}
|
161 |
+
Event.stop(event);
|
162 |
+
}
|
163 |
+
|
164 |
+
var checkout = new Checkout();
|
165 |
+
$$('#checkout-payment-method-load dt input').invoke('observe', 'click', function(e) {
|
166 |
+
|
167 |
+
var element = e.element();
|
168 |
+
var name = 'payment_form_' + element.getValue();
|
169 |
+
payment.currentMethod = element.getValue();
|
170 |
+
/* Hide all other forms */
|
171 |
+
$$('dd.payment-method').invoke('hide');
|
172 |
+
|
173 |
+
if(element.checked) {
|
174 |
+
payment.switchMethod(payment.currentMethod);
|
175 |
+
var form = $(name);
|
176 |
+
var container = $('container_payment_method_' + element.getValue());
|
177 |
+
|
178 |
+
if(element !== null && container !== null) {
|
179 |
+
container.show();
|
180 |
+
$(name).show();
|
181 |
+
}
|
182 |
+
}
|
183 |
+
});
|
184 |
+
|
185 |
+
// ADYEN: set current method as well if you click on hpp and oneclick
|
186 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', function(e) {
|
187 |
+
payment.currentMethod = "adyen_hpp";
|
188 |
+
});
|
189 |
+
|
190 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', function(e) {
|
191 |
+
payment.currentMethod = "adyen_oneclick";
|
192 |
+
});
|
193 |
+
|
194 |
+
<?php if(Mage::helper('onestepcheckout')->isEnterprise() && Mage::helper('customer')->isLoggedIn()):?>
|
195 |
+
//if we have a enterprise version we should include this
|
196 |
+
|
197 |
+
rPoints = $('use_reward_points');
|
198 |
+
if(rPoints){
|
199 |
+
if(rPoints.checked){
|
200 |
+
payment.switchRewardPointsCheckbox();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
cBalance = $('use_customer_balance');
|
204 |
+
if(cBalance){
|
205 |
+
if(cBalance.checked){
|
206 |
+
payment.switchCustomerBalanceCheckbox();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
//if we have a enterprise version we should include this end
|
210 |
+
<?php endif;?>
|
211 |
+
|
212 |
+
payment.switchMethod(payment.currentMethod);
|
213 |
+
|
214 |
+
|
215 |
+
<?php echo $this->getChildHtml('giftcardaccount_scripts');?>
|
216 |
+
//]]>
|
217 |
+
</script>
|
@@ -2,12 +2,12 @@
|
|
2 |
Â
*
|
3 |
Â
* Client Encryption of Forms.
|
4 |
Â
*
|
5 |
-
* Includes:
|
6 |
Â
* * RSA and ECC in JavaScript | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
7 |
Â
* * Stanford Javascript Crypto Library | http://crypto.stanford.edu/sjcl/
|
8 |
Â
* * JSON in JavaScript | http://www.JSON.org/
|
9 |
-
*
|
10 |
-
* Version: 0_1_1
|
11 |
Â
* Author: ADYEN (c) 2013
|
12 |
Â
|
13 |
Â
<!DOCTYPE html>
|
@@ -40,7 +40,7 @@
|
|
40 |
Â
|
41 |
Â
<div class="field">
|
42 |
Â
<label for="adyen-encrypted-form-expiry-month">Expiration Month (MM)
|
43 |
-
<input type="text" value="06" id="adyen-encrypted-form-expiry-month" size="2" autocomplete="off" data-encrypted-name="expiryMonth" /> /
|
44 |
Â
</label>
|
45 |
Â
<label for="adyen-encrypted-form-expiry-year">Expiration Year (YYYY)
|
46 |
Â
<input type="text" value="2016" id="adyen-encrypted-form-expiry-year" size="4" autocomplete="off" data-encrypted-name="expiryYear" />
|
@@ -59,10 +59,10 @@
|
|
59 |
Â
<script>
|
60 |
Â
// generate time client side for testing... Don't deploy on a real integration!!!
|
61 |
Â
document.getElementById('adyen-encrypted-form-expiry-generationtime').value = new Date().toISOString();
|
62 |
-
|
63 |
Â
// the form element to encrypt
|
64 |
Â
var form = document.getElementById('adyen-encrypted-form');
|
65 |
-
|
66 |
Â
// the public key
|
67 |
Â
var key = "10001|80C7821C961865FB4AD23F172E220F819A5CC7B9956BC3458E2788"
|
68 |
Â
+ "F9D725B07536E297B89243081916AAF29E26B7624453FC84CB10FC7DF386"
|
@@ -72,10 +72,10 @@
|
|
72 |
Â
+ "ECFC59B90B928F31715A7034E7B674E221F1EB1D696CC8B734DF7DE2E309"
|
73 |
Â
+ "E6E8CF94156686558522629E8AF59620CBDE58327E9D84F29965E4CD0FAF"
|
74 |
Â
+ "A38C632B244287EA1F7F70DAA445D81C216D3286B09205F6650262CAB415"
|
75 |
-
+ "5F024B3294A933F4DC514DE0B5686F6C2A6A2D";
|
76 |
-
|
77 |
-
var options = {};
|
78 |
-
|
79 |
Â
// the form will be encrypted before it is submitted
|
80 |
Â
adyen.encrypt.createEncryptedForm( form, key, options);
|
81 |
Â
</script>
|
@@ -86,19 +86,19 @@
|
|
86 |
Â
*/
|
87 |
Â
|
88 |
Â
(function() {
|
89 |
-
|
90 |
Â
/* json2.js */
|
91 |
Â
if(typeof JSON!=="object"){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());
|
92 |
Â
|
93 |
Â
/* base64.js */
|
94 |
Â
function hex2b64(e){var t;var n;var r="";for(t=0;t+3<=e.length;t+=3){n=parseInt(e.substring(t,t+3),16);r+=b64map.charAt(n>>6)+b64map.charAt(n&63)}if(t+1==e.length){n=parseInt(e.substring(t,t+1),16);r+=b64map.charAt(n<<2)}else if(t+2==e.length){n=parseInt(e.substring(t,t+2),16);r+=b64map.charAt(n>>2)+b64map.charAt((n&3)<<4)}while((r.length&3)>0)r+=b64pad;return r}function b64tohex(e){var t="";var n;var r=0;var i;for(n=0;n<e.length;++n){if(e.charAt(n)==b64pad)break;v=b64map.indexOf(e.charAt(n));if(v<0)continue;if(r==0){t+=int2char(v>>2);i=v&3;r=1}else if(r==1){t+=int2char(i<<2|v>>4);i=v&15;r=2}else if(r==2){t+=int2char(i);t+=int2char(v>>2);i=v&3;r=3}else{t+=int2char(i<<2|v>>4);t+=int2char(v&15);r=0}}if(r==1)t+=int2char(i<<2);return t}function b64toBA(e){var t=b64tohex(e);var n;var r=new Array;for(n=0;2*n<t.length;++n){r[n]=parseInt(t.substring(2*n,2*n+2),16)}return r}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64pad="="
|
95 |
-
|
96 |
Â
/* jsbn.js */
|
97 |
Â
function BigInteger(e,t,n){if(e!=null)if("number"==typeof e)this.fromNumber(e,t,n);else if(t==null&&"string"!=typeof e)this.fromString(e,256);else this.fromString(e,t)}function nbi(){return new BigInteger(null)}function am1(e,t,n,r,i,s){while(--s>=0){var o=t*this[e++]+n[r]+i;i=Math.floor(o/67108864);n[r++]=o&67108863}return i}function am2(e,t,n,r,i,s){var o=t&32767,u=t>>15;while(--s>=0){var a=this[e]&32767;var f=this[e++]>>15;var l=u*a+f*o;a=o*a+((l&32767)<<15)+n[r]+(i&1073741823);i=(a>>>30)+(l>>>15)+u*f+(i>>>30);n[r++]=a&1073741823}return i}function am3(e,t,n,r,i,s){var o=t&16383,u=t>>14;while(--s>=0){var a=this[e]&16383;var f=this[e++]>>14;var l=u*a+f*o;a=o*a+((l&16383)<<14)+n[r]+i;i=(a>>28)+(l>>14)+u*f;n[r++]=a&268435455}return i}function int2char(e){return BI_RM.charAt(e)}function intAt(e,t){var n=BI_RC[e.charCodeAt(t)];return n==null?-1:n}function bnpCopyTo(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t;e.s=this.s}function bnpFromInt(e){this.t=1;this.s=e<0?-1:0;if(e>0)this[0]=e;else if(e<-1)this[0]=e+DV;else this.t=0}function nbv(e){var t=nbi();t.fromInt(e);return t}function bnpFromString(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0;this.s=0;var r=e.length,i=false,s=0;while(--r>=0){var o=n==8?e[r]&255:intAt(e,r);if(o<0){if(e.charAt(r)=="-")i=true;continue}i=false;if(s==0)this[this.t++]=o;else if(s+n>this.DB){this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s;this[this.t++]=o>>this.DB-s}else this[this.t-1]|=o<<s;s+=n;if(s>=this.DB)s-=this.DB}if(n==8&&(e[0]&128)!=0){this.s=-1;if(s>0)this[this.t-1]|=(1<<this.DB-s)-1<<s}this.clamp();if(i)BigInteger.ZERO.subTo(this,this)}function bnpClamp(){var e=this.s&this.DM;while(this.t>0&&this[this.t-1]==e)--this.t}function bnToString(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var n=(1<<t)-1,r,i=false,s="",o=this.t;var u=this.DB-o*this.DB%t;if(o-->0){if(u<this.DB&&(r=this[o]>>u)>0){i=true;s=int2char(r)}while(o>=0){if(u<t){r=(this[o]&(1<<u)-1)<<t-u;r|=this[--o]>>(u+=this.DB-t)}else{r=this[o]>>(u-=t)&n;if(u<=0){u+=this.DB;--o}}if(r>0)i=true;if(i)s+=int2char(r)}}return i?s:"0"}function bnNegate(){var e=nbi();BigInteger.ZERO.subTo(this,e);return e}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;t=n-e.t;if(t!=0)return this.s<0?-t:t;while(--n>=0)if((t=this[n]-e[n])!=0)return t;return 0}function nbits(e){var t=1,n;if((n=e>>>16)!=0){e=n;t+=16}if((n=e>>8)!=0){e=n;t+=8}if((n=e>>4)!=0){e=n;t+=4}if((n=e>>2)!=0){e=n;t+=2}if((n=e>>1)!=0){e=n;t+=1}return t}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e;t.s=this.s}function bnpDRShiftTo(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0);t.s=this.s}function bnpLShiftTo(e,t){var n=e%this.DB;var r=this.DB-n;var i=(1<<r)-1;var s=Math.floor(e/this.DB),o=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u){t[u+s+1]=this[u]>>r|o;o=(this[u]&i)<<n}for(u=s-1;u>=0;--u)t[u]=0;t[s]=o;t.t=this.t+s+1;t.s=this.s;t.clamp()}function bnpRShiftTo(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB;var i=this.DB-r;var s=(1<<r)-1;t[0]=this[n]>>r;for(var o=n+1;o<this.t;++o){t[o-n-1]|=(this[o]&s)<<i;t[o-n]=this[o]>>r}if(r>0)t[this.t-n-1]|=(this.s&s)<<i;t.t=this.t-n;t.clamp()}function bnpSubTo(e,t){var n=0,r=0,i=Math.min(e.t,this.t);while(n<i){r+=this[n]-e[n];t[n++]=r&this.DM;r>>=this.DB}if(e.t<this.t){r-=e.s;while(n<this.t){r+=this[n];t[n++]=r&this.DM;r>>=this.DB}r+=this.s}else{r+=this.s;while(n<e.t){r-=e[n];t[n++]=r&this.DM;r>>=this.DB}r-=e.s}t.s=r<0?-1:0;if(r<-1)t[n++]=this.DV+r;else if(r>0)t[n++]=r;t.t=n;t.clamp()}function bnpMultiplyTo(e,t){var n=this.abs(),r=e.abs();var i=n.t;t.t=i+r.t;while(--i>=0)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0;t.clamp();if(this.s!=e.s)BigInteger.ZERO.subTo(t,t)}function bnpSquareTo(e){var t=this.abs();var n=e.t=2*t.t;while(--n>=0)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);if((e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV){e[n+t.t]-=t.DV;e[n+t.t+1]=1}}if(e.t>0)e[e.t-1]+=t.am(n,t[n],e,2*n,0,1);e.s=0;e.clamp()}function bnpDivRemTo(e,t,n){var r=e.abs();if(r.t<=0)return;var i=this.abs();if(i.t<r.t){if(t!=null)t.fromInt(0);if(n!=null)this.copyTo(n);return}if(n==null)n=nbi();var s=nbi(),o=this.s,u=e.s;var a=this.DB-nbits(r[r.t-1]);if(a>0){r.lShiftTo(a,s);i.lShiftTo(a,n)}else{r.copyTo(s);i.copyTo(n)}var f=s.t;var l=s[f-1];if(l==0)return;var c=l*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0);var h=this.FV/c,p=(1<<this.F1)/c,d=1<<this.F2;var v=n.t,m=v-f,g=t==null?nbi():t;s.dlShiftTo(m,g);if(n.compareTo(g)>=0){n[n.t++]=1;n.subTo(g,n)}BigInteger.ONE.dlShiftTo(f,g);g.subTo(s,s);while(s.t<f)s[s.t++]=0;while(--m>=0){var y=n[--v]==l?this.DM:Math.floor(n[v]*h+(n[v-1]+d)*p);if((n[v]+=s.am(0,y,n,m,0,f))<y){s.dlShiftTo(m,g);n.subTo(g,n);while(n[v]<--y)n.subTo(g,n)}}if(t!=null){n.drShiftTo(f,t);if(o!=u)BigInteger.ZERO.subTo(t,t)}n.t=f;n.clamp();if(a>0)n.rShiftTo(a,n);if(o<0)BigInteger.ZERO.subTo(n,n)}function bnMod(e){var t=nbi();this.abs().divRemTo(e,null,t);if(this.s<0&&t.compareTo(BigInteger.ZERO)>0)e.subTo(t,t);return t}function Classic(e){this.m=e}function cConvert(e){if(e.s<0||e.compareTo(this.m)>=0)return e.mod(this.m);else return e}function cRevert(e){return e}function cReduce(e){e.divRemTo(this.m,null,e)}function cMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}function cSqrTo(e,t){e.squareTo(t);this.reduce(t)}function bnpInvDigit(){if(this.t<1)return 0;var e=this[0];if((e&1)==0)return 0;var t=e&3;t=t*(2-(e&15)*t)&15;t=t*(2-(e&255)*t)&255;t=t*(2-((e&65535)*t&65535))&65535;t=t*(2-e*t%this.DV)%this.DV;return t>0?this.DV-t:-t}function Montgomery(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}function montConvert(e){var t=nbi();e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);if(e.s<0&&t.compareTo(BigInteger.ZERO)>0)this.m.subTo(t,t);return t}function montRevert(e){var t=nbi();e.copyTo(t);this.reduce(t);return t}function montReduce(e){while(e.t<=this.mt2)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=e[t]&32767;var r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;n=t+this.m.t;e[n]+=this.m.am(0,r,e,t,0,this.m.t);while(e[n]>=e.DV){e[n]-=e.DV;e[++n]++}}e.clamp();e.drShiftTo(this.m.t,e);if(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function montSqrTo(e,t){e.squareTo(t);this.reduce(t)}function montMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,t){if(e>4294967295||e<1)return BigInteger.ONE;var n=nbi(),r=nbi(),i=t.convert(this),s=nbits(e)-1;i.copyTo(n);while(--s>=0){t.sqrTo(n,r);if((e&1<<s)>0)t.mulTo(r,i,n);else{var o=n;n=r;r=o}}return t.revert(n)}function bnModPowInt(e,t){var n;if(e<256||t.isEven())n=new Classic(t);else n=new Montgomery(t);return this.exp(e,n)}var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array;var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1)
|
98 |
-
|
99 |
Â
/* prng4.js */
|
100 |
Â
function Arcfour(){this.i=0;this.j=0;this.S=new Array}function ARC4init(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;n=0;for(t=0;t<256;++t){n=n+this.S[t]+e[t%e.length]&255;r=this.S[t];this.S[t]=this.S[n];this.S[n]=r}this.i=0;this.j=0}function ARC4next(){var e;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;e=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=e;return this.S[e+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;var rng_psize=256
|
101 |
-
|
102 |
Â
/* rng.js */
|
103 |
Â
function rng_seed_int(e){rng_pool[rng_pptr++]^=e&255;rng_pool[rng_pptr++]^=e>>8&255;rng_pool[rng_pptr++]^=e>>16&255;rng_pool[rng_pptr++]^=e>>24&255;if(rng_pptr>=rng_psize)rng_pptr-=rng_psize}function rng_seed_time(){rng_seed_int((new Date).getTime())}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(e){var t;for(t=0;t<e.length;++t)e[t]=rng_get_byte()}function SecureRandom(){}var rng_state;var rng_pool;var rng_pptr;if(rng_pool==null){rng_pool=new Array;rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}while(rng_pptr<rng_psize){t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=t>>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}SecureRandom.prototype.nextBytes=rng_get_bytes
|
104 |
Â
|
@@ -106,24 +106,24 @@
|
|
106 |
Â
function parseBigInt(str,r){return new BigInteger(str,r)}function pkcs1pad2(b,n){if(n<b.length+11){alert("Message too long for RSA");return null}var ba=new Array();var i=b.length-1;while(i>=0&&n>0){ba[--n]=b[i--]}ba[--n]=0;var rng=new SecureRandom();var x=new Array();while(n>2){x[0]=0;while(x[0]==0){rng.nextBytes(x)}ba[--n]=x[0]}ba[--n]=2;ba[--n]=0;return new BigInteger(ba)}function RSAKey(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null}function RSASetPublic(N,E){if(N!=null&&E!=null&&N.length>0&&E.length>0){this.n=parseBigInt(N,16);this.e=parseInt(E,16)}else{alert("Invalid RSA public key")}}function RSADoPublic(x){return x.modPowInt(this.e,this.n)}function RSAEncrypt(bytes){var m=pkcs1pad2(bytes,(this.n.bitLength()+7)>>3);if(m==null){return null}var c=this.doPublic(m);if(c==null){return null}var h=c.toString(16);if((h.length&1)==0){return h}else{return"0"+h}}function RSAEncryptB64(bytes){var h=this.encrypt(bytes);if(h){return hex2b64(h)}else{return null}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;RSAKey.prototype.encrypt_b64=RSAEncryptB64;
|
107 |
Â
|
108 |
Â
/* sjcl.js */
|
109 |
-
|
110 |
Â
"use strict";var sjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}};if(typeof module!="undefined"&&module.exports){module.exports=sjcl}sjcl.cipher.aes=function(a){this.g[0][0][0]||this.u();var b,c,d,e,f=this.g[0][4],g=this.g[1];b=a.length;var h=1;if(b!==4&&b!==6&&b!==8){throw new sjcl.exception.invalid("invalid aes key size")}this.a=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(a%b===0||b===8&&a%b===4){c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255];if(a%b===0){c=c<<8^c>>>24^h<<24;h=h<<1^(h>>7)*283}}d[a]=d[a-b]^c}for(b=0;a;b++,a--){c=d[b&3?a:a-4];e[b]=a<=4||b<4?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^g[3][f[c&255]]}};sjcl.cipher.aes.prototype={encrypt:function(a){return this.D(a,0)},decrypt:function(a){return this.D(a,1)},g:[[[],[],[],[],[]],[[],[],[],[],[]]],u:function(){var a=this.g[0],b=this.g[1],c=a[4],d=b[4],e,f,g,h=[],i=[],k,j,l,m;for(e=0;e<256;e++){i[(h[e]=e<<1^(e>>7)*283)^e]=e}for(f=g=0;!c[f];f^=k||1,g=i[g]||1){l=g^g<<1^g<<2^g<<3^g<<4;l=l>>8^l&255^99;c[f]=l;d[l]=f;j=h[e=h[k=h[f]]];m=j*16843009^e*65537^k*257^f*16843008;j=h[l]*257^l*16843008;for(e=0;e<4;e++){a[e][f]=j=j<<24^j>>>8;b[e][l]=m=m<<24^m>>>8}}for(e=0;e<5;e++){a[e]=a[e].slice(0);b[e]=b[e].slice(0)}},D:function(a,b){if(a.length!==4){throw new sjcl.exception.invalid("invalid aes block size")}var c=this.a[b],d=a[0]^c[0],e=a[b?3:1]^c[1],f=a[2]^c[2];a=a[b?1:3]^c[3];var g,h,i,k=c.length/4-2,j,l=4,m=[0,0,0,0];g=this.g[b];var n=g[0],o=g[1],p=g[2],q=g[3],r=g[4];for(j=0;j<k;j++){g=n[d>>>24]^o[e>>16&255]^p[f>>8&255]^q[a&255]^c[l];h=n[e>>>24]^o[f>>16&255]^p[a>>8&255]^q[d&255]^c[l+1];i=n[f>>>24]^o[a>>16&255]^p[d>>8&255]^q[e&255]^c[l+2];a=n[a>>>24]^o[d>>16&255]^p[e>>8&255]^q[f&255]^c[l+3];l+=4;d=g;e=h;f=i}for(j=0;j<4;j++){m[b?3&-j:j]=r[d>>>24]<<24^r[e>>16&255]<<16^r[f>>8&255]<<8^r[a&255]^c[l++];g=d;d=e;e=f;f=a;a=g}return m}};sjcl.bitArray={bitSlice:function(a,b,c){a=sjcl.bitArray.L(a.slice(b/32),32-(b&31)).slice(1);return c===undefined?a:sjcl.bitArray.clamp(a,c-b)},extract:function(a,b,c){var d=Math.floor(-b-c&31);return((b+c-1^b)&-32?a[b/32|0]<<32-d^a[b/32+1|0]>>>d:a[b/32|0]>>>d)&(1<<c)-1},concat:function(a,b){if(a.length===0||b.length===0){return a.concat(b)}var c=a[a.length-1],d=sjcl.bitArray.getPartial(c);return d===32?a.concat(b):sjcl.bitArray.L(b,d,c|0,a.slice(0,a.length-1))},bitLength:function(a){var b=a.length;if(b===0){return 0}return(b-1)*32+sjcl.bitArray.getPartial(a[b-1])},clamp:function(a,b){if(a.length*32<b){return a}a=a.slice(0,Math.ceil(b/32));var c=a.length;b&=31;if(c>0&&b){a[c-1]=sjcl.bitArray.partial(b,a[c-1]&2147483648>>b-1,1)}return a},partial:function(a,b,c){if(a===32){return b}return(c?b|0:b<<32-a)+a*1099511627776},getPartial:function(a){return Math.round(a/1099511627776)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b)){return false}var c=0,d;for(d=0;d<a.length;d++){c|=a[d]^b[d]}return c===0},L:function(a,b,c,d){var e;e=0;if(d===undefined){d=[]}for(;b>=32;b-=32){d.push(c);c=0}if(b===0){return d.concat(a)}for(e=0;e<a.length;e++){d.push(c|a[e]>>>b);c=a[e]<<32-b}e=a.length?a[a.length-1]:0;a=sjcl.bitArray.getPartial(e);d.push(sjcl.bitArray.partial(b+a&31,b+a>32?c:d.pop(),1));return d},M:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}};sjcl.codec.utf8String={fromBits:function(a){var b="",c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b+=String.fromCharCode(e>>>24);e<<=8}return decodeURIComponent(escape(b))},toBits:function(a){a=unescape(encodeURIComponent(a));var b=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a.charCodeAt(c);if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};sjcl.codec.base64={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(a,b,c){var d="",e=0,f=sjcl.codec.base64.A,g=0,h=sjcl.bitArray.bitLength(a);if(c){f=f.substr(0,62)+"-_"}for(c=0;d.length*6<h;){d+=f.charAt((g^a[c]>>>e)>>>26);if(e<6){g=a[c]<<6-e;e+=26;c++}else{g<<=6;e-=6}}for(;d.length&3&&!b;){d+="="}return d},toBits:function(a,b){a=a.replace(/\s|=/g,"");var c=[],d=0,e=sjcl.codec.base64.A,f=0,g;if(b){e=e.substr(0,62)+"-_"}for(b=0;b<a.length;b++){g=e.indexOf(a.charAt(b));if(g<0){throw new sjcl.exception.invalid("this isn't base64!")}if(d>26){d-=26;c.push(f^g>>>d);f=g<<32-d}else{d+=6;f^=g<<32-d}}d&56&&c.push(sjcl.bitArray.partial(d&56,f,1));return c}};sjcl.codec.base64url={fromBits:function(a){return sjcl.codec.base64.fromBits(a,1,1)},toBits:function(a){return sjcl.codec.base64.toBits(a,1)}};sjcl.codec.bytes={fromBits:function(a){var b=[],c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b.push(e>>>24);e<<=8}return b},toBits:function(a){var b=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a[c];if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};sjcl.hash.sha256=function(a){this.a[0]||this.u();if(a){this.l=a.l.slice(0);this.h=a.h.slice(0);this.d=a.d}else{this.reset()}};sjcl.hash.sha256.hash=function(a){return(new sjcl.hash.sha256).update(a).finalize()};sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this.l=this.J.slice(0);this.h=[];this.d=0;return this},update:function(a){if(typeof a==="string"){a=sjcl.codec.utf8String.toBits(a)}var b,c=this.h=sjcl.bitArray.concat(this.h,a);b=this.d;a=this.d=b+sjcl.bitArray.bitLength(a);for(b=512+b&-512;b<=a;b+=512){this.z(c.splice(0,16))}return this},finalize:function(){var a,b=this.h,c=this.l;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,1)]);for(a=b.length+2;a&15;a++){b.push(0)}b.push(Math.floor(this.d/4294967296));for(b.push(this.d|0);b.length;){this.z(b.splice(0,16))}this.reset();return c},J:[],a:[],u:function(){function a(e){return(e-Math.floor(e))*4294967296|0}var b=0,c=2,d;a:for(;b<64;c++){for(d=2;d*d<=c;d++){if(c%d===0){continue a}}if(b<8){this.J[b]=a(Math.pow(c,0.5))}this.a[b]=a(Math.pow(c,1/3));b++}},z:function(a){var b,c,d=a.slice(0),e=this.l,f=this.a,g=e[0],h=e[1],i=e[2],k=e[3],j=e[4],l=e[5],m=e[6],n=e[7];for(a=0;a<64;a++){if(a<16){b=d[a]}else{b=d[a+1&15];c=d[a+14&15];b=d[a&15]=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+d[a&15]+d[a+9&15]|0}b=b+n+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(m^j&(l^m))+f[a];n=m;m=l;l=j;j=k+b|0;k=i;i=h;h=g;g=b+(h&i^k&(h^i))+(h>>>2^h>>>13^h>>>22^h<<30^h<<19^h<<10)|0}e[0]=e[0]+g|0;e[1]=e[1]+h|0;e[2]=e[2]+i|0;e[3]=e[3]+k|0;e[4]=e[4]+j|0;e[5]=e[5]+l|0;e[6]=e[6]+m|0;e[7]=e[7]+n|0}};sjcl.mode.ccm={name:"ccm",encrypt:function(a,b,c,d,e){var f,g=b.slice(0),h=sjcl.bitArray,i=h.bitLength(c)/8,k=h.bitLength(g)/8;e=e||64;d=d||[];if(i<7){throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(f=2;f<4&&k>>>8*f;f++){}if(f<15-i){f=15-i}c=h.clamp(c,8*(15-f));b=sjcl.mode.ccm.C(a,b,c,d,e,f);g=sjcl.mode.ccm.F(a,g,c,b,e,f);return h.concat(g.data,g.tag)},decrypt:function(a,b,c,d,e){e=e||64;d=d||[];var f=sjcl.bitArray,g=f.bitLength(c)/8,h=f.bitLength(b),i=f.clamp(b,h-e),k=f.bitSlice(b,h-e);h=(h-e)/8;if(g<7){throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(b=2;b<4&&h>>>8*b;b++){}if(b<15-g){b=15-g}c=f.clamp(c,8*(15-b));i=sjcl.mode.ccm.F(a,i,c,k,e,b);a=sjcl.mode.ccm.C(a,i.data,c,d,e,b);if(!f.equal(i.tag,a)){throw new sjcl.exception.corrupt("ccm: tag doesn't match")}return i.data},C:function(a,b,c,d,e,f){var g=[],h=sjcl.bitArray,i=h.M;e/=8;if(e%2||e<4||e>16){throw new sjcl.exception.invalid("ccm: invalid tag length")}if(d.length>4294967295||b.length>4294967295){throw new sjcl.exception.bug("ccm: can't deal with 4GiB or more data")}f=[h.partial(8,(d.length?64:0)|e-2<<2|f-1)];f=h.concat(f,c);f[3]|=h.bitLength(b)/8;f=a.encrypt(f);if(d.length){c=h.bitLength(d)/8;if(c<=65279){g=[h.partial(16,c)]}else{if(c<=4294967295){g=h.concat([h.partial(16,65534)],[c])}}g=h.concat(g,d);for(d=0;d<g.length;d+=4){f=a.encrypt(i(f,g.slice(d,d+4).concat([0,0,0])))}}for(d=0;d<b.length;d+=4){f=a.encrypt(i(f,b.slice(d,d+4).concat([0,0,0])))}return h.clamp(f,e*8)},F:function(a,b,c,d,e,f){var g,h=sjcl.bitArray;g=h.M;var i=b.length,k=h.bitLength(b);c=h.concat([h.partial(8,f-1)],c).concat([0,0,0]).slice(0,4);d=h.bitSlice(g(d,a.encrypt(c)),0,e);if(!i){return{tag:d,data:[]}}for(g=0;g<i;g+=4){c[3]++;e=a.encrypt(c);b[g]^=e[0];b[g+1]^=e[1];b[g+2]^=e[2];b[g+3]^=e[3]}return{tag:d,data:h.clamp(b,k)}}};sjcl.misc.hmac=function(a,b){this.I=b=b||sjcl.hash.sha256;var c=[[],[]],d=b.prototype.blockSize/32;this.j=[new b,new b];if(a.length>d){a=b.hash(a)}for(b=0;b<d;b++){c[0][b]=a[b]^909522486;c[1][b]=a[b]^1549556828}this.j[0].update(c[0]);this.j[1].update(c[1])};sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(a){a=(new this.I(this.j[0])).update(a).finalize();return(new this.I(this.j[1])).update(a).finalize()};sjcl.misc.pbkdf2=function(a,b,c,d,e){c=c||1000;if(d<0||c<0){throw sjcl.exception.invalid("invalid params to pbkdf2")}if(typeof a==="string"){a=sjcl.codec.utf8String.toBits(a)}e=e||sjcl.misc.hmac;a=new e(a);var f,g,h,i,k=[],j=sjcl.bitArray;for(i=1;32*k.length<(d||1);i++){e=f=a.encrypt(j.concat(b,[i]));for(g=1;g<c;g++){f=a.encrypt(f);for(h=0;h<f.length;h++){e[h]^=f[h]}}k=k.concat(e)}if(d){k=j.clamp(k,d)}return k};sjcl.random={randomWords:function(a,b){var c=[];b=this.isReady(b);var d;if(b===0){throw new sjcl.exception.notReady("generator isn't seeded")}else{b&2&&this.Q(!(b&1))}for(b=0;b<a;b+=4){(b+1)%65536===0&&this.H();d=this.t();c.push(d[0],d[1],d[2],d[3])}this.H();return c.slice(0,a)},setDefaultParanoia:function(a){this.r=a},addEntropy:function(a,b,c){c=c||"user";var d,e,f=(new Date).valueOf(),g=this.o[c],h=this.isReady(),i=0;d=this.B[c];if(d===undefined){d=this.B[c]=this.O++}if(g===undefined){g=this.o[c]=0}this.o[c]=(this.o[c]+1)%this.b.length;switch(typeof a){case"number":if(b===undefined){b=1}this.b[g].update([d,this.s++,1,b,f,1,a|0]);break;case"object":c=Object.prototype.toString.call(a);if(c==="[object Uint32Array]"){e=[];for(c=0;c<a.length;c++){e.push(a[c])}a=e}else{if(c!=="[object Array]"){i=1}for(c=0;c<a.length&&!i;c++){if(typeof a[c]!="number"){i=1}}}if(!i){if(b===undefined){for(c=b=0;c<a.length;c++){for(e=a[c];e>0;){b++;e>>>=1}}}this.b[g].update([d,this.s++,2,b,f,a.length].concat(a))}break;case"string":if(b===undefined){b=a.length}this.b[g].update([d,this.s++,3,b,f,a.length]);this.b[g].update(a);break;default:i=1}if(i){throw new sjcl.exception.bug("random: addEntropy only supports number, array of numbers or string")}this.i[g]+=b;this.e+=b;if(h===0){this.isReady()!==0&&this.G("seeded",Math.max(this.f,this.e));this.G("progress",this.getProgress())}},isReady:function(a){a=this.w[a!==undefined?a:this.r];return this.f&&this.f>=a?this.i[0]>80&&(new Date).valueOf()>this.K?3:1:this.e>=a?2:0},getProgress:function(a){a=this.w[a?a:this.r];return this.f>=a?1:this.e>a?1:this.e/a},startCollectors:function(){if(!this.k){if(window.addEventListener){window.addEventListener("load",this.m,false);window.addEventListener("mousemove",this.n,false)}else{if(document.attachEvent){document.attachEvent("onload",this.m);document.attachEvent("onmousemove",this.n)}else{throw new sjcl.exception.bug("can't attach event")}}this.k=true}},stopCollectors:function(){if(this.k){if(window.removeEventListener){window.removeEventListener("load",this.m,false);window.removeEventListener("mousemove",this.n,false)}else{if(window.detachEvent){window.detachEvent("onload",this.m);window.detachEvent("onmousemove",this.n)}}this.k=false}},addEventListener:function(a,b){this.p[a][this.N++]=b},removeEventListener:function(a,b){var c;a=this.p[a];var d=[];for(c in a){a.hasOwnProperty(c)&&a[c]===b&&d.push(c)}for(b=0;b<d.length;b++){c=d[b];delete a[c]}},b:[new sjcl.hash.sha256],i:[0],v:0,o:{},s:0,B:{},O:0,f:0,e:0,K:0,a:[0,0,0,0,0,0,0,0],c:[0,0,0,0],q:undefined,r:6,k:false,p:{progress:{},seeded:{}},N:0,w:[0,48,64,96,128,192,256,384,512,768,1024],t:function(){for(var a=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}return this.q.encrypt(this.c)},H:function(){this.a=this.t().concat(this.t());this.q=new sjcl.cipher.aes(this.a)},P:function(a){this.a=sjcl.hash.sha256.hash(this.a.concat(a));this.q=new sjcl.cipher.aes(this.a);for(a=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}},Q:function(a){var b=[],c=0,d;this.K=b[0]=(new Date).valueOf()+30000;for(d=0;d<16;d++){b.push(Math.random()*4294967296|0)}for(d=0;d<this.b.length;d++){b=b.concat(this.b[d].finalize());c+=this.i[d];this.i[d]=0;if(!a&&this.v&1<<d){break}}if(this.v>=1<<this.b.length){this.b.push(new sjcl.hash.sha256);this.i.push(0)}this.e-=c;if(c>this.f){this.f=c}this.v++;this.P(b)},n:function(a){sjcl.random.addEntropy([a.x||a.clientX||a.offsetX||0,a.y||a.clientY||a.offsetY||0],2,"mouse")},m:function(){sjcl.random.addEntropy((new Date).valueOf(),2,"loadtime")},G:function(a,b){var c;a=sjcl.random.p[a];var d=[];for(c in a){a.hasOwnProperty(c)&&d.push(a[c])}for(c=0;c<d.length;c++){d[c](b)}}};try{var s=new Uint32Array(32);crypto.getRandomValues(s);sjcl.random.addEntropy(s,1024,"crypto['getRandomValues']")}catch(t){};
|
111 |
Â
|
112 |
Â
/* adyen */
|
113 |
Â
var adyen = window.adyen = window.adyen || {};
|
114 |
-
|
115 |
Â
var encrypt = adyen.encrypt = adyen.encrypt || {
|
116 |
Â
createEncryptedForm: function( form, key, name ) {
|
117 |
Â
return new EncryptedForm( form, key, name );
|
118 |
Â
}
|
119 |
Â
};
|
120 |
-
|
121 |
Â
encrypt.version = '0_1_1';
|
122 |
-
|
123 |
Â
|
124 |
Â
/*
|
125 |
Â
*
|
126 |
-
*
|
127 |
Â
*
|
128 |
Â
* @constructor EncryptedForm
|
129 |
Â
*
|
@@ -148,6 +148,7 @@
|
|
148 |
Â
this.force = options.force || false;
|
149 |
Â
this.id = options.id || this.name;
|
150 |
Â
this.onsubmit = options.onsubmit || function() {};
|
Â
|
|
151 |
Â
|
152 |
Â
if ( this.force !== false ) {
|
153 |
Â
this.createEncryptedField( this.encrypt() );
|
@@ -158,36 +159,36 @@
|
|
158 |
Â
this.element.attachEvent( 'onsubmit', this.handleSubmit.bind( this ) );
|
159 |
Â
}
|
160 |
Â
}
|
161 |
-
|
162 |
Â
};
|
163 |
Â
|
164 |
Â
EncryptedForm.prototype = {
|
165 |
Â
|
166 |
Â
constructor: EncryptedForm,
|
167 |
-
|
168 |
Â
/*
|
169 |
Â
*
|
170 |
Â
* Handles a submit of the form.
|
171 |
Â
* It creates a hidden input with the form data as serialized, encrypted JSON.
|
172 |
Â
*
|
173 |
Â
* @param e {Event} The submit event to handle.
|
174 |
-
*
|
175 |
Â
*/
|
176 |
-
|
177 |
Â
handleSubmit: function( e ) {
|
178 |
Â
this.createEncryptedField( this.encrypt() );
|
179 |
Â
this.onsubmit(e);
|
180 |
Â
},
|
181 |
-
|
182 |
Â
/*
|
183 |
Â
* Creates an RSA key based on the public key.
|
184 |
Â
*
|
185 |
Â
* @returns rsa {RSAKey} An RSAKey based on the public key provided.
|
186 |
Â
*
|
187 |
Â
*/
|
188 |
-
|
189 |
Â
createRSAKey: function() {
|
190 |
-
|
191 |
Â
var k = this.key.split('|');
|
192 |
Â
|
193 |
Â
if ( k.length != 2 ) {
|
@@ -202,21 +203,21 @@
|
|
202 |
Â
rsa.setPublic( mod, exp );
|
203 |
Â
|
204 |
Â
return rsa;
|
205 |
-
|
206 |
Â
},
|
207 |
-
|
208 |
Â
/*
|
209 |
Â
* Creates an AES key.
|
210 |
Â
*
|
211 |
Â
* @returns aes {Object} An AESKey with encryption methods.
|
212 |
Â
*
|
213 |
Â
*/
|
214 |
-
|
215 |
Â
createAESKey: function() {
|
216 |
Â
return new AESKey();
|
217 |
Â
},
|
218 |
-
|
219 |
-
/*
|
220 |
Â
* Gets all encrypted fields from a root node ( usually the form element ).
|
221 |
Â
*
|
222 |
Â
* @param node {DOMNode} The root of the form to get encrypted fields from ( i.e. querySelectorAll( '[data-encrypeted-name]' ) ).
|
@@ -229,8 +230,8 @@
|
|
229 |
Â
getEncryptedFields: function( node, fields ) {
|
230 |
Â
|
231 |
Â
if ( node.querySelectorAll ) {
|
232 |
-
return node.querySelectorAll( '[
|
233 |
-
}
|
234 |
Â
|
235 |
Â
fields = fields || [];
|
236 |
Â
|
@@ -240,7 +241,7 @@
|
|
240 |
Â
for ( var i = 0; i < children.length; i++ ) {
|
241 |
Â
child = children[i];
|
242 |
Â
|
243 |
-
if ( child.hasAttribute(
|
244 |
Â
fields.push( child )
|
245 |
Â
} else {
|
246 |
Â
this.getEncryptedFields( child, fields );
|
@@ -251,7 +252,7 @@
|
|
251 |
Â
return fields;
|
252 |
Â
|
253 |
Â
},
|
254 |
-
|
255 |
Â
/*
|
256 |
Â
* Creates JSON object
|
257 |
Â
*
|
@@ -269,21 +270,18 @@
|
|
269 |
Â
var key, value;
|
270 |
Â
|
271 |
Â
for ( var i = fields.length - 1; i >= 0; i-- ) {
|
272 |
-
|
273 |
Â
field = fields[i];
|
274 |
-
|
275 |
Â
field.removeAttribute('name');
|
276 |
-
key = field.getAttribute(
|
277 |
Â
value = field.value;
|
278 |
-
|
279 |
Â
data[ key ] = value;
|
280 |
-
|
281 |
Â
};
|
282 |
-
|
283 |
Â
return data;
|
284 |
Â
|
285 |
Â
},
|
286 |
-
|
287 |
Â
/*
|
288 |
Â
* Encrypts data
|
289 |
Â
*
|
@@ -292,23 +290,23 @@
|
|
292 |
Â
*/
|
293 |
Â
|
294 |
Â
encrypt: function() {
|
295 |
-
|
296 |
Â
var data = this.toJSON( this.getEncryptedFields( this.element ) );
|
297 |
-
|
298 |
Â
var rsa, aes, cipher, encoded, encrypted, prefix;
|
299 |
Â
|
300 |
Â
rsa = this.createRSAKey();
|
301 |
Â
aes = this.createAESKey();
|
302 |
-
|
303 |
Â
cipher = aes.encrypt( JSON.stringify( data ) );
|
304 |
Â
keybytes = sjcl.codec.bytes.fromBits( aes.key );
|
305 |
Â
encrypted = rsa.encrypt_b64( keybytes );
|
306 |
Â
prefix = 'adyenjs_' + encrypt.version + '$';
|
307 |
-
|
308 |
Â
return [ prefix, encrypted, '$', cipher ].join('');
|
309 |
-
|
310 |
Â
},
|
311 |
-
|
312 |
Â
/*
|
313 |
Â
*
|
314 |
Â
* Creates an encrypted field.
|
@@ -316,11 +314,11 @@
|
|
316 |
Â
* @param data {String} The data in the form as encrypted and serialized JSON.
|
317 |
Â
*
|
318 |
Â
*/
|
319 |
-
|
320 |
Â
createEncryptedField: function( data ) {
|
321 |
-
|
322 |
Â
var element = document.getElementById( this.name );
|
323 |
-
|
324 |
Â
if ( !element ) {
|
325 |
Â
element = document.createElement( 'input' );
|
326 |
Â
element.type = 'hidden';
|
@@ -328,14 +326,12 @@
|
|
328 |
Â
element.id = this.id;
|
329 |
Â
this.element.appendChild( element );
|
330 |
Â
}
|
331 |
-
|
332 |
Â
element.setAttribute( 'value', data );
|
333 |
-
|
334 |
Â
}
|
335 |
Â
|
336 |
Â
};
|
337 |
-
|
338 |
-
|
339 |
Â
/*
|
340 |
Â
*
|
341 |
Â
* @constructor AESKey
|
@@ -343,15 +339,15 @@
|
|
343 |
Â
* @return aes {AESKey} An AESKey with encryption methods.
|
344 |
Â
*
|
345 |
Â
*/
|
346 |
-
|
347 |
Â
var AESKey = function() {
|
348 |
Â
// empty constructor
|
349 |
Â
};
|
350 |
-
|
351 |
Â
AESKey.prototype = {
|
352 |
-
|
353 |
Â
constructor: AESKey,
|
354 |
-
|
355 |
Â
key: sjcl.random.randomWords( 8, 0 ),
|
356 |
Â
|
357 |
Â
encrypt: function ( text ) {
|
@@ -372,7 +368,7 @@
|
|
372 |
Â
return sjcl.codec.base64.fromBits( cipherIV );
|
373 |
Â
|
374 |
Â
}
|
375 |
-
|
376 |
Â
};
|
377 |
Â
|
378 |
Â
})();
|
2 |
Â
*
|
3 |
Â
* Client Encryption of Forms.
|
4 |
Â
*
|
5 |
+
* Includes:
|
6 |
Â
* * RSA and ECC in JavaScript | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
7 |
Â
* * Stanford Javascript Crypto Library | http://crypto.stanford.edu/sjcl/
|
8 |
Â
* * JSON in JavaScript | http://www.JSON.org/
|
9 |
+
*
|
10 |
+
* Version: 0_1_1
|
11 |
Â
* Author: ADYEN (c) 2013
|
12 |
Â
|
13 |
Â
<!DOCTYPE html>
|
40 |
Â
|
41 |
Â
<div class="field">
|
42 |
Â
<label for="adyen-encrypted-form-expiry-month">Expiration Month (MM)
|
43 |
+
<input type="text" value="06" id="adyen-encrypted-form-expiry-month" size="2" autocomplete="off" data-encrypted-name="expiryMonth" /> /
|
44 |
Â
</label>
|
45 |
Â
<label for="adyen-encrypted-form-expiry-year">Expiration Year (YYYY)
|
46 |
Â
<input type="text" value="2016" id="adyen-encrypted-form-expiry-year" size="4" autocomplete="off" data-encrypted-name="expiryYear" />
|
59 |
Â
<script>
|
60 |
Â
// generate time client side for testing... Don't deploy on a real integration!!!
|
61 |
Â
document.getElementById('adyen-encrypted-form-expiry-generationtime').value = new Date().toISOString();
|
62 |
+
|
63 |
Â
// the form element to encrypt
|
64 |
Â
var form = document.getElementById('adyen-encrypted-form');
|
65 |
+
|
66 |
Â
// the public key
|
67 |
Â
var key = "10001|80C7821C961865FB4AD23F172E220F819A5CC7B9956BC3458E2788"
|
68 |
Â
+ "F9D725B07536E297B89243081916AAF29E26B7624453FC84CB10FC7DF386"
|
72 |
Â
+ "ECFC59B90B928F31715A7034E7B674E221F1EB1D696CC8B734DF7DE2E309"
|
73 |
Â
+ "E6E8CF94156686558522629E8AF59620CBDE58327E9D84F29965E4CD0FAF"
|
74 |
Â
+ "A38C632B244287EA1F7F70DAA445D81C216D3286B09205F6650262CAB415"
|
75 |
+
+ "5F024B3294A933F4DC514DE0B5686F6C2A6A2D";
|
76 |
+
|
77 |
+
var options = {};
|
78 |
+
|
79 |
Â
// the form will be encrypted before it is submitted
|
80 |
Â
adyen.encrypt.createEncryptedForm( form, key, options);
|
81 |
Â
</script>
|
86 |
Â
*/
|
87 |
Â
|
88 |
Â
(function() {
|
89 |
+
|
90 |
Â
/* json2.js */
|
91 |
Â
if(typeof JSON!=="object"){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());
|
92 |
Â
|
93 |
Â
/* base64.js */
|
94 |
Â
function hex2b64(e){var t;var n;var r="";for(t=0;t+3<=e.length;t+=3){n=parseInt(e.substring(t,t+3),16);r+=b64map.charAt(n>>6)+b64map.charAt(n&63)}if(t+1==e.length){n=parseInt(e.substring(t,t+1),16);r+=b64map.charAt(n<<2)}else if(t+2==e.length){n=parseInt(e.substring(t,t+2),16);r+=b64map.charAt(n>>2)+b64map.charAt((n&3)<<4)}while((r.length&3)>0)r+=b64pad;return r}function b64tohex(e){var t="";var n;var r=0;var i;for(n=0;n<e.length;++n){if(e.charAt(n)==b64pad)break;v=b64map.indexOf(e.charAt(n));if(v<0)continue;if(r==0){t+=int2char(v>>2);i=v&3;r=1}else if(r==1){t+=int2char(i<<2|v>>4);i=v&15;r=2}else if(r==2){t+=int2char(i);t+=int2char(v>>2);i=v&3;r=3}else{t+=int2char(i<<2|v>>4);t+=int2char(v&15);r=0}}if(r==1)t+=int2char(i<<2);return t}function b64toBA(e){var t=b64tohex(e);var n;var r=new Array;for(n=0;2*n<t.length;++n){r[n]=parseInt(t.substring(2*n,2*n+2),16)}return r}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64pad="="
|
95 |
+
|
96 |
Â
/* jsbn.js */
|
97 |
Â
function BigInteger(e,t,n){if(e!=null)if("number"==typeof e)this.fromNumber(e,t,n);else if(t==null&&"string"!=typeof e)this.fromString(e,256);else this.fromString(e,t)}function nbi(){return new BigInteger(null)}function am1(e,t,n,r,i,s){while(--s>=0){var o=t*this[e++]+n[r]+i;i=Math.floor(o/67108864);n[r++]=o&67108863}return i}function am2(e,t,n,r,i,s){var o=t&32767,u=t>>15;while(--s>=0){var a=this[e]&32767;var f=this[e++]>>15;var l=u*a+f*o;a=o*a+((l&32767)<<15)+n[r]+(i&1073741823);i=(a>>>30)+(l>>>15)+u*f+(i>>>30);n[r++]=a&1073741823}return i}function am3(e,t,n,r,i,s){var o=t&16383,u=t>>14;while(--s>=0){var a=this[e]&16383;var f=this[e++]>>14;var l=u*a+f*o;a=o*a+((l&16383)<<14)+n[r]+i;i=(a>>28)+(l>>14)+u*f;n[r++]=a&268435455}return i}function int2char(e){return BI_RM.charAt(e)}function intAt(e,t){var n=BI_RC[e.charCodeAt(t)];return n==null?-1:n}function bnpCopyTo(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t;e.s=this.s}function bnpFromInt(e){this.t=1;this.s=e<0?-1:0;if(e>0)this[0]=e;else if(e<-1)this[0]=e+DV;else this.t=0}function nbv(e){var t=nbi();t.fromInt(e);return t}function bnpFromString(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0;this.s=0;var r=e.length,i=false,s=0;while(--r>=0){var o=n==8?e[r]&255:intAt(e,r);if(o<0){if(e.charAt(r)=="-")i=true;continue}i=false;if(s==0)this[this.t++]=o;else if(s+n>this.DB){this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s;this[this.t++]=o>>this.DB-s}else this[this.t-1]|=o<<s;s+=n;if(s>=this.DB)s-=this.DB}if(n==8&&(e[0]&128)!=0){this.s=-1;if(s>0)this[this.t-1]|=(1<<this.DB-s)-1<<s}this.clamp();if(i)BigInteger.ZERO.subTo(this,this)}function bnpClamp(){var e=this.s&this.DM;while(this.t>0&&this[this.t-1]==e)--this.t}function bnToString(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var n=(1<<t)-1,r,i=false,s="",o=this.t;var u=this.DB-o*this.DB%t;if(o-->0){if(u<this.DB&&(r=this[o]>>u)>0){i=true;s=int2char(r)}while(o>=0){if(u<t){r=(this[o]&(1<<u)-1)<<t-u;r|=this[--o]>>(u+=this.DB-t)}else{r=this[o]>>(u-=t)&n;if(u<=0){u+=this.DB;--o}}if(r>0)i=true;if(i)s+=int2char(r)}}return i?s:"0"}function bnNegate(){var e=nbi();BigInteger.ZERO.subTo(this,e);return e}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;t=n-e.t;if(t!=0)return this.s<0?-t:t;while(--n>=0)if((t=this[n]-e[n])!=0)return t;return 0}function nbits(e){var t=1,n;if((n=e>>>16)!=0){e=n;t+=16}if((n=e>>8)!=0){e=n;t+=8}if((n=e>>4)!=0){e=n;t+=4}if((n=e>>2)!=0){e=n;t+=2}if((n=e>>1)!=0){e=n;t+=1}return t}function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e;t.s=this.s}function bnpDRShiftTo(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0);t.s=this.s}function bnpLShiftTo(e,t){var n=e%this.DB;var r=this.DB-n;var i=(1<<r)-1;var s=Math.floor(e/this.DB),o=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u){t[u+s+1]=this[u]>>r|o;o=(this[u]&i)<<n}for(u=s-1;u>=0;--u)t[u]=0;t[s]=o;t.t=this.t+s+1;t.s=this.s;t.clamp()}function bnpRShiftTo(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB;var i=this.DB-r;var s=(1<<r)-1;t[0]=this[n]>>r;for(var o=n+1;o<this.t;++o){t[o-n-1]|=(this[o]&s)<<i;t[o-n]=this[o]>>r}if(r>0)t[this.t-n-1]|=(this.s&s)<<i;t.t=this.t-n;t.clamp()}function bnpSubTo(e,t){var n=0,r=0,i=Math.min(e.t,this.t);while(n<i){r+=this[n]-e[n];t[n++]=r&this.DM;r>>=this.DB}if(e.t<this.t){r-=e.s;while(n<this.t){r+=this[n];t[n++]=r&this.DM;r>>=this.DB}r+=this.s}else{r+=this.s;while(n<e.t){r-=e[n];t[n++]=r&this.DM;r>>=this.DB}r-=e.s}t.s=r<0?-1:0;if(r<-1)t[n++]=this.DV+r;else if(r>0)t[n++]=r;t.t=n;t.clamp()}function bnpMultiplyTo(e,t){var n=this.abs(),r=e.abs();var i=n.t;t.t=i+r.t;while(--i>=0)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0;t.clamp();if(this.s!=e.s)BigInteger.ZERO.subTo(t,t)}function bnpSquareTo(e){var t=this.abs();var n=e.t=2*t.t;while(--n>=0)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);if((e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV){e[n+t.t]-=t.DV;e[n+t.t+1]=1}}if(e.t>0)e[e.t-1]+=t.am(n,t[n],e,2*n,0,1);e.s=0;e.clamp()}function bnpDivRemTo(e,t,n){var r=e.abs();if(r.t<=0)return;var i=this.abs();if(i.t<r.t){if(t!=null)t.fromInt(0);if(n!=null)this.copyTo(n);return}if(n==null)n=nbi();var s=nbi(),o=this.s,u=e.s;var a=this.DB-nbits(r[r.t-1]);if(a>0){r.lShiftTo(a,s);i.lShiftTo(a,n)}else{r.copyTo(s);i.copyTo(n)}var f=s.t;var l=s[f-1];if(l==0)return;var c=l*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0);var h=this.FV/c,p=(1<<this.F1)/c,d=1<<this.F2;var v=n.t,m=v-f,g=t==null?nbi():t;s.dlShiftTo(m,g);if(n.compareTo(g)>=0){n[n.t++]=1;n.subTo(g,n)}BigInteger.ONE.dlShiftTo(f,g);g.subTo(s,s);while(s.t<f)s[s.t++]=0;while(--m>=0){var y=n[--v]==l?this.DM:Math.floor(n[v]*h+(n[v-1]+d)*p);if((n[v]+=s.am(0,y,n,m,0,f))<y){s.dlShiftTo(m,g);n.subTo(g,n);while(n[v]<--y)n.subTo(g,n)}}if(t!=null){n.drShiftTo(f,t);if(o!=u)BigInteger.ZERO.subTo(t,t)}n.t=f;n.clamp();if(a>0)n.rShiftTo(a,n);if(o<0)BigInteger.ZERO.subTo(n,n)}function bnMod(e){var t=nbi();this.abs().divRemTo(e,null,t);if(this.s<0&&t.compareTo(BigInteger.ZERO)>0)e.subTo(t,t);return t}function Classic(e){this.m=e}function cConvert(e){if(e.s<0||e.compareTo(this.m)>=0)return e.mod(this.m);else return e}function cRevert(e){return e}function cReduce(e){e.divRemTo(this.m,null,e)}function cMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}function cSqrTo(e,t){e.squareTo(t);this.reduce(t)}function bnpInvDigit(){if(this.t<1)return 0;var e=this[0];if((e&1)==0)return 0;var t=e&3;t=t*(2-(e&15)*t)&15;t=t*(2-(e&255)*t)&255;t=t*(2-((e&65535)*t&65535))&65535;t=t*(2-e*t%this.DV)%this.DV;return t>0?this.DV-t:-t}function Montgomery(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}function montConvert(e){var t=nbi();e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);if(e.s<0&&t.compareTo(BigInteger.ZERO)>0)this.m.subTo(t,t);return t}function montRevert(e){var t=nbi();e.copyTo(t);this.reduce(t);return t}function montReduce(e){while(e.t<=this.mt2)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=e[t]&32767;var r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;n=t+this.m.t;e[n]+=this.m.am(0,r,e,t,0,this.m.t);while(e[n]>=e.DV){e[n]-=e.DV;e[++n]++}}e.clamp();e.drShiftTo(this.m.t,e);if(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function montSqrTo(e,t){e.squareTo(t);this.reduce(t)}function montMulTo(e,t,n){e.multiplyTo(t,n);this.reduce(n)}function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(e,t){if(e>4294967295||e<1)return BigInteger.ONE;var n=nbi(),r=nbi(),i=t.convert(this),s=nbits(e)-1;i.copyTo(n);while(--s>=0){t.sqrTo(n,r);if((e&1<<s)>0)t.mulTo(r,i,n);else{var o=n;n=r;r=o}}return t.revert(n)}function bnModPowInt(e,t){var n;if(e<256||t.isEven())n=new Classic(t);else n=new Montgomery(t);return this.exp(e,n)}var dbits;var canary=0xdeadbeefcafe;var j_lm=(canary&16777215)==15715070;if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array;var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1)
|
98 |
+
|
99 |
Â
/* prng4.js */
|
100 |
Â
function Arcfour(){this.i=0;this.j=0;this.S=new Array}function ARC4init(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;n=0;for(t=0;t<256;++t){n=n+this.S[t]+e[t%e.length]&255;r=this.S[t];this.S[t]=this.S[n];this.S[n]=r}this.i=0;this.j=0}function ARC4next(){var e;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;e=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=e;return this.S[e+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;var rng_psize=256
|
101 |
+
|
102 |
Â
/* rng.js */
|
103 |
Â
function rng_seed_int(e){rng_pool[rng_pptr++]^=e&255;rng_pool[rng_pptr++]^=e>>8&255;rng_pool[rng_pptr++]^=e>>16&255;rng_pool[rng_pptr++]^=e>>24&255;if(rng_pptr>=rng_psize)rng_pptr-=rng_psize}function rng_seed_time(){rng_seed_int((new Date).getTime())}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(e){var t;for(t=0;t<e.length;++t)e[t]=rng_get_byte()}function SecureRandom(){}var rng_state;var rng_pool;var rng_pptr;if(rng_pool==null){rng_pool=new Array;rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}while(rng_pptr<rng_psize){t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=t>>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}SecureRandom.prototype.nextBytes=rng_get_bytes
|
104 |
Â
|
106 |
Â
function parseBigInt(str,r){return new BigInteger(str,r)}function pkcs1pad2(b,n){if(n<b.length+11){alert("Message too long for RSA");return null}var ba=new Array();var i=b.length-1;while(i>=0&&n>0){ba[--n]=b[i--]}ba[--n]=0;var rng=new SecureRandom();var x=new Array();while(n>2){x[0]=0;while(x[0]==0){rng.nextBytes(x)}ba[--n]=x[0]}ba[--n]=2;ba[--n]=0;return new BigInteger(ba)}function RSAKey(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null}function RSASetPublic(N,E){if(N!=null&&E!=null&&N.length>0&&E.length>0){this.n=parseBigInt(N,16);this.e=parseInt(E,16)}else{alert("Invalid RSA public key")}}function RSADoPublic(x){return x.modPowInt(this.e,this.n)}function RSAEncrypt(bytes){var m=pkcs1pad2(bytes,(this.n.bitLength()+7)>>3);if(m==null){return null}var c=this.doPublic(m);if(c==null){return null}var h=c.toString(16);if((h.length&1)==0){return h}else{return"0"+h}}function RSAEncryptB64(bytes){var h=this.encrypt(bytes);if(h){return hex2b64(h)}else{return null}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;RSAKey.prototype.encrypt_b64=RSAEncryptB64;
|
107 |
Â
|
108 |
Â
/* sjcl.js */
|
109 |
+
|
110 |
Â
"use strict";var sjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}};if(typeof module!="undefined"&&module.exports){module.exports=sjcl}sjcl.cipher.aes=function(a){this.g[0][0][0]||this.u();var b,c,d,e,f=this.g[0][4],g=this.g[1];b=a.length;var h=1;if(b!==4&&b!==6&&b!==8){throw new sjcl.exception.invalid("invalid aes key size")}this.a=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(a%b===0||b===8&&a%b===4){c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255];if(a%b===0){c=c<<8^c>>>24^h<<24;h=h<<1^(h>>7)*283}}d[a]=d[a-b]^c}for(b=0;a;b++,a--){c=d[b&3?a:a-4];e[b]=a<=4||b<4?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^g[3][f[c&255]]}};sjcl.cipher.aes.prototype={encrypt:function(a){return this.D(a,0)},decrypt:function(a){return this.D(a,1)},g:[[[],[],[],[],[]],[[],[],[],[],[]]],u:function(){var a=this.g[0],b=this.g[1],c=a[4],d=b[4],e,f,g,h=[],i=[],k,j,l,m;for(e=0;e<256;e++){i[(h[e]=e<<1^(e>>7)*283)^e]=e}for(f=g=0;!c[f];f^=k||1,g=i[g]||1){l=g^g<<1^g<<2^g<<3^g<<4;l=l>>8^l&255^99;c[f]=l;d[l]=f;j=h[e=h[k=h[f]]];m=j*16843009^e*65537^k*257^f*16843008;j=h[l]*257^l*16843008;for(e=0;e<4;e++){a[e][f]=j=j<<24^j>>>8;b[e][l]=m=m<<24^m>>>8}}for(e=0;e<5;e++){a[e]=a[e].slice(0);b[e]=b[e].slice(0)}},D:function(a,b){if(a.length!==4){throw new sjcl.exception.invalid("invalid aes block size")}var c=this.a[b],d=a[0]^c[0],e=a[b?3:1]^c[1],f=a[2]^c[2];a=a[b?1:3]^c[3];var g,h,i,k=c.length/4-2,j,l=4,m=[0,0,0,0];g=this.g[b];var n=g[0],o=g[1],p=g[2],q=g[3],r=g[4];for(j=0;j<k;j++){g=n[d>>>24]^o[e>>16&255]^p[f>>8&255]^q[a&255]^c[l];h=n[e>>>24]^o[f>>16&255]^p[a>>8&255]^q[d&255]^c[l+1];i=n[f>>>24]^o[a>>16&255]^p[d>>8&255]^q[e&255]^c[l+2];a=n[a>>>24]^o[d>>16&255]^p[e>>8&255]^q[f&255]^c[l+3];l+=4;d=g;e=h;f=i}for(j=0;j<4;j++){m[b?3&-j:j]=r[d>>>24]<<24^r[e>>16&255]<<16^r[f>>8&255]<<8^r[a&255]^c[l++];g=d;d=e;e=f;f=a;a=g}return m}};sjcl.bitArray={bitSlice:function(a,b,c){a=sjcl.bitArray.L(a.slice(b/32),32-(b&31)).slice(1);return c===undefined?a:sjcl.bitArray.clamp(a,c-b)},extract:function(a,b,c){var d=Math.floor(-b-c&31);return((b+c-1^b)&-32?a[b/32|0]<<32-d^a[b/32+1|0]>>>d:a[b/32|0]>>>d)&(1<<c)-1},concat:function(a,b){if(a.length===0||b.length===0){return a.concat(b)}var c=a[a.length-1],d=sjcl.bitArray.getPartial(c);return d===32?a.concat(b):sjcl.bitArray.L(b,d,c|0,a.slice(0,a.length-1))},bitLength:function(a){var b=a.length;if(b===0){return 0}return(b-1)*32+sjcl.bitArray.getPartial(a[b-1])},clamp:function(a,b){if(a.length*32<b){return a}a=a.slice(0,Math.ceil(b/32));var c=a.length;b&=31;if(c>0&&b){a[c-1]=sjcl.bitArray.partial(b,a[c-1]&2147483648>>b-1,1)}return a},partial:function(a,b,c){if(a===32){return b}return(c?b|0:b<<32-a)+a*1099511627776},getPartial:function(a){return Math.round(a/1099511627776)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b)){return false}var c=0,d;for(d=0;d<a.length;d++){c|=a[d]^b[d]}return c===0},L:function(a,b,c,d){var e;e=0;if(d===undefined){d=[]}for(;b>=32;b-=32){d.push(c);c=0}if(b===0){return d.concat(a)}for(e=0;e<a.length;e++){d.push(c|a[e]>>>b);c=a[e]<<32-b}e=a.length?a[a.length-1]:0;a=sjcl.bitArray.getPartial(e);d.push(sjcl.bitArray.partial(b+a&31,b+a>32?c:d.pop(),1));return d},M:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}};sjcl.codec.utf8String={fromBits:function(a){var b="",c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b+=String.fromCharCode(e>>>24);e<<=8}return decodeURIComponent(escape(b))},toBits:function(a){a=unescape(encodeURIComponent(a));var b=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a.charCodeAt(c);if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};sjcl.codec.base64={A:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(a,b,c){var d="",e=0,f=sjcl.codec.base64.A,g=0,h=sjcl.bitArray.bitLength(a);if(c){f=f.substr(0,62)+"-_"}for(c=0;d.length*6<h;){d+=f.charAt((g^a[c]>>>e)>>>26);if(e<6){g=a[c]<<6-e;e+=26;c++}else{g<<=6;e-=6}}for(;d.length&3&&!b;){d+="="}return d},toBits:function(a,b){a=a.replace(/\s|=/g,"");var c=[],d=0,e=sjcl.codec.base64.A,f=0,g;if(b){e=e.substr(0,62)+"-_"}for(b=0;b<a.length;b++){g=e.indexOf(a.charAt(b));if(g<0){throw new sjcl.exception.invalid("this isn't base64!")}if(d>26){d-=26;c.push(f^g>>>d);f=g<<32-d}else{d+=6;f^=g<<32-d}}d&56&&c.push(sjcl.bitArray.partial(d&56,f,1));return c}};sjcl.codec.base64url={fromBits:function(a){return sjcl.codec.base64.fromBits(a,1,1)},toBits:function(a){return sjcl.codec.base64.toBits(a,1)}};sjcl.codec.bytes={fromBits:function(a){var b=[],c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++){if((d&3)===0){e=a[d/4]}b.push(e>>>24);e<<=8}return b},toBits:function(a){var b=[],c,d=0;for(c=0;c<a.length;c++){d=d<<8|a[c];if((c&3)===3){b.push(d);d=0}}c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};sjcl.hash.sha256=function(a){this.a[0]||this.u();if(a){this.l=a.l.slice(0);this.h=a.h.slice(0);this.d=a.d}else{this.reset()}};sjcl.hash.sha256.hash=function(a){return(new sjcl.hash.sha256).update(a).finalize()};sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this.l=this.J.slice(0);this.h=[];this.d=0;return this},update:function(a){if(typeof a==="string"){a=sjcl.codec.utf8String.toBits(a)}var b,c=this.h=sjcl.bitArray.concat(this.h,a);b=this.d;a=this.d=b+sjcl.bitArray.bitLength(a);for(b=512+b&-512;b<=a;b+=512){this.z(c.splice(0,16))}return this},finalize:function(){var a,b=this.h,c=this.l;b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,1)]);for(a=b.length+2;a&15;a++){b.push(0)}b.push(Math.floor(this.d/4294967296));for(b.push(this.d|0);b.length;){this.z(b.splice(0,16))}this.reset();return c},J:[],a:[],u:function(){function a(e){return(e-Math.floor(e))*4294967296|0}var b=0,c=2,d;a:for(;b<64;c++){for(d=2;d*d<=c;d++){if(c%d===0){continue a}}if(b<8){this.J[b]=a(Math.pow(c,0.5))}this.a[b]=a(Math.pow(c,1/3));b++}},z:function(a){var b,c,d=a.slice(0),e=this.l,f=this.a,g=e[0],h=e[1],i=e[2],k=e[3],j=e[4],l=e[5],m=e[6],n=e[7];for(a=0;a<64;a++){if(a<16){b=d[a]}else{b=d[a+1&15];c=d[a+14&15];b=d[a&15]=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(c>>>17^c>>>19^c>>>10^c<<15^c<<13)+d[a&15]+d[a+9&15]|0}b=b+n+(j>>>6^j>>>11^j>>>25^j<<26^j<<21^j<<7)+(m^j&(l^m))+f[a];n=m;m=l;l=j;j=k+b|0;k=i;i=h;h=g;g=b+(h&i^k&(h^i))+(h>>>2^h>>>13^h>>>22^h<<30^h<<19^h<<10)|0}e[0]=e[0]+g|0;e[1]=e[1]+h|0;e[2]=e[2]+i|0;e[3]=e[3]+k|0;e[4]=e[4]+j|0;e[5]=e[5]+l|0;e[6]=e[6]+m|0;e[7]=e[7]+n|0}};sjcl.mode.ccm={name:"ccm",encrypt:function(a,b,c,d,e){var f,g=b.slice(0),h=sjcl.bitArray,i=h.bitLength(c)/8,k=h.bitLength(g)/8;e=e||64;d=d||[];if(i<7){throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(f=2;f<4&&k>>>8*f;f++){}if(f<15-i){f=15-i}c=h.clamp(c,8*(15-f));b=sjcl.mode.ccm.C(a,b,c,d,e,f);g=sjcl.mode.ccm.F(a,g,c,b,e,f);return h.concat(g.data,g.tag)},decrypt:function(a,b,c,d,e){e=e||64;d=d||[];var f=sjcl.bitArray,g=f.bitLength(c)/8,h=f.bitLength(b),i=f.clamp(b,h-e),k=f.bitSlice(b,h-e);h=(h-e)/8;if(g<7){throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes")}for(b=2;b<4&&h>>>8*b;b++){}if(b<15-g){b=15-g}c=f.clamp(c,8*(15-b));i=sjcl.mode.ccm.F(a,i,c,k,e,b);a=sjcl.mode.ccm.C(a,i.data,c,d,e,b);if(!f.equal(i.tag,a)){throw new sjcl.exception.corrupt("ccm: tag doesn't match")}return i.data},C:function(a,b,c,d,e,f){var g=[],h=sjcl.bitArray,i=h.M;e/=8;if(e%2||e<4||e>16){throw new sjcl.exception.invalid("ccm: invalid tag length")}if(d.length>4294967295||b.length>4294967295){throw new sjcl.exception.bug("ccm: can't deal with 4GiB or more data")}f=[h.partial(8,(d.length?64:0)|e-2<<2|f-1)];f=h.concat(f,c);f[3]|=h.bitLength(b)/8;f=a.encrypt(f);if(d.length){c=h.bitLength(d)/8;if(c<=65279){g=[h.partial(16,c)]}else{if(c<=4294967295){g=h.concat([h.partial(16,65534)],[c])}}g=h.concat(g,d);for(d=0;d<g.length;d+=4){f=a.encrypt(i(f,g.slice(d,d+4).concat([0,0,0])))}}for(d=0;d<b.length;d+=4){f=a.encrypt(i(f,b.slice(d,d+4).concat([0,0,0])))}return h.clamp(f,e*8)},F:function(a,b,c,d,e,f){var g,h=sjcl.bitArray;g=h.M;var i=b.length,k=h.bitLength(b);c=h.concat([h.partial(8,f-1)],c).concat([0,0,0]).slice(0,4);d=h.bitSlice(g(d,a.encrypt(c)),0,e);if(!i){return{tag:d,data:[]}}for(g=0;g<i;g+=4){c[3]++;e=a.encrypt(c);b[g]^=e[0];b[g+1]^=e[1];b[g+2]^=e[2];b[g+3]^=e[3]}return{tag:d,data:h.clamp(b,k)}}};sjcl.misc.hmac=function(a,b){this.I=b=b||sjcl.hash.sha256;var c=[[],[]],d=b.prototype.blockSize/32;this.j=[new b,new b];if(a.length>d){a=b.hash(a)}for(b=0;b<d;b++){c[0][b]=a[b]^909522486;c[1][b]=a[b]^1549556828}this.j[0].update(c[0]);this.j[1].update(c[1])};sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(a){a=(new this.I(this.j[0])).update(a).finalize();return(new this.I(this.j[1])).update(a).finalize()};sjcl.misc.pbkdf2=function(a,b,c,d,e){c=c||1000;if(d<0||c<0){throw sjcl.exception.invalid("invalid params to pbkdf2")}if(typeof a==="string"){a=sjcl.codec.utf8String.toBits(a)}e=e||sjcl.misc.hmac;a=new e(a);var f,g,h,i,k=[],j=sjcl.bitArray;for(i=1;32*k.length<(d||1);i++){e=f=a.encrypt(j.concat(b,[i]));for(g=1;g<c;g++){f=a.encrypt(f);for(h=0;h<f.length;h++){e[h]^=f[h]}}k=k.concat(e)}if(d){k=j.clamp(k,d)}return k};sjcl.random={randomWords:function(a,b){var c=[];b=this.isReady(b);var d;if(b===0){throw new sjcl.exception.notReady("generator isn't seeded")}else{b&2&&this.Q(!(b&1))}for(b=0;b<a;b+=4){(b+1)%65536===0&&this.H();d=this.t();c.push(d[0],d[1],d[2],d[3])}this.H();return c.slice(0,a)},setDefaultParanoia:function(a){this.r=a},addEntropy:function(a,b,c){c=c||"user";var d,e,f=(new Date).valueOf(),g=this.o[c],h=this.isReady(),i=0;d=this.B[c];if(d===undefined){d=this.B[c]=this.O++}if(g===undefined){g=this.o[c]=0}this.o[c]=(this.o[c]+1)%this.b.length;switch(typeof a){case"number":if(b===undefined){b=1}this.b[g].update([d,this.s++,1,b,f,1,a|0]);break;case"object":c=Object.prototype.toString.call(a);if(c==="[object Uint32Array]"){e=[];for(c=0;c<a.length;c++){e.push(a[c])}a=e}else{if(c!=="[object Array]"){i=1}for(c=0;c<a.length&&!i;c++){if(typeof a[c]!="number"){i=1}}}if(!i){if(b===undefined){for(c=b=0;c<a.length;c++){for(e=a[c];e>0;){b++;e>>>=1}}}this.b[g].update([d,this.s++,2,b,f,a.length].concat(a))}break;case"string":if(b===undefined){b=a.length}this.b[g].update([d,this.s++,3,b,f,a.length]);this.b[g].update(a);break;default:i=1}if(i){throw new sjcl.exception.bug("random: addEntropy only supports number, array of numbers or string")}this.i[g]+=b;this.e+=b;if(h===0){this.isReady()!==0&&this.G("seeded",Math.max(this.f,this.e));this.G("progress",this.getProgress())}},isReady:function(a){a=this.w[a!==undefined?a:this.r];return this.f&&this.f>=a?this.i[0]>80&&(new Date).valueOf()>this.K?3:1:this.e>=a?2:0},getProgress:function(a){a=this.w[a?a:this.r];return this.f>=a?1:this.e>a?1:this.e/a},startCollectors:function(){if(!this.k){if(window.addEventListener){window.addEventListener("load",this.m,false);window.addEventListener("mousemove",this.n,false)}else{if(document.attachEvent){document.attachEvent("onload",this.m);document.attachEvent("onmousemove",this.n)}else{throw new sjcl.exception.bug("can't attach event")}}this.k=true}},stopCollectors:function(){if(this.k){if(window.removeEventListener){window.removeEventListener("load",this.m,false);window.removeEventListener("mousemove",this.n,false)}else{if(window.detachEvent){window.detachEvent("onload",this.m);window.detachEvent("onmousemove",this.n)}}this.k=false}},addEventListener:function(a,b){this.p[a][this.N++]=b},removeEventListener:function(a,b){var c;a=this.p[a];var d=[];for(c in a){a.hasOwnProperty(c)&&a[c]===b&&d.push(c)}for(b=0;b<d.length;b++){c=d[b];delete a[c]}},b:[new sjcl.hash.sha256],i:[0],v:0,o:{},s:0,B:{},O:0,f:0,e:0,K:0,a:[0,0,0,0,0,0,0,0],c:[0,0,0,0],q:undefined,r:6,k:false,p:{progress:{},seeded:{}},N:0,w:[0,48,64,96,128,192,256,384,512,768,1024],t:function(){for(var a=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}return this.q.encrypt(this.c)},H:function(){this.a=this.t().concat(this.t());this.q=new sjcl.cipher.aes(this.a)},P:function(a){this.a=sjcl.hash.sha256.hash(this.a.concat(a));this.q=new sjcl.cipher.aes(this.a);for(a=0;a<4;a++){this.c[a]=this.c[a]+1|0;if(this.c[a]){break}}},Q:function(a){var b=[],c=0,d;this.K=b[0]=(new Date).valueOf()+30000;for(d=0;d<16;d++){b.push(Math.random()*4294967296|0)}for(d=0;d<this.b.length;d++){b=b.concat(this.b[d].finalize());c+=this.i[d];this.i[d]=0;if(!a&&this.v&1<<d){break}}if(this.v>=1<<this.b.length){this.b.push(new sjcl.hash.sha256);this.i.push(0)}this.e-=c;if(c>this.f){this.f=c}this.v++;this.P(b)},n:function(a){sjcl.random.addEntropy([a.x||a.clientX||a.offsetX||0,a.y||a.clientY||a.offsetY||0],2,"mouse")},m:function(){sjcl.random.addEntropy((new Date).valueOf(),2,"loadtime")},G:function(a,b){var c;a=sjcl.random.p[a];var d=[];for(c in a){a.hasOwnProperty(c)&&d.push(a[c])}for(c=0;c<d.length;c++){d[c](b)}}};try{var s=new Uint32Array(32);crypto.getRandomValues(s);sjcl.random.addEntropy(s,1024,"crypto['getRandomValues']")}catch(t){};
|
111 |
Â
|
112 |
Â
/* adyen */
|
113 |
Â
var adyen = window.adyen = window.adyen || {};
|
114 |
+
|
115 |
Â
var encrypt = adyen.encrypt = adyen.encrypt || {
|
116 |
Â
createEncryptedForm: function( form, key, name ) {
|
117 |
Â
return new EncryptedForm( form, key, name );
|
118 |
Â
}
|
119 |
Â
};
|
120 |
+
|
121 |
Â
encrypt.version = '0_1_1';
|
122 |
+
|
123 |
Â
|
124 |
Â
/*
|
125 |
Â
*
|
126 |
+
*
|
127 |
Â
*
|
128 |
Â
* @constructor EncryptedForm
|
129 |
Â
*
|
148 |
Â
this.force = options.force || false;
|
149 |
Â
this.id = options.id || this.name;
|
150 |
Â
this.onsubmit = options.onsubmit || function() {};
|
151 |
+
this.dataEncryptedName = options.dataEncryptedName || "data-encrypted-name";
|
152 |
Â
|
153 |
Â
if ( this.force !== false ) {
|
154 |
Â
this.createEncryptedField( this.encrypt() );
|
159 |
Â
this.element.attachEvent( 'onsubmit', this.handleSubmit.bind( this ) );
|
160 |
Â
}
|
161 |
Â
}
|
162 |
+
|
163 |
Â
};
|
164 |
Â
|
165 |
Â
EncryptedForm.prototype = {
|
166 |
Â
|
167 |
Â
constructor: EncryptedForm,
|
168 |
+
|
169 |
Â
/*
|
170 |
Â
*
|
171 |
Â
* Handles a submit of the form.
|
172 |
Â
* It creates a hidden input with the form data as serialized, encrypted JSON.
|
173 |
Â
*
|
174 |
Â
* @param e {Event} The submit event to handle.
|
175 |
+
*
|
176 |
Â
*/
|
177 |
+
|
178 |
Â
handleSubmit: function( e ) {
|
179 |
Â
this.createEncryptedField( this.encrypt() );
|
180 |
Â
this.onsubmit(e);
|
181 |
Â
},
|
182 |
+
|
183 |
Â
/*
|
184 |
Â
* Creates an RSA key based on the public key.
|
185 |
Â
*
|
186 |
Â
* @returns rsa {RSAKey} An RSAKey based on the public key provided.
|
187 |
Â
*
|
188 |
Â
*/
|
189 |
+
|
190 |
Â
createRSAKey: function() {
|
191 |
+
|
192 |
Â
var k = this.key.split('|');
|
193 |
Â
|
194 |
Â
if ( k.length != 2 ) {
|
203 |
Â
rsa.setPublic( mod, exp );
|
204 |
Â
|
205 |
Â
return rsa;
|
206 |
+
|
207 |
Â
},
|
208 |
+
|
209 |
Â
/*
|
210 |
Â
* Creates an AES key.
|
211 |
Â
*
|
212 |
Â
* @returns aes {Object} An AESKey with encryption methods.
|
213 |
Â
*
|
214 |
Â
*/
|
215 |
+
|
216 |
Â
createAESKey: function() {
|
217 |
Â
return new AESKey();
|
218 |
Â
},
|
219 |
+
|
220 |
+
/*
|
221 |
Â
* Gets all encrypted fields from a root node ( usually the form element ).
|
222 |
Â
*
|
223 |
Â
* @param node {DOMNode} The root of the form to get encrypted fields from ( i.e. querySelectorAll( '[data-encrypeted-name]' ) ).
|
230 |
Â
getEncryptedFields: function( node, fields ) {
|
231 |
Â
|
232 |
Â
if ( node.querySelectorAll ) {
|
233 |
+
return node.querySelectorAll( '['+ this.dataEncryptedName + ']' );
|
234 |
+
}
|
235 |
Â
|
236 |
Â
fields = fields || [];
|
237 |
Â
|
241 |
Â
for ( var i = 0; i < children.length; i++ ) {
|
242 |
Â
child = children[i];
|
243 |
Â
|
244 |
+
if ( child.hasAttribute(this.dataEncryptedName) ) {
|
245 |
Â
fields.push( child )
|
246 |
Â
} else {
|
247 |
Â
this.getEncryptedFields( child, fields );
|
252 |
Â
return fields;
|
253 |
Â
|
254 |
Â
},
|
255 |
+
|
256 |
Â
/*
|
257 |
Â
* Creates JSON object
|
258 |
Â
*
|
270 |
Â
var key, value;
|
271 |
Â
|
272 |
Â
for ( var i = fields.length - 1; i >= 0; i-- ) {
|
273 |
+
|
274 |
Â
field = fields[i];
|
275 |
+
|
276 |
Â
field.removeAttribute('name');
|
277 |
+
key = field.getAttribute(this.dataEncryptedName);
|
278 |
Â
value = field.value;
|
Â
|
|
279 |
Â
data[ key ] = value;
|
Â
|
|
280 |
Â
};
|
Â
|
|
281 |
Â
return data;
|
282 |
Â
|
283 |
Â
},
|
284 |
+
|
285 |
Â
/*
|
286 |
Â
* Encrypts data
|
287 |
Â
*
|
290 |
Â
*/
|
291 |
Â
|
292 |
Â
encrypt: function() {
|
293 |
+
|
294 |
Â
var data = this.toJSON( this.getEncryptedFields( this.element ) );
|
295 |
+
|
296 |
Â
var rsa, aes, cipher, encoded, encrypted, prefix;
|
297 |
Â
|
298 |
Â
rsa = this.createRSAKey();
|
299 |
Â
aes = this.createAESKey();
|
300 |
+
|
301 |
Â
cipher = aes.encrypt( JSON.stringify( data ) );
|
302 |
Â
keybytes = sjcl.codec.bytes.fromBits( aes.key );
|
303 |
Â
encrypted = rsa.encrypt_b64( keybytes );
|
304 |
Â
prefix = 'adyenjs_' + encrypt.version + '$';
|
305 |
+
|
306 |
Â
return [ prefix, encrypted, '$', cipher ].join('');
|
307 |
+
|
308 |
Â
},
|
309 |
+
|
310 |
Â
/*
|
311 |
Â
*
|
312 |
Â
* Creates an encrypted field.
|
314 |
Â
* @param data {String} The data in the form as encrypted and serialized JSON.
|
315 |
Â
*
|
316 |
Â
*/
|
317 |
+
|
318 |
Â
createEncryptedField: function( data ) {
|
319 |
+
|
320 |
Â
var element = document.getElementById( this.name );
|
321 |
+
|
322 |
Â
if ( !element ) {
|
323 |
Â
element = document.createElement( 'input' );
|
324 |
Â
element.type = 'hidden';
|
326 |
Â
element.id = this.id;
|
327 |
Â
this.element.appendChild( element );
|
328 |
Â
}
|
Â
|
|
329 |
Â
element.setAttribute( 'value', data );
|
Â
|
|
330 |
Â
}
|
331 |
Â
|
332 |
Â
};
|
333 |
+
|
334 |
+
|
335 |
Â
/*
|
336 |
Â
*
|
337 |
Â
* @constructor AESKey
|
339 |
Â
* @return aes {AESKey} An AESKey with encryption methods.
|
340 |
Â
*
|
341 |
Â
*/
|
342 |
+
|
343 |
Â
var AESKey = function() {
|
344 |
Â
// empty constructor
|
345 |
Â
};
|
346 |
+
|
347 |
Â
AESKey.prototype = {
|
348 |
+
|
349 |
Â
constructor: AESKey,
|
350 |
+
|
351 |
Â
key: sjcl.random.randomWords( 8, 0 ),
|
352 |
Â
|
353 |
Â
encrypt: function ( text ) {
|
368 |
Â
return sjcl.codec.base64.fromBits( cipherIV );
|
369 |
Â
|
370 |
Â
}
|
371 |
+
|
372 |
Â
};
|
373 |
Â
|
374 |
Â
})();
|
@@ -1,7 +1,7 @@
|
|
1 |
Â
<?xml version="1.0"?>
|
2 |
Â
<package>
|
3 |
Â
<name>Adyen_Payment</name>
|
4 |
-
<version>2.0
|
5 |
Â
<stability>stable</stability>
|
6 |
Â
<license uri="http://opensource.org/licenses/OSL-3.0">Open Software License (OSL-3.0)</license>
|
7 |
Â
<channel>community</channel>
|
@@ -10,13 +10,33 @@
|
|
10 |
Â
<description>Magento Plugin for Payment Service Provider Adyen. The integration guide for this Plugin is available on the Adyen Support website: support.adyen.com, type in 'Magento'
|
11 |
Â

|
12 |
Â
support@adyen.com</description>
|
13 |
-
<notes>
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
<contents><target name="magecommunity"><dir name="Adyen"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Installments.php" hash="f316d311c9e1c876fb18896d85734cf8"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Filter"><file name="Adyen.php" hash="d5e828a9621eda18cf3404c6d294cf18"/></dir><dir name="Renderer"><file name="Adyen.php" hash="44bc7f403e35ce4711101f8b93192190"/></dir></dir></dir></dir><dir name="Checkout"><file name="Success.php" hash="8edb224af51fb76d111807168268f67c"/></dir><file name="Failure.php" hash="ead96fee55fba2cbb5044f09566e85e4"/><dir name="Form"><file name="Boleto.php" hash="29aa8c90287d37979fc5eb35554fc630"/><file name="Cc.php" hash="9e9f2b2fb861e39133635ce7adc40bb1"/><file name="Elv.php" hash="c3de45c9161b1564209b79a80140fec3"/><file name="Hpp.php" hash="1ad9ac1b1f4f847101edd37341d03ec6"/><file name="Openinvoice.php" hash="86994b120bfdff14854194be5cb530bf"/><file name="Pos.php" hash="7a93f39cd4c30d5be1b56218a4e04a7f"/></dir><file name="Form.php" hash="77d0589a32cb816dcdc6df16c98f2cd6"/><dir name="Info"><file name="Boleto.php" hash="720913657cb3aad5706aaff9e73ff65c"/><file name="Cc.php" hash="fda6af2c2c9a6988095b5f4eee3b6711"/><file name="Elv.php" hash="d35cfabffa923a7c0345a1dacde38a52"/><file name="Hpp.php" hash="bce3945267dac13f4fd9c9fd1400d11c"/><file name="Openinvoice.php" hash="1e99e4ab3ef75a9fa27626bd946b0407"/><file name="Pos.php" hash="8a6be4f35d43dc7791b9741cfb05b8a5"/></dir><file name="Redirect.php" hash="66f82378a6c73c349098a8c5b35341ab"/></dir><dir name="Helper"><file name="Data.php" hash="cd50d08a820784ba7f5bf2d6784ad732"/><file name="Installments.php" hash="a2e3baac6ab0af239d048a0f7a9e5368"/></dir><dir name="Model"><dir name="Adyen"><file name="Abstract.php" hash="ff2e0015cba8cf06c5e2a50760ab5c24"/><file name="Boleto.php" hash="e92f38062af2dcc766161ce2e92d9fac"/><file name="Cc.php" hash="fc6ba72e489362de7ccfd734830677b4"/><dir name="Data"><file name="Abstract.php" hash="dcdd899bd0595af98886ff752a67e21a"/><file name="AdditionalData.php" hash="e4d038a60ac548e0938f75a0452d5717"/><file name="AdditionalDataKVPair.php" hash="cc2e0ba6733ef5139f44ba7c9af303dc"/><file name="Amount.php" hash="73540706cac2c2eef0252615d6200511"/><file name="BrowserInfo.php" hash="bd1cca3cc27aea7fad85661c7132e2cd"/><file name="Card.php" hash="ea384e9c2032ba7ad5925edfb434625f"/><file name="Classmap.php" hash="38ab9bfbfb1585852380c0551a35b9ec"/><file name="Elv.php" hash="6608688d03b047387a2b28be10c47b87"/><file name="IdealPaymentRequest.php" hash="8281d9276cdf4fa65a4a451a4096a979"/><file name="InvoiceLine.php" hash="2013af2bbae2b07df4db34b4d8565796"/><file name="InvoiceRow.php" hash="a3f423014bd18a35d4e7e65a1a12fa79"/><file name="ModificationRequest.php" hash="81ea8b3a849f8fccba2c55c4832b0cc8"/><file name="ModificationResult.php" hash="eec37eba3849baa4ad52b194e31ac362"/><file name="NotificationClassmap.php" hash="31166e4ef9ea728c107f5ee501d67fc5"/><file name="NotificationRequest.php" hash="4647bfc558308e8f7795ae97fbf2c066"/><file name="NotificationRequestItem.php" hash="ef0794de69076f4accc5035b3f659808"/><file name="OpenInvoiceDetailResult.php" hash="cfdb5c3b03944556bc3931428339347e"/><file name="PaymentRequest.php" hash="d105a1c9445ef810083ac5d04e6d825f"/><file name="PaymentRequest3d.php" hash="505731df1bb63d6426a11e5d3036552f"/><file name="Recurring.php" hash="bad9acc8370eff0008ebbc0a6a32a75b"/><file name="RecurringRequest.php" hash="aed77050f296df4f48c88038ef3ac547"/><dir name="Server"><file name="Notification.php" hash="51ed88aa2c2035e4cb7b4e992e7c8e4a"/><file name="Openinvoice.php" hash="d94166e3c8337e213061655ab7e48e68"/></dir><file name="ShopperName.php" hash="91bfea9ade01d29fa9053de87ce01560"/></dir><file name="Debug.php" hash="8044ccae24d83db38d9430cf125ada83"/><file name="Dummy.php" hash="a72ccc6e8c5268cf6786db289de4e3d9"/><file name="Elv.php" hash="f3e6067e8bb235d037c7cd78aaa703b6"/><file name="Hpp.php" hash="354ece4d6ddfea544a0067a649093877"/><file name="Ideal.php" hash="8359f4eb5c28363680c08ecbc88a28a5"/><file name="Openinvoice.php" hash="53a3cb1ab35a7a8a539a10cd9928e925"/><file name="Pos.php" hash="b471260f8bfa2f8cd67ead83500095ae"/><file name="Shared.php" hash="7f3fe961a7107b6fb5625a9efe7854fd"/></dir><file name="Authenticate.php" hash="9de42d073756d2f1dfaa09a3af83cea9"/><file name="Event.php" hash="52184be6de80f9835a93de826ca1b65f"/><dir name="Mysql4"><dir name="Adyen"><dir name="Debug"><file name="Collection.php" hash="dee84aa1c2b370a72d79031a09b9bba4"/></dir><file name="Debug.php" hash="123808b460f70ad416ed9bb92e6a1d60"/><file name="Event.php" hash="0cb65021f52c84f0f567098bd90db4e6"/></dir><file name="Order.php" hash="05c5ce3b68f877b23d1396d13db18517"/><file name="Setup.php" hash="45997ed47c197cb302d6fbb684489201"/></dir><file name="Observer.php" hash="7494dc549d07127865a8557c9b06f59a"/><file name="Process.php" hash="d9039c5c3189abf5f4363a31eeb47d6a"/><dir name="Source"><file name="BoletoType.php" hash="1a31476c4ebfdb6b16a1dd3a26015fb1"/><file name="CancelModes.php" hash="b18c30b103cdce97af41e63ef0a25a92"/><file name="CaptureModes.php" hash="d2d138f0a59e1e448531f1fd8f908439"/><file name="CcType.php" hash="97d4e2549bec42b8282636f1e98e853a"/><file name="DemoModes.php" hash="0ce4142166b9f7dc96ee8e1e3bd03286"/><file name="OpeninvoiceType.php" hash="c39389388338dfe0b85b10a1e9b828cb"/><file name="PaymentAction.php" hash="23224178cf58e55c308234036f629bf7"/><file name="PaymentRoutines.php" hash="7aa5525e67554ad35226cf1aaa802c49"/><file name="RecurringType.php" hash="2a3c60c4546d9c02c842a9ea0a5ade26"/><dir name="Status"><file name="Refund.php" hash="bb700fa537f3a7c27c43691846777ef4"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Installments.php" hash="6c3b60719edb83eaaad1515514dab620"/></dir></dir></dir></dir><dir name="controllers"><file name="ProcessController.php" hash="f13bf04ac2e5ddb6ede00eeced522860"/></dir><dir name="docs"><dir name="httpauthentication"><file name="cgihtaccess.patch" hash="b1ca6c18002d1c22f53c8dd55aee1845"/><file name="howto" hash="31677f6b34fca607f8751c9eb5bdcac2"/></dir><file name="readme" hash="aae2884b18ed35ab74c7e73f4baec6e3"/><file name="test-cards" hash="d7a4a41bc2bb17f74dcbcfbc41156675"/><dir name="translation"><file name="Adyen_Payment.csv" hash="0094e6a70aca120e94cc395f139f1687"/><file name="Mage_Checkout.csv" hash="7d3bcce1ce01d189d113d02b949b73ca"/><file name="howto" hash="00a8a321b06b7235c6e6ca39cfcef80f"/></dir></dir><dir name="etc"><file name="Notification.wsdl" hash="cbba67067d372790e91225b4049c7e0d"/><file name="Payment.wsdl" hash="f7166d125a3f8ba355b8b9fc923abc88"/><file name="config.xml" hash="c276d5a3460770e08f08a389012d1174"/><file name="system.xml" hash="402e1b494490f786940d3744d840aee3"/></dir><dir name="sql"><dir name="adyen_setup"><file name="mysql4-install-0.0.1.php" hash="3c304ff04d461bc0bfa6205c03dceea0"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="3d687c555ed52be5eeb4eaba126abb2b"/><file name="mysql4-upgrade-0.0.7-0.0.8.php" hash="27b202258c2bd16ee64902df7985862e"/><file name="mysql4-upgrade-0.0.8-0.0.9.php" hash="85d3de753b99b541a4547c39b7713905"/><file name="mysql4-upgrade-0.1.0.3-0.1.0.4.php" hash="8b43e357cf7a365b1e099b130db51b20"/><file name="mysql4-upgrade-0.1.0.8-0.1.0.9.php" hash="0ba22acbe3f48fc1ae1e76212a11dc2a"/><file name="mysql4-upgrade-0.1.0.9-0.1.0.10.php" hash="2b029ba94cea8dd9b6d82a0de265234f"/><file name="mysql4-upgrade-1.0.0.3-1.0.0.7.php" hash="c087b4bbc48cf47e954b6cfbd1f2c5bb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="adyen.xml" hash="a963acf4938f60fde0672bb6177399f1"/></dir><dir name="template"><dir name="adyen"><dir name="form"><file name="boleto.phtml" hash="83c7bc35d037f426aa75c0719e8adb86"/><file name="cc.phtml" hash="054ab1e3fa2b3901973a76e4f7547c10"/><file name="elv.phtml" hash="4d370d2d737f0a42ebcb33e7151ecee6"/><file name="hpp.phtml" hash="4a91ca20deb8e5dd083d8f4d68102812"/><file name="openinvoice.phtml" hash="33127af4713430e153cccbe8684fab13"/><file name="pos.phtml" hash="c07c11d348fced7d889ded4fc77e3363"/></dir><dir name="info"><file name="boleto.phtml" hash="fd3d6d83a26d1584b9c7912011465f26"/><file name="cc.phtml" hash="232556a362df5d3a88cd7975f7434b1e"/><file name="elv.phtml" hash="7a6b627e0c6acd04497d52f5047e930a"/><file name="hpp.phtml" hash="55005919f39ca07650aca6039d423081"/><file name="openinvoice.phtml" hash="14f889a7cc056538629ca9963e4052f0"/><file name="pos.phtml" hash="a5b175023f0670409122876074d6f050"/></dir><dir name="pdf"><file name="boleto.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="cc.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="elv.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="hpp.phtml" hash="4cdb4f7c88b6556fc847c21d5d4b7ffb"/><file name="openinvoice.phtml" hash="742b87babbb612032d68a8e79d31e89c"/><file name="pos.phtml" hash="a3dc27a6607b4978c93b21d945661e5c"/></dir><file name="pdf.tar.bz2" hash="d4b4edd908e7784efc8ac45fe1ce73cb"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="adyen"><file name="blank.phtml" hash="03d788d9ec2aa70de7eb66015b2c4da1"/><dir name="checkout"><file name="success.phtml" hash="56c5bdd54f9cbed22be7afe0deedead4"/></dir><dir name="form"><file name="boleto.phtml" hash="3598286ebd678277681160eaa1c842e3"/><file name="cc.phtml" hash="02f7b3cdd935db88b560af4fccace63b"/><file name="elv.phtml" hash="789610e3d1f8973f6aecb4ef119a59c9"/><file name="hpp.phtml" hash="86fe103d87159f5cd18065f5d0b673c8"/><file name="openinvoice.phtml" hash="7e749cb508d84e1c065a0048f6cf616b"/><file name="pos.phtml" hash="674097ccf62f13c969d39c2f6a6824b8"/></dir><dir name="info"><file name="boleto.phtml" hash="c526f9c4badab3afaa771872bb4687f1"/><file name="cc.phtml" hash="cda685b7c94fc401158bf5901e66c8b6"/><file name="elv.phtml" hash="8b850e97ea84e1de5ead4ec487c4356f"/><file name="hpp.phtml" hash="4d91b5d0729eafc220268d204b514cae"/><file name="openinvoice.phtml" hash="2bcd711e1255923d53f353819e19529e"/><file name="pos.phtml" hash="9b917920aa1cc77c9e8c3a26943b1335"/></dir></dir></dir><dir name="layout"><file name="adyen.xml" hash="93a4b160747bcc918d09944cc7328fab"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adyen_Payment.xml" hash="e4d297a9b401c4548acb47aea1ae41d9"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="adyen"><file name="ABNAMRO.png" hash="a621e7f4cf1c3340ac5147fef5544bfe"/><file name="ABNAMRO.xcf" hash="eac24c953dcf05d40ce928ccab2af90f"/><file name="ASNBANK.png" hash="13034bc0836590cfb0ec7b6c3076e435"/><file name="FORTIS.png" hash="3b68fa26a90f8cd44e2f8dfcb5f72fe8"/><file name="FRIESLANDBANK.png" hash="c1388a9b8a170260b0b72da9b2cd2dbf"/><file name="ING.png" hash="b08f829cf67322875ca12d5fc36ac191"/><file name="KNAB.png" hash="4df678f84bdf11db9b75d1e539a0367c"/><file name="POSTBANK.png" hash="ea0ffd9d3e9717fe0bdc160d8cd92482"/><file name="RABOBANK.png" hash="f09418ebbd0d6daf21786d5bde93e856"/><file name="REGIOBANK.png" hash="0c3a984ce817e4d3ec98549be7704712"/><file name="SNSBANK.png" hash="75f988e3ab935d6d509a86f82422f474"/><file name="SNSREGIOBANK.png" hash="34a70ac0e1e0a8cfb56c77a5b1da3c80"/><file name="TESTISSUER.png" hash="0110aadd0f619b39f357b98b63e3ff69"/><file name="TESTISSUER10.png" hash="b2462fe98e69d211e92771ae75f48552"/><file name="TESTISSUER2.png" hash="471cc38e61077fdaba8fd868fea22dfe"/><file name="TESTISSUER3.png" hash="4ca46be0b7607dc95caccb5ec974e0a8"/><file name="TESTISSUER4.png" hash="6e31a3d3e73390432a84e394a1937c5d"/><file name="TESTISSUER5.png" hash="78b758fef66f220e79b1b9ecda8851d2"/><file name="TESTISSUER6.png" hash="4aefac8baaa06592c8a80f085c0ade08"/><file name="TESTISSUER7.png" hash="0474b1a3264ef45068013747a27158d2"/><file name="TESTISSUER8.png" hash="5e655c4af04b417acecac6fd66623662"/><file name="TESTISSUER9.png" hash="6e378c3b7c75febd0be361ec39c55e45"/><file name="TESTISSUERCANCELLED.png" hash="c794eeb78ef618c3e9dcd8b444b7b23f"/><file name="TESTISSUERPENDING.png" hash="04ee87a5c35a491e624719a3c885d492"/><file name="TESTISSUERREFUSED.png" hash="2f7e2bad6857f39f32afd09eb846e55a"/><file name="TRIODOSBANK.png" hash="922b1fcd51306e0d0da6b15ebe640d8c"/><file name="VANLANSCHOTBANKIERS.png" hash="0a5d713a5c73c54e90507743456c5657"/><file name="achcolombia.png" hash="1f1339c682440cfd7584f9ba00f59722"/><file name="achcolombia_small.png" hash="d6b2899a0039de82788c831b00dd1533"/><file name="achcolombia_small_grey.png" hash="bcae575368bdcdb582423e28ac7a56e9"/><file name="achcolombia_tiny.png" hash="a287c57b8bcc821371758da895db6437"/><file name="advance_payment.png" hash="5aba603621b4b21cc05b7eae1f7455da"/><file name="adyen_logo_large.png" hash="70726ef290d0eee3ed163eb751091813"/><file name="alipay.png" hash="e3773ada96577e575c9e1300a89a5875"/><file name="alipay_small.png" hash="f9848d15fc7ee22b6687ccdbe7f36a16"/><file name="alipay_small_grey.png" hash="e5ffe7ff272ce2814b7808fd047a9c6b"/><file name="alipay_tiny.png" hash="1a7867dd958ddcdd90ad2400e5be23de"/><file name="amex.png" hash="8e3b962f9ef18e08cf16b77934607d28"/><file name="amex_small.png" hash="6ce7c9a2b330c9c46f0213c40db55683"/><file name="amex_small_grey.png" hash="0f6aabd8dfcbf48dbb555b9191d7795e"/><file name="amex_tiny.png" hash="b7016f4efb163c985d6f1d99a8433d2a"/><file name="asiapay.png" hash="44626dc317e547fb40010498c1096407"/><file name="asiapay_small.png" hash="cca4d86b5abc510f20ca9563d7215c3d"/><file name="asiapay_small_grey.png" hash="00e20b2b2eb0d2ad51c15d8ccc558dc5"/><file name="asiapay_tiny.png" hash="ba0d613d94a64918c0338504fed20ee7"/><file name="autopay.png" hash="4251763c71239e7b1b421e4bc7f5b70a"/><file name="autopay_small.png" hash="ca6941b80b6157bae2411b5620149d2d"/><file name="autopay_small_grey.png" hash="f69d143b4f1fc16a9138ccfacec808a4"/><file name="autopay_tiny.png" hash="4c0c91402daafc63bdb5979dbbd963db"/><file name="babygiftcard.png" hash="91bcbb6604b26565b89898c9a8e1e117"/><file name="babygiftcard_small.png" hash="2558bbdd4d9528b37ba93a8c4af536a4"/><file name="babygiftcard_tiny.png" hash="393a192fab9874e3b167c3bc5d568db7"/><file name="baloto.png" hash="1c172c628f79837c83196b243c636ff5"/><file name="baloto_small.png" hash="c66db84ac7fed6f81010e8058fa39a74"/><file name="baloto_small_grey.png" hash="bdc5eac76e02a658b348a0722fca9ba9"/><file name="baloto_tiny.png" hash="5e10ee14c8a44c3b4c28571664fa045f"/><file name="bancnet.png" hash="a2b687ef27244e448b85635cc1d3ec60"/><file name="bancnet_small.png" hash="4473bc16badc29200ffd09021778b1e3"/><file name="bancnet_small_grey.png" hash="6b108ea906b6d6a5ad51e4de6db732eb"/><file name="bancnet_tiny.png" hash="0ac28b35fd4e09954debcd2eb42e89ce"/><file name="bank24.png" hash="9a921572d6bae73604e1122ec3e5bf7e"/><file name="bankTransfer_AE.png" hash="a6f29729723fa65c732ffc9267b3f8be"/><file name="bankTransfer_AE_small.png" hash="a3322805ab1c40c4e6237943185284ab"/><file name="bankTransfer_AE_tiny.png" hash="dfcf50c97c3b832fd3c17efb2864335c"/><file name="bankTransfer_AT.png" hash="7fa4204d1426a64a4cd26af06af44d41"/><file name="bankTransfer_AT_small.png" hash="31037dcf034d1e9d28254d1962b2ca16"/><file name="bankTransfer_AT_tiny.png" hash="4ee9964118e05d2a81335f3033ec5bf1"/><file name="bankTransfer_AU.png" hash="05716c67579fcf3574037ce69c9e4229"/><file name="bankTransfer_AU_small.png" hash="acd23b8e3ccf3c9d28960fde63c22e85"/><file name="bankTransfer_AU_tiny.png" hash="4a3ee62afdac23a00a0675c763e93470"/><file name="bankTransfer_BE.png" hash="5547426f07e0562ba9b605f1f04a9ad7"/><file name="bankTransfer_BE_small.png" hash="007dbd9f27115b601eb94db09a10b8f3"/><file name="bankTransfer_BE_tiny.png" hash="cf0285a691339efad52d82d40c7aa9f1"/><file name="bankTransfer_BG.png" hash="be209415f5bec0a45bd2bd9cd3c41d0a"/><file name="bankTransfer_BG_small.png" hash="6249144aa579c494988b5bbecb22eb69"/><file name="bankTransfer_BG_tiny.png" hash="7c11956844dbf7cc76db038b32fc7ab1"/><file name="bankTransfer_CH.png" hash="9b20d62386085ac2c9da1227abec5d58"/><file name="bankTransfer_CH_small.png" hash="2887bcf97901ed7ed6bc4fb5d8a00876"/><file name="bankTransfer_CH_tiny.png" hash="c0218d075bbb503689f40007a331ba85"/><file name="bankTransfer_CZ.png" hash="78f7aac275e10af77b3bbab28ba1aa23"/><file name="bankTransfer_CZ_small.png" hash="7bf17799b64aa618945981eb7fa00cce"/><file name="bankTransfer_CZ_tiny.png" hash="7f2a7e2fde701bff21fa388776e73632"/><file name="bankTransfer_DE.png" hash="989d5e1cc2547504b0fbc7aa88e08713"/><file name="bankTransfer_DE_small.png" hash="fb50048c4acfdebf85c4c8f90d8b08d9"/><file name="bankTransfer_DE_small.xcf" hash="cfbc9a47bc116e97a121771c0aa6fe83"/><file name="bankTransfer_DE_tiny.png" hash="d4d68f1068df68f61cb828005c9c0ac9"/><file name="bankTransfer_DK.png" hash="a2e9a409144a8ef18747faafa2937609"/><file name="bankTransfer_DK_small.png" hash="71e75c357b475fe236b633ac8a2a76cd"/><file name="bankTransfer_DK_tiny.png" hash="0103bbe5b8a803aad990bd4ad53c88c0"/><file name="bankTransfer_EE.png" hash="9caa3e1ac3558e9ec372c45df045bae6"/><file name="bankTransfer_EE_small.png" hash="91ffe550444bac13ac29ac1696ffdfac"/><file name="bankTransfer_EE_tiny.png" hash="59ea293d7ba58cd6dd9a9a2b43088093"/><file name="bankTransfer_ES.png" hash="7d0051c7ee32eddca94b89368bb5afbe"/><file name="bankTransfer_ES_small.png" hash="2dc1519510ef7bea726e0bca70859c06"/><file name="bankTransfer_ES_tiny.png" hash="a2338a0d60b2585ac34269daf794d189"/><file name="bankTransfer_FI.png" hash="ffbe8dfa936a4628e3c029bd957f367d"/><file name="bankTransfer_FI_small.png" hash="1db5d45d947502483a2e8c40aab3734d"/><file name="bankTransfer_FI_tiny.png" hash="b9f26cef0fc7f051b6d79ada14c902ba"/><file name="bankTransfer_FR.png" hash="572f77cf0f22103300682c5f89e9d9e9"/><file name="bankTransfer_FR_small.png" hash="58a268c927e4d19858ed3241ceac05f8"/><file name="bankTransfer_FR_tiny.png" hash="dee4c0c47d94fb0e2ab032264c4d1543"/><file name="bankTransfer_GB.png" hash="5a7eee2f31bec7bf422425f31aea2d5a"/><file name="bankTransfer_GB_small.png" hash="17d3c0ca20cee2250e3b6d0f5f080ba9"/><file name="bankTransfer_GB_tiny.png" hash="24d7d3ce5dc62ef776f3f36f24ff78b1"/><file name="bankTransfer_GI.png" hash="e9035b335bd8dc809c7e4afc7d775cc0"/><file name="bankTransfer_GI_small.png" hash="e51bd2f8333a8d8b2163c777c5b12b48"/><file name="bankTransfer_GI_tiny.png" hash="d158401d4dd73a057adac68f3f23ad89"/><file name="bankTransfer_GR.png" hash="aefe60c85d74d77d1c1327538617f297"/><file name="bankTransfer_GR_small.png" hash="b9a0a5d6ec52c80d72d8e8cf903f37f3"/><file name="bankTransfer_GR_tiny.png" hash="1dc0912afd646785eade5d8785baa12c"/><file name="bankTransfer_IBAN.png" hash="f636fcae0c128e08baaef26dacaa078d"/><file name="bankTransfer_IBAN_small.png" hash="ffc0073f2fe405de05206cdfc1565daa"/><file name="bankTransfer_IBAN_tiny.png" hash="4a4f64cb62ca9cfec99d117d0169bb83"/><file name="bankTransfer_IE.png" hash="eb6efba5502d54571022feaef9a9ded3"/><file name="bankTransfer_IE_small.png" hash="d9359e8a2bf8c04d4d43acdcc8b30a5e"/><file name="bankTransfer_IE_tiny.png" hash="b3a0f75656b535960c362baaabc45ce3"/><file name="bankTransfer_IT.png" hash="cd56062b943e4ec6716bc72ebe4b62a9"/><file name="bankTransfer_IT_small.png" hash="29ac58a26ae12dc26dd2d501262ed361"/><file name="bankTransfer_IT_tiny.png" hash="c45892a3e2ae81bb9b4508d79164e556"/><file name="bankTransfer_JP.png" hash="20023e2e93afc881740ea74e89251d86"/><file name="bankTransfer_LU.png" hash="b3dbdeea3429de5280c3a6d911930e9a"/><file name="bankTransfer_LU_small.png" hash="ebb919c647653075be4d9bfaeec8c00c"/><file name="bankTransfer_LU_tiny.png" hash="ec058289aef35f481077c56cdf758032"/><file name="bankTransfer_MT.png" hash="8955bc706cf66307ba69e58d8006af2d"/><file name="bankTransfer_MT_small.png" hash="13ce68bbda83c39b8719d356705da6d2"/><file name="bankTransfer_MT_tiny.png" hash="b05aa11e844f09fa797a3540534e5155"/><file name="bankTransfer_NL.png" hash="ccffd7131f791f7eb44e21b42fd66cc4"/><file name="bankTransfer_NL_small.png" hash="90f18f3784ec4c4733891aafd2e83958"/><file name="bankTransfer_NL_small.xcf" hash="ac17edd9804089820e9d73c76441abfc"/><file name="bankTransfer_NL_tiny.png" hash="61e9d461381aa1fb7e9dbcc8012686e0"/><file name="bankTransfer_NO.png" hash="ffcb1204470ff94a7cf2025e000e4978"/><file name="bankTransfer_NO_small.png" hash="daab5aceaf8e4dd59dfcf29fa69cdc24"/><file name="bankTransfer_NO_tiny.png" hash="3fbbf9e381d8d0d9ada61a54778655cb"/><file name="bankTransfer_PL.png" hash="cd25fefef6bce86a97ab7242138360e2"/><file name="bankTransfer_PL_small.png" hash="880b17d7d090c7bd21965e9b78894851"/><file name="bankTransfer_PL_tiny.png" hash="9579393e3dbb3c2aeb7ebf35e54ef4e7"/><file name="bankTransfer_PT.png" hash="c3c652523d77b5d085da97111c96ef9e"/><file name="bankTransfer_PT_small.png" hash="9d3a979ef52298bcc1545b131bd4a3db"/><file name="bankTransfer_PT_tiny.png" hash="cf2be093140773d75d8993fab7aa347c"/><file name="bankTransfer_SE.png" hash="e5608461fa8bdbac771449f30cde91ec"/><file name="bankTransfer_SE_small.png" hash="0f57f6092f8bef25c9973a140a2d85ad"/><file name="bankTransfer_SE_tiny.png" hash="79f3a00608bf18d686d89562af80a72f"/><file name="bankTransfer_SK.png" hash="2390a923affb1640b1b8bb801ce04705"/><file name="bankTransfer_SK_small.png" hash="50adde906c3a965992bbfb04554a5371"/><file name="bankTransfer_SK_tiny.png" hash="d4866f13969214fd774ea1c427a048e6"/><file name="bankTransfer_US.png" hash="9013561099b618aa954f5a3e1352a6ce"/><file name="bankTransfer_US_small.png" hash="191e204c1216a199229da9d75ed1a2a5"/><file name="bankTransfer_US_tiny.png" hash="9d9e942b93d13a18e38aac0ee932fe15"/><file name="bank_ru.png" hash="2390a923affb1640b1b8bb801ce04705"/><file name="bank_ru_small.png" hash="01c263789dd7e38ac4078f55161ec19b"/><file name="bank_ru_tiny.png" hash="d4866f13969214fd774ea1c427a048e6"/><file name="barras.png" hash="389f5242e23cc5b386392d5d21459f21"/><file name="barras_small.png" hash="9e657657b963a1434e88d4289acf9448"/><file name="barras_small_grey.png" hash="d14dbd53e9a52706bf736525a90d8f63"/><file name="barras_tiny.png" hash="e46d37c7e69ef3722876a0205431f1c8"/><file name="bcmc.png" hash="28dca1b34022f2c653c13556c452fce3"/><file name="bcmc_small.png" hash="49698208e5b73f80773260c3fdb3e5a3"/><file name="bcmc_small_grey.png" hash="5069f14bff23c074af6fe2092a2e482a"/><file name="bcmc_tiny.png" hash="3b4221516dc0d1ace3432a473903991e"/><file name="beelinesms.png" hash="a559096cb240aaf7696be7563498b18b"/><file name="bijcard.png" hash="c93da8e22fac6869d729e961df24b593"/><file name="bijcard_small.png" hash="f188b92b77af1613a91c00450d3eb168"/><file name="bijcard_small_grey.png" hash="08eb4420ac9f7a7f691d688e9550f651"/><file name="bijcard_tiny.png" hash="b88eeed8f7318514f849e3ed3a9a2ce8"/><file name="bill99.png" hash="461213bcf10fb394ef524d3a0ad92ee0"/><file name="bill99_small.png" hash="d6e30f7d3da5ce34af3aa7e2353b4809"/><file name="bill99_small_grey.png" hash="a66c49f3556fa99301f4288341eaa014"/><file name="bill99_tiny.png" hash="d10dbbf6512e15252ad6d1337670a7fd"/><file name="boleto.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_hsbc.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_itau.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_santander.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="bradesco.png" hash="d5ae6f8cb39883cce8c97c0d11257a4c"/><file name="c_cash.png" hash="1b9d5b0c9ece2eaff0be71b4082e0655"/><file name="c_factuur.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_factuur_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_factuur_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_invoice.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_invoice_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_invoice_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_oprekening.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_oprekening_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_oprekening_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_paypal.png" hash="fe5fd0065e4a84e967095f082b329d7f"/><file name="c_paypal_small.png" hash="294698dab8f5aa31f2ad62702bd9d379"/><file name="c_rembours.png" hash="fb2da23375ce5ba67380dc0fb60e7669"/><file name="c_rembours_small.png" hash="0d0f244c1820921db3a6635552cf8129"/><file name="c_rembours_tiny.png" hash="c15d78de45389d475f2786fed3e81c4b"/><file name="card.png" hash="adfe3d9fe45c3f94b9edca852e2cb38c"/><file name="cashticket.png" hash="0dba12beffb7c5ebf47ae1e5701426f3"/><file name="cashticket_small.png" hash="ade5518971a871dd48b0628af6f6cf89"/><file name="cashticket_small_grey.png" hash="348c3721fbedfb2a7121f57db435f43e"/><file name="cashticket_tiny.png" hash="95248971eb69c150748b9acf27f68fb5"/><file name="cashticket_tiny2.png" hash="16ab15f5263fe81ab5233d02ce2cd715"/><file name="cashu.png" hash="1b6d79438ad686cdff44866a66445dca"/><file name="ccavenue.png" hash="aee563b4c9c77d8a881db1e79ad8758d"/><file name="ccavenue_small.png" hash="ffa7390808c679e8d6c580fcf14054fb"/><file name="ccavenue_small_grey.png" hash="9a6c58e88230fb6a167e597752a533ab"/><file name="ccavenue_tiny.png" hash="994d56725d095d107fb33c6f3abf7653"/><file name="cellpaypoint.png" hash="c676483390c0c7e932a320b6326593da"/><file name="cellpaypoint_small.png" hash="f720447e73325b922568a00d0effe75c"/><file name="cellpaypoint_small_grey.png" hash="c6deea99f2099ade43b2b75dcb62f273"/><file name="cellpaypoint_tiny.png" hash="5c00501360e94b3020ff54bccbc2e531"/><file name="ciberpay.png" hash="625d300997f331918e912dc266e1a3a4"/><file name="contact_ru.png" hash="5f70b79ee4232a81a9f7eb0224b0ba3c"/><file name="creditcards.png" hash="cd1a83b970a38307c2899f9949495a00"/><file name="dineromail.png" hash="9058ea237d278d5fd238c2d180807c57"/><file name="dineromail_ar_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_ar_argencard.gif" hash="422ea3362cc44616f72a887f5cba66c6"/><file name="dineromail_ar_banktransfer.gif" hash="758e12e370a5b213996ea1f39259721a"/><file name="dineromail_ar_bapropago.gif" hash="df51325a4fae890a5a6673f92bb64f5d"/><file name="dineromail_ar_cabal.gif" hash="98f6cc5d54df43b4c4a17d9fc2dfb9bd"/><file name="dineromail_ar_cobroexpress.gif" hash="910960360ea1cd632a69ab500cd627ee"/><file name="dineromail_ar_dm.gif" hash="b458246e266ecb059865ab17b7673882"/><file name="dineromail_ar_italcred.gif" hash="aa4376df77748d39c670001794e7991f"/><file name="dineromail_ar_master.gif" hash="126cdc5db597363e5934cf19205f8f45"/><file name="dineromail_ar_pagofacil.gif" hash="2c85235d6dff444b1b914488d035eb7b"/><file name="dineromail_ar_rapipago.gif" hash="c745eb4d456f03c6643f40e77f9ad6ac"/><file name="dineromail_ar_tshopping.gif" hash="552daaa4621397aaed5cea3ad5fc89ec"/><file name="dineromail_ar_visa.gif" hash="61c86fd2afade160736b1c318a8280a6"/><file name="dineromail_ar_visa_hipotecario.gif" hash="bbdb3933302107611678bd7a87779a6c"/><file name="dineromail_br_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_br_aura.gif" hash="b4a8dea00ceebb3d1d64660a997ac22d"/><file name="dineromail_br_bbancario.gif" hash="d9adffbdf626846cfe11b874c5bc0715"/><file name="dineromail_br_diners.gif" hash="b4f437b40f747842cb32becf8af28eb4"/><file name="dineromail_br_dm.gif" hash="65fa3eb604d2d5cd64b76ea0419788a6"/><file name="dineromail_br_hipercard.gif" hash="329dd978884c554fc8c0a37bd6c1ded9"/><file name="dineromail_br_master.gif" hash="126cdc5db597363e5934cf19205f8f45"/><file name="dineromail_br_oipaggo.gif" hash="9cad6e46ea39ec1d6af77ce9322835c1"/><file name="dineromail_br_visa.gif" hash="61c86fd2afade160736b1c318a8280a6"/><file name="dineromail_cl_amex.gif" hash="d4942bf6dab3c072e701e709adaecf78"/><file name="dineromail_cl_diners.gif" hash="9f5bccfc0ab73993405821859dab56b0"/><file name="dineromail_cl_dm.gif" hash="0b886856a701eff48c710a4812f999d0"/><file name="dineromail_cl_magna.gif" hash="bbbbed0d123e619dbf9ffc3308cb4f6e"/><file name="dineromail_cl_master.gif" hash="38b5c034caa6249caf49256f7df4894c"/><file name="dineromail_cl_presto.gif" hash="fa18e40e599f4216d0efea05d9329b5b"/><file name="dineromail_cl_ripley.gif" hash="8a0fe5295feeb9959f2dedf17b304215"/><file name="dineromail_cl_servipag.gif" hash="51cc675b605ce7dd88016743fc324e09"/><file name="dineromail_cl_visa.gif" hash="87fa159904723d830b30d9a0f2f2ff00"/><file name="dineromail_mx_7eleven.gif" hash="7595248bd6c735fc9cd28a0afe9e035c"/><file name="dineromail_mx_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_mx_bancomer_tc.gif" hash="b2854f409126920b1c9cf8ed3792a349"/><file name="dineromail_mx_dm.gif" hash="9eede7e49ebcb145494952f6edb749b2"/><file name="dineromail_mx_hsbc_tb.gif" hash="1fb60730a0dfe9d0a0ebef45af1d8fdd"/><file name="dineromail_mx_ixe_tc.gif" hash="6e19e5be52b5bfce749f16b26e933c2e"/><file name="dineromail_mx_otherbank_tc.gif" hash="df05af375e248dcc04324aa92b6163b0"/><file name="dineromail_mx_oxxo.gif" hash="ee69da5b06d9c52ef76dd1a20bab5ebb"/><file name="dineromail_mx_santander_tc.gif" hash="5bb0f9600b1b8ad67d0a418c2412a506"/><file name="dineromail_mx_scotiabank_tc.gif" hash="dbe7bdd2d9327086cae42ee6a842d00c"/><file name="dineromail_small.png" hash="356e06d5a2fd5f98f3da4dfc192e389c"/><file name="dineromail_tiny.png" hash="98f6b908f7025a8babaffafcc1336428"/><file name="diners.png" hash="6310bb53fe7921cf016309d6a75b8c22"/><file name="diners_small.png" hash="ecf5d635a74460ca9575bb7d6d8550dd"/><file name="diners_small_grey.png" hash="77ff46143b8a4aab54eb35c345806a83"/><file name="diners_tiny.png" hash="881b5998d35cc373d294ca21689015d5"/><file name="directEbanking.png" hash="6d7ce2ff213c33743d80ab83fb24e8de"/><file name="directEbanking_axa.png" hash="3d90797ef39a0db23dd6373bdfef9ee8"/><file name="directEbanking_cbc.png" hash="f23617618a9e2ce7863a931947b49adb"/><file name="directEbanking_de.png" hash="9fa16b098e744e94553952c5a28c7dd2"/><file name="directEbanking_de_grey.png" hash="109b1237e5d69d7ae82dc9a64d6ab4fd"/><file name="directEbanking_de_small.png" hash="5f65ee79ae22c4ba52e6a8485cf155cd"/><file name="directEbanking_de_tiny.png" hash="15983a607b8151f0be3b5ecfb067ea7a"/><file name="directEbanking_dexia.png" hash="37ebcc9a12bc9c88d540f78adf9bd679"/><file name="directEbanking_fintro.png" hash="389b1a7b14e5466b7b0dd4721aee0433"/><file name="directEbanking_fortis.png" hash="511cc06fefa644cc7575a0efb227bd64"/><file name="directEbanking_grey.png" hash="109b1237e5d69d7ae82dc9a64d6ab4fd"/><file name="directEbanking_ing.png" hash="ac4f224d0fe9aee23d143acc5198dd72"/><file name="directEbanking_kbc.png" hash="eae3c85e332e4289841bd27a46031db3"/><file name="directEbanking_small.png" hash="db84d47793f8e375d48dc8b17f8a0ddf"/><file name="directEbanking_small_grey.png" hash="7f4fbbcfe647cf8d280238754061d042"/><file name="directEbanking_tiny.png" hash="7d804d09c7df931eb9cafc2d3a4984b1"/><file name="directdebit_BR_bancodobrasil.png" hash="784271e1bf909c95e79ff7de4d92ed5b"/><file name="directdebit_BR_bradesco.png" hash="d5ae6f8cb39883cce8c97c0d11257a4c"/><file name="directdebit_BR_caixa.png" hash="a0d69bc8a40bf120fc2138a694c31186"/><file name="directdebit_BR_hsbc.png" hash="4943f73d211b8111fd81ca8d4e06160d"/><file name="directdebit_BR_itau.png" hash="b24ed466c1d694dca7dc26ee42dbf330"/><file name="directdebit_BR_santander.png" hash="bd73ea7f9f46b0ed583e764f01e9a8d0"/><file name="directdebit_NL.png" hash="cf1246761401ad866b72d7b520506b22"/><file name="directdebit_NL_small.png" hash="2e6a7444f509232818458312f28f8c50"/><file name="directdebit_NL_tiny.png" hash="99ea09a985cf0221ce87d3696211704e"/><file name="discover.png" hash="491378a0e2ae6223ab41fc925b67575d"/><file name="discover_small.png" hash="8573aebe4938afb288749badb22aa091"/><file name="discover_small_grey.png" hash="e60b18fcd2f0509c02a08fa0bf7024b2"/><file name="discover_tiny.png" hash="78a2cb6ccedb121d3138b280e1778f84"/><file name="dotpay.png" hash="a09962a7357374482444accf6b066037"/><file name="dotpay_inteligo.png" hash="25492f3d9eaabae7aa1441fdf24947b3"/><file name="dotpay_moje.png" hash="1c948c8e2db27f09e44e4c6f3591e39c"/><file name="dotpay_mtransfer.png" hash="e9ef4a420639f227e650c9e456235059"/><file name="dotpay_multitransfer.png" hash="b604e3e946b41437bc485b0a95a76b2a"/><file name="dotpay_nordea.png" hash="cfda5216a9ae9b829e5121bbfaaf887b"/><file name="dotpay_potzta.png" hash="88670102fd0e7f532357d06ec66a8ec6"/><file name="dotpay_przelewz.png" hash="06cbe8767f3b1810e2a72b19a1bcc9c7"/><file name="dotpay_przelewz24.png" hash="64143c67feac20a193fd459ba0a6e8b4"/><file name="dotpay_small.png" hash="aabbcc9e2471e044c38ab63d8aa6d48f"/><file name="dotpay_tiny.png" hash="5c746221e7ec781c18bb4d7e6f0a66a0"/><file name="dotpay_zabka.png" hash="a6edae22b53cdd3b997f8c9b50840b2c"/><file name="ebanking_FI.png" hash="7d717c71a9174624d8e30a314c4f091e"/><file name="ebanking_FI_aktia.gif" hash="092c03a2319bd7c5d8fc9dc98516be46"/><file name="ebanking_FI_alandsbanken.png" hash="d64698c6c6dc9b6c8e1d2179dfb61d8d"/><file name="ebanking_FI_handelsbanken.png" hash="06f99903ea285bc5cf392ea6c642a267"/><file name="ebanking_FI_nordea.png" hash="c68ecd7c03b5d6a0819110c56df501e8"/><file name="ebanking_FI_osuuspankki.png" hash="cf9f495363970b9da3dbbaffe1031225"/><file name="ebanking_FI_sampo.png" hash="e5b4bd2ac745258b22ab832be253654a"/><file name="ebanking_FI_small.png" hash="57635f01d33e65d40af90d3ab4088ad7"/><file name="ebanking_FI_spankki.png" hash="e88599e1318b54be1990363607819811"/><file name="ebanking_FI_tapiola.png" hash="27ad56685d2e0e641a8d3e95942630ef"/><file name="ebanking_FI_tiny.png" hash="b0e3de2e531c362daaac6063c7a59d9e"/><file name="ebetalning.png" hash="0bc7c8cc01264df81ad06b0b75ce7c0a"/><file name="ebucks.png" hash="33d683c3a6f4f61df3c36e09d867936e"/><file name="ebucks_small.png" hash="c2afb7964e668ba7ba0416682fdd831b"/><file name="ebucks_small_tiny.png" hash="dd79fc153f0a7fcc79e628383e76ee26"/><file name="ebucks_tiny.png" hash="6085ef04ad96289d6a98e429c6d061ba"/><file name="elba.png" hash="8d2bfd3e8c0953b5d1ba80e201d25069"/><file name="elecsnet.png" hash="4a27849dfd5a8bc6771a962aff3908f4"/><file name="elv.png" hash="8e47d6ce919e1be80328665798d387ec"/><file name="elv_small.png" hash="a565fd570c28204b7ed0e92ebf667012"/><file name="elv_tiny.png" hash="3c9d929660d6279f255c7be9bf02ee8f"/><file name="empty.png" hash="65d7e6c42582ea986cb66ad78768b2ae"/><file name="enets.png" hash="5eae578677220e7085374936ffc2ec6a"/><file name="entertainmentcard.png" hash="df44b82c45f98790ea0e8866ecb5fee7"/><file name="entertainmentcard_small.png" hash="0466be6962e63c80c766ca4b092cded6"/><file name="entertainmentcard_small_grey.png" hash="32b0a15b2467decf84db199cd6db3bcf"/><file name="entertainmentcard_tiny.png" hash="2a7610575298bf7029bbbfad2bb86596"/><file name="forwardmobile.png" hash="023348014c3838963e48bdc8b397c387"/><file name="frame.png" hash="5e2226d7539f5d95dabe5988f4446282"/><file name="gallgall.png" hash="2e6b9f6aafaebe09112e089c05aa64ea"/><file name="gallgall_small.png" hash="24fabea2d5af04bedf9dd69e2368b943"/><file name="gallgall_small_tiny.png" hash="671cb1ce378d811cddaf77af7545d365"/><file name="gallgall_tiny.png" hash="769bf04c15a3b81f06940c237c3b3706"/><file name="giropay.png" hash="469cb654fe84b923b86b06723455ef9d"/><file name="giropay_small.png" hash="444f3a6307bb83a1d20d19e1cb8237f9"/><file name="giropay_small_grey.png" hash="565dd52d036a87d5c515c8bec4cef4f3"/><file name="giropay_tiny.png" hash="3a677e8d71ce59332e012db5bc343106"/><file name="globegcash.png" hash="580003d47ef03a6d1c7203bfc250b6d3"/><file name="globegcash_small.png" hash="cd18f17b46acb7ca15370b000f9bfa95"/><file name="globegcash_small_grey.png" hash="36e88a7a7170eb0c5ca7d3a8f2b08f13"/><file name="globegcash_tiny.png" hash="006794f78d9a43a56543a6e6b5a7ebd8"/><file name="hansabank.png" hash="b4dad91137678e09a650e1c6693e98d3"/><file name="hdfc.png" hash="b6e57b76ee8920607a2a0a809ee40d48"/><file name="hdfc_small.png" hash="1b9e555bfab7c0f11631dfecacffa637"/><file name="hdfc_small_grey.png" hash="cadac6a01cdab50cff177a1c0feb6156"/><file name="hdfc_tiny.png" hash="584260909cebec2286b6d1cd9489c7d4"/><file name="hppPos.png" hash="4780e785c785e93aed6ad13df323d6ef"/><file name="hyvesafrekenen.png" hash="5c8068c5b31a55f043cee6dff3246bb7"/><file name="hyvesafrekenen_small.png" hash="5a4c5747c030ac74cea799032ada3b26"/><file name="hyvesafrekenen_tiny.png" hash="2215dc356edeb426da65f43536960afe"/><file name="ideal.png" hash="6a851bfc5bac2835fd31c18c1224e8c9"/><file name="ideal_small.png" hash="8b115bda559a24a3564e02f7a90caae9"/><file name="ideal_tiny.png" hash="140c2e52427e074f95627a44db1f9f88"/><file name="interac.png" hash="c63021e21273e83423d8af2b4c7c1728"/><file name="interac_small.png" hash="0c74bd42750252eda57b054651afca18"/><file name="interac_tiny.png" hash="1a42ba184555605ab8e2ea1a4956f21a"/><file name="ipay88.png" hash="116aa967091843ee6e8e911ff4c34b22"/><file name="ipay88_small.png" hash="1dfb38797a43657d72b0701c446a841e"/><file name="ipay88_small_grey.png" hash="418f051bc03571334cec46e122fa698f"/><file name="ipay88_tiny.png" hash="0009e8c253c57564c3688010c5192ad4"/><file name="ivr.png" hash="0ebef34ac806802b0d29c1d74f84fdbf"/><file name="ivrLandline.png" hash="0ebef34ac806802b0d29c1d74f84fdbf"/><file name="ivrLandline_small.png" hash="155f9a61db970885782db7cbe997dab4"/><file name="ivrLandline_tiny.png" hash="ecf7994d1e627023dbd47615a8ebb848"/><file name="ivrMobile.png" hash="6a16e39d5deffb8fa3234108ca97b7de"/><file name="ivrMobile_small.png" hash="a9756b756b3ea56dea07a16edcdf39a9"/><file name="ivrMobile_tiny.png" hash="8c35341f8a8f6ca16b752ff7e1bb51bf"/><file name="ivr_small.png" hash="155f9a61db970885782db7cbe997dab4"/><file name="ivr_tiny.png" hash="ecf7994d1e627023dbd47615a8ebb848"/><file name="jcb.png" hash="68303da687ac6e8615196a66f40bb6fb"/><file name="jcb_small.png" hash="f469481ddecb206cfc74478c6b58266e"/><file name="jcb_small_grey.png" hash="ddb4587396f2e7c7ad83d2aa6561cf7a"/><file name="jcb_tiny.png" hash="5d89108481655ee9dc2dbf6476bbcc14"/><file name="kadowereld.png" hash="c2eea3806e2f55ffa2f7eb3154450be5"/><file name="kadowereld_small.png" hash="203f4584e34c3f059025f3d4329b4898"/><file name="kadowereld_small_grey.png" hash="3afa5e33cd29e5c3ce1723ea10607463"/><file name="kadowereld_tiny.png" hash="b2ca2f7f504670555d332f4c5e8d3074"/><file name="klarna.png" hash="51bc6b70472fe29b728192222b88c709"/><file name="klarna_small.png" hash="57a98dc539dd5c329aac8540a3204d1e"/><file name="klarna_tiny.png" hash="fe0295e2cba0b79136e86180d7db5963"/><file name="laser.png" hash="c64699ddd372b4a48e72b8066fd2aa78"/><file name="laser_small.png" hash="abda432193ffcd5388037fa34b9e0737"/><file name="laser_small_grey.png" hash="ef7193af17ae93fa9bb5215a0ec73195"/><file name="laser_tiny.png" hash="2f87b8e37582541355e9b77008cf3853"/><file name="maestro.png" hash="e91fa85475ae74b16b92b7ac05e562c2"/><file name="maestro_small.png" hash="7814fbfff53e57643137fd68889ec807"/><file name="maestro_small_grey.png" hash="31ab5c8168e8a5b075fe1136b221d453"/><file name="maestro_tiny.png" hash="87ff6ebe1ef2e4cbae340881169065c4"/><file name="maestrouk.png" hash="cf0fcc0e1f41ad2301d5814e4a9c88c4"/><file name="maestrouk_small.png" hash="7814fbfff53e57643137fd68889ec807"/><file name="maestrouk_small_grey.png" hash="31ab5c8168e8a5b075fe1136b221d453"/><file name="maestrouk_tiny.png" hash="87ff6ebe1ef2e4cbae340881169065c4"/><file name="mc.png" hash="0d108b48ed7f8e1f0020da611e223800"/><file name="mc_small.png" hash="51ca51c64a8f0277961effeb0a0dedbb"/><file name="mc_small_grey.png" hash="0762490e5dc86277d0e411468b01a269"/><file name="mc_tiny.png" hash="814af4ec011f2f33edb7d38763dea2ea"/><file name="mercadopago.png" hash="e8cdc9cab0494fbaec13ffa7a008f0d6"/><file name="mimoney.png" hash="0f6d07a6156c6dc931636c8c618384ac"/><file name="mimoney_small.png" hash="4a8b0586fd04690de902120a463ca5b2"/><file name="mimoney_small_grey.png" hash="c85a2d63e583a8fd231713d30d484ecb"/><file name="mimoney_tiny.png" hash="0c562f6e53a95ebe2ff12747f9271a56"/><file name="moneta.png" hash="c208f24cbe664e0c9df753d1dd6b8d43"/><file name="moneybookers.png" hash="7bfc54c2a787b53f699f124d7449a169"/><file name="moneybookers_small.png" hash="1290894e479fafda67291355ea65defe"/><file name="moneybookers_tiny.png" hash="4ed8a8052e9b394e174889de6d621604"/><file name="moneymail.png" hash="73d044eac9d9f1679a653dd2e62935f3"/><file name="moneymoney.png" hash="7204b9579b665085d00b1ea2184b678f"/><file name="multibanco.png" hash="178a9292a9743e3b8904f105e7d6715b"/><file name="nedbank.png" hash="a8a2dc3af1e76262b75270a24a041331"/><file name="nedbank_small.png" hash="d386a8672bd21e53580ae32ae529ca3a"/><file name="nedbank_small_grey.png" hash="7085229e1217e47b07663764f8bb1e6e"/><file name="nedbank_tiny.png" hash="af3694515dd8b68ca71324ca20089c58"/><file name="onebip.png" hash="ca289a3c9fd8d72bce90165db98a88b9"/><file name="online_RU.png" hash="afcc9ad6292e2e21feff4af23e2fa46e"/><file name="online_RU_small.png" hash="712fa0be37857b024e3118d96da61bab"/><file name="online_RU_tiny.png" hash="0e3ac8d1ca10dff95657aa9b9ebdc13b"/><file name="online_transfer_de.png" hash="43324fb914cdbf8eff66f3668a353f1e"/><file name="openinvoice.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="openinvoice.xcf" hash="d5f41ec9c48415f65a519c33999a1229"/><file name="openinvoice_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="openinvoice_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="pagosonline.png" hash="04a1d0c0bb46ed7f931b3d4e248f8c0a"/><file name="pagosonline_small.png" hash="9768e52502eb299716268a212a044812"/><file name="pagosonline_small_grey.png" hash="e9f7365e885652200fdb08201e1b13cf"/><file name="pagosonline_tiny.png" hash="70d51512b8bf5215f5865b21a3ca7731"/><file name="paypal.png" hash="02362803ca1d3ab9c9e8dc3176100d66"/><file name="paypal_small.png" hash="294698dab8f5aa31f2ad62702bd9d379"/><file name="paypal_tiny.png" hash="709c47f06297455d8d55d6937245e016"/><file name="paysafecard.png" hash="20861199bb6e8781c0b10e995f1490de"/><file name="paysafecard_small.png" hash="e7452ca00265fdc91dd28a2b326355d3"/><file name="paysafecard_small_grey.png" hash="06377beb14a2666f153b273e89053419"/><file name="paysafecard_tiny.png" hash="92b3df13741ef6f71d2c12206ab3f412"/><file name="payu.png" hash="bc671fff056fd108fe24ba52053111b0"/><file name="payu_small.png" hash="ca3eb82cb24dd1f1bfc34436287dc9d0"/><file name="payu_small_grey.png" hash="6097711eeb2ea309d407c03a467e1653"/><file name="payu_tiny.png" hash="2b89f57174338ba3d3192eb8519ece3f"/><file name="plastix.png" hash="82d3202239d01c6bf49d8dc2399900e2"/><file name="plastix_small.png" hash="447240736bdba2d15a34986395c3fb1f"/><file name="plastix_small_grey.png" hash="7e039f412a96a0e884f86598ebfccfb1"/><file name="plastix_tiny.png" hash="aaff5ff8c33af35fe4ae64e627c0964c"/><file name="platezhru.png" hash="2f36e088146ab75470c7a55177db8c07"/><file name="platika.png" hash="03e93ab41b0d330706e2c4f85cae966a"/><file name="postoffice_ru.png" hash="8ade3cd1711071ab73248d4ba62eae64"/><file name="pps.png" hash="29f4efc8d08cfd5ba90920b1fcef6bde"/><file name="pps_small.png" hash="7bf1fa7c4adcd8dfc2b2f56eb172fcaa"/><file name="pps_small_grey.png" hash="08d6188b7f5c13ec9c5f3488b4cbf19e"/><file name="pps_tiny.png" hash="4ed68db4ca98ac69f0557319a8284c8d"/><file name="pse.png" hash="6af65a4a18af66d103473fece5536e1c"/><file name="pse_small.png" hash="1f6695131dca61647b07f7180e695c46"/><file name="pse_small_grey.png" hash="7adf2fdfc48d8b078f7c0aeaa4f50e1c"/><file name="pse_tiny.png" hash="128b2749a126cfade0300f27c6919308"/><file name="qiwi.png" hash="b5e092af3394bc333fe83d073e8a6dfd"/><file name="qiwiwallet.png" hash="623b4c7fec53864fdee6d567da5f61cc"/><file name="refresh.png" hash="69ddc65b628d15a4375e66792c07484f"/><file name="safetypay.png" hash="af4e58d22f816f148faae179d0867b3f"/><file name="safetypay_small.png" hash="26749f1a95011897c8aaf568425df3dc"/><file name="safetypay_small_grey.png" hash="e5f3e5287e3fee2d77c065063b43e17d"/><file name="safetypay_tiny.png" hash="f3700f2d3cda7834cd178ac0f70d6352"/><file name="sendEmail.png" hash="cdddfa5e77d565a0ed23b6c26e0dee09"/><file name="sendEmail_small.png" hash="b5d63cc1613f08a08194442647ee451d"/><file name="sepadirectdebit.png" hash="e565455436d808fa07499131296490de"/><file name="sms.png" hash="7c6c0fddee039be4d879808b374f06f5"/><file name="sms_small.png" hash="fd1d52278d2446c7fe1c34d4fc70d556"/><file name="sms_tiny.png" hash="ed22de378fdbc717f987f8d4199e0452"/><file name="solo.png" hash="13f13c36cff7835d4a46df140fe432a3"/><file name="solo_small.png" hash="96de4f5f750a415fef573ce28092bf68"/><file name="solo_small_grey.png" hash="75c9b0b2daae0d6d80a5f5ff4f14e8d6"/><file name="solo_tiny.png" hash="3e2d7a21d19b12ed84aabdb26304fae6"/><file name="switch.png" hash="8cf19bb8c744a3f852511e781c176c07"/><file name="template.xcf" hash="e5035cd9e4e96859e50c1a9773098e89"/><file name="tenpay.png" hash="ddd0b5b8e3ff63cf1bfc555fbede0242"/><file name="tenpay_small.png" hash="2aa6c5919108eec42ed5c47ad4155a8f"/><file name="tenpay_small_grey.png" hash="6a21283b21295eefb4db553f877ea4c1"/><file name="tenpay_tiny.png" hash="736275eeec39e56c3c1d29fcb9d8ebb7"/><file name="terminal_RU.png" hash="711ab27d1cbbf6771e0ee133f75c7c46"/><file name="terminal_RU_small.png" hash="9bafe5dd035f73757f553250382764c6"/><file name="terminal_RU_tiny.png" hash="1b4dce2e901d90185933420cd80648cb"/><file name="tnt_rembours.png" hash="a8abb6f51d7893da39fcc2477d7bd2bb"/><file name="tnt_rembours_small.png" hash="72ee2b0ae6742cd325bda44a14093f4c"/><file name="trustly.png" hash="2a82872cc0ada644b0442e05423a2db8"/><file name="trustpay.png" hash="88a3680bf1007661ab4fc63106aa1ff4"/><file name="uhisbank.png" hash="8c0967455a15aefe3cdfb47240a18850"/><file name="ukash.png" hash="b95eb9f2658923c38a6252f5ff9ca9c7"/><file name="ukash_small.png" hash="2210a65cd1fb85bc883d112b12c79e6e"/><file name="ukash_small_grey.png" hash="65e6cc21082ebd3c93e96bbf96499df4"/><file name="ukash_tiny.png" hash="543ab39e6dcbc094188b4f473ac4b998"/><file name="unionpay.png" hash="068dee300e2c12e58e9a47d3556e977c"/><file name="unionpay_small.png" hash="55a00c9d7bbcbe1c448b449974d85af1"/><file name="unionpay_small_grey.png" hash="5c69e46ee4663f2d0e47c7f503bbd1e4"/><file name="unionpay_tiny.png" hash="45d3b4e758237412b524a5c52418da67"/><file name="unknown.png" hash="b2d137147db4d6eb7dacb5414a4f7a30"/><file name="unknown_small.png" hash="a5234e9eb2e4485acb19b196876d762b"/><file name="vias.png" hash="aca848fa54b173225fe17637699d87c4"/><file name="vias_small.png" hash="37bee85c36b52a07a4529735a194a41e"/><file name="vias_small_grey.png" hash="4da77d558ae9488ee2a85191e9db8748"/><file name="vias_tiny.png" hash="1a45f0a2696b5539195c2fcb69be49b6"/><file name="visa-electron.png" hash="308132b89febd4979bac61594919057f"/><file name="visa-electron_small.png" hash="5ab129027f4f4acbc7a9aa2b5d0e84d3"/><file name="visa-electron_small_grey.png" hash="712b876d4f060613f54f2ec04516e512"/><file name="visa.png" hash="30f9fde31aa41197e71ccd9a63a1fe75"/><file name="visa_fr.png" hash="abd117879295333ac54497e15f81ea18"/><file name="visa_fr_small.png" hash="837db98a87141717dcd1b90bcb5ff5b1"/><file name="visa_fr_small_grey.png" hash="e8cef14608278ab71ef2ffd58e65dc9e"/><file name="visa_small.png" hash="cdab39efaf22fcd2ab88f3dc42c32de1"/><file name="visa_small_grey.png" hash="9411565a7e81c5c3cc484863dc53031a"/><file name="visa_tiny.png" hash="e374bec64dcc345848b43f0a8a3490c2"/><file name="wallet_RU.png" hash="29213300b3cf644c64d915418f259d87"/><file name="wallet_RU_small.png" hash="3308a16ce0f5b474af32505f587079b5"/><file name="wallet_RU_tiny.png" hash="c46cdb588d7a9a21a909e5af842414b5"/><file name="wallie.png" hash="fc97552b8249c3e96aa6f3cf8e3577bd"/><file name="wallie_small.png" hash="c0b60fe348b16e157eb0c64043f410c2"/><file name="wallie_tiny.png" hash="df61209a0e0517bbb3d65119d5ebfcbd"/><file name="webmoney.png" hash="3cca800e0962e0078b64361de11b935f"/><file name="webshopgiftcard.png" hash="09990fe325b20c2fcdaaa855457d5348"/><file name="wiwallet.png" hash="5db11152a23a72b2f4676841261c5db0"/><file name="wiwallet_small.png" hash="a4c5567f59ca4575a316e1bf3eb066c1"/><file name="wiwallet_small_grey.png" hash="b75b2af0b5c6129e8c1d7bc9087222b4"/><file name="wiwallet_tiny.png" hash="8b53e98458e15bc19b242d05ad678f2d"/><file name="yandexmoney.png" hash="e6a38c66b08ba78a68096f8ff1b2a41d"/><file name="yourgift.png" hash="87bd1ef190d75ec64fb66b77aaeb7b8c"/><file name="yourgift_small.png" hash="17300795f7fd31d5cb730685c2eb0098"/><file name="yourgift_small_grey.png" hash="69b235ccb6b7ef0dfb3a2645be60dbc6"/><file name="yourgift_tiny.png" hash="a3bc0b90775458ff9ef8499f7a5437ca"/></dir></dir><dir name="css"><file name="adyenstyle.css" hash="77d39df20e43da4dc5ff1e749ed60afa"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="adyen"><dir name="payment"><file name="adyen.encrypt.js" hash="c2b680f6077b829b0129e2bfd53cf22f"/><file name="elv.js" hash="db612a634c95727ec9db82c50e9aec8e"/></dir></dir></dir></target></contents>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
20 |
Â
<compatible/>
|
21 |
Â
<dependencies><required><php><min>5.3.3</min><max>6.0.0</max></php></required></dependencies>
|
22 |
Â
</package>
|
1 |
Â
<?xml version="1.0"?>
|
2 |
Â
<package>
|
3 |
Â
<name>Adyen_Payment</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
Â
<stability>stable</stability>
|
6 |
Â
<license uri="http://opensource.org/licenses/OSL-3.0">Open Software License (OSL-3.0)</license>
|
7 |
Â
<channel>community</channel>
|
10 |
Â
<description>Magento Plugin for Payment Service Provider Adyen. The integration guide for this Plugin is available on the Adyen Support website: support.adyen.com, type in 'Magento'
|
11 |
Â

|
12 |
Â
support@adyen.com</description>
|
13 |
+
<notes>Features & Fixes
|
14 |
+
* Show OneClick payments in Magento checkout
|
15 |
+
* New API payment method SEPA
|
16 |
+
* Add discount for the payment method open invoice (karna/Afterpay)
|
17 |
+
* Optimized UI in the payment step (for the default OnePage checkout and the OneStepCheckout module)
|
18 |
+
* Build in scan functionality for using Magento as cash register solution
|
19 |
+
* express checkout button for payments through the Adyen Shuttle
|
20 |
+
* Creditcard installments can now be setup foreach creditcard type
|
21 |
+
* Installment rate (in %) is now added to the installment setup
|
22 |
+
* For Klarna it is now possible to show date of birth and gender only when you select payment method open invoice
|
23 |
+
* Multicurrency problem with Api Payments solved
|
24 |
+
* Show reservationNumber for Klarna and AfterPay in the payment information of the order
|
25 |
+
* Directory lookup call to retrieve the payment methods shown in the payment step can now be cached for better performance
|
26 |
+
* Payment methods can now be sorted in the front-end
|
27 |
+
* Boleto firstname and lastname automatically filled in based on billing information
|
28 |
+
* For Boleto payments the paid amount is now shown in the payment information of the order detail page
|
29 |
+
* Possible to select different status for Boleto if the payment is overpaid or underpaid
|
30 |
+
* Full refund will send in Cancel\Refund request to Adyen if payment is not yet captured the order will be cancelled
|
31 |
+
* For payment method Klarna and after pay the fields are disabled on the Adyen HPP
|
32 |
+
* Payment methods in the checkout give back the language specific payment method text
|
33 |
+
* Add after pay logo in magento checkout
|
34 |
+
* Plugin version number and links for setting up now visible in the Adyen General settings sections
|
35 |
+
</notes>
|
36 |
+
<authors><author><name>Adyen</name><user>adyen</user><email>magento@adyen.com</email></author></authors>
|
37 |
+
<date>2014-09-24</date>
|
38 |
+
<time>06:51:05</time>
|
39 |
+
<contents><target name="magecommunity"><dir name="Adyen"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Installments.php" hash="e73b36349ac2ac5f9687cd5ce5958e53"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="1460f2048e15c0d08405c00e68653a47"/></dir><dir name="Filter"><file name="Adyen.php" hash="e928bb38a944adc399d6a43321084667"/></dir><dir name="Invoice"><file name="Totals.php" hash="40f4258c2e79e25bd38abb8ed7a0a778"/></dir><dir name="Renderer"><file name="Adyen.php" hash="44bc7f403e35ce4711101f8b93192190"/></dir><file name="Totals.php" hash="3d6dfca8bcd137c85828a4d9a39507c5"/></dir></dir><file name="Version.php" hash="9e527d0424b878cba5160462c69c1cba"/></dir><dir name="Checkout"><file name="Success.php" hash="8edb224af51fb76d111807168268f67c"/></dir><file name="Failure.php" hash="ead96fee55fba2cbb5044f09566e85e4"/><dir name="Form"><file name="Boleto.php" hash="a787217b71dfeab643073cfed4ec20a9"/><file name="Cc.php" hash="9e9f2b2fb861e39133635ce7adc40bb1"/><file name="Elv.php" hash="c3de45c9161b1564209b79a80140fec3"/><file name="Hpp.php" hash="afe655b84cfbdddde988725c4cee2740"/><file name="Oneclick.php" hash="ee048e190bf8c0723cba4fce18ca2b5f"/><file name="Openinvoice.php" hash="03f441912f177fb5af9f9aaef27e92d5"/><file name="Pos.php" hash="7a93f39cd4c30d5be1b56218a4e04a7f"/><file name="Sepa.php" hash="91b145e97db61846febaae1c5ac0b9d6"/></dir><file name="Form.php" hash="77d0589a32cb816dcdc6df16c98f2cd6"/><dir name="Info"><file name="Boleto.php" hash="720913657cb3aad5706aaff9e73ff65c"/><file name="Cc.php" hash="fda6af2c2c9a6988095b5f4eee3b6711"/><file name="Elv.php" hash="d35cfabffa923a7c0345a1dacde38a52"/><file name="Hpp.php" hash="bce3945267dac13f4fd9c9fd1400d11c"/><file name="Oneclick.php" hash="b0fb295f9a0572f92f0a1dc7108b9e8a"/><file name="Openinvoice.php" hash="1e99e4ab3ef75a9fa27626bd946b0407"/><file name="Pos.php" hash="8a6be4f35d43dc7791b9741cfb05b8a5"/><file name="Sepa.php" hash="9b1b5acbeb78dc774a6c13ff8db1bcb1"/></dir><file name="PosExpressCheckout.php" hash="52ead923b25324e31507c173caf95045"/><file name="Redirect.php" hash="065d1f3ba3ee85ac1826cc87df64bbb1"/><dir name="Sales"><dir name="Order"><file name="Totals.php" hash="1110ea3b2faedc600767aac41a9c634b"/></dir></dir><file name="ScanProduct.php" hash="541b0d9473ef2256dafe31a47bf0ac88"/></dir><dir name="Helper"><file name="Data.php" hash="de6afc16fd7b3c05c7a8fbc2be0b2dd1"/><file name="Installments.php" hash="6e37f0cbc7acb860fec12ca68d734a2b"/></dir><dir name="Model"><dir name="Adyen"><file name="Abstract.php" hash="9bda31a6e44bc86a53d43ae44d13bf0d"/><file name="Boleto.php" hash="e92f38062af2dcc766161ce2e92d9fac"/><file name="Cc.php" hash="044558f75f84bcdd34ae682aee80ec19"/><dir name="Data"><file name="Abstract.php" hash="cdda2d90654bff01f372a817d6e94e1a"/><file name="AdditionalData.php" hash="e4d038a60ac548e0938f75a0452d5717"/><file name="AdditionalDataKVPair.php" hash="cc2e0ba6733ef5139f44ba7c9af303dc"/><file name="Amount.php" hash="73540706cac2c2eef0252615d6200511"/><file name="BankAccount.php" hash="89124b1a311269d878e88acd56391afc"/><file name="BrowserInfo.php" hash="bd1cca3cc27aea7fad85661c7132e2cd"/><file name="Card.php" hash="ea384e9c2032ba7ad5925edfb434625f"/><file name="Classmap.php" hash="38ab9bfbfb1585852380c0551a35b9ec"/><file name="Elv.php" hash="6608688d03b047387a2b28be10c47b87"/><file name="IdealPaymentRequest.php" hash="4c3e7b5e1d98765524d022e8950c0ce6"/><file name="Installments.php" hash="ab285677d94614d631b927b427268eff"/><file name="InvoiceLine.php" hash="2013af2bbae2b07df4db34b4d8565796"/><file name="InvoiceRow.php" hash="6c6e4bfe2c2ec51d14ac99d747879bec"/><file name="ModificationRequest.php" hash="0cfe14752a16a579c3a29a6d4e66ba6e"/><file name="ModificationResult.php" hash="eec37eba3849baa4ad52b194e31ac362"/><file name="NotificationClassmap.php" hash="31166e4ef9ea728c107f5ee501d67fc5"/><file name="NotificationRequest.php" hash="4647bfc558308e8f7795ae97fbf2c066"/><file name="NotificationRequestItem.php" hash="ef0794de69076f4accc5035b3f659808"/><file name="OpenInvoiceDetailResult.php" hash="68391a7b4b2a460967ec0018a2300396"/><file name="PaymentRequest.php" hash="c302d22b311a4d8c9fec6b46d683b52d"/><file name="PaymentRequest3d.php" hash="505731df1bb63d6426a11e5d3036552f"/><file name="Recurring.php" hash="ae069455222f0315c2eaee6cdf84f461"/><file name="RecurringRequest.php" hash="aed77050f296df4f48c88038ef3ac547"/><dir name="Server"><file name="Notification.php" hash="51ed88aa2c2035e4cb7b4e992e7c8e4a"/><file name="Openinvoice.php" hash="d94166e3c8337e213061655ab7e48e68"/></dir><file name="ShopperName.php" hash="91bfea9ade01d29fa9053de87ce01560"/></dir><file name="Debug.php" hash="8044ccae24d83db38d9430cf125ada83"/><file name="Dummy.php" hash="a72ccc6e8c5268cf6786db289de4e3d9"/><file name="Elv.php" hash="f3e6067e8bb235d037c7cd78aaa703b6"/><file name="Hpp.php" hash="d5217d5df4a5c49ba4b4105fc7b8e29c"/><file name="Ideal.php" hash="8359f4eb5c28363680c08ecbc88a28a5"/><file name="Oneclick.php" hash="7196d95d7f71fc33be4df29b1ad7596e"/><file name="Openinvoice.php" hash="61d7122f706c318883c3e78ff07ce3f2"/><file name="Pos.php" hash="1769416ab285000a3fcd169466ff257d"/><file name="Sepa.php" hash="81aef386a6fa7e868cc9f22c7db008ff"/><file name="Shared.php" hash="7f3fe961a7107b6fb5625a9efe7854fd"/><file name=".DS_Store" hash="d179556f904a5601ccd01a54743c155f"/></dir><file name="Authenticate.php" hash="9de42d073756d2f1dfaa09a3af83cea9"/><file name="Event.php" hash="73452fac034ce72918bd5560a06ca347"/><dir name="Mysql4"><dir name="Adyen"><dir name="Debug"><file name="Collection.php" hash="dee84aa1c2b370a72d79031a09b9bba4"/></dir><file name="Debug.php" hash="123808b460f70ad416ed9bb92e6a1d60"/><file name="Event.php" hash="affce8ec81a3471647cc6e0612eb0568"/></dir><file name="Order.php" hash="05c5ce3b68f877b23d1396d13db18517"/><file name="Setup.php" hash="45997ed47c197cb302d6fbb684489201"/></dir><file name="Observer.php" hash="8a18198083aaecb636a3f2a0a989f18c"/><file name="Process.php" hash="1155b418cc2b4ecc4e9b874b1f40f62d"/><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="PaymentFee.php" hash="f14a964cb2cba6b7f6fcf6162b8a91fd"/><file name="PaymentInstallmentFee.php" hash="5cb9a44b7f1006e8e471d1dbc7b8ba08"/></dir></dir></dir></dir><dir name="Source"><file name="BoletoType.php" hash="1a31476c4ebfdb6b16a1dd3a26015fb1"/><file name="CancelModes.php" hash="b18c30b103cdce97af41e63ef0a25a92"/><file name="CaptureModes.php" hash="d2d138f0a59e1e448531f1fd8f908439"/><file name="CcType.php" hash="97d4e2549bec42b8282636f1e98e853a"/><file name="DemoModes.php" hash="0ce4142166b9f7dc96ee8e1e3bd03286"/><file name="OpeninvoiceType.php" hash="c39389388338dfe0b85b10a1e9b828cb"/><file name="PaymentAction.php" hash="23224178cf58e55c308234036f629bf7"/><file name="PaymentRoutines.php" hash="7aa5525e67554ad35226cf1aaa802c49"/><file name="RecurringType.php" hash="2a3c60c4546d9c02c842a9ea0a5ade26"/><dir name="Status"><file name="Refund.php" hash="bb700fa537f3a7c27c43691846777ef4"/></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Installments.php" hash="6c3b60719edb83eaaad1515514dab620"/></dir></dir></dir><dir name="Total"><dir name="PaymentFee"><file name="Creditmemo.php" hash="738f7b84586d51cd875011d6b31dfd3e"/><file name="Invoice.php" hash="8aa607b99f709a5eee9b76675e2d5ada"/></dir><dir name="PaymentInstallmentFee"><file name="Creditmemo.php" hash="b40551c179c19ccea7be11a5edf6be4c"/><file name="Invoice.php" hash="5f4563813511aff2eafb98cf4943d817"/></dir></dir><file name=".DS_Store" hash="286b9ee8ade7883fb60d91c7d0c64900"/></dir><dir name="controllers"><file name="CheckoutPosController.php" hash="c7efe60bb75c06fb279fc051597a37b8"/><file name="GetInstallmentsController.php" hash="175bdd2692050f0118bcb90d354b60f1"/><file name="ProcessController.php" hash="f13bf04ac2e5ddb6ede00eeced522860"/><file name="UpdateCartController.php" hash="c7280eb6b5b5f87e2dd9f06cc4370e97"/></dir><dir name="docs"><dir name="httpauthentication"><file name="cgihtaccess.patch" hash="b1ca6c18002d1c22f53c8dd55aee1845"/><file name="howto" hash="31677f6b34fca607f8751c9eb5bdcac2"/></dir><file name="readme" hash="aae2884b18ed35ab74c7e73f4baec6e3"/><file name="test-cards" hash="d7a4a41bc2bb17f74dcbcfbc41156675"/><dir name="translation"><file name="Adyen_Payment.csv" hash="0094e6a70aca120e94cc395f139f1687"/><file name="Mage_Checkout.csv" hash="7d3bcce1ce01d189d113d02b949b73ca"/><file name="howto" hash="00a8a321b06b7235c6e6ca39cfcef80f"/></dir><file name=".DS_Store" hash="cbdf8e79d5e282650b9b7136c3b9ad33"/></dir><dir name="etc"><file name="Notification.wsdl" hash="cbba67067d372790e91225b4049c7e0d"/><file name="Payment.wsdl" hash="a4bcff4f854a5efda30b7678eee2040f"/><file name="config.xml" hash="04c91aeb65ce9b4a70711bf137fec297"/><file name="system.xml" hash="5027279dc270cbf022c85ea74a89f3c8"/></dir><dir name="sql"><dir name="adyen_setup"><file name="mysql4-install-0.0.1.php" hash="3c304ff04d461bc0bfa6205c03dceea0"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="3d687c555ed52be5eeb4eaba126abb2b"/><file name="mysql4-upgrade-0.0.7-0.0.8.php" hash="27b202258c2bd16ee64902df7985862e"/><file name="mysql4-upgrade-0.0.8-0.0.9.php" hash="85d3de753b99b541a4547c39b7713905"/><file name="mysql4-upgrade-0.1.0.3-0.1.0.4.php" hash="8b43e357cf7a365b1e099b130db51b20"/><file name="mysql4-upgrade-0.1.0.8-0.1.0.9.php" hash="0ba22acbe3f48fc1ae1e76212a11dc2a"/><file name="mysql4-upgrade-0.1.0.9-0.1.0.10.php" hash="2b029ba94cea8dd9b6d82a0de265234f"/><file name="mysql4-upgrade-1.0.0.3-1.0.0.7.php" hash="c087b4bbc48cf47e954b6cfbd1f2c5bb"/><file name="mysql4-upgrade-2.0.3-2.1.0.php" hash="09d7c123a6270e4ee029f187d92c1c31"/></dir></dir><file name=".DS_Store" hash="327f3b98fa44a731152378b2757ed144"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="adyen.xml" hash="a963acf4938f60fde0672bb6177399f1"/></dir><dir name="template"><dir name="adyen"><dir name="form"><file name="boleto.phtml" hash="83c7bc35d037f426aa75c0719e8adb86"/><file name="cc.phtml" hash="054ab1e3fa2b3901973a76e4f7547c10"/><file name="elv.phtml" hash="4d370d2d737f0a42ebcb33e7151ecee6"/><file name="hpp.phtml" hash="dcb1987da78dc78d45437de3bc0a10f9"/><file name="openinvoice.phtml" hash="33127af4713430e153cccbe8684fab13"/><file name="pos.phtml" hash="c07c11d348fced7d889ded4fc77e3363"/><file name="sepa.phtml" hash="aad80786900ccbe1b211ddbc0c00febd"/></dir><dir name="info"><file name="boleto.phtml" hash="d7fbc6f480f75d07a52a79ea7cf8457a"/><file name="cc.phtml" hash="be7d0e812e4c8eed5de08f2c37cf3875"/><file name="elv.phtml" hash="7a6b627e0c6acd04497d52f5047e930a"/><file name="hpp.phtml" hash="c6cccc2520a32a42f509b2ca9bf5a4c1"/><file name="openinvoice.phtml" hash="46550d1d3dbe0a92c89dd6272f5d9104"/><file name="pos.phtml" hash="a5b175023f0670409122876074d6f050"/><file name="sepa.phtml" hash="49f960b088e563135860774517fbcdfe"/></dir><dir name="order"><dir name="view"><file name="history.phtml" hash="9a6d80c534d935c63eb900d7d892e9ff"/></dir></dir><dir name="pdf"><file name="boleto.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="cc.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="elv.phtml" hash="50853749a944124f076d129fd5e6cfa9"/><file name="hpp.phtml" hash="4cdb4f7c88b6556fc847c21d5d4b7ffb"/><file name="openinvoice.phtml" hash="742b87babbb612032d68a8e79d31e89c"/><file name="pos.phtml" hash="a3dc27a6607b4978c93b21d945661e5c"/></dir><file name="pdf.tar.bz2" hash="d4b4edd908e7784efc8ac45fe1ce73cb"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="adyen"><file name="blank.phtml" hash="03d788d9ec2aa70de7eb66015b2c4da1"/><dir name="checkout"><file name="success.phtml" hash="56c5bdd54f9cbed22be7afe0deedead4"/></dir><dir name="form"><file name="boleto.phtml" hash="21b6c7d06dfef2bb9f8de8205bc2c6a9"/><file name="cc.phtml" hash="e504c4b3b0f78ece12d20b3631264a45"/><file name="elv.phtml" hash="789610e3d1f8973f6aecb4ef119a59c9"/><file name="hpp.phtml" hash="8d2c341ec0970e9bc81e481d437826cc"/><file name="oneclick.phtml" hash="08c71d3c3bf62fa736ac3dbf65d1c907"/><file name="openinvoice.phtml" hash="4dbda9d80bd82328ec8b33c775f44599"/><file name="pos.phtml" hash="674097ccf62f13c969d39c2f6a6824b8"/><file name="sepa.phtml" hash="a536c0245cc8a5e0762a5e9fb567d325"/></dir><dir name="info"><file name="boleto.phtml" hash="c526f9c4badab3afaa771872bb4687f1"/><file name="cc.phtml" hash="cda685b7c94fc401158bf5901e66c8b6"/><file name="elv.phtml" hash="8b850e97ea84e1de5ead4ec487c4356f"/><file name="hpp.phtml" hash="4d91b5d0729eafc220268d204b514cae"/><file name="openinvoice.phtml" hash="2bcd711e1255923d53f353819e19529e"/><file name="pos.phtml" hash="9b917920aa1cc77c9e8c3a26943b1335"/><file name="sepa.phtml" hash="c886a3d9923c3ade6ca5056f18c1b856"/></dir><file name="posExpressCheckout.phtml" hash="0db835c5f5998f660d03ce4ba88bdb05"/><file name="scanProduct.phtml" hash="792b3dbc6f10b4b9f8aff824d09f4f7a"/></dir></dir><dir name="layout"><file name="adyen.xml" hash="09dd483ce555ef83bd87d86b8f8f3165"/></dir></dir></dir><dir name="default"><dir name="adyen"><dir name="template"><dir name="checkout"><dir name="onepage"><dir name="payment"><file name="methods.phtml" hash="bda669695d2150eaccdcaeeb6b419949"/></dir></dir></dir><dir name="onestepcheckout"><file name="checkout.phtml" hash="520e231832277d5d09bb3be8134c56f8"/><file name="payment_method.phtml" hash="f2852a921420340ef82a5d2f4f799fee"/></dir></dir></dir></dir><dir name="rwd"><dir name="adyen"><dir name="template"><dir name="checkout"><dir name="onepage"><dir name="payment"><file name="methods.phtml" hash="bda669695d2150eaccdcaeeb6b419949"/></dir></dir></dir><dir name="onestepcheckout"><file name="checkout.phtml" hash="c315e54e6ba093bcc737df1bb1f8f0b9"/><file name="payment_method.phtml" hash="f2852a921420340ef82a5d2f4f799fee"/></dir></dir></dir></dir><dir name="enterprise"><dir name="adyen"><dir name="template"><dir name="checkout"><dir name="onepage"><dir name="payment"><file name="methods.phtml" hash="413a7bc55d51d278e743a33f35df8f88"/></dir></dir></dir><dir name="onestepcheckout"><file name="checkout.phtml" hash="c315e54e6ba093bcc737df1bb1f8f0b9"/><file name="payment_method.phtml" hash="f2852a921420340ef82a5d2f4f799fee"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adyen_Payment.xml" hash="e4d297a9b401c4548acb47aea1ae41d9"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="adyen"><file name="ABNAMRO.png" hash="a621e7f4cf1c3340ac5147fef5544bfe"/><file name="ABNAMRO.xcf" hash="eac24c953dcf05d40ce928ccab2af90f"/><file name="ASNBANK.png" hash="13034bc0836590cfb0ec7b6c3076e435"/><file name="FORTIS.png" hash="3b68fa26a90f8cd44e2f8dfcb5f72fe8"/><file name="FRIESLANDBANK.png" hash="c1388a9b8a170260b0b72da9b2cd2dbf"/><file name="ING.png" hash="b08f829cf67322875ca12d5fc36ac191"/><file name="KNAB.png" hash="4df678f84bdf11db9b75d1e539a0367c"/><file name="POSTBANK.png" hash="ea0ffd9d3e9717fe0bdc160d8cd92482"/><file name="RABOBANK.png" hash="f09418ebbd0d6daf21786d5bde93e856"/><file name="REGIOBANK.png" hash="0c3a984ce817e4d3ec98549be7704712"/><file name="SNSBANK.png" hash="75f988e3ab935d6d509a86f82422f474"/><file name="SNSREGIOBANK.png" hash="34a70ac0e1e0a8cfb56c77a5b1da3c80"/><file name="TESTISSUER.png" hash="0110aadd0f619b39f357b98b63e3ff69"/><file name="TESTISSUER10.png" hash="b2462fe98e69d211e92771ae75f48552"/><file name="TESTISSUER2.png" hash="471cc38e61077fdaba8fd868fea22dfe"/><file name="TESTISSUER3.png" hash="4ca46be0b7607dc95caccb5ec974e0a8"/><file name="TESTISSUER4.png" hash="6e31a3d3e73390432a84e394a1937c5d"/><file name="TESTISSUER5.png" hash="78b758fef66f220e79b1b9ecda8851d2"/><file name="TESTISSUER6.png" hash="4aefac8baaa06592c8a80f085c0ade08"/><file name="TESTISSUER7.png" hash="0474b1a3264ef45068013747a27158d2"/><file name="TESTISSUER8.png" hash="5e655c4af04b417acecac6fd66623662"/><file name="TESTISSUER9.png" hash="6e378c3b7c75febd0be361ec39c55e45"/><file name="TESTISSUERCANCELLED.png" hash="c794eeb78ef618c3e9dcd8b444b7b23f"/><file name="TESTISSUERPENDING.png" hash="04ee87a5c35a491e624719a3c885d492"/><file name="TESTISSUERREFUSED.png" hash="2f7e2bad6857f39f32afd09eb846e55a"/><file name="TRIODOSBANK.png" hash="922b1fcd51306e0d0da6b15ebe640d8c"/><file name="VANLANSCHOTBANKIERS.png" hash="0a5d713a5c73c54e90507743456c5657"/><file name="achcolombia.png" hash="1f1339c682440cfd7584f9ba00f59722"/><file name="achcolombia_small.png" hash="d6b2899a0039de82788c831b00dd1533"/><file name="achcolombia_small_grey.png" hash="bcae575368bdcdb582423e28ac7a56e9"/><file name="achcolombia_tiny.png" hash="a287c57b8bcc821371758da895db6437"/><file name="advance_payment.png" hash="5aba603621b4b21cc05b7eae1f7455da"/><file name="adyen_logo_large.png" hash="70726ef290d0eee3ed163eb751091813"/><file name="afterpay_default.png" hash="a62e3982d50612522be071d4e86eaa6a"/><file name="alipay.png" hash="e3773ada96577e575c9e1300a89a5875"/><file name="alipay_small.png" hash="f9848d15fc7ee22b6687ccdbe7f36a16"/><file name="alipay_small_grey.png" hash="e5ffe7ff272ce2814b7808fd047a9c6b"/><file name="alipay_tiny.png" hash="1a7867dd958ddcdd90ad2400e5be23de"/><file name="amex.png" hash="8e3b962f9ef18e08cf16b77934607d28"/><file name="amex_small.png" hash="6ce7c9a2b330c9c46f0213c40db55683"/><file name="amex_small_grey.png" hash="0f6aabd8dfcbf48dbb555b9191d7795e"/><file name="amex_tiny.png" hash="b7016f4efb163c985d6f1d99a8433d2a"/><file name="asiapay.png" hash="44626dc317e547fb40010498c1096407"/><file name="asiapay_small.png" hash="cca4d86b5abc510f20ca9563d7215c3d"/><file name="asiapay_small_grey.png" hash="00e20b2b2eb0d2ad51c15d8ccc558dc5"/><file name="asiapay_tiny.png" hash="ba0d613d94a64918c0338504fed20ee7"/><file name="autopay.png" hash="4251763c71239e7b1b421e4bc7f5b70a"/><file name="autopay_small.png" hash="ca6941b80b6157bae2411b5620149d2d"/><file name="autopay_small_grey.png" hash="f69d143b4f1fc16a9138ccfacec808a4"/><file name="autopay_tiny.png" hash="4c0c91402daafc63bdb5979dbbd963db"/><file name="babygiftcard.png" hash="91bcbb6604b26565b89898c9a8e1e117"/><file name="babygiftcard_small.png" hash="2558bbdd4d9528b37ba93a8c4af536a4"/><file name="babygiftcard_tiny.png" hash="393a192fab9874e3b167c3bc5d568db7"/><file name="baloto.png" hash="1c172c628f79837c83196b243c636ff5"/><file name="baloto_small.png" hash="c66db84ac7fed6f81010e8058fa39a74"/><file name="baloto_small_grey.png" hash="bdc5eac76e02a658b348a0722fca9ba9"/><file name="baloto_tiny.png" hash="5e10ee14c8a44c3b4c28571664fa045f"/><file name="bancnet.png" hash="a2b687ef27244e448b85635cc1d3ec60"/><file name="bancnet_small.png" hash="4473bc16badc29200ffd09021778b1e3"/><file name="bancnet_small_grey.png" hash="6b108ea906b6d6a5ad51e4de6db732eb"/><file name="bancnet_tiny.png" hash="0ac28b35fd4e09954debcd2eb42e89ce"/><file name="bank24.png" hash="9a921572d6bae73604e1122ec3e5bf7e"/><file name="bankTransfer_AE.png" hash="a6f29729723fa65c732ffc9267b3f8be"/><file name="bankTransfer_AE_small.png" hash="a3322805ab1c40c4e6237943185284ab"/><file name="bankTransfer_AE_tiny.png" hash="dfcf50c97c3b832fd3c17efb2864335c"/><file name="bankTransfer_AT.png" hash="7fa4204d1426a64a4cd26af06af44d41"/><file name="bankTransfer_AT_small.png" hash="31037dcf034d1e9d28254d1962b2ca16"/><file name="bankTransfer_AT_tiny.png" hash="4ee9964118e05d2a81335f3033ec5bf1"/><file name="bankTransfer_AU.png" hash="05716c67579fcf3574037ce69c9e4229"/><file name="bankTransfer_AU_small.png" hash="acd23b8e3ccf3c9d28960fde63c22e85"/><file name="bankTransfer_AU_tiny.png" hash="4a3ee62afdac23a00a0675c763e93470"/><file name="bankTransfer_BE.png" hash="5547426f07e0562ba9b605f1f04a9ad7"/><file name="bankTransfer_BE_small.png" hash="007dbd9f27115b601eb94db09a10b8f3"/><file name="bankTransfer_BE_tiny.png" hash="cf0285a691339efad52d82d40c7aa9f1"/><file name="bankTransfer_BG.png" hash="be209415f5bec0a45bd2bd9cd3c41d0a"/><file name="bankTransfer_BG_small.png" hash="6249144aa579c494988b5bbecb22eb69"/><file name="bankTransfer_BG_tiny.png" hash="7c11956844dbf7cc76db038b32fc7ab1"/><file name="bankTransfer_CH.png" hash="9b20d62386085ac2c9da1227abec5d58"/><file name="bankTransfer_CH_small.png" hash="2887bcf97901ed7ed6bc4fb5d8a00876"/><file name="bankTransfer_CH_tiny.png" hash="c0218d075bbb503689f40007a331ba85"/><file name="bankTransfer_CZ.png" hash="78f7aac275e10af77b3bbab28ba1aa23"/><file name="bankTransfer_CZ_small.png" hash="7bf17799b64aa618945981eb7fa00cce"/><file name="bankTransfer_CZ_tiny.png" hash="7f2a7e2fde701bff21fa388776e73632"/><file name="bankTransfer_DE.png" hash="989d5e1cc2547504b0fbc7aa88e08713"/><file name="bankTransfer_DE_small.png" hash="fb50048c4acfdebf85c4c8f90d8b08d9"/><file name="bankTransfer_DE_small.xcf" hash="cfbc9a47bc116e97a121771c0aa6fe83"/><file name="bankTransfer_DE_tiny.png" hash="d4d68f1068df68f61cb828005c9c0ac9"/><file name="bankTransfer_DK.png" hash="a2e9a409144a8ef18747faafa2937609"/><file name="bankTransfer_DK_small.png" hash="71e75c357b475fe236b633ac8a2a76cd"/><file name="bankTransfer_DK_tiny.png" hash="0103bbe5b8a803aad990bd4ad53c88c0"/><file name="bankTransfer_EE.png" hash="9caa3e1ac3558e9ec372c45df045bae6"/><file name="bankTransfer_EE_small.png" hash="91ffe550444bac13ac29ac1696ffdfac"/><file name="bankTransfer_EE_tiny.png" hash="59ea293d7ba58cd6dd9a9a2b43088093"/><file name="bankTransfer_ES.png" hash="7d0051c7ee32eddca94b89368bb5afbe"/><file name="bankTransfer_ES_small.png" hash="2dc1519510ef7bea726e0bca70859c06"/><file name="bankTransfer_ES_tiny.png" hash="a2338a0d60b2585ac34269daf794d189"/><file name="bankTransfer_FI.png" hash="ffbe8dfa936a4628e3c029bd957f367d"/><file name="bankTransfer_FI_small.png" hash="1db5d45d947502483a2e8c40aab3734d"/><file name="bankTransfer_FI_tiny.png" hash="b9f26cef0fc7f051b6d79ada14c902ba"/><file name="bankTransfer_FR.png" hash="572f77cf0f22103300682c5f89e9d9e9"/><file name="bankTransfer_FR_small.png" hash="58a268c927e4d19858ed3241ceac05f8"/><file name="bankTransfer_FR_tiny.png" hash="dee4c0c47d94fb0e2ab032264c4d1543"/><file name="bankTransfer_GB.png" hash="5a7eee2f31bec7bf422425f31aea2d5a"/><file name="bankTransfer_GB_small.png" hash="17d3c0ca20cee2250e3b6d0f5f080ba9"/><file name="bankTransfer_GB_tiny.png" hash="24d7d3ce5dc62ef776f3f36f24ff78b1"/><file name="bankTransfer_GI.png" hash="e9035b335bd8dc809c7e4afc7d775cc0"/><file name="bankTransfer_GI_small.png" hash="e51bd2f8333a8d8b2163c777c5b12b48"/><file name="bankTransfer_GI_tiny.png" hash="d158401d4dd73a057adac68f3f23ad89"/><file name="bankTransfer_GR.png" hash="aefe60c85d74d77d1c1327538617f297"/><file name="bankTransfer_GR_small.png" hash="b9a0a5d6ec52c80d72d8e8cf903f37f3"/><file name="bankTransfer_GR_tiny.png" hash="1dc0912afd646785eade5d8785baa12c"/><file name="bankTransfer_IBAN.png" hash="f636fcae0c128e08baaef26dacaa078d"/><file name="bankTransfer_IBAN_small.png" hash="ffc0073f2fe405de05206cdfc1565daa"/><file name="bankTransfer_IBAN_tiny.png" hash="4a4f64cb62ca9cfec99d117d0169bb83"/><file name="bankTransfer_IE.png" hash="eb6efba5502d54571022feaef9a9ded3"/><file name="bankTransfer_IE_small.png" hash="d9359e8a2bf8c04d4d43acdcc8b30a5e"/><file name="bankTransfer_IE_tiny.png" hash="b3a0f75656b535960c362baaabc45ce3"/><file name="bankTransfer_IT.png" hash="cd56062b943e4ec6716bc72ebe4b62a9"/><file name="bankTransfer_IT_small.png" hash="29ac58a26ae12dc26dd2d501262ed361"/><file name="bankTransfer_IT_tiny.png" hash="c45892a3e2ae81bb9b4508d79164e556"/><file name="bankTransfer_JP.png" hash="20023e2e93afc881740ea74e89251d86"/><file name="bankTransfer_LU.png" hash="b3dbdeea3429de5280c3a6d911930e9a"/><file name="bankTransfer_LU_small.png" hash="ebb919c647653075be4d9bfaeec8c00c"/><file name="bankTransfer_LU_tiny.png" hash="ec058289aef35f481077c56cdf758032"/><file name="bankTransfer_MT.png" hash="8955bc706cf66307ba69e58d8006af2d"/><file name="bankTransfer_MT_small.png" hash="13ce68bbda83c39b8719d356705da6d2"/><file name="bankTransfer_MT_tiny.png" hash="b05aa11e844f09fa797a3540534e5155"/><file name="bankTransfer_NL.png" hash="ccffd7131f791f7eb44e21b42fd66cc4"/><file name="bankTransfer_NL_small.png" hash="90f18f3784ec4c4733891aafd2e83958"/><file name="bankTransfer_NL_small.xcf" hash="ac17edd9804089820e9d73c76441abfc"/><file name="bankTransfer_NL_tiny.png" hash="61e9d461381aa1fb7e9dbcc8012686e0"/><file name="bankTransfer_NO.png" hash="ffcb1204470ff94a7cf2025e000e4978"/><file name="bankTransfer_NO_small.png" hash="daab5aceaf8e4dd59dfcf29fa69cdc24"/><file name="bankTransfer_NO_tiny.png" hash="3fbbf9e381d8d0d9ada61a54778655cb"/><file name="bankTransfer_PL.png" hash="cd25fefef6bce86a97ab7242138360e2"/><file name="bankTransfer_PL_small.png" hash="880b17d7d090c7bd21965e9b78894851"/><file name="bankTransfer_PL_tiny.png" hash="9579393e3dbb3c2aeb7ebf35e54ef4e7"/><file name="bankTransfer_PT.png" hash="c3c652523d77b5d085da97111c96ef9e"/><file name="bankTransfer_PT_small.png" hash="9d3a979ef52298bcc1545b131bd4a3db"/><file name="bankTransfer_PT_tiny.png" hash="cf2be093140773d75d8993fab7aa347c"/><file name="bankTransfer_SE.png" hash="e5608461fa8bdbac771449f30cde91ec"/><file name="bankTransfer_SE_small.png" hash="0f57f6092f8bef25c9973a140a2d85ad"/><file name="bankTransfer_SE_tiny.png" hash="79f3a00608bf18d686d89562af80a72f"/><file name="bankTransfer_SK.png" hash="2390a923affb1640b1b8bb801ce04705"/><file name="bankTransfer_SK_small.png" hash="50adde906c3a965992bbfb04554a5371"/><file name="bankTransfer_SK_tiny.png" hash="d4866f13969214fd774ea1c427a048e6"/><file name="bankTransfer_US.png" hash="9013561099b618aa954f5a3e1352a6ce"/><file name="bankTransfer_US_small.png" hash="191e204c1216a199229da9d75ed1a2a5"/><file name="bankTransfer_US_tiny.png" hash="9d9e942b93d13a18e38aac0ee932fe15"/><file name="bank_ru.png" hash="2390a923affb1640b1b8bb801ce04705"/><file name="bank_ru_small.png" hash="01c263789dd7e38ac4078f55161ec19b"/><file name="bank_ru_tiny.png" hash="d4866f13969214fd774ea1c427a048e6"/><file name="barras.png" hash="389f5242e23cc5b386392d5d21459f21"/><file name="barras_small.png" hash="9e657657b963a1434e88d4289acf9448"/><file name="barras_small_grey.png" hash="d14dbd53e9a52706bf736525a90d8f63"/><file name="barras_tiny.png" hash="e46d37c7e69ef3722876a0205431f1c8"/><file name="bcmc.png" hash="28dca1b34022f2c653c13556c452fce3"/><file name="bcmc_small.png" hash="49698208e5b73f80773260c3fdb3e5a3"/><file name="bcmc_small_grey.png" hash="5069f14bff23c074af6fe2092a2e482a"/><file name="bcmc_tiny.png" hash="3b4221516dc0d1ace3432a473903991e"/><file name="beelinesms.png" hash="a559096cb240aaf7696be7563498b18b"/><file name="bijcard.png" hash="c93da8e22fac6869d729e961df24b593"/><file name="bijcard_small.png" hash="f188b92b77af1613a91c00450d3eb168"/><file name="bijcard_small_grey.png" hash="08eb4420ac9f7a7f691d688e9550f651"/><file name="bijcard_tiny.png" hash="b88eeed8f7318514f849e3ed3a9a2ce8"/><file name="bill99.png" hash="461213bcf10fb394ef524d3a0ad92ee0"/><file name="bill99_small.png" hash="d6e30f7d3da5ce34af3aa7e2353b4809"/><file name="bill99_small_grey.png" hash="a66c49f3556fa99301f4288341eaa014"/><file name="bill99_tiny.png" hash="d10dbbf6512e15252ad6d1337670a7fd"/><file name="boleto.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_hsbc.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_itau.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="boletobancario_santander.png" hash="3968115c3576a14f7cdc8ebd98c8092e"/><file name="bradesco.png" hash="d5ae6f8cb39883cce8c97c0d11257a4c"/><file name="c_cash.png" hash="1b9d5b0c9ece2eaff0be71b4082e0655"/><file name="c_factuur.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_factuur_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_factuur_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_invoice.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_invoice_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_invoice_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_oprekening.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="c_oprekening_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="c_oprekening_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="c_paypal.png" hash="fe5fd0065e4a84e967095f082b329d7f"/><file name="c_paypal_small.png" hash="294698dab8f5aa31f2ad62702bd9d379"/><file name="c_rembours.png" hash="fb2da23375ce5ba67380dc0fb60e7669"/><file name="c_rembours_small.png" hash="0d0f244c1820921db3a6635552cf8129"/><file name="c_rembours_tiny.png" hash="c15d78de45389d475f2786fed3e81c4b"/><file name="card.png" hash="adfe3d9fe45c3f94b9edca852e2cb38c"/><file name="cashticket.png" hash="0dba12beffb7c5ebf47ae1e5701426f3"/><file name="cashticket_small.png" hash="ade5518971a871dd48b0628af6f6cf89"/><file name="cashticket_small_grey.png" hash="348c3721fbedfb2a7121f57db435f43e"/><file name="cashticket_tiny.png" hash="95248971eb69c150748b9acf27f68fb5"/><file name="cashticket_tiny2.png" hash="16ab15f5263fe81ab5233d02ce2cd715"/><file name="cashu.png" hash="1b6d79438ad686cdff44866a66445dca"/><file name="ccavenue.png" hash="aee563b4c9c77d8a881db1e79ad8758d"/><file name="ccavenue_small.png" hash="ffa7390808c679e8d6c580fcf14054fb"/><file name="ccavenue_small_grey.png" hash="9a6c58e88230fb6a167e597752a533ab"/><file name="ccavenue_tiny.png" hash="994d56725d095d107fb33c6f3abf7653"/><file name="cellpaypoint.png" hash="c676483390c0c7e932a320b6326593da"/><file name="cellpaypoint_small.png" hash="f720447e73325b922568a00d0effe75c"/><file name="cellpaypoint_small_grey.png" hash="c6deea99f2099ade43b2b75dcb62f273"/><file name="cellpaypoint_tiny.png" hash="5c00501360e94b3020ff54bccbc2e531"/><file name="ciberpay.png" hash="625d300997f331918e912dc266e1a3a4"/><file name="contact_ru.png" hash="5f70b79ee4232a81a9f7eb0224b0ba3c"/><file name="creditcards.png" hash="cd1a83b970a38307c2899f9949495a00"/><file name="dineromail.png" hash="9058ea237d278d5fd238c2d180807c57"/><file name="dineromail_ar_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_ar_argencard.gif" hash="422ea3362cc44616f72a887f5cba66c6"/><file name="dineromail_ar_banktransfer.gif" hash="758e12e370a5b213996ea1f39259721a"/><file name="dineromail_ar_bapropago.gif" hash="df51325a4fae890a5a6673f92bb64f5d"/><file name="dineromail_ar_cabal.gif" hash="98f6cc5d54df43b4c4a17d9fc2dfb9bd"/><file name="dineromail_ar_cobroexpress.gif" hash="910960360ea1cd632a69ab500cd627ee"/><file name="dineromail_ar_dm.gif" hash="b458246e266ecb059865ab17b7673882"/><file name="dineromail_ar_italcred.gif" hash="aa4376df77748d39c670001794e7991f"/><file name="dineromail_ar_master.gif" hash="126cdc5db597363e5934cf19205f8f45"/><file name="dineromail_ar_pagofacil.gif" hash="2c85235d6dff444b1b914488d035eb7b"/><file name="dineromail_ar_rapipago.gif" hash="c745eb4d456f03c6643f40e77f9ad6ac"/><file name="dineromail_ar_tshopping.gif" hash="552daaa4621397aaed5cea3ad5fc89ec"/><file name="dineromail_ar_visa.gif" hash="61c86fd2afade160736b1c318a8280a6"/><file name="dineromail_ar_visa_hipotecario.gif" hash="bbdb3933302107611678bd7a87779a6c"/><file name="dineromail_br_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_br_aura.gif" hash="b4a8dea00ceebb3d1d64660a997ac22d"/><file name="dineromail_br_bbancario.gif" hash="d9adffbdf626846cfe11b874c5bc0715"/><file name="dineromail_br_diners.gif" hash="b4f437b40f747842cb32becf8af28eb4"/><file name="dineromail_br_dm.gif" hash="65fa3eb604d2d5cd64b76ea0419788a6"/><file name="dineromail_br_hipercard.gif" hash="329dd978884c554fc8c0a37bd6c1ded9"/><file name="dineromail_br_master.gif" hash="126cdc5db597363e5934cf19205f8f45"/><file name="dineromail_br_oipaggo.gif" hash="9cad6e46ea39ec1d6af77ce9322835c1"/><file name="dineromail_br_visa.gif" hash="61c86fd2afade160736b1c318a8280a6"/><file name="dineromail_cl_amex.gif" hash="d4942bf6dab3c072e701e709adaecf78"/><file name="dineromail_cl_diners.gif" hash="9f5bccfc0ab73993405821859dab56b0"/><file name="dineromail_cl_dm.gif" hash="0b886856a701eff48c710a4812f999d0"/><file name="dineromail_cl_magna.gif" hash="bbbbed0d123e619dbf9ffc3308cb4f6e"/><file name="dineromail_cl_master.gif" hash="38b5c034caa6249caf49256f7df4894c"/><file name="dineromail_cl_presto.gif" hash="fa18e40e599f4216d0efea05d9329b5b"/><file name="dineromail_cl_ripley.gif" hash="8a0fe5295feeb9959f2dedf17b304215"/><file name="dineromail_cl_servipag.gif" hash="51cc675b605ce7dd88016743fc324e09"/><file name="dineromail_cl_visa.gif" hash="87fa159904723d830b30d9a0f2f2ff00"/><file name="dineromail_mx_7eleven.gif" hash="7595248bd6c735fc9cd28a0afe9e035c"/><file name="dineromail_mx_amex.gif" hash="4a94da8ec02c565e8cfcb66fbfffe362"/><file name="dineromail_mx_bancomer_tc.gif" hash="b2854f409126920b1c9cf8ed3792a349"/><file name="dineromail_mx_dm.gif" hash="9eede7e49ebcb145494952f6edb749b2"/><file name="dineromail_mx_hsbc_tb.gif" hash="1fb60730a0dfe9d0a0ebef45af1d8fdd"/><file name="dineromail_mx_ixe_tc.gif" hash="6e19e5be52b5bfce749f16b26e933c2e"/><file name="dineromail_mx_otherbank_tc.gif" hash="df05af375e248dcc04324aa92b6163b0"/><file name="dineromail_mx_oxxo.gif" hash="ee69da5b06d9c52ef76dd1a20bab5ebb"/><file name="dineromail_mx_santander_tc.gif" hash="5bb0f9600b1b8ad67d0a418c2412a506"/><file name="dineromail_mx_scotiabank_tc.gif" hash="dbe7bdd2d9327086cae42ee6a842d00c"/><file name="dineromail_small.png" hash="356e06d5a2fd5f98f3da4dfc192e389c"/><file name="dineromail_tiny.png" hash="98f6b908f7025a8babaffafcc1336428"/><file name="diners.png" hash="6310bb53fe7921cf016309d6a75b8c22"/><file name="diners_small.png" hash="ecf5d635a74460ca9575bb7d6d8550dd"/><file name="diners_small_grey.png" hash="77ff46143b8a4aab54eb35c345806a83"/><file name="diners_tiny.png" hash="881b5998d35cc373d294ca21689015d5"/><file name="directEbanking.png" hash="6d7ce2ff213c33743d80ab83fb24e8de"/><file name="directEbanking_axa.png" hash="3d90797ef39a0db23dd6373bdfef9ee8"/><file name="directEbanking_cbc.png" hash="f23617618a9e2ce7863a931947b49adb"/><file name="directEbanking_de.png" hash="9fa16b098e744e94553952c5a28c7dd2"/><file name="directEbanking_de_grey.png" hash="109b1237e5d69d7ae82dc9a64d6ab4fd"/><file name="directEbanking_de_small.png" hash="5f65ee79ae22c4ba52e6a8485cf155cd"/><file name="directEbanking_de_tiny.png" hash="15983a607b8151f0be3b5ecfb067ea7a"/><file name="directEbanking_dexia.png" hash="37ebcc9a12bc9c88d540f78adf9bd679"/><file name="directEbanking_fintro.png" hash="389b1a7b14e5466b7b0dd4721aee0433"/><file name="directEbanking_fortis.png" hash="511cc06fefa644cc7575a0efb227bd64"/><file name="directEbanking_grey.png" hash="109b1237e5d69d7ae82dc9a64d6ab4fd"/><file name="directEbanking_ing.png" hash="ac4f224d0fe9aee23d143acc5198dd72"/><file name="directEbanking_kbc.png" hash="eae3c85e332e4289841bd27a46031db3"/><file name="directEbanking_small.png" hash="db84d47793f8e375d48dc8b17f8a0ddf"/><file name="directEbanking_small_grey.png" hash="7f4fbbcfe647cf8d280238754061d042"/><file name="directEbanking_tiny.png" hash="7d804d09c7df931eb9cafc2d3a4984b1"/><file name="directdebit_BR_bancodobrasil.png" hash="784271e1bf909c95e79ff7de4d92ed5b"/><file name="directdebit_BR_bradesco.png" hash="d5ae6f8cb39883cce8c97c0d11257a4c"/><file name="directdebit_BR_caixa.png" hash="a0d69bc8a40bf120fc2138a694c31186"/><file name="directdebit_BR_hsbc.png" hash="4943f73d211b8111fd81ca8d4e06160d"/><file name="directdebit_BR_itau.png" hash="b24ed466c1d694dca7dc26ee42dbf330"/><file name="directdebit_BR_santander.png" hash="bd73ea7f9f46b0ed583e764f01e9a8d0"/><file name="directdebit_NL.png" hash="cf1246761401ad866b72d7b520506b22"/><file name="directdebit_NL_small.png" hash="2e6a7444f509232818458312f28f8c50"/><file name="directdebit_NL_tiny.png" hash="99ea09a985cf0221ce87d3696211704e"/><file name="discover.png" hash="491378a0e2ae6223ab41fc925b67575d"/><file name="discover_small.png" hash="8573aebe4938afb288749badb22aa091"/><file name="discover_small_grey.png" hash="e60b18fcd2f0509c02a08fa0bf7024b2"/><file name="discover_tiny.png" hash="78a2cb6ccedb121d3138b280e1778f84"/><file name="dotpay.png" hash="a09962a7357374482444accf6b066037"/><file name="dotpay_inteligo.png" hash="25492f3d9eaabae7aa1441fdf24947b3"/><file name="dotpay_moje.png" hash="1c948c8e2db27f09e44e4c6f3591e39c"/><file name="dotpay_mtransfer.png" hash="e9ef4a420639f227e650c9e456235059"/><file name="dotpay_multitransfer.png" hash="b604e3e946b41437bc485b0a95a76b2a"/><file name="dotpay_nordea.png" hash="cfda5216a9ae9b829e5121bbfaaf887b"/><file name="dotpay_potzta.png" hash="88670102fd0e7f532357d06ec66a8ec6"/><file name="dotpay_przelewz.png" hash="06cbe8767f3b1810e2a72b19a1bcc9c7"/><file name="dotpay_przelewz24.png" hash="64143c67feac20a193fd459ba0a6e8b4"/><file name="dotpay_small.png" hash="aabbcc9e2471e044c38ab63d8aa6d48f"/><file name="dotpay_tiny.png" hash="5c746221e7ec781c18bb4d7e6f0a66a0"/><file name="dotpay_zabka.png" hash="a6edae22b53cdd3b997f8c9b50840b2c"/><file name="ebanking_FI.png" hash="7d717c71a9174624d8e30a314c4f091e"/><file name="ebanking_FI_aktia.gif" hash="092c03a2319bd7c5d8fc9dc98516be46"/><file name="ebanking_FI_alandsbanken.png" hash="d64698c6c6dc9b6c8e1d2179dfb61d8d"/><file name="ebanking_FI_handelsbanken.png" hash="06f99903ea285bc5cf392ea6c642a267"/><file name="ebanking_FI_nordea.png" hash="c68ecd7c03b5d6a0819110c56df501e8"/><file name="ebanking_FI_osuuspankki.png" hash="cf9f495363970b9da3dbbaffe1031225"/><file name="ebanking_FI_sampo.png" hash="e5b4bd2ac745258b22ab832be253654a"/><file name="ebanking_FI_small.png" hash="57635f01d33e65d40af90d3ab4088ad7"/><file name="ebanking_FI_spankki.png" hash="e88599e1318b54be1990363607819811"/><file name="ebanking_FI_tapiola.png" hash="27ad56685d2e0e641a8d3e95942630ef"/><file name="ebanking_FI_tiny.png" hash="b0e3de2e531c362daaac6063c7a59d9e"/><file name="ebetalning.png" hash="0bc7c8cc01264df81ad06b0b75ce7c0a"/><file name="ebucks.png" hash="33d683c3a6f4f61df3c36e09d867936e"/><file name="ebucks_small.png" hash="c2afb7964e668ba7ba0416682fdd831b"/><file name="ebucks_small_tiny.png" hash="dd79fc153f0a7fcc79e628383e76ee26"/><file name="ebucks_tiny.png" hash="6085ef04ad96289d6a98e429c6d061ba"/><file name="elba.png" hash="8d2bfd3e8c0953b5d1ba80e201d25069"/><file name="elecsnet.png" hash="4a27849dfd5a8bc6771a962aff3908f4"/><file name="elv.png" hash="8e47d6ce919e1be80328665798d387ec"/><file name="elv_small.png" hash="a565fd570c28204b7ed0e92ebf667012"/><file name="elv_tiny.png" hash="3c9d929660d6279f255c7be9bf02ee8f"/><file name="empty.png" hash="65d7e6c42582ea986cb66ad78768b2ae"/><file name="enets.png" hash="5eae578677220e7085374936ffc2ec6a"/><file name="entertainmentcard.png" hash="df44b82c45f98790ea0e8866ecb5fee7"/><file name="entertainmentcard_small.png" hash="0466be6962e63c80c766ca4b092cded6"/><file name="entertainmentcard_small_grey.png" hash="32b0a15b2467decf84db199cd6db3bcf"/><file name="entertainmentcard_tiny.png" hash="2a7610575298bf7029bbbfad2bb86596"/><file name="forwardmobile.png" hash="023348014c3838963e48bdc8b397c387"/><file name="frame.png" hash="5e2226d7539f5d95dabe5988f4446282"/><file name="gallgall.png" hash="2e6b9f6aafaebe09112e089c05aa64ea"/><file name="gallgall_small.png" hash="24fabea2d5af04bedf9dd69e2368b943"/><file name="gallgall_small_tiny.png" hash="671cb1ce378d811cddaf77af7545d365"/><file name="gallgall_tiny.png" hash="769bf04c15a3b81f06940c237c3b3706"/><file name="giropay.png" hash="469cb654fe84b923b86b06723455ef9d"/><file name="giropay_small.png" hash="444f3a6307bb83a1d20d19e1cb8237f9"/><file name="giropay_small_grey.png" hash="565dd52d036a87d5c515c8bec4cef4f3"/><file name="giropay_tiny.png" hash="3a677e8d71ce59332e012db5bc343106"/><file name="globegcash.png" hash="580003d47ef03a6d1c7203bfc250b6d3"/><file name="globegcash_small.png" hash="cd18f17b46acb7ca15370b000f9bfa95"/><file name="globegcash_small_grey.png" hash="36e88a7a7170eb0c5ca7d3a8f2b08f13"/><file name="globegcash_tiny.png" hash="006794f78d9a43a56543a6e6b5a7ebd8"/><file name="hansabank.png" hash="b4dad91137678e09a650e1c6693e98d3"/><file name="hdfc.png" hash="b6e57b76ee8920607a2a0a809ee40d48"/><file name="hdfc_small.png" hash="1b9e555bfab7c0f11631dfecacffa637"/><file name="hdfc_small_grey.png" hash="cadac6a01cdab50cff177a1c0feb6156"/><file name="hdfc_tiny.png" hash="584260909cebec2286b6d1cd9489c7d4"/><file name="hppPos.png" hash="4780e785c785e93aed6ad13df323d6ef"/><file name="hyvesafrekenen.png" hash="5c8068c5b31a55f043cee6dff3246bb7"/><file name="hyvesafrekenen_small.png" hash="5a4c5747c030ac74cea799032ada3b26"/><file name="hyvesafrekenen_tiny.png" hash="2215dc356edeb426da65f43536960afe"/><file name="ideal.png" hash="6a851bfc5bac2835fd31c18c1224e8c9"/><file name="ideal_small.png" hash="8b115bda559a24a3564e02f7a90caae9"/><file name="ideal_tiny.png" hash="140c2e52427e074f95627a44db1f9f88"/><file name="interac.png" hash="c63021e21273e83423d8af2b4c7c1728"/><file name="interac_small.png" hash="0c74bd42750252eda57b054651afca18"/><file name="interac_tiny.png" hash="1a42ba184555605ab8e2ea1a4956f21a"/><file name="ipay88.png" hash="116aa967091843ee6e8e911ff4c34b22"/><file name="ipay88_small.png" hash="1dfb38797a43657d72b0701c446a841e"/><file name="ipay88_small_grey.png" hash="418f051bc03571334cec46e122fa698f"/><file name="ipay88_tiny.png" hash="0009e8c253c57564c3688010c5192ad4"/><file name="ivr.png" hash="0ebef34ac806802b0d29c1d74f84fdbf"/><file name="ivrLandline.png" hash="0ebef34ac806802b0d29c1d74f84fdbf"/><file name="ivrLandline_small.png" hash="155f9a61db970885782db7cbe997dab4"/><file name="ivrLandline_tiny.png" hash="ecf7994d1e627023dbd47615a8ebb848"/><file name="ivrMobile.png" hash="6a16e39d5deffb8fa3234108ca97b7de"/><file name="ivrMobile_small.png" hash="a9756b756b3ea56dea07a16edcdf39a9"/><file name="ivrMobile_tiny.png" hash="8c35341f8a8f6ca16b752ff7e1bb51bf"/><file name="ivr_small.png" hash="155f9a61db970885782db7cbe997dab4"/><file name="ivr_tiny.png" hash="ecf7994d1e627023dbd47615a8ebb848"/><file name="jcb.png" hash="68303da687ac6e8615196a66f40bb6fb"/><file name="jcb_small.png" hash="f469481ddecb206cfc74478c6b58266e"/><file name="jcb_small_grey.png" hash="ddb4587396f2e7c7ad83d2aa6561cf7a"/><file name="jcb_tiny.png" hash="5d89108481655ee9dc2dbf6476bbcc14"/><file name="kadowereld.png" hash="c2eea3806e2f55ffa2f7eb3154450be5"/><file name="kadowereld_small.png" hash="203f4584e34c3f059025f3d4329b4898"/><file name="kadowereld_small_grey.png" hash="3afa5e33cd29e5c3ce1723ea10607463"/><file name="kadowereld_tiny.png" hash="b2ca2f7f504670555d332f4c5e8d3074"/><file name="klarna.png" hash="51bc6b70472fe29b728192222b88c709"/><file name="klarna_small.png" hash="57a98dc539dd5c329aac8540a3204d1e"/><file name="klarna_tiny.png" hash="fe0295e2cba0b79136e86180d7db5963"/><file name="laser.png" hash="c64699ddd372b4a48e72b8066fd2aa78"/><file name="laser_small.png" hash="abda432193ffcd5388037fa34b9e0737"/><file name="laser_small_grey.png" hash="ef7193af17ae93fa9bb5215a0ec73195"/><file name="laser_tiny.png" hash="2f87b8e37582541355e9b77008cf3853"/><file name="maestro.png" hash="e91fa85475ae74b16b92b7ac05e562c2"/><file name="maestro_small.png" hash="7814fbfff53e57643137fd68889ec807"/><file name="maestro_small_grey.png" hash="31ab5c8168e8a5b075fe1136b221d453"/><file name="maestro_tiny.png" hash="87ff6ebe1ef2e4cbae340881169065c4"/><file name="maestrouk.png" hash="cf0fcc0e1f41ad2301d5814e4a9c88c4"/><file name="maestrouk_small.png" hash="7814fbfff53e57643137fd68889ec807"/><file name="maestrouk_small_grey.png" hash="31ab5c8168e8a5b075fe1136b221d453"/><file name="maestrouk_tiny.png" hash="87ff6ebe1ef2e4cbae340881169065c4"/><file name="mc.png" hash="0d108b48ed7f8e1f0020da611e223800"/><file name="mc_small.png" hash="51ca51c64a8f0277961effeb0a0dedbb"/><file name="mc_small_grey.png" hash="0762490e5dc86277d0e411468b01a269"/><file name="mc_tiny.png" hash="814af4ec011f2f33edb7d38763dea2ea"/><file name="mercadopago.png" hash="e8cdc9cab0494fbaec13ffa7a008f0d6"/><file name="mimoney.png" hash="0f6d07a6156c6dc931636c8c618384ac"/><file name="mimoney_small.png" hash="4a8b0586fd04690de902120a463ca5b2"/><file name="mimoney_small_grey.png" hash="c85a2d63e583a8fd231713d30d484ecb"/><file name="mimoney_tiny.png" hash="0c562f6e53a95ebe2ff12747f9271a56"/><file name="moneta.png" hash="c208f24cbe664e0c9df753d1dd6b8d43"/><file name="moneybookers.png" hash="7bfc54c2a787b53f699f124d7449a169"/><file name="moneybookers_small.png" hash="1290894e479fafda67291355ea65defe"/><file name="moneybookers_tiny.png" hash="4ed8a8052e9b394e174889de6d621604"/><file name="moneymail.png" hash="73d044eac9d9f1679a653dd2e62935f3"/><file name="moneymoney.png" hash="7204b9579b665085d00b1ea2184b678f"/><file name="multibanco.png" hash="178a9292a9743e3b8904f105e7d6715b"/><file name="nedbank.png" hash="a8a2dc3af1e76262b75270a24a041331"/><file name="nedbank_small.png" hash="d386a8672bd21e53580ae32ae529ca3a"/><file name="nedbank_small_grey.png" hash="7085229e1217e47b07663764f8bb1e6e"/><file name="nedbank_tiny.png" hash="af3694515dd8b68ca71324ca20089c58"/><file name="onebip.png" hash="ca289a3c9fd8d72bce90165db98a88b9"/><file name="online_RU.png" hash="afcc9ad6292e2e21feff4af23e2fa46e"/><file name="online_RU_small.png" hash="712fa0be37857b024e3118d96da61bab"/><file name="online_RU_tiny.png" hash="0e3ac8d1ca10dff95657aa9b9ebdc13b"/><file name="online_transfer_de.png" hash="43324fb914cdbf8eff66f3668a353f1e"/><file name="openinvoice.png" hash="cd46b7d11c9dd79b1cc9c073c0696aff"/><file name="openinvoice.xcf" hash="d5f41ec9c48415f65a519c33999a1229"/><file name="openinvoice_small.png" hash="63d4c6fd1e5b214d018f3e00ca687cd5"/><file name="openinvoice_tiny.png" hash="153791c1eb5bae6095e1210787ffe4fa"/><file name="pagosonline.png" hash="04a1d0c0bb46ed7f931b3d4e248f8c0a"/><file name="pagosonline_small.png" hash="9768e52502eb299716268a212a044812"/><file name="pagosonline_small_grey.png" hash="e9f7365e885652200fdb08201e1b13cf"/><file name="pagosonline_tiny.png" hash="70d51512b8bf5215f5865b21a3ca7731"/><file name="paypal.png" hash="02362803ca1d3ab9c9e8dc3176100d66"/><file name="paypal_small.png" hash="294698dab8f5aa31f2ad62702bd9d379"/><file name="paypal_tiny.png" hash="709c47f06297455d8d55d6937245e016"/><file name="paysafecard.png" hash="20861199bb6e8781c0b10e995f1490de"/><file name="paysafecard_small.png" hash="e7452ca00265fdc91dd28a2b326355d3"/><file name="paysafecard_small_grey.png" hash="06377beb14a2666f153b273e89053419"/><file name="paysafecard_tiny.png" hash="92b3df13741ef6f71d2c12206ab3f412"/><file name="payu.png" hash="bc671fff056fd108fe24ba52053111b0"/><file name="payu_small.png" hash="ca3eb82cb24dd1f1bfc34436287dc9d0"/><file name="payu_small_grey.png" hash="6097711eeb2ea309d407c03a467e1653"/><file name="payu_tiny.png" hash="2b89f57174338ba3d3192eb8519ece3f"/><file name="plastix.png" hash="82d3202239d01c6bf49d8dc2399900e2"/><file name="plastix_small.png" hash="447240736bdba2d15a34986395c3fb1f"/><file name="plastix_small_grey.png" hash="7e039f412a96a0e884f86598ebfccfb1"/><file name="plastix_tiny.png" hash="aaff5ff8c33af35fe4ae64e627c0964c"/><file name="platezhru.png" hash="2f36e088146ab75470c7a55177db8c07"/><file name="platika.png" hash="03e93ab41b0d330706e2c4f85cae966a"/><file name="postoffice_ru.png" hash="8ade3cd1711071ab73248d4ba62eae64"/><file name="pps.png" hash="29f4efc8d08cfd5ba90920b1fcef6bde"/><file name="pps_small.png" hash="7bf1fa7c4adcd8dfc2b2f56eb172fcaa"/><file name="pps_small_grey.png" hash="08d6188b7f5c13ec9c5f3488b4cbf19e"/><file name="pps_tiny.png" hash="4ed68db4ca98ac69f0557319a8284c8d"/><file name="pse.png" hash="6af65a4a18af66d103473fece5536e1c"/><file name="pse_small.png" hash="1f6695131dca61647b07f7180e695c46"/><file name="pse_small_grey.png" hash="7adf2fdfc48d8b078f7c0aeaa4f50e1c"/><file name="pse_tiny.png" hash="128b2749a126cfade0300f27c6919308"/><file name="qiwi.png" hash="b5e092af3394bc333fe83d073e8a6dfd"/><file name="qiwiwallet.png" hash="623b4c7fec53864fdee6d567da5f61cc"/><file name="refresh.png" hash="69ddc65b628d15a4375e66792c07484f"/><file name="safetypay.png" hash="af4e58d22f816f148faae179d0867b3f"/><file name="safetypay_small.png" hash="26749f1a95011897c8aaf568425df3dc"/><file name="safetypay_small_grey.png" hash="e5f3e5287e3fee2d77c065063b43e17d"/><file name="safetypay_tiny.png" hash="f3700f2d3cda7834cd178ac0f70d6352"/><file name="sendEmail.png" hash="cdddfa5e77d565a0ed23b6c26e0dee09"/><file name="sendEmail_small.png" hash="b5d63cc1613f08a08194442647ee451d"/><file name="sepadirectdebit.png" hash="e565455436d808fa07499131296490de"/><file name="sms.png" hash="7c6c0fddee039be4d879808b374f06f5"/><file name="sms_small.png" hash="fd1d52278d2446c7fe1c34d4fc70d556"/><file name="sms_tiny.png" hash="ed22de378fdbc717f987f8d4199e0452"/><file name="solo.png" hash="13f13c36cff7835d4a46df140fe432a3"/><file name="solo_small.png" hash="96de4f5f750a415fef573ce28092bf68"/><file name="solo_small_grey.png" hash="75c9b0b2daae0d6d80a5f5ff4f14e8d6"/><file name="solo_tiny.png" hash="3e2d7a21d19b12ed84aabdb26304fae6"/><file name="switch.png" hash="8cf19bb8c744a3f852511e781c176c07"/><file name="template.xcf" hash="e5035cd9e4e96859e50c1a9773098e89"/><file name="tenpay.png" hash="ddd0b5b8e3ff63cf1bfc555fbede0242"/><file name="tenpay_small.png" hash="2aa6c5919108eec42ed5c47ad4155a8f"/><file name="tenpay_small_grey.png" hash="6a21283b21295eefb4db553f877ea4c1"/><file name="tenpay_tiny.png" hash="736275eeec39e56c3c1d29fcb9d8ebb7"/><file name="terminal_RU.png" hash="711ab27d1cbbf6771e0ee133f75c7c46"/><file name="terminal_RU_small.png" hash="9bafe5dd035f73757f553250382764c6"/><file name="terminal_RU_tiny.png" hash="1b4dce2e901d90185933420cd80648cb"/><file name="tnt_rembours.png" hash="a8abb6f51d7893da39fcc2477d7bd2bb"/><file name="tnt_rembours_small.png" hash="72ee2b0ae6742cd325bda44a14093f4c"/><file name="trustly.png" hash="2a82872cc0ada644b0442e05423a2db8"/><file name="trustpay.png" hash="88a3680bf1007661ab4fc63106aa1ff4"/><file name="uhisbank.png" hash="8c0967455a15aefe3cdfb47240a18850"/><file name="ukash.png" hash="b95eb9f2658923c38a6252f5ff9ca9c7"/><file name="ukash_small.png" hash="2210a65cd1fb85bc883d112b12c79e6e"/><file name="ukash_small_grey.png" hash="65e6cc21082ebd3c93e96bbf96499df4"/><file name="ukash_tiny.png" hash="543ab39e6dcbc094188b4f473ac4b998"/><file name="unionpay.png" hash="068dee300e2c12e58e9a47d3556e977c"/><file name="unionpay_small.png" hash="55a00c9d7bbcbe1c448b449974d85af1"/><file name="unionpay_small_grey.png" hash="5c69e46ee4663f2d0e47c7f503bbd1e4"/><file name="unionpay_tiny.png" hash="45d3b4e758237412b524a5c52418da67"/><file name="unknown.png" hash="b2d137147db4d6eb7dacb5414a4f7a30"/><file name="unknown_small.png" hash="a5234e9eb2e4485acb19b196876d762b"/><file name="vias.png" hash="aca848fa54b173225fe17637699d87c4"/><file name="vias_small.png" hash="37bee85c36b52a07a4529735a194a41e"/><file name="vias_small_grey.png" hash="4da77d558ae9488ee2a85191e9db8748"/><file name="vias_tiny.png" hash="1a45f0a2696b5539195c2fcb69be49b6"/><file name="visa-electron.png" hash="308132b89febd4979bac61594919057f"/><file name="visa-electron_small.png" hash="5ab129027f4f4acbc7a9aa2b5d0e84d3"/><file name="visa-electron_small_grey.png" hash="712b876d4f060613f54f2ec04516e512"/><file name="visa.png" hash="30f9fde31aa41197e71ccd9a63a1fe75"/><file name="visa_fr.png" hash="abd117879295333ac54497e15f81ea18"/><file name="visa_fr_small.png" hash="837db98a87141717dcd1b90bcb5ff5b1"/><file name="visa_fr_small_grey.png" hash="e8cef14608278ab71ef2ffd58e65dc9e"/><file name="visa_small.png" hash="cdab39efaf22fcd2ab88f3dc42c32de1"/><file name="visa_small_grey.png" hash="9411565a7e81c5c3cc484863dc53031a"/><file name="visa_tiny.png" hash="e374bec64dcc345848b43f0a8a3490c2"/><file name="wallet_RU.png" hash="29213300b3cf644c64d915418f259d87"/><file name="wallet_RU_small.png" hash="3308a16ce0f5b474af32505f587079b5"/><file name="wallet_RU_tiny.png" hash="c46cdb588d7a9a21a909e5af842414b5"/><file name="wallie.png" hash="fc97552b8249c3e96aa6f3cf8e3577bd"/><file name="wallie_small.png" hash="c0b60fe348b16e157eb0c64043f410c2"/><file name="wallie_tiny.png" hash="df61209a0e0517bbb3d65119d5ebfcbd"/><file name="webmoney.png" hash="3cca800e0962e0078b64361de11b935f"/><file name="webshopgiftcard.png" hash="09990fe325b20c2fcdaaa855457d5348"/><file name="wiwallet.png" hash="5db11152a23a72b2f4676841261c5db0"/><file name="wiwallet_small.png" hash="a4c5567f59ca4575a316e1bf3eb066c1"/><file name="wiwallet_small_grey.png" hash="b75b2af0b5c6129e8c1d7bc9087222b4"/><file name="wiwallet_tiny.png" hash="8b53e98458e15bc19b242d05ad678f2d"/><file name="yandexmoney.png" hash="e6a38c66b08ba78a68096f8ff1b2a41d"/><file name="yourgift.png" hash="87bd1ef190d75ec64fb66b77aaeb7b8c"/><file name="yourgift_small.png" hash="17300795f7fd31d5cb730685c2eb0098"/><file name="yourgift_small_grey.png" hash="69b235ccb6b7ef0dfb3a2645be60dbc6"/><file name="yourgift_tiny.png" hash="a3bc0b90775458ff9ef8499f7a5437ca"/></dir></dir><dir name="css"><file name="adyenstyle.css" hash="c4f2cb9f27c1b6282d133245499f9128"/></dir></dir></dir><dir name="default"><dir name="adyen"><dir><dir name="onestepcheckout"><dir name="js"><file name="onestepcheckout.js" hash="a3f69ca218c08e6de153aac7120dc3c7"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="adyen"><dir><dir name="onestepcheckout"><dir name="js"><file name="onestepcheckout.js" hash="a3f69ca218c08e6de153aac7120dc3c7"/></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="adyen"><dir><dir name="onestepcheckout"><dir name="js"><file name="onestepcheckout.js" hash="a3f69ca218c08e6de153aac7120dc3c7"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="adyen"><dir name="payment"><file name="adyen.encrypt.js" hash="6e6d006f2ac96f33a4531d3115f2d852"/><file name="elv.js" hash="db612a634c95727ec9db82c50e9aec8e"/></dir></dir></dir></target></contents>
|
40 |
Â
<compatible/>
|
41 |
Â
<dependencies><required><php><min>5.3.3</min><max>6.0.0</max></php></required></dependencies>
|
42 |
Â
</package>
|
@@ -40,6 +40,23 @@
|
|
40 |
Â
.sp-methods #payment_form_adyen_hpp #payment_form_ideal table td input { margin-top: 15px; margin-left: 4px; /*margin-top: -38px; margin-left: 2px; position: relative; z-index: 1;*/ }
|
41 |
Â
.sp-methods #payment_form_adyen_hpp #payment_form_ideal table td img { /*margin-left: -25px;*/ }
|
42 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
43 |
Â
/* pos redirect page */
|
44 |
Â
.redirect-body-adyen { margin:0; padding:0;}
|
45 |
Â
#pos-redirect-page .logo { margin:10px 0 0 10px; width:336px; height:111px; background:url(../images/adyen/adyen_logo_large.png) left top no-repeat; }
|
@@ -47,4 +64,3 @@
|
|
47 |
Â
#pos-redirect-page .grey-header h1 { padding: 16px 10px; font-family: 'Open Sans', sans-serif; font-size:24px;color:white; }
|
48 |
Â
#pos-redirect-page .amount-box { width:300px; height:150px; padding-top:75px; margin:50px auto; border:1px solid #797c83; color:#797c83; text-align:center; font-weight:bold; font-size:34px; background-color: #f5f5f5; box-shadow: 0 0 2px 2px #888;}
|
49 |
Â
#pos-redirect-page #launchlink { margin-top:10px; clear:both; display:block; color:#797C83; text-decoration:none; }
|
50 |
-
|
40 |
Â
.sp-methods #payment_form_adyen_hpp #payment_form_ideal table td input { margin-top: 15px; margin-left: 4px; /*margin-top: -38px; margin-left: 2px; position: relative; z-index: 1;*/ }
|
41 |
Â
.sp-methods #payment_form_adyen_hpp #payment_form_ideal table td img { /*margin-left: -25px;*/ }
|
42 |
Â
|
43 |
+
/* for onepagecheckout */
|
44 |
+
.payment-methods dd#container_payment_method_adyen_hpp { margin:0; padding:0;}
|
45 |
+
/* end for onepagecheckout */
|
46 |
+
|
47 |
+
.sp-methods h3.other-payment { margin-top:15px; }
|
48 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick { padding-top:10px; }
|
49 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .recurring-creditcards .recurring_type { float:left; vertical-align: middle; height:120px;}
|
50 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block { display:inline-block; border: 1px solid #999; padding:10px; margin-left:10px; min-width: 568px; }
|
51 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block img { margin-bottom:10px;}
|
52 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block .columns { float:left; margin-right:10px; height:30px;}
|
53 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block .columns .update-expiration-date { display:inline; float:none; }
|
54 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block label { display:block; }
|
55 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block .columns.three.b label { width:175px;}
|
56 |
+
.sp-methods #oneclick_payment_form_adyen_oneclick .creditcard-block .creditcard-holder-name { margin-top:20px;}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
Â
/* pos redirect page */
|
61 |
Â
.redirect-body-adyen { margin:0; padding:0;}
|
62 |
Â
#pos-redirect-page .logo { margin:10px 0 0 10px; width:336px; height:111px; background:url(../images/adyen/adyen_logo_large.png) left top no-repeat; }
|
64 |
Â
#pos-redirect-page .grey-header h1 { padding: 16px 10px; font-family: 'Open Sans', sans-serif; font-size:24px;color:white; }
|
65 |
Â
#pos-redirect-page .amount-box { width:300px; height:150px; padding-top:75px; margin:50px auto; border:1px solid #797c83; color:#797c83; text-align:center; font-weight:bold; font-size:34px; background-color: #f5f5f5; box-shadow: 0 0 2px 2px #888;}
|
66 |
Â
#pos-redirect-page #launchlink { margin-top:10px; clear:both; display:block; color:#797C83; text-decoration:none; }
|
Â
|
Binary file
|
@@ -0,0 +1,1051 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
|
2 |
+
|
3 |
+
/* Login popup class */
|
4 |
+
var OneStepCheckoutLoginPopup = Class.create({
|
5 |
+
initialize: function(options) {
|
6 |
+
this.options = options;
|
7 |
+
this.popup_container = $('onestepcheckout-login-popup');
|
8 |
+
this.popup_link = $('onestepcheckout-login-link');
|
9 |
+
this.popup = null;
|
10 |
+
this.createPopup();
|
11 |
+
this.mode = 'login';
|
12 |
+
|
13 |
+
this.forgot_password_link = $('onestepcheckout-forgot-password-link');
|
14 |
+
this.forgot_password_container = $('onestepcheckout-login-popup-contents-forgot');
|
15 |
+
this.forgot_password_loading = $('onestepcheckout-forgot-loading');
|
16 |
+
this.forgot_password_error = $('onestepcheckout-forgot-error');
|
17 |
+
this.forgot_password_success = $('onestepcheckout-forgot-success');
|
18 |
+
this.forgot_password_button = $('onestepcheckout-forgot-button');
|
19 |
+
this.forgot_password_table = $('onestepcheckout-forgot-table');
|
20 |
+
|
21 |
+
this.login_link = $('onestepcheckout-return-login-link');
|
22 |
+
this.login_container = $('onestepcheckout-login-popup-contents-login');
|
23 |
+
this.login_table = $('onestepcheckout-login-table');
|
24 |
+
this.login_error = $('onestepcheckout-login-error');
|
25 |
+
this.login_loading = $('onestepcheckout-login-loading');
|
26 |
+
this.login_button = $('onestepcheckout-login-button');
|
27 |
+
this.login_form = $('onestepcheckout-login-form');
|
28 |
+
this.login_username = $('id_onestepcheckout_username');
|
29 |
+
|
30 |
+
/* Bindings for the enter button */
|
31 |
+
this.keypress_handler = function(e) {
|
32 |
+
if(e.keyCode == Event.KEY_RETURN) {
|
33 |
+
e.preventDefault();
|
34 |
+
|
35 |
+
if(this.mode == 'login') {
|
36 |
+
this.login_handler();
|
37 |
+
} else if(this.mode == 'forgot') {
|
38 |
+
this.forgot_password_handler();
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}.bind(this);
|
42 |
+
|
43 |
+
this.login_handler = function(e) {
|
44 |
+
|
45 |
+
var parameters = this.login_form.serialize(true);
|
46 |
+
var url = this.options.login_url;
|
47 |
+
this.showLoginLoading();
|
48 |
+
|
49 |
+
new Ajax.Request(url, {
|
50 |
+
method: 'post',
|
51 |
+
parameters: parameters,
|
52 |
+
onSuccess: function(transport) {
|
53 |
+
var result = transport.responseText.evalJSON();
|
54 |
+
if(result.success) {
|
55 |
+
window.location = window.location;
|
56 |
+
} else {
|
57 |
+
this.showLoginError(result.error);
|
58 |
+
}
|
59 |
+
}.bind(this)
|
60 |
+
});
|
61 |
+
};
|
62 |
+
|
63 |
+
this.forgot_password_handler = function(e) {
|
64 |
+
var email = $('id_onestepcheckout_email').getValue();
|
65 |
+
|
66 |
+
if(email == '') {
|
67 |
+
alert(this.options.translations.invalid_email);
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
this.showForgotPasswordLoading();
|
72 |
+
|
73 |
+
/* Prepare AJAX call */
|
74 |
+
var url = this.options.forgot_password_url;
|
75 |
+
|
76 |
+
new Ajax.Request(url, {
|
77 |
+
method: 'post',
|
78 |
+
parameters: { email: email },
|
79 |
+
onSuccess: function(transport) {
|
80 |
+
var result = transport.responseText.evalJSON();
|
81 |
+
|
82 |
+
if(result.success) {
|
83 |
+
/* Show success message */
|
84 |
+
this.showForgotPasswordSuccess();
|
85 |
+
|
86 |
+
/* Pre-set username to simplify login */
|
87 |
+
this.login_username.setValue(email);
|
88 |
+
} else {
|
89 |
+
/* Show error message */
|
90 |
+
this.showForgotPasswordError();
|
91 |
+
}
|
92 |
+
|
93 |
+
}.bind(this)
|
94 |
+
});
|
95 |
+
};
|
96 |
+
|
97 |
+
this.bindEventHandlers();
|
98 |
+
},
|
99 |
+
|
100 |
+
bindEventHandlers: function() {
|
101 |
+
/* First bind the link for opening the popup */
|
102 |
+
if(this.popup_link){
|
103 |
+
this.popup_link.observe('click', function(e) {
|
104 |
+
e.preventDefault();
|
105 |
+
this.popup.open();
|
106 |
+
}.bind(this));
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Link for closing the popup */
|
110 |
+
if(this.popup_container){
|
111 |
+
this.popup_container.select('p.close a').invoke(
|
112 |
+
'observe', 'click', function(e) {
|
113 |
+
this.popup.close();
|
114 |
+
}.bind(this));
|
115 |
+
}
|
116 |
+
|
117 |
+
/* Link to switch between states */
|
118 |
+
if(this.login_link){
|
119 |
+
this.login_link.observe('click', function(e) {
|
120 |
+
e.preventDefault();
|
121 |
+
this.forgot_password_container.hide();
|
122 |
+
this.login_container.show();
|
123 |
+
this.mode = 'login';
|
124 |
+
}.bind(this));
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Link to switch between states */
|
128 |
+
if(this.forgot_password_link){
|
129 |
+
this.forgot_password_link.observe('click', function(e) {
|
130 |
+
e.preventDefault();
|
131 |
+
this.login_container.hide();
|
132 |
+
this.forgot_password_container.show();
|
133 |
+
this.mode = 'forgot';
|
134 |
+
}.bind(this));
|
135 |
+
}
|
136 |
+
|
137 |
+
/* Now bind the submit button for logging in */
|
138 |
+
if(this.login_button){
|
139 |
+
this.login_button.observe(
|
140 |
+
'click', this.login_handler.bind(this));
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Now bind the submit button for forgotten password */
|
144 |
+
if(this.forgot_password_button){
|
145 |
+
this.forgot_password_button.observe('click',
|
146 |
+
this.forgot_password_handler.bind(this));
|
147 |
+
}
|
148 |
+
|
149 |
+
/* Handle return keypress when open */
|
150 |
+
if(this.popup){
|
151 |
+
this.popup.observe('afterOpen', function(e) {
|
152 |
+
document.observe('keypress', this.keypress_handler);
|
153 |
+
}.bind(this));
|
154 |
+
|
155 |
+
this.popup.observe('afterClose', function(e) {
|
156 |
+
this.resetPopup();
|
157 |
+
document.stopObserving('keypress', this.keypress_handler);
|
158 |
+
}.bind(this));
|
159 |
+
}
|
160 |
+
|
161 |
+
},
|
162 |
+
|
163 |
+
resetPopup: function() {
|
164 |
+
this.login_table.show();
|
165 |
+
this.forgot_password_table.show();
|
166 |
+
|
167 |
+
this.login_loading.hide();
|
168 |
+
this.forgot_password_loading.hide();
|
169 |
+
|
170 |
+
this.login_error.hide();
|
171 |
+
this.forgot_password_error.hide();
|
172 |
+
|
173 |
+
this.login_container.show();
|
174 |
+
this.forgot_password_container.hide();
|
175 |
+
},
|
176 |
+
|
177 |
+
showLoginError: function(error) {
|
178 |
+
this.login_table.show();
|
179 |
+
this.login_error.show();
|
180 |
+
this.login_loading.hide();
|
181 |
+
|
182 |
+
if(error) {
|
183 |
+
this.login_error.update(error);
|
184 |
+
}
|
185 |
+
},
|
186 |
+
|
187 |
+
showLoginLoading: function() {
|
188 |
+
this.login_table.hide();
|
189 |
+
this.login_loading.show();
|
190 |
+
this.login_error.hide();
|
191 |
+
},
|
192 |
+
|
193 |
+
showForgotPasswordSuccess: function() {
|
194 |
+
this.forgot_password_error.hide();
|
195 |
+
this.forgot_password_loading.hide();
|
196 |
+
this.forgot_password_table.hide();
|
197 |
+
this.forgot_password_success.show();
|
198 |
+
},
|
199 |
+
|
200 |
+
showForgotPasswordError: function() {
|
201 |
+
this.forgot_password_error.show();
|
202 |
+
this.forgot_password_error.update(
|
203 |
+
this.options.translations.email_not_found),
|
204 |
+
|
205 |
+
this.forgot_password_table.show();
|
206 |
+
this.forgot_password_loading.hide();
|
207 |
+
},
|
208 |
+
|
209 |
+
showForgotPasswordLoading: function() {
|
210 |
+
this.forgot_password_loading.show();
|
211 |
+
this.forgot_password_error.hide();
|
212 |
+
this.forgot_password_table.hide();
|
213 |
+
},
|
214 |
+
|
215 |
+
show: function(){
|
216 |
+
this.popup.open();
|
217 |
+
},
|
218 |
+
|
219 |
+
createPopup: function() {
|
220 |
+
this.popup = new Control.Modal(this.popup_container, {
|
221 |
+
overlayOpacity: 0.65,
|
222 |
+
fade: true,
|
223 |
+
fadeDuration: 0.3,
|
224 |
+
position: 'center_once'
|
225 |
+
});
|
226 |
+
}
|
227 |
+
});
|
228 |
+
|
229 |
+
function $RF(el, radioGroup) {
|
230 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
231 |
+
var radioGroup = $(el).name;
|
232 |
+
var el = $(el).form;
|
233 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
|
237 |
+
var checked = $(el).getInputs('radio', radioGroup).find(
|
238 |
+
function(re) {return re.checked;}
|
239 |
+
);
|
240 |
+
return (checked) ? $F(checked) : null;
|
241 |
+
}
|
242 |
+
|
243 |
+
function $RFF(el, radioGroup) {
|
244 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
245 |
+
var radioGroup = $(el).name;
|
246 |
+
var el = $(el).form;
|
247 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
248 |
+
return false;
|
249 |
+
}
|
250 |
+
return $(el).getInputs('radio', radioGroup).first();
|
251 |
+
}
|
252 |
+
|
253 |
+
function get_totals_element()
|
254 |
+
{
|
255 |
+
// Search for OSC summary element
|
256 |
+
var search_osc = $$('div.onestepcheckout-summary');
|
257 |
+
|
258 |
+
if(search_osc.length > 0) {
|
259 |
+
return search_osc[0];
|
260 |
+
}
|
261 |
+
|
262 |
+
var search_cart = $$('div.shopping-cart-totals');
|
263 |
+
|
264 |
+
if(search_cart.length > 0) {
|
265 |
+
return search_cart[0];
|
266 |
+
}
|
267 |
+
|
268 |
+
if($('shopping-cart-totals-table')) {
|
269 |
+
return $('shopping-cart-totals-table');
|
270 |
+
}
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
function get_save_methods_function(url, update_payments)
|
275 |
+
{
|
276 |
+
|
277 |
+
if(typeof update_payments == 'undefined') {
|
278 |
+
var update_payments = false;
|
279 |
+
}
|
280 |
+
return function(e) {
|
281 |
+
|
282 |
+
if(typeof e != 'undefined') {
|
283 |
+
var element = e.element();
|
284 |
+
|
285 |
+
if(element.name != 'shipping_method') {
|
286 |
+
update_payments = false;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
var form = $('onestepcheckout-form');
|
291 |
+
var shipping_method = $RF(form, 'shipping_method');
|
292 |
+
var payment_method = $RF(form, 'payment[method]');
|
293 |
+
|
294 |
+
var totals = get_totals_element();
|
295 |
+
totals.update('<div class="loading-ajax"> </div>');
|
296 |
+
|
297 |
+
if(update_payments) {
|
298 |
+
var payment_methods = $$('div.payment-methods')[0];
|
299 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
300 |
+
}
|
301 |
+
|
302 |
+
var parameters = {
|
303 |
+
shipping_method: shipping_method,
|
304 |
+
payment_method: payment_method
|
305 |
+
}
|
306 |
+
|
307 |
+
/* Find payment parameters and include */
|
308 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
309 |
+
var names = items.pluck('name');
|
310 |
+
var values = items.pluck('value');
|
311 |
+
|
312 |
+
for(var x=0; x < names.length; x++) {
|
313 |
+
if(names[x] != 'payment[method]') {
|
314 |
+
parameters[names[x]] = values[x];
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
new Ajax.Request(url, {
|
319 |
+
method: 'post',
|
320 |
+
onSuccess: function(transport) {
|
321 |
+
if(transport.status == 200) {
|
322 |
+
var data = transport.responseText.evalJSON();
|
323 |
+
|
324 |
+
totals.update(data.summary);
|
325 |
+
|
326 |
+
if(update_payments) {
|
327 |
+
|
328 |
+
payment_methods.replace(data.payment_method);
|
329 |
+
|
330 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
331 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
332 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
333 |
+
|
334 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
335 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
336 |
+
new Effect.Fade(item);
|
337 |
+
});
|
338 |
+
});
|
339 |
+
|
340 |
+
if($RF(form, 'payment[method]') != null) {
|
341 |
+
try {
|
342 |
+
var payment_method = $RF(form, 'payment[method]');
|
343 |
+
$('container_payment_method_' + payment_method).show();
|
344 |
+
$('payment_form_' + payment_method).show();
|
345 |
+
} catch(err) {
|
346 |
+
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
}
|
351 |
+
}
|
352 |
+
},
|
353 |
+
parameters: parameters
|
354 |
+
});
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
+
function exclude_unchecked_checkboxes(data)
|
359 |
+
{
|
360 |
+
var items = [];
|
361 |
+
for(var x=0; x < data.length; x++) {
|
362 |
+
var item = data[x];
|
363 |
+
if(item.type == 'checkbox') {
|
364 |
+
if(item.checked) {
|
365 |
+
items.push(item);
|
366 |
+
}
|
367 |
+
}
|
368 |
+
else {
|
369 |
+
items.push(item);
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
return items;
|
374 |
+
}
|
375 |
+
|
376 |
+
function get_save_billing_function(url, set_methods_url, update_payments, triggered)
|
377 |
+
{
|
378 |
+
if(typeof update_payments == 'undefined') {
|
379 |
+
var update_payments = false;
|
380 |
+
}
|
381 |
+
|
382 |
+
if(typeof triggered == 'undefined') {
|
383 |
+
var triggered = true;
|
384 |
+
}
|
385 |
+
|
386 |
+
if(!triggered){
|
387 |
+
return function(){return;};
|
388 |
+
}
|
389 |
+
|
390 |
+
return function() {
|
391 |
+
var form = $('onestepcheckout-form');
|
392 |
+
var items = exclude_unchecked_checkboxes($$('input[name^=billing]').concat($$('select[name^=billing]')));
|
393 |
+
var names = items.pluck('name');
|
394 |
+
var values = items.pluck('value');
|
395 |
+
var parameters = {
|
396 |
+
shipping_method: $RF(form, 'shipping_method')
|
397 |
+
};
|
398 |
+
|
399 |
+
|
400 |
+
var street_count = 0;
|
401 |
+
for(var x=0; x < names.length; x++) {
|
402 |
+
if(names[x] != 'payment[method]') {
|
403 |
+
|
404 |
+
var current_name = names[x];
|
405 |
+
|
406 |
+
if(names[x] == 'billing[street][]') {
|
407 |
+
current_name = 'billing[street][' + street_count + ']';
|
408 |
+
street_count = street_count + 1;
|
409 |
+
}
|
410 |
+
|
411 |
+
parameters[current_name] = values[x];
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
var use_for_shipping = $('billing:use_for_shipping_yes');
|
416 |
+
|
417 |
+
|
418 |
+
|
419 |
+
|
420 |
+
if(use_for_shipping && use_for_shipping.getValue() != '1') {
|
421 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
422 |
+
var shipping_names = items.pluck('name');
|
423 |
+
var shipping_values = items.pluck('value');
|
424 |
+
var shipping_parameters = {};
|
425 |
+
var street_count = 0;
|
426 |
+
|
427 |
+
for(var x=0; x < shipping_names.length; x++) {
|
428 |
+
if(shipping_names[x] != 'shipping_method') {
|
429 |
+
var current_name = shipping_names[x];
|
430 |
+
if(shipping_names[x] == 'shipping[street][]') {
|
431 |
+
current_name = 'shipping[street][' + street_count + ']';
|
432 |
+
street_count = street_count + 1;
|
433 |
+
}
|
434 |
+
|
435 |
+
parameters[current_name] = shipping_values[x];
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
var shipment_methods = $$('div.onestepcheckout-shipping-method-block')[0];
|
441 |
+
var shipment_methods_found = false;
|
442 |
+
|
443 |
+
if(typeof shipment_methods != 'undefined') {
|
444 |
+
shipment_methods_found = true;
|
445 |
+
}
|
446 |
+
|
447 |
+
if(shipment_methods_found) {
|
448 |
+
shipment_methods.update('<div class="loading-ajax"> </div>');
|
449 |
+
}
|
450 |
+
|
451 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
452 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
453 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
454 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
455 |
+
var payment_method = $RF(form, 'payment[method]');
|
456 |
+
parameters['payment_method'] = payment_method;
|
457 |
+
parameters['payment[method]'] = payment_method;
|
458 |
+
|
459 |
+
if(update_payments){
|
460 |
+
var payment_methods = $$('div.payment-methods')[0];
|
461 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
462 |
+
}
|
463 |
+
|
464 |
+
var totals = get_totals_element();
|
465 |
+
totals.update('<div class="loading-ajax"> </div>');
|
466 |
+
|
467 |
+
|
468 |
+
new Ajax.Request(url, {
|
469 |
+
method: 'post',
|
470 |
+
onSuccess: function(transport) {
|
471 |
+
if(transport.status == 200) {
|
472 |
+
|
473 |
+
var data = transport.responseText.evalJSON();
|
474 |
+
|
475 |
+
// Update shipment methods
|
476 |
+
if(shipment_methods_found) {
|
477 |
+
shipment_methods.update(data.shipping_method);
|
478 |
+
}
|
479 |
+
|
480 |
+
if(update_payments){
|
481 |
+
payment_methods.replace(data.payment_method);
|
482 |
+
}
|
483 |
+
|
484 |
+
totals.update(data.summary);
|
485 |
+
|
486 |
+
|
487 |
+
}
|
488 |
+
},
|
489 |
+
onComplete: function(transport){
|
490 |
+
if(transport.status == 200) {
|
491 |
+
if(shipment_methods_found) {
|
492 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url, update_payments));
|
493 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
494 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
495 |
+
new Effect.Fade(item);
|
496 |
+
});
|
497 |
+
});
|
498 |
+
}
|
499 |
+
|
500 |
+
if(update_payments){
|
501 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url));
|
502 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
503 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
504 |
+
|
505 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
506 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
507 |
+
new Effect.Fade(item);
|
508 |
+
});
|
509 |
+
});
|
510 |
+
|
511 |
+
if($RF(form, 'payment[method]') != null) {
|
512 |
+
try {
|
513 |
+
var payment_method = $RF(form, 'payment[method]');
|
514 |
+
$('container_payment_method_' + payment_method).show();
|
515 |
+
var payment_form = $('payment_form_' + payment_method);
|
516 |
+
if(payment_form)
|
517 |
+
$(payment_form).show();
|
518 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
519 |
+
// set sub payment method back
|
520 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
521 |
+
|
522 |
+
// check if ideal payment bank is chosen
|
523 |
+
if(payment_hpp_type == "ideal") {
|
524 |
+
if(payment_hpp_ideal_type) {
|
525 |
+
// get issue_id this is before the slash
|
526 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
527 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
528 |
+
}
|
529 |
+
$('payment_form_ideal').show();
|
530 |
+
}
|
531 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
532 |
+
// set sub payment method back
|
533 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
534 |
+
// set back the cvc code
|
535 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
536 |
+
// show the cvc code block
|
537 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
538 |
+
$(cvc_block).show();
|
539 |
+
}
|
540 |
+
} catch(err) {
|
541 |
+
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
},
|
547 |
+
parameters: parameters
|
548 |
+
});
|
549 |
+
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
function get_separate_save_methods_function(url, update_payments)
|
554 |
+
{
|
555 |
+
if(typeof update_payments == 'undefined') {
|
556 |
+
var update_payments = false;
|
557 |
+
}
|
558 |
+
|
559 |
+
return function(e) {
|
560 |
+
if(typeof e != 'undefined') {
|
561 |
+
var element = e.element();
|
562 |
+
|
563 |
+
if(element.name != 'shipping_method') {
|
564 |
+
update_payments = false;
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
var form = $('onestepcheckout-form');
|
569 |
+
var shipping_method = $RF(form, 'shipping_method');
|
570 |
+
var payment_method = $RF(form, 'payment[method]');
|
571 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
572 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
573 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
574 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
575 |
+
|
576 |
+
var totals = get_totals_element();
|
577 |
+
|
578 |
+
var freeMethod = $('p_method_free');
|
579 |
+
if(freeMethod){
|
580 |
+
payment.reloadcallback = true;
|
581 |
+
payment.countreload = 1;
|
582 |
+
}
|
583 |
+
|
584 |
+
totals.update('<div class="loading-ajax"> </div>');
|
585 |
+
|
586 |
+
if(update_payments) {
|
587 |
+
var payment_methods = $$('div.payment-methods')[0];
|
588 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
589 |
+
}
|
590 |
+
|
591 |
+
var parameters = {
|
592 |
+
shipping_method: shipping_method,
|
593 |
+
payment_method: payment_method
|
594 |
+
}
|
595 |
+
|
596 |
+
/* Find payment parameters and include */
|
597 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
598 |
+
var names = items.pluck('name');
|
599 |
+
var values = items.pluck('value');
|
600 |
+
|
601 |
+
for(var x=0; x < names.length; x++) {
|
602 |
+
if(names[x] != 'payment[method]') {
|
603 |
+
parameters[names[x]] = values[x];
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
new Ajax.Request(url, {
|
608 |
+
method: 'post',
|
609 |
+
onSuccess: function(transport) {
|
610 |
+
if(transport.status == 200) {
|
611 |
+
var data = transport.responseText.evalJSON();
|
612 |
+
var form = $('onestepcheckout-form');
|
613 |
+
|
614 |
+
totals.update(data.summary);
|
615 |
+
|
616 |
+
if(update_payments) {
|
617 |
+
|
618 |
+
payment_methods.replace(data.payment_method);
|
619 |
+
|
620 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
621 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
622 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
623 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
624 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
625 |
+
new Effect.Fade(item);
|
626 |
+
});
|
627 |
+
});
|
628 |
+
|
629 |
+
if($RF($('onestepcheckout-form'), 'payment[method]') != null) {
|
630 |
+
try {
|
631 |
+
var payment_method = $RF(form, 'payment[method]');
|
632 |
+
$('container_payment_method_' + payment_method).show();
|
633 |
+
var payment_form = $('payment_form_' + payment_method);
|
634 |
+
if(payment_form)
|
635 |
+
$(payment_form).show();
|
636 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
637 |
+
// set sub payment method back
|
638 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
639 |
+
|
640 |
+
// check if ideal payment bank is chosen
|
641 |
+
if(payment_hpp_type == "ideal") {
|
642 |
+
if(payment_hpp_ideal_type) {
|
643 |
+
// get issue_id this is before the slash
|
644 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
645 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
646 |
+
}
|
647 |
+
$('payment_form_ideal').show();
|
648 |
+
}
|
649 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
650 |
+
// set sub payment method back
|
651 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
652 |
+
// set back the cvc code
|
653 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
654 |
+
// show the cvc code block
|
655 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
656 |
+
$(cvc_block).show();
|
657 |
+
// show update link url
|
658 |
+
var update_link = "update-expiration-date-" + payment_recurring_type;
|
659 |
+
$(update_link).show();
|
660 |
+
}
|
661 |
+
} catch(err) {
|
662 |
+
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
},
|
668 |
+
parameters: parameters
|
669 |
+
});
|
670 |
+
}
|
671 |
+
}
|
672 |
+
|
673 |
+
function paymentrefresh(url) {
|
674 |
+
var payment_methods = $$('div.payment-methods')[0];
|
675 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
676 |
+
new Ajax.Request(url, {
|
677 |
+
method: 'get',
|
678 |
+
onSuccess: function(transport){
|
679 |
+
if(transport.status == 200) {
|
680 |
+
var data = transport.responseText.evalJSON();
|
681 |
+
payment_methods.replace(data.payment_method);
|
682 |
+
|
683 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
684 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', function() {
|
685 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
686 |
+
new Effect.Fade(item);
|
687 |
+
});
|
688 |
+
});
|
689 |
+
|
690 |
+
if($RF(form, 'payment[method]') != null) {
|
691 |
+
try {
|
692 |
+
var payment_method = $RF(form, 'payment[method]');
|
693 |
+
$('container_payment_method_' + payment_method).show();
|
694 |
+
$('payment_form_' + payment_method).show();
|
695 |
+
} catch(err){}
|
696 |
+
}
|
697 |
+
|
698 |
+
}
|
699 |
+
}
|
700 |
+
});
|
701 |
+
}
|
702 |
+
|
703 |
+
function addressPreview(templates, target) {
|
704 |
+
var bparams = {};
|
705 |
+
var sparams = {};
|
706 |
+
var savedBillingItems = $('billing-address-select');
|
707 |
+
if(savedBillingItems && savedBillingItems.getValue()){
|
708 |
+
index = savedBillingItems.selectedIndex;
|
709 |
+
bparams = customerBAddresses[index];
|
710 |
+
} else {
|
711 |
+
var items = $$('input[name^=billing]').concat($$('select[name^=billing]'));
|
712 |
+
items.each(function(s) {
|
713 |
+
if(s.getStyle('display') != 'none'){
|
714 |
+
selectText = s.options
|
715 |
+
if(selectText){
|
716 |
+
value = selectText[s.selectedIndex].text;
|
717 |
+
} else {
|
718 |
+
value = s.getValue();
|
719 |
+
}
|
720 |
+
if(value){
|
721 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
722 |
+
}
|
723 |
+
if(s.id == 'billing:region_id'){
|
724 |
+
bparams['billing:region'] = value;
|
725 |
+
} else {
|
726 |
+
bparams[s.id] = value;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
});
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
|
734 |
+
var savedShippingItems = $('shipping-address-select');
|
735 |
+
if(savedShippingItems && savedShippingItems.getValue()){
|
736 |
+
index = savedShippingItems.selectedIndex;
|
737 |
+
sparams = customerSAddresses[index];
|
738 |
+
} else {
|
739 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
740 |
+
items.each(function(s) {
|
741 |
+
if(s.getStyle('display') != 'none'){
|
742 |
+
selectText = s.options
|
743 |
+
if(selectText){
|
744 |
+
value = selectText[s.selectedIndex].text;
|
745 |
+
} else {
|
746 |
+
value = s.getValue();
|
747 |
+
}
|
748 |
+
if(value){
|
749 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
750 |
+
}
|
751 |
+
if(s.id == 'shipping:region_id'){
|
752 |
+
sparams['shipping:region'] = value;
|
753 |
+
} else {
|
754 |
+
sparams[s.id] = value;
|
755 |
+
}
|
756 |
+
}
|
757 |
+
});
|
758 |
+
}
|
759 |
+
|
760 |
+
|
761 |
+
var form = $('onestepcheckout-form');
|
762 |
+
|
763 |
+
var shipping_method = $RF(form, 'shipping_method');
|
764 |
+
if(shipping_method){
|
765 |
+
var shipping_label = $('s_method_' + shipping_method).up('dt').down('label').innerHTML.stripScripts();
|
766 |
+
var shipping_title = $('s_method_' + shipping_method).up('dt').previous('dd').innerHTML.stripScripts();
|
767 |
+
var shipping_row = shipping_title + ' - ' + shipping_label
|
768 |
+
}
|
769 |
+
|
770 |
+
var useOnlyBilling = $('billing:use_for_shipping_yes').getValue();
|
771 |
+
billinga_template = new Template(templates.billing);
|
772 |
+
|
773 |
+
if(useOnlyBilling){
|
774 |
+
shippinga_template = new Template(templates.billing);
|
775 |
+
}else{
|
776 |
+
shippinga_template = new Template(templates.shipping);
|
777 |
+
}
|
778 |
+
|
779 |
+
var payment_method = payment.currentMethod;
|
780 |
+
|
781 |
+
if(payment_method){
|
782 |
+
var payment_label = $('p_method_'+payment_method).up('dt').down('label').innerHTML.stripScripts();
|
783 |
+
}
|
784 |
+
|
785 |
+
var targetelem = $(target + '_billinga').childElements()[1];
|
786 |
+
if(targetelem){
|
787 |
+
targetelem.update(billinga_template.evaluate(bparams));
|
788 |
+
}
|
789 |
+
|
790 |
+
var targetelem = $(target + '_shippinga').childElements()[1];
|
791 |
+
if(targetelem){
|
792 |
+
if(useOnlyBilling){
|
793 |
+
targetelem.update(shippinga_template.evaluate(bparams));
|
794 |
+
}else{
|
795 |
+
targetelem.update(shippinga_template.evaluate(sparams));
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
var targetelem = $(target + '_shipping').childElements()[1];
|
800 |
+
if(targetelem){
|
801 |
+
targetelem.update(shipping_row);
|
802 |
+
}
|
803 |
+
|
804 |
+
var targetelem = $(target + '_payment').childElements()[1];
|
805 |
+
if(targetelem){
|
806 |
+
targetelem.update(payment_label);
|
807 |
+
}
|
808 |
+
|
809 |
+
var targetelem = $(target + '_summary').childElements()[1];
|
810 |
+
if(targetelem){
|
811 |
+
targetelem.update('');
|
812 |
+
targetelem.insert($$('table.onestepcheckout-summary')[0].cloneNode(true));
|
813 |
+
targetelem.insert($$('table.onestepcheckout-totals')[0].cloneNode(true));
|
814 |
+
}
|
815 |
+
}
|
816 |
+
|
817 |
+
|
818 |
+
var Checkout = Class.create();
|
819 |
+
Checkout.prototype = {
|
820 |
+
initialize: function(){
|
821 |
+
this.accordion = '';
|
822 |
+
this.progressUrl = '';
|
823 |
+
this.reviewUrl = '';
|
824 |
+
this.saveMethodUrl = '';
|
825 |
+
this.failureUrl = '';
|
826 |
+
this.billingForm = false;
|
827 |
+
this.shippingForm= false;
|
828 |
+
this.syncBillingShipping = false;
|
829 |
+
this.method = '';
|
830 |
+
this.payment = '';
|
831 |
+
this.loadWaiting = false;
|
832 |
+
},
|
833 |
+
|
834 |
+
ajaxFailure: function(){
|
835 |
+
location.href = this.failureUrl;
|
836 |
+
},
|
837 |
+
|
838 |
+
setLoadWaiting: function(step, keepDisabled) {
|
839 |
+
return true
|
840 |
+
}
|
841 |
+
};
|
842 |
+
|
843 |
+
//billing
|
844 |
+
var Billing = Class.create();
|
845 |
+
Billing.prototype = {
|
846 |
+
initialize: function(form, addressUrl, saveUrl){
|
847 |
+
this.form = form;
|
848 |
+
},
|
849 |
+
|
850 |
+
setAddress: function(addressId){
|
851 |
+
|
852 |
+
},
|
853 |
+
|
854 |
+
newAddress: function(isNew){
|
855 |
+
if (isNew) {
|
856 |
+
//this.resetSelectedAddress();
|
857 |
+
Element.show('billing_address_list');
|
858 |
+
if($('billing:use_for_shipping_yes').getValue() != "1" && $('shipping-address-select').getValue() == ''){
|
859 |
+
Element.show('shipping_address_list');
|
860 |
+
}
|
861 |
+
|
862 |
+
} else {
|
863 |
+
Element.hide('billing_address_list');
|
864 |
+
}
|
865 |
+
$$('input[name^=billing]', 'select[id=billing:region_id]').each(function(e){
|
866 |
+
if(e.name=='billing[use_for_shipping]' || e.name=='billing[save_in_address_book]'){
|
867 |
+
|
868 |
+
} else {
|
869 |
+
e.value = '';
|
870 |
+
}
|
871 |
+
});
|
872 |
+
},
|
873 |
+
|
874 |
+
resetSelectedAddress: function(){
|
875 |
+
var selectElement = $('shipping-address-select')
|
876 |
+
if (selectElement) {
|
877 |
+
selectElement.value='';
|
878 |
+
}
|
879 |
+
},
|
880 |
+
|
881 |
+
fillForm: function(transport){
|
882 |
+
|
883 |
+
},
|
884 |
+
|
885 |
+
setUseForShipping: function(flag) {
|
886 |
+
|
887 |
+
},
|
888 |
+
|
889 |
+
save: function(){
|
890 |
+
|
891 |
+
},
|
892 |
+
|
893 |
+
resetLoadWaiting: function(transport){
|
894 |
+
|
895 |
+
},
|
896 |
+
|
897 |
+
nextStep: function(transport){
|
898 |
+
|
899 |
+
}
|
900 |
+
};
|
901 |
+
|
902 |
+
//shipping
|
903 |
+
var Shipping = Class.create();
|
904 |
+
Shipping.prototype = {
|
905 |
+
initialize: function(form){
|
906 |
+
this.form = form;
|
907 |
+
},
|
908 |
+
|
909 |
+
setAddress: function(addressId){
|
910 |
+
|
911 |
+
},
|
912 |
+
|
913 |
+
newAddress: function(isNew){
|
914 |
+
if (isNew) {
|
915 |
+
this.resetSelectedAddress();
|
916 |
+
Element.show('shipping_address_list');
|
917 |
+
} else {
|
918 |
+
Element.hide('shipping_address_list');
|
919 |
+
}
|
920 |
+
|
921 |
+
$$('#shipping_address input[name^=shipping],#shipping_address select[id=shipping:region_id]').each(function(e){
|
922 |
+
if(e.name=='shipping[save_in_address_book]'){
|
923 |
+
|
924 |
+
} else {
|
925 |
+
e.value = '';
|
926 |
+
}
|
927 |
+
})
|
928 |
+
|
929 |
+
},
|
930 |
+
|
931 |
+
resetSelectedAddress: function(){
|
932 |
+
var selectElement = $('shipping-address-select')
|
933 |
+
if (selectElement) {
|
934 |
+
selectElement.value='';
|
935 |
+
}
|
936 |
+
},
|
937 |
+
|
938 |
+
fillForm: function(transport){
|
939 |
+
|
940 |
+
},
|
941 |
+
|
942 |
+
setSameAsBilling: function(flag) {
|
943 |
+
|
944 |
+
},
|
945 |
+
|
946 |
+
syncWithBilling: function () {
|
947 |
+
|
948 |
+
},
|
949 |
+
|
950 |
+
setRegionValue: function(){
|
951 |
+
//$('shipping:region').value = $('billing:region').value;
|
952 |
+
},
|
953 |
+
|
954 |
+
save: function(){
|
955 |
+
|
956 |
+
}
|
957 |
+
};
|
958 |
+
|
959 |
+
//payment object
|
960 |
+
var Payment = Class.create();
|
961 |
+
Payment.prototype = {
|
962 |
+
beforeInitFunc:$H({}),
|
963 |
+
afterInitFunc:$H({}),
|
964 |
+
beforeValidateFunc:$H({}),
|
965 |
+
afterValidateFunc:$H({}),
|
966 |
+
initialize: function(form, saveUrl){
|
967 |
+
this.form = form;
|
968 |
+
this.saveUrl = saveUrl;
|
969 |
+
},
|
970 |
+
|
971 |
+
init : function () {
|
972 |
+
var elements = Form.getElements(this.form);
|
973 |
+
if ($(this.form)) {
|
974 |
+
//$(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
|
975 |
+
}
|
976 |
+
var method = null;
|
977 |
+
for (var i=0; i<elements.length; i++) {
|
978 |
+
if (elements[i].name=='payment[method]') {
|
979 |
+
if (elements[i].checked) {
|
980 |
+
method = elements[i].value;
|
981 |
+
}
|
982 |
+
} else {
|
983 |
+
elements[i].disabled = true;
|
984 |
+
}
|
985 |
+
}
|
986 |
+
if (method) this.switchMethod(method);
|
987 |
+
},
|
988 |
+
|
989 |
+
switchMethod: function(method){
|
990 |
+
if (this.currentMethod && $('payment_form_'+this.currentMethod)) {
|
991 |
+
var form = $('payment_form_'+this.currentMethod);
|
992 |
+
form.style.display = 'none';
|
993 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
994 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = true;
|
995 |
+
}
|
996 |
+
|
997 |
+
if ($('payment_form_'+method)){
|
998 |
+
var form = $('payment_form_'+method);
|
999 |
+
form.style.display = '';
|
1000 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
1001 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
1002 |
+
this.currentMethod = method;
|
1003 |
+
}
|
1004 |
+
},
|
1005 |
+
|
1006 |
+
addBeforeValidateFunction : function(code, func) {
|
1007 |
+
this.beforeValidateFunc.set(code, func);
|
1008 |
+
},
|
1009 |
+
|
1010 |
+
beforeValidate : function() {
|
1011 |
+
var validateResult = true;
|
1012 |
+
var hasValidation = false;
|
1013 |
+
(this.beforeValidateFunc).each(function(validate){
|
1014 |
+
hasValidation = true;
|
1015 |
+
if ((validate.value)() == false) {
|
1016 |
+
validateResult = false;
|
1017 |
+
}
|
1018 |
+
}.bind(this));
|
1019 |
+
if (!hasValidation) {
|
1020 |
+
validateResult = false;
|
1021 |
+
}
|
1022 |
+
return validateResult;
|
1023 |
+
},
|
1024 |
+
|
1025 |
+
validate: function() {
|
1026 |
+
var methods = document.getElementsByName('payment[method]');
|
1027 |
+
if (methods.length==0) {
|
1028 |
+
alert(Translator.translate('Your order can not be completed at this time as there is no payment methods available for it.'));
|
1029 |
+
return false;
|
1030 |
+
}
|
1031 |
+
for (var i=0; i<methods.length; i++) {
|
1032 |
+
if (methods[i].checked) {
|
1033 |
+
return true;
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
alert(Translator.translate('Please specify payment method.'));
|
1037 |
+
return false;
|
1038 |
+
},
|
1039 |
+
|
1040 |
+
save: function(){
|
1041 |
+
},
|
1042 |
+
addAfterInitFunction : function(code, func) {
|
1043 |
+
this.afterInitFunc.set(code, func);
|
1044 |
+
},
|
1045 |
+
|
1046 |
+
afterInit : function() {
|
1047 |
+
(this.afterInitFunc).each(function(init){
|
1048 |
+
(init.value)();
|
1049 |
+
});
|
1050 |
+
}
|
1051 |
+
};
|
@@ -0,0 +1,1051 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
|
2 |
+
|
3 |
+
/* Login popup class */
|
4 |
+
var OneStepCheckoutLoginPopup = Class.create({
|
5 |
+
initialize: function(options) {
|
6 |
+
this.options = options;
|
7 |
+
this.popup_container = $('onestepcheckout-login-popup');
|
8 |
+
this.popup_link = $('onestepcheckout-login-link');
|
9 |
+
this.popup = null;
|
10 |
+
this.createPopup();
|
11 |
+
this.mode = 'login';
|
12 |
+
|
13 |
+
this.forgot_password_link = $('onestepcheckout-forgot-password-link');
|
14 |
+
this.forgot_password_container = $('onestepcheckout-login-popup-contents-forgot');
|
15 |
+
this.forgot_password_loading = $('onestepcheckout-forgot-loading');
|
16 |
+
this.forgot_password_error = $('onestepcheckout-forgot-error');
|
17 |
+
this.forgot_password_success = $('onestepcheckout-forgot-success');
|
18 |
+
this.forgot_password_button = $('onestepcheckout-forgot-button');
|
19 |
+
this.forgot_password_table = $('onestepcheckout-forgot-table');
|
20 |
+
|
21 |
+
this.login_link = $('onestepcheckout-return-login-link');
|
22 |
+
this.login_container = $('onestepcheckout-login-popup-contents-login');
|
23 |
+
this.login_table = $('onestepcheckout-login-table');
|
24 |
+
this.login_error = $('onestepcheckout-login-error');
|
25 |
+
this.login_loading = $('onestepcheckout-login-loading');
|
26 |
+
this.login_button = $('onestepcheckout-login-button');
|
27 |
+
this.login_form = $('onestepcheckout-login-form');
|
28 |
+
this.login_username = $('id_onestepcheckout_username');
|
29 |
+
|
30 |
+
/* Bindings for the enter button */
|
31 |
+
this.keypress_handler = function(e) {
|
32 |
+
if(e.keyCode == Event.KEY_RETURN) {
|
33 |
+
e.preventDefault();
|
34 |
+
|
35 |
+
if(this.mode == 'login') {
|
36 |
+
this.login_handler();
|
37 |
+
} else if(this.mode == 'forgot') {
|
38 |
+
this.forgot_password_handler();
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}.bind(this);
|
42 |
+
|
43 |
+
this.login_handler = function(e) {
|
44 |
+
|
45 |
+
var parameters = this.login_form.serialize(true);
|
46 |
+
var url = this.options.login_url;
|
47 |
+
this.showLoginLoading();
|
48 |
+
|
49 |
+
new Ajax.Request(url, {
|
50 |
+
method: 'post',
|
51 |
+
parameters: parameters,
|
52 |
+
onSuccess: function(transport) {
|
53 |
+
var result = transport.responseText.evalJSON();
|
54 |
+
if(result.success) {
|
55 |
+
window.location = window.location;
|
56 |
+
} else {
|
57 |
+
this.showLoginError(result.error);
|
58 |
+
}
|
59 |
+
}.bind(this)
|
60 |
+
});
|
61 |
+
};
|
62 |
+
|
63 |
+
this.forgot_password_handler = function(e) {
|
64 |
+
var email = $('id_onestepcheckout_email').getValue();
|
65 |
+
|
66 |
+
if(email == '') {
|
67 |
+
alert(this.options.translations.invalid_email);
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
this.showForgotPasswordLoading();
|
72 |
+
|
73 |
+
/* Prepare AJAX call */
|
74 |
+
var url = this.options.forgot_password_url;
|
75 |
+
|
76 |
+
new Ajax.Request(url, {
|
77 |
+
method: 'post',
|
78 |
+
parameters: { email: email },
|
79 |
+
onSuccess: function(transport) {
|
80 |
+
var result = transport.responseText.evalJSON();
|
81 |
+
|
82 |
+
if(result.success) {
|
83 |
+
/* Show success message */
|
84 |
+
this.showForgotPasswordSuccess();
|
85 |
+
|
86 |
+
/* Pre-set username to simplify login */
|
87 |
+
this.login_username.setValue(email);
|
88 |
+
} else {
|
89 |
+
/* Show error message */
|
90 |
+
this.showForgotPasswordError();
|
91 |
+
}
|
92 |
+
|
93 |
+
}.bind(this)
|
94 |
+
});
|
95 |
+
};
|
96 |
+
|
97 |
+
this.bindEventHandlers();
|
98 |
+
},
|
99 |
+
|
100 |
+
bindEventHandlers: function() {
|
101 |
+
/* First bind the link for opening the popup */
|
102 |
+
if(this.popup_link){
|
103 |
+
this.popup_link.observe('click', function(e) {
|
104 |
+
e.preventDefault();
|
105 |
+
this.popup.open();
|
106 |
+
}.bind(this));
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Link for closing the popup */
|
110 |
+
if(this.popup_container){
|
111 |
+
this.popup_container.select('p.close a').invoke(
|
112 |
+
'observe', 'click', function(e) {
|
113 |
+
this.popup.close();
|
114 |
+
}.bind(this));
|
115 |
+
}
|
116 |
+
|
117 |
+
/* Link to switch between states */
|
118 |
+
if(this.login_link){
|
119 |
+
this.login_link.observe('click', function(e) {
|
120 |
+
e.preventDefault();
|
121 |
+
this.forgot_password_container.hide();
|
122 |
+
this.login_container.show();
|
123 |
+
this.mode = 'login';
|
124 |
+
}.bind(this));
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Link to switch between states */
|
128 |
+
if(this.forgot_password_link){
|
129 |
+
this.forgot_password_link.observe('click', function(e) {
|
130 |
+
e.preventDefault();
|
131 |
+
this.login_container.hide();
|
132 |
+
this.forgot_password_container.show();
|
133 |
+
this.mode = 'forgot';
|
134 |
+
}.bind(this));
|
135 |
+
}
|
136 |
+
|
137 |
+
/* Now bind the submit button for logging in */
|
138 |
+
if(this.login_button){
|
139 |
+
this.login_button.observe(
|
140 |
+
'click', this.login_handler.bind(this));
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Now bind the submit button for forgotten password */
|
144 |
+
if(this.forgot_password_button){
|
145 |
+
this.forgot_password_button.observe('click',
|
146 |
+
this.forgot_password_handler.bind(this));
|
147 |
+
}
|
148 |
+
|
149 |
+
/* Handle return keypress when open */
|
150 |
+
if(this.popup){
|
151 |
+
this.popup.observe('afterOpen', function(e) {
|
152 |
+
document.observe('keypress', this.keypress_handler);
|
153 |
+
}.bind(this));
|
154 |
+
|
155 |
+
this.popup.observe('afterClose', function(e) {
|
156 |
+
this.resetPopup();
|
157 |
+
document.stopObserving('keypress', this.keypress_handler);
|
158 |
+
}.bind(this));
|
159 |
+
}
|
160 |
+
|
161 |
+
},
|
162 |
+
|
163 |
+
resetPopup: function() {
|
164 |
+
this.login_table.show();
|
165 |
+
this.forgot_password_table.show();
|
166 |
+
|
167 |
+
this.login_loading.hide();
|
168 |
+
this.forgot_password_loading.hide();
|
169 |
+
|
170 |
+
this.login_error.hide();
|
171 |
+
this.forgot_password_error.hide();
|
172 |
+
|
173 |
+
this.login_container.show();
|
174 |
+
this.forgot_password_container.hide();
|
175 |
+
},
|
176 |
+
|
177 |
+
showLoginError: function(error) {
|
178 |
+
this.login_table.show();
|
179 |
+
this.login_error.show();
|
180 |
+
this.login_loading.hide();
|
181 |
+
|
182 |
+
if(error) {
|
183 |
+
this.login_error.update(error);
|
184 |
+
}
|
185 |
+
},
|
186 |
+
|
187 |
+
showLoginLoading: function() {
|
188 |
+
this.login_table.hide();
|
189 |
+
this.login_loading.show();
|
190 |
+
this.login_error.hide();
|
191 |
+
},
|
192 |
+
|
193 |
+
showForgotPasswordSuccess: function() {
|
194 |
+
this.forgot_password_error.hide();
|
195 |
+
this.forgot_password_loading.hide();
|
196 |
+
this.forgot_password_table.hide();
|
197 |
+
this.forgot_password_success.show();
|
198 |
+
},
|
199 |
+
|
200 |
+
showForgotPasswordError: function() {
|
201 |
+
this.forgot_password_error.show();
|
202 |
+
this.forgot_password_error.update(
|
203 |
+
this.options.translations.email_not_found),
|
204 |
+
|
205 |
+
this.forgot_password_table.show();
|
206 |
+
this.forgot_password_loading.hide();
|
207 |
+
},
|
208 |
+
|
209 |
+
showForgotPasswordLoading: function() {
|
210 |
+
this.forgot_password_loading.show();
|
211 |
+
this.forgot_password_error.hide();
|
212 |
+
this.forgot_password_table.hide();
|
213 |
+
},
|
214 |
+
|
215 |
+
show: function(){
|
216 |
+
this.popup.open();
|
217 |
+
},
|
218 |
+
|
219 |
+
createPopup: function() {
|
220 |
+
this.popup = new Control.Modal(this.popup_container, {
|
221 |
+
overlayOpacity: 0.65,
|
222 |
+
fade: true,
|
223 |
+
fadeDuration: 0.3,
|
224 |
+
position: 'center_once'
|
225 |
+
});
|
226 |
+
}
|
227 |
+
});
|
228 |
+
|
229 |
+
function $RF(el, radioGroup) {
|
230 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
231 |
+
var radioGroup = $(el).name;
|
232 |
+
var el = $(el).form;
|
233 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
|
237 |
+
var checked = $(el).getInputs('radio', radioGroup).find(
|
238 |
+
function(re) {return re.checked;}
|
239 |
+
);
|
240 |
+
return (checked) ? $F(checked) : null;
|
241 |
+
}
|
242 |
+
|
243 |
+
function $RFF(el, radioGroup) {
|
244 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
245 |
+
var radioGroup = $(el).name;
|
246 |
+
var el = $(el).form;
|
247 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
248 |
+
return false;
|
249 |
+
}
|
250 |
+
return $(el).getInputs('radio', radioGroup).first();
|
251 |
+
}
|
252 |
+
|
253 |
+
function get_totals_element()
|
254 |
+
{
|
255 |
+
// Search for OSC summary element
|
256 |
+
var search_osc = $$('div.onestepcheckout-summary');
|
257 |
+
|
258 |
+
if(search_osc.length > 0) {
|
259 |
+
return search_osc[0];
|
260 |
+
}
|
261 |
+
|
262 |
+
var search_cart = $$('div.shopping-cart-totals');
|
263 |
+
|
264 |
+
if(search_cart.length > 0) {
|
265 |
+
return search_cart[0];
|
266 |
+
}
|
267 |
+
|
268 |
+
if($('shopping-cart-totals-table')) {
|
269 |
+
return $('shopping-cart-totals-table');
|
270 |
+
}
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
function get_save_methods_function(url, update_payments)
|
275 |
+
{
|
276 |
+
|
277 |
+
if(typeof update_payments == 'undefined') {
|
278 |
+
var update_payments = false;
|
279 |
+
}
|
280 |
+
return function(e) {
|
281 |
+
|
282 |
+
if(typeof e != 'undefined') {
|
283 |
+
var element = e.element();
|
284 |
+
|
285 |
+
if(element.name != 'shipping_method') {
|
286 |
+
update_payments = false;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
var form = $('onestepcheckout-form');
|
291 |
+
var shipping_method = $RF(form, 'shipping_method');
|
292 |
+
var payment_method = $RF(form, 'payment[method]');
|
293 |
+
|
294 |
+
var totals = get_totals_element();
|
295 |
+
totals.update('<div class="loading-ajax"> </div>');
|
296 |
+
|
297 |
+
if(update_payments) {
|
298 |
+
var payment_methods = $$('div.payment-methods')[0];
|
299 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
300 |
+
}
|
301 |
+
|
302 |
+
var parameters = {
|
303 |
+
shipping_method: shipping_method,
|
304 |
+
payment_method: payment_method
|
305 |
+
}
|
306 |
+
|
307 |
+
/* Find payment parameters and include */
|
308 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
309 |
+
var names = items.pluck('name');
|
310 |
+
var values = items.pluck('value');
|
311 |
+
|
312 |
+
for(var x=0; x < names.length; x++) {
|
313 |
+
if(names[x] != 'payment[method]') {
|
314 |
+
parameters[names[x]] = values[x];
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
new Ajax.Request(url, {
|
319 |
+
method: 'post',
|
320 |
+
onSuccess: function(transport) {
|
321 |
+
if(transport.status == 200) {
|
322 |
+
var data = transport.responseText.evalJSON();
|
323 |
+
|
324 |
+
totals.update(data.summary);
|
325 |
+
|
326 |
+
if(update_payments) {
|
327 |
+
|
328 |
+
payment_methods.replace(data.payment_method);
|
329 |
+
|
330 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
331 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
332 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
333 |
+
|
334 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
335 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
336 |
+
new Effect.Fade(item);
|
337 |
+
});
|
338 |
+
});
|
339 |
+
|
340 |
+
if($RF(form, 'payment[method]') != null) {
|
341 |
+
try {
|
342 |
+
var payment_method = $RF(form, 'payment[method]');
|
343 |
+
$('container_payment_method_' + payment_method).show();
|
344 |
+
$('payment_form_' + payment_method).show();
|
345 |
+
} catch(err) {
|
346 |
+
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
}
|
351 |
+
}
|
352 |
+
},
|
353 |
+
parameters: parameters
|
354 |
+
});
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
+
function exclude_unchecked_checkboxes(data)
|
359 |
+
{
|
360 |
+
var items = [];
|
361 |
+
for(var x=0; x < data.length; x++) {
|
362 |
+
var item = data[x];
|
363 |
+
if(item.type == 'checkbox') {
|
364 |
+
if(item.checked) {
|
365 |
+
items.push(item);
|
366 |
+
}
|
367 |
+
}
|
368 |
+
else {
|
369 |
+
items.push(item);
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
return items;
|
374 |
+
}
|
375 |
+
|
376 |
+
function get_save_billing_function(url, set_methods_url, update_payments, triggered)
|
377 |
+
{
|
378 |
+
if(typeof update_payments == 'undefined') {
|
379 |
+
var update_payments = false;
|
380 |
+
}
|
381 |
+
|
382 |
+
if(typeof triggered == 'undefined') {
|
383 |
+
var triggered = true;
|
384 |
+
}
|
385 |
+
|
386 |
+
if(!triggered){
|
387 |
+
return function(){return;};
|
388 |
+
}
|
389 |
+
|
390 |
+
return function() {
|
391 |
+
var form = $('onestepcheckout-form');
|
392 |
+
var items = exclude_unchecked_checkboxes($$('input[name^=billing]').concat($$('select[name^=billing]')));
|
393 |
+
var names = items.pluck('name');
|
394 |
+
var values = items.pluck('value');
|
395 |
+
var parameters = {
|
396 |
+
shipping_method: $RF(form, 'shipping_method')
|
397 |
+
};
|
398 |
+
|
399 |
+
|
400 |
+
var street_count = 0;
|
401 |
+
for(var x=0; x < names.length; x++) {
|
402 |
+
if(names[x] != 'payment[method]') {
|
403 |
+
|
404 |
+
var current_name = names[x];
|
405 |
+
|
406 |
+
if(names[x] == 'billing[street][]') {
|
407 |
+
current_name = 'billing[street][' + street_count + ']';
|
408 |
+
street_count = street_count + 1;
|
409 |
+
}
|
410 |
+
|
411 |
+
parameters[current_name] = values[x];
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
var use_for_shipping = $('billing:use_for_shipping_yes');
|
416 |
+
|
417 |
+
|
418 |
+
|
419 |
+
|
420 |
+
if(use_for_shipping && use_for_shipping.getValue() != '1') {
|
421 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
422 |
+
var shipping_names = items.pluck('name');
|
423 |
+
var shipping_values = items.pluck('value');
|
424 |
+
var shipping_parameters = {};
|
425 |
+
var street_count = 0;
|
426 |
+
|
427 |
+
for(var x=0; x < shipping_names.length; x++) {
|
428 |
+
if(shipping_names[x] != 'shipping_method') {
|
429 |
+
var current_name = shipping_names[x];
|
430 |
+
if(shipping_names[x] == 'shipping[street][]') {
|
431 |
+
current_name = 'shipping[street][' + street_count + ']';
|
432 |
+
street_count = street_count + 1;
|
433 |
+
}
|
434 |
+
|
435 |
+
parameters[current_name] = shipping_values[x];
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
var shipment_methods = $$('div.onestepcheckout-shipping-method-block')[0];
|
441 |
+
var shipment_methods_found = false;
|
442 |
+
|
443 |
+
if(typeof shipment_methods != 'undefined') {
|
444 |
+
shipment_methods_found = true;
|
445 |
+
}
|
446 |
+
|
447 |
+
if(shipment_methods_found) {
|
448 |
+
shipment_methods.update('<div class="loading-ajax"> </div>');
|
449 |
+
}
|
450 |
+
|
451 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
452 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
453 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
454 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
455 |
+
var payment_method = $RF(form, 'payment[method]');
|
456 |
+
parameters['payment_method'] = payment_method;
|
457 |
+
parameters['payment[method]'] = payment_method;
|
458 |
+
|
459 |
+
if(update_payments){
|
460 |
+
var payment_methods = $$('div.payment-methods')[0];
|
461 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
462 |
+
}
|
463 |
+
|
464 |
+
var totals = get_totals_element();
|
465 |
+
totals.update('<div class="loading-ajax"> </div>');
|
466 |
+
|
467 |
+
|
468 |
+
new Ajax.Request(url, {
|
469 |
+
method: 'post',
|
470 |
+
onSuccess: function(transport) {
|
471 |
+
if(transport.status == 200) {
|
472 |
+
|
473 |
+
var data = transport.responseText.evalJSON();
|
474 |
+
|
475 |
+
// Update shipment methods
|
476 |
+
if(shipment_methods_found) {
|
477 |
+
shipment_methods.update(data.shipping_method);
|
478 |
+
}
|
479 |
+
|
480 |
+
if(update_payments){
|
481 |
+
payment_methods.replace(data.payment_method);
|
482 |
+
}
|
483 |
+
|
484 |
+
totals.update(data.summary);
|
485 |
+
|
486 |
+
|
487 |
+
}
|
488 |
+
},
|
489 |
+
onComplete: function(transport){
|
490 |
+
if(transport.status == 200) {
|
491 |
+
if(shipment_methods_found) {
|
492 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url, update_payments));
|
493 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
494 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
495 |
+
new Effect.Fade(item);
|
496 |
+
});
|
497 |
+
});
|
498 |
+
}
|
499 |
+
|
500 |
+
if(update_payments){
|
501 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url));
|
502 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
503 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
504 |
+
|
505 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
506 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
507 |
+
new Effect.Fade(item);
|
508 |
+
});
|
509 |
+
});
|
510 |
+
|
511 |
+
if($RF(form, 'payment[method]') != null) {
|
512 |
+
try {
|
513 |
+
var payment_method = $RF(form, 'payment[method]');
|
514 |
+
$('container_payment_method_' + payment_method).show();
|
515 |
+
var payment_form = $('payment_form_' + payment_method);
|
516 |
+
if(payment_form)
|
517 |
+
$(payment_form).show();
|
518 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
519 |
+
// set sub payment method back
|
520 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
521 |
+
|
522 |
+
// check if ideal payment bank is chosen
|
523 |
+
if(payment_hpp_type == "ideal") {
|
524 |
+
if(payment_hpp_ideal_type) {
|
525 |
+
// get issue_id this is before the slash
|
526 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
527 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
528 |
+
}
|
529 |
+
$('payment_form_ideal').show();
|
530 |
+
}
|
531 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
532 |
+
// set sub payment method back
|
533 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
534 |
+
// set back the cvc code
|
535 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
536 |
+
// show the cvc code block
|
537 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
538 |
+
$(cvc_block).show();
|
539 |
+
}
|
540 |
+
} catch(err) {
|
541 |
+
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
},
|
547 |
+
parameters: parameters
|
548 |
+
});
|
549 |
+
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
function get_separate_save_methods_function(url, update_payments)
|
554 |
+
{
|
555 |
+
if(typeof update_payments == 'undefined') {
|
556 |
+
var update_payments = false;
|
557 |
+
}
|
558 |
+
|
559 |
+
return function(e) {
|
560 |
+
if(typeof e != 'undefined') {
|
561 |
+
var element = e.element();
|
562 |
+
|
563 |
+
if(element.name != 'shipping_method') {
|
564 |
+
update_payments = false;
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
var form = $('onestepcheckout-form');
|
569 |
+
var shipping_method = $RF(form, 'shipping_method');
|
570 |
+
var payment_method = $RF(form, 'payment[method]');
|
571 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
572 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
573 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
574 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
575 |
+
|
576 |
+
var totals = get_totals_element();
|
577 |
+
|
578 |
+
var freeMethod = $('p_method_free');
|
579 |
+
if(freeMethod){
|
580 |
+
payment.reloadcallback = true;
|
581 |
+
payment.countreload = 1;
|
582 |
+
}
|
583 |
+
|
584 |
+
totals.update('<div class="loading-ajax"> </div>');
|
585 |
+
|
586 |
+
if(update_payments) {
|
587 |
+
var payment_methods = $$('div.payment-methods')[0];
|
588 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
589 |
+
}
|
590 |
+
|
591 |
+
var parameters = {
|
592 |
+
shipping_method: shipping_method,
|
593 |
+
payment_method: payment_method
|
594 |
+
}
|
595 |
+
|
596 |
+
/* Find payment parameters and include */
|
597 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
598 |
+
var names = items.pluck('name');
|
599 |
+
var values = items.pluck('value');
|
600 |
+
|
601 |
+
for(var x=0; x < names.length; x++) {
|
602 |
+
if(names[x] != 'payment[method]') {
|
603 |
+
parameters[names[x]] = values[x];
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
new Ajax.Request(url, {
|
608 |
+
method: 'post',
|
609 |
+
onSuccess: function(transport) {
|
610 |
+
if(transport.status == 200) {
|
611 |
+
var data = transport.responseText.evalJSON();
|
612 |
+
var form = $('onestepcheckout-form');
|
613 |
+
|
614 |
+
totals.update(data.summary);
|
615 |
+
|
616 |
+
if(update_payments) {
|
617 |
+
|
618 |
+
payment_methods.replace(data.payment_method);
|
619 |
+
|
620 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
621 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
622 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
623 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
624 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
625 |
+
new Effect.Fade(item);
|
626 |
+
});
|
627 |
+
});
|
628 |
+
|
629 |
+
if($RF($('onestepcheckout-form'), 'payment[method]') != null) {
|
630 |
+
try {
|
631 |
+
var payment_method = $RF(form, 'payment[method]');
|
632 |
+
$('container_payment_method_' + payment_method).show();
|
633 |
+
var payment_form = $('payment_form_' + payment_method);
|
634 |
+
if(payment_form)
|
635 |
+
$(payment_form).show();
|
636 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
637 |
+
// set sub payment method back
|
638 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
639 |
+
|
640 |
+
// check if ideal payment bank is chosen
|
641 |
+
if(payment_hpp_type == "ideal") {
|
642 |
+
if(payment_hpp_ideal_type) {
|
643 |
+
// get issue_id this is before the slash
|
644 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
645 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
646 |
+
}
|
647 |
+
$('payment_form_ideal').show();
|
648 |
+
}
|
649 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
650 |
+
// set sub payment method back
|
651 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
652 |
+
// set back the cvc code
|
653 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
654 |
+
// show the cvc code block
|
655 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
656 |
+
$(cvc_block).show();
|
657 |
+
// show update link url
|
658 |
+
var update_link = "update-expiration-date-" + payment_recurring_type;
|
659 |
+
$(update_link).show();
|
660 |
+
}
|
661 |
+
} catch(err) {
|
662 |
+
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
},
|
668 |
+
parameters: parameters
|
669 |
+
});
|
670 |
+
}
|
671 |
+
}
|
672 |
+
|
673 |
+
function paymentrefresh(url) {
|
674 |
+
var payment_methods = $$('div.payment-methods')[0];
|
675 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
676 |
+
new Ajax.Request(url, {
|
677 |
+
method: 'get',
|
678 |
+
onSuccess: function(transport){
|
679 |
+
if(transport.status == 200) {
|
680 |
+
var data = transport.responseText.evalJSON();
|
681 |
+
payment_methods.replace(data.payment_method);
|
682 |
+
|
683 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
684 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', function() {
|
685 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
686 |
+
new Effect.Fade(item);
|
687 |
+
});
|
688 |
+
});
|
689 |
+
|
690 |
+
if($RF(form, 'payment[method]') != null) {
|
691 |
+
try {
|
692 |
+
var payment_method = $RF(form, 'payment[method]');
|
693 |
+
$('container_payment_method_' + payment_method).show();
|
694 |
+
$('payment_form_' + payment_method).show();
|
695 |
+
} catch(err){}
|
696 |
+
}
|
697 |
+
|
698 |
+
}
|
699 |
+
}
|
700 |
+
});
|
701 |
+
}
|
702 |
+
|
703 |
+
function addressPreview(templates, target) {
|
704 |
+
var bparams = {};
|
705 |
+
var sparams = {};
|
706 |
+
var savedBillingItems = $('billing-address-select');
|
707 |
+
if(savedBillingItems && savedBillingItems.getValue()){
|
708 |
+
index = savedBillingItems.selectedIndex;
|
709 |
+
bparams = customerBAddresses[index];
|
710 |
+
} else {
|
711 |
+
var items = $$('input[name^=billing]').concat($$('select[name^=billing]'));
|
712 |
+
items.each(function(s) {
|
713 |
+
if(s.getStyle('display') != 'none'){
|
714 |
+
selectText = s.options
|
715 |
+
if(selectText){
|
716 |
+
value = selectText[s.selectedIndex].text;
|
717 |
+
} else {
|
718 |
+
value = s.getValue();
|
719 |
+
}
|
720 |
+
if(value){
|
721 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
722 |
+
}
|
723 |
+
if(s.id == 'billing:region_id'){
|
724 |
+
bparams['billing:region'] = value;
|
725 |
+
} else {
|
726 |
+
bparams[s.id] = value;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
});
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
|
734 |
+
var savedShippingItems = $('shipping-address-select');
|
735 |
+
if(savedShippingItems && savedShippingItems.getValue()){
|
736 |
+
index = savedShippingItems.selectedIndex;
|
737 |
+
sparams = customerSAddresses[index];
|
738 |
+
} else {
|
739 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
740 |
+
items.each(function(s) {
|
741 |
+
if(s.getStyle('display') != 'none'){
|
742 |
+
selectText = s.options
|
743 |
+
if(selectText){
|
744 |
+
value = selectText[s.selectedIndex].text;
|
745 |
+
} else {
|
746 |
+
value = s.getValue();
|
747 |
+
}
|
748 |
+
if(value){
|
749 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
750 |
+
}
|
751 |
+
if(s.id == 'shipping:region_id'){
|
752 |
+
sparams['shipping:region'] = value;
|
753 |
+
} else {
|
754 |
+
sparams[s.id] = value;
|
755 |
+
}
|
756 |
+
}
|
757 |
+
});
|
758 |
+
}
|
759 |
+
|
760 |
+
|
761 |
+
var form = $('onestepcheckout-form');
|
762 |
+
|
763 |
+
var shipping_method = $RF(form, 'shipping_method');
|
764 |
+
if(shipping_method){
|
765 |
+
var shipping_label = $('s_method_' + shipping_method).up('dt').down('label').innerHTML.stripScripts();
|
766 |
+
var shipping_title = $('s_method_' + shipping_method).up('dt').previous('dd').innerHTML.stripScripts();
|
767 |
+
var shipping_row = shipping_title + ' - ' + shipping_label
|
768 |
+
}
|
769 |
+
|
770 |
+
var useOnlyBilling = $('billing:use_for_shipping_yes').getValue();
|
771 |
+
billinga_template = new Template(templates.billing);
|
772 |
+
|
773 |
+
if(useOnlyBilling){
|
774 |
+
shippinga_template = new Template(templates.billing);
|
775 |
+
}else{
|
776 |
+
shippinga_template = new Template(templates.shipping);
|
777 |
+
}
|
778 |
+
|
779 |
+
var payment_method = payment.currentMethod;
|
780 |
+
|
781 |
+
if(payment_method){
|
782 |
+
var payment_label = $('p_method_'+payment_method).up('dt').down('label').innerHTML.stripScripts();
|
783 |
+
}
|
784 |
+
|
785 |
+
var targetelem = $(target + '_billinga').childElements()[1];
|
786 |
+
if(targetelem){
|
787 |
+
targetelem.update(billinga_template.evaluate(bparams));
|
788 |
+
}
|
789 |
+
|
790 |
+
var targetelem = $(target + '_shippinga').childElements()[1];
|
791 |
+
if(targetelem){
|
792 |
+
if(useOnlyBilling){
|
793 |
+
targetelem.update(shippinga_template.evaluate(bparams));
|
794 |
+
}else{
|
795 |
+
targetelem.update(shippinga_template.evaluate(sparams));
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
var targetelem = $(target + '_shipping').childElements()[1];
|
800 |
+
if(targetelem){
|
801 |
+
targetelem.update(shipping_row);
|
802 |
+
}
|
803 |
+
|
804 |
+
var targetelem = $(target + '_payment').childElements()[1];
|
805 |
+
if(targetelem){
|
806 |
+
targetelem.update(payment_label);
|
807 |
+
}
|
808 |
+
|
809 |
+
var targetelem = $(target + '_summary').childElements()[1];
|
810 |
+
if(targetelem){
|
811 |
+
targetelem.update('');
|
812 |
+
targetelem.insert($$('table.onestepcheckout-summary')[0].cloneNode(true));
|
813 |
+
targetelem.insert($$('table.onestepcheckout-totals')[0].cloneNode(true));
|
814 |
+
}
|
815 |
+
}
|
816 |
+
|
817 |
+
|
818 |
+
var Checkout = Class.create();
|
819 |
+
Checkout.prototype = {
|
820 |
+
initialize: function(){
|
821 |
+
this.accordion = '';
|
822 |
+
this.progressUrl = '';
|
823 |
+
this.reviewUrl = '';
|
824 |
+
this.saveMethodUrl = '';
|
825 |
+
this.failureUrl = '';
|
826 |
+
this.billingForm = false;
|
827 |
+
this.shippingForm= false;
|
828 |
+
this.syncBillingShipping = false;
|
829 |
+
this.method = '';
|
830 |
+
this.payment = '';
|
831 |
+
this.loadWaiting = false;
|
832 |
+
},
|
833 |
+
|
834 |
+
ajaxFailure: function(){
|
835 |
+
location.href = this.failureUrl;
|
836 |
+
},
|
837 |
+
|
838 |
+
setLoadWaiting: function(step, keepDisabled) {
|
839 |
+
return true
|
840 |
+
}
|
841 |
+
};
|
842 |
+
|
843 |
+
//billing
|
844 |
+
var Billing = Class.create();
|
845 |
+
Billing.prototype = {
|
846 |
+
initialize: function(form, addressUrl, saveUrl){
|
847 |
+
this.form = form;
|
848 |
+
},
|
849 |
+
|
850 |
+
setAddress: function(addressId){
|
851 |
+
|
852 |
+
},
|
853 |
+
|
854 |
+
newAddress: function(isNew){
|
855 |
+
if (isNew) {
|
856 |
+
//this.resetSelectedAddress();
|
857 |
+
Element.show('billing_address_list');
|
858 |
+
if($('billing:use_for_shipping_yes').getValue() != "1" && $('shipping-address-select').getValue() == ''){
|
859 |
+
Element.show('shipping_address_list');
|
860 |
+
}
|
861 |
+
|
862 |
+
} else {
|
863 |
+
Element.hide('billing_address_list');
|
864 |
+
}
|
865 |
+
$$('input[name^=billing]', 'select[id=billing:region_id]').each(function(e){
|
866 |
+
if(e.name=='billing[use_for_shipping]' || e.name=='billing[save_in_address_book]'){
|
867 |
+
|
868 |
+
} else {
|
869 |
+
e.value = '';
|
870 |
+
}
|
871 |
+
});
|
872 |
+
},
|
873 |
+
|
874 |
+
resetSelectedAddress: function(){
|
875 |
+
var selectElement = $('shipping-address-select')
|
876 |
+
if (selectElement) {
|
877 |
+
selectElement.value='';
|
878 |
+
}
|
879 |
+
},
|
880 |
+
|
881 |
+
fillForm: function(transport){
|
882 |
+
|
883 |
+
},
|
884 |
+
|
885 |
+
setUseForShipping: function(flag) {
|
886 |
+
|
887 |
+
},
|
888 |
+
|
889 |
+
save: function(){
|
890 |
+
|
891 |
+
},
|
892 |
+
|
893 |
+
resetLoadWaiting: function(transport){
|
894 |
+
|
895 |
+
},
|
896 |
+
|
897 |
+
nextStep: function(transport){
|
898 |
+
|
899 |
+
}
|
900 |
+
};
|
901 |
+
|
902 |
+
//shipping
|
903 |
+
var Shipping = Class.create();
|
904 |
+
Shipping.prototype = {
|
905 |
+
initialize: function(form){
|
906 |
+
this.form = form;
|
907 |
+
},
|
908 |
+
|
909 |
+
setAddress: function(addressId){
|
910 |
+
|
911 |
+
},
|
912 |
+
|
913 |
+
newAddress: function(isNew){
|
914 |
+
if (isNew) {
|
915 |
+
this.resetSelectedAddress();
|
916 |
+
Element.show('shipping_address_list');
|
917 |
+
} else {
|
918 |
+
Element.hide('shipping_address_list');
|
919 |
+
}
|
920 |
+
|
921 |
+
$$('#shipping_address input[name^=shipping],#shipping_address select[id=shipping:region_id]').each(function(e){
|
922 |
+
if(e.name=='shipping[save_in_address_book]'){
|
923 |
+
|
924 |
+
} else {
|
925 |
+
e.value = '';
|
926 |
+
}
|
927 |
+
})
|
928 |
+
|
929 |
+
},
|
930 |
+
|
931 |
+
resetSelectedAddress: function(){
|
932 |
+
var selectElement = $('shipping-address-select')
|
933 |
+
if (selectElement) {
|
934 |
+
selectElement.value='';
|
935 |
+
}
|
936 |
+
},
|
937 |
+
|
938 |
+
fillForm: function(transport){
|
939 |
+
|
940 |
+
},
|
941 |
+
|
942 |
+
setSameAsBilling: function(flag) {
|
943 |
+
|
944 |
+
},
|
945 |
+
|
946 |
+
syncWithBilling: function () {
|
947 |
+
|
948 |
+
},
|
949 |
+
|
950 |
+
setRegionValue: function(){
|
951 |
+
//$('shipping:region').value = $('billing:region').value;
|
952 |
+
},
|
953 |
+
|
954 |
+
save: function(){
|
955 |
+
|
956 |
+
}
|
957 |
+
};
|
958 |
+
|
959 |
+
//payment object
|
960 |
+
var Payment = Class.create();
|
961 |
+
Payment.prototype = {
|
962 |
+
beforeInitFunc:$H({}),
|
963 |
+
afterInitFunc:$H({}),
|
964 |
+
beforeValidateFunc:$H({}),
|
965 |
+
afterValidateFunc:$H({}),
|
966 |
+
initialize: function(form, saveUrl){
|
967 |
+
this.form = form;
|
968 |
+
this.saveUrl = saveUrl;
|
969 |
+
},
|
970 |
+
|
971 |
+
init : function () {
|
972 |
+
var elements = Form.getElements(this.form);
|
973 |
+
if ($(this.form)) {
|
974 |
+
//$(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
|
975 |
+
}
|
976 |
+
var method = null;
|
977 |
+
for (var i=0; i<elements.length; i++) {
|
978 |
+
if (elements[i].name=='payment[method]') {
|
979 |
+
if (elements[i].checked) {
|
980 |
+
method = elements[i].value;
|
981 |
+
}
|
982 |
+
} else {
|
983 |
+
elements[i].disabled = true;
|
984 |
+
}
|
985 |
+
}
|
986 |
+
if (method) this.switchMethod(method);
|
987 |
+
},
|
988 |
+
|
989 |
+
switchMethod: function(method){
|
990 |
+
if (this.currentMethod && $('payment_form_'+this.currentMethod)) {
|
991 |
+
var form = $('payment_form_'+this.currentMethod);
|
992 |
+
form.style.display = 'none';
|
993 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
994 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = true;
|
995 |
+
}
|
996 |
+
|
997 |
+
if ($('payment_form_'+method)){
|
998 |
+
var form = $('payment_form_'+method);
|
999 |
+
form.style.display = '';
|
1000 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
1001 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
1002 |
+
this.currentMethod = method;
|
1003 |
+
}
|
1004 |
+
},
|
1005 |
+
|
1006 |
+
addBeforeValidateFunction : function(code, func) {
|
1007 |
+
this.beforeValidateFunc.set(code, func);
|
1008 |
+
},
|
1009 |
+
|
1010 |
+
beforeValidate : function() {
|
1011 |
+
var validateResult = true;
|
1012 |
+
var hasValidation = false;
|
1013 |
+
(this.beforeValidateFunc).each(function(validate){
|
1014 |
+
hasValidation = true;
|
1015 |
+
if ((validate.value)() == false) {
|
1016 |
+
validateResult = false;
|
1017 |
+
}
|
1018 |
+
}.bind(this));
|
1019 |
+
if (!hasValidation) {
|
1020 |
+
validateResult = false;
|
1021 |
+
}
|
1022 |
+
return validateResult;
|
1023 |
+
},
|
1024 |
+
|
1025 |
+
validate: function() {
|
1026 |
+
var methods = document.getElementsByName('payment[method]');
|
1027 |
+
if (methods.length==0) {
|
1028 |
+
alert(Translator.translate('Your order can not be completed at this time as there is no payment methods available for it.'));
|
1029 |
+
return false;
|
1030 |
+
}
|
1031 |
+
for (var i=0; i<methods.length; i++) {
|
1032 |
+
if (methods[i].checked) {
|
1033 |
+
return true;
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
alert(Translator.translate('Please specify payment method.'));
|
1037 |
+
return false;
|
1038 |
+
},
|
1039 |
+
|
1040 |
+
save: function(){
|
1041 |
+
},
|
1042 |
+
addAfterInitFunction : function(code, func) {
|
1043 |
+
this.afterInitFunc.set(code, func);
|
1044 |
+
},
|
1045 |
+
|
1046 |
+
afterInit : function() {
|
1047 |
+
(this.afterInitFunc).each(function(init){
|
1048 |
+
(init.value)();
|
1049 |
+
});
|
1050 |
+
}
|
1051 |
+
};
|
@@ -0,0 +1,1051 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
|
2 |
+
|
3 |
+
/* Login popup class */
|
4 |
+
var OneStepCheckoutLoginPopup = Class.create({
|
5 |
+
initialize: function(options) {
|
6 |
+
this.options = options;
|
7 |
+
this.popup_container = $('onestepcheckout-login-popup');
|
8 |
+
this.popup_link = $('onestepcheckout-login-link');
|
9 |
+
this.popup = null;
|
10 |
+
this.createPopup();
|
11 |
+
this.mode = 'login';
|
12 |
+
|
13 |
+
this.forgot_password_link = $('onestepcheckout-forgot-password-link');
|
14 |
+
this.forgot_password_container = $('onestepcheckout-login-popup-contents-forgot');
|
15 |
+
this.forgot_password_loading = $('onestepcheckout-forgot-loading');
|
16 |
+
this.forgot_password_error = $('onestepcheckout-forgot-error');
|
17 |
+
this.forgot_password_success = $('onestepcheckout-forgot-success');
|
18 |
+
this.forgot_password_button = $('onestepcheckout-forgot-button');
|
19 |
+
this.forgot_password_table = $('onestepcheckout-forgot-table');
|
20 |
+
|
21 |
+
this.login_link = $('onestepcheckout-return-login-link');
|
22 |
+
this.login_container = $('onestepcheckout-login-popup-contents-login');
|
23 |
+
this.login_table = $('onestepcheckout-login-table');
|
24 |
+
this.login_error = $('onestepcheckout-login-error');
|
25 |
+
this.login_loading = $('onestepcheckout-login-loading');
|
26 |
+
this.login_button = $('onestepcheckout-login-button');
|
27 |
+
this.login_form = $('onestepcheckout-login-form');
|
28 |
+
this.login_username = $('id_onestepcheckout_username');
|
29 |
+
|
30 |
+
/* Bindings for the enter button */
|
31 |
+
this.keypress_handler = function(e) {
|
32 |
+
if(e.keyCode == Event.KEY_RETURN) {
|
33 |
+
e.preventDefault();
|
34 |
+
|
35 |
+
if(this.mode == 'login') {
|
36 |
+
this.login_handler();
|
37 |
+
} else if(this.mode == 'forgot') {
|
38 |
+
this.forgot_password_handler();
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}.bind(this);
|
42 |
+
|
43 |
+
this.login_handler = function(e) {
|
44 |
+
|
45 |
+
var parameters = this.login_form.serialize(true);
|
46 |
+
var url = this.options.login_url;
|
47 |
+
this.showLoginLoading();
|
48 |
+
|
49 |
+
new Ajax.Request(url, {
|
50 |
+
method: 'post',
|
51 |
+
parameters: parameters,
|
52 |
+
onSuccess: function(transport) {
|
53 |
+
var result = transport.responseText.evalJSON();
|
54 |
+
if(result.success) {
|
55 |
+
window.location = window.location;
|
56 |
+
} else {
|
57 |
+
this.showLoginError(result.error);
|
58 |
+
}
|
59 |
+
}.bind(this)
|
60 |
+
});
|
61 |
+
};
|
62 |
+
|
63 |
+
this.forgot_password_handler = function(e) {
|
64 |
+
var email = $('id_onestepcheckout_email').getValue();
|
65 |
+
|
66 |
+
if(email == '') {
|
67 |
+
alert(this.options.translations.invalid_email);
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
this.showForgotPasswordLoading();
|
72 |
+
|
73 |
+
/* Prepare AJAX call */
|
74 |
+
var url = this.options.forgot_password_url;
|
75 |
+
|
76 |
+
new Ajax.Request(url, {
|
77 |
+
method: 'post',
|
78 |
+
parameters: { email: email },
|
79 |
+
onSuccess: function(transport) {
|
80 |
+
var result = transport.responseText.evalJSON();
|
81 |
+
|
82 |
+
if(result.success) {
|
83 |
+
/* Show success message */
|
84 |
+
this.showForgotPasswordSuccess();
|
85 |
+
|
86 |
+
/* Pre-set username to simplify login */
|
87 |
+
this.login_username.setValue(email);
|
88 |
+
} else {
|
89 |
+
/* Show error message */
|
90 |
+
this.showForgotPasswordError();
|
91 |
+
}
|
92 |
+
|
93 |
+
}.bind(this)
|
94 |
+
});
|
95 |
+
};
|
96 |
+
|
97 |
+
this.bindEventHandlers();
|
98 |
+
},
|
99 |
+
|
100 |
+
bindEventHandlers: function() {
|
101 |
+
/* First bind the link for opening the popup */
|
102 |
+
if(this.popup_link){
|
103 |
+
this.popup_link.observe('click', function(e) {
|
104 |
+
e.preventDefault();
|
105 |
+
this.popup.open();
|
106 |
+
}.bind(this));
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Link for closing the popup */
|
110 |
+
if(this.popup_container){
|
111 |
+
this.popup_container.select('p.close a').invoke(
|
112 |
+
'observe', 'click', function(e) {
|
113 |
+
this.popup.close();
|
114 |
+
}.bind(this));
|
115 |
+
}
|
116 |
+
|
117 |
+
/* Link to switch between states */
|
118 |
+
if(this.login_link){
|
119 |
+
this.login_link.observe('click', function(e) {
|
120 |
+
e.preventDefault();
|
121 |
+
this.forgot_password_container.hide();
|
122 |
+
this.login_container.show();
|
123 |
+
this.mode = 'login';
|
124 |
+
}.bind(this));
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Link to switch between states */
|
128 |
+
if(this.forgot_password_link){
|
129 |
+
this.forgot_password_link.observe('click', function(e) {
|
130 |
+
e.preventDefault();
|
131 |
+
this.login_container.hide();
|
132 |
+
this.forgot_password_container.show();
|
133 |
+
this.mode = 'forgot';
|
134 |
+
}.bind(this));
|
135 |
+
}
|
136 |
+
|
137 |
+
/* Now bind the submit button for logging in */
|
138 |
+
if(this.login_button){
|
139 |
+
this.login_button.observe(
|
140 |
+
'click', this.login_handler.bind(this));
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Now bind the submit button for forgotten password */
|
144 |
+
if(this.forgot_password_button){
|
145 |
+
this.forgot_password_button.observe('click',
|
146 |
+
this.forgot_password_handler.bind(this));
|
147 |
+
}
|
148 |
+
|
149 |
+
/* Handle return keypress when open */
|
150 |
+
if(this.popup){
|
151 |
+
this.popup.observe('afterOpen', function(e) {
|
152 |
+
document.observe('keypress', this.keypress_handler);
|
153 |
+
}.bind(this));
|
154 |
+
|
155 |
+
this.popup.observe('afterClose', function(e) {
|
156 |
+
this.resetPopup();
|
157 |
+
document.stopObserving('keypress', this.keypress_handler);
|
158 |
+
}.bind(this));
|
159 |
+
}
|
160 |
+
|
161 |
+
},
|
162 |
+
|
163 |
+
resetPopup: function() {
|
164 |
+
this.login_table.show();
|
165 |
+
this.forgot_password_table.show();
|
166 |
+
|
167 |
+
this.login_loading.hide();
|
168 |
+
this.forgot_password_loading.hide();
|
169 |
+
|
170 |
+
this.login_error.hide();
|
171 |
+
this.forgot_password_error.hide();
|
172 |
+
|
173 |
+
this.login_container.show();
|
174 |
+
this.forgot_password_container.hide();
|
175 |
+
},
|
176 |
+
|
177 |
+
showLoginError: function(error) {
|
178 |
+
this.login_table.show();
|
179 |
+
this.login_error.show();
|
180 |
+
this.login_loading.hide();
|
181 |
+
|
182 |
+
if(error) {
|
183 |
+
this.login_error.update(error);
|
184 |
+
}
|
185 |
+
},
|
186 |
+
|
187 |
+
showLoginLoading: function() {
|
188 |
+
this.login_table.hide();
|
189 |
+
this.login_loading.show();
|
190 |
+
this.login_error.hide();
|
191 |
+
},
|
192 |
+
|
193 |
+
showForgotPasswordSuccess: function() {
|
194 |
+
this.forgot_password_error.hide();
|
195 |
+
this.forgot_password_loading.hide();
|
196 |
+
this.forgot_password_table.hide();
|
197 |
+
this.forgot_password_success.show();
|
198 |
+
},
|
199 |
+
|
200 |
+
showForgotPasswordError: function() {
|
201 |
+
this.forgot_password_error.show();
|
202 |
+
this.forgot_password_error.update(
|
203 |
+
this.options.translations.email_not_found),
|
204 |
+
|
205 |
+
this.forgot_password_table.show();
|
206 |
+
this.forgot_password_loading.hide();
|
207 |
+
},
|
208 |
+
|
209 |
+
showForgotPasswordLoading: function() {
|
210 |
+
this.forgot_password_loading.show();
|
211 |
+
this.forgot_password_error.hide();
|
212 |
+
this.forgot_password_table.hide();
|
213 |
+
},
|
214 |
+
|
215 |
+
show: function(){
|
216 |
+
this.popup.open();
|
217 |
+
},
|
218 |
+
|
219 |
+
createPopup: function() {
|
220 |
+
this.popup = new Control.Modal(this.popup_container, {
|
221 |
+
overlayOpacity: 0.65,
|
222 |
+
fade: true,
|
223 |
+
fadeDuration: 0.3,
|
224 |
+
position: 'center_once'
|
225 |
+
});
|
226 |
+
}
|
227 |
+
});
|
228 |
+
|
229 |
+
function $RF(el, radioGroup) {
|
230 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
231 |
+
var radioGroup = $(el).name;
|
232 |
+
var el = $(el).form;
|
233 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
|
237 |
+
var checked = $(el).getInputs('radio', radioGroup).find(
|
238 |
+
function(re) {return re.checked;}
|
239 |
+
);
|
240 |
+
return (checked) ? $F(checked) : null;
|
241 |
+
}
|
242 |
+
|
243 |
+
function $RFF(el, radioGroup) {
|
244 |
+
if($(el).type && $(el).type.toLowerCase() == 'radio') {
|
245 |
+
var radioGroup = $(el).name;
|
246 |
+
var el = $(el).form;
|
247 |
+
} else if ($(el).tagName.toLowerCase() != 'form') {
|
248 |
+
return false;
|
249 |
+
}
|
250 |
+
return $(el).getInputs('radio', radioGroup).first();
|
251 |
+
}
|
252 |
+
|
253 |
+
function get_totals_element()
|
254 |
+
{
|
255 |
+
// Search for OSC summary element
|
256 |
+
var search_osc = $$('div.onestepcheckout-summary');
|
257 |
+
|
258 |
+
if(search_osc.length > 0) {
|
259 |
+
return search_osc[0];
|
260 |
+
}
|
261 |
+
|
262 |
+
var search_cart = $$('div.shopping-cart-totals');
|
263 |
+
|
264 |
+
if(search_cart.length > 0) {
|
265 |
+
return search_cart[0];
|
266 |
+
}
|
267 |
+
|
268 |
+
if($('shopping-cart-totals-table')) {
|
269 |
+
return $('shopping-cart-totals-table');
|
270 |
+
}
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
function get_save_methods_function(url, update_payments)
|
275 |
+
{
|
276 |
+
|
277 |
+
if(typeof update_payments == 'undefined') {
|
278 |
+
var update_payments = false;
|
279 |
+
}
|
280 |
+
return function(e) {
|
281 |
+
|
282 |
+
if(typeof e != 'undefined') {
|
283 |
+
var element = e.element();
|
284 |
+
|
285 |
+
if(element.name != 'shipping_method') {
|
286 |
+
update_payments = false;
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
var form = $('onestepcheckout-form');
|
291 |
+
var shipping_method = $RF(form, 'shipping_method');
|
292 |
+
var payment_method = $RF(form, 'payment[method]');
|
293 |
+
|
294 |
+
var totals = get_totals_element();
|
295 |
+
totals.update('<div class="loading-ajax"> </div>');
|
296 |
+
|
297 |
+
if(update_payments) {
|
298 |
+
var payment_methods = $$('div.payment-methods')[0];
|
299 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
300 |
+
}
|
301 |
+
|
302 |
+
var parameters = {
|
303 |
+
shipping_method: shipping_method,
|
304 |
+
payment_method: payment_method
|
305 |
+
}
|
306 |
+
|
307 |
+
/* Find payment parameters and include */
|
308 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
309 |
+
var names = items.pluck('name');
|
310 |
+
var values = items.pluck('value');
|
311 |
+
|
312 |
+
for(var x=0; x < names.length; x++) {
|
313 |
+
if(names[x] != 'payment[method]') {
|
314 |
+
parameters[names[x]] = values[x];
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
new Ajax.Request(url, {
|
319 |
+
method: 'post',
|
320 |
+
onSuccess: function(transport) {
|
321 |
+
if(transport.status == 200) {
|
322 |
+
var data = transport.responseText.evalJSON();
|
323 |
+
|
324 |
+
totals.update(data.summary);
|
325 |
+
|
326 |
+
if(update_payments) {
|
327 |
+
|
328 |
+
payment_methods.replace(data.payment_method);
|
329 |
+
|
330 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
331 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
332 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
333 |
+
|
334 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
335 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
336 |
+
new Effect.Fade(item);
|
337 |
+
});
|
338 |
+
});
|
339 |
+
|
340 |
+
if($RF(form, 'payment[method]') != null) {
|
341 |
+
try {
|
342 |
+
var payment_method = $RF(form, 'payment[method]');
|
343 |
+
$('container_payment_method_' + payment_method).show();
|
344 |
+
$('payment_form_' + payment_method).show();
|
345 |
+
} catch(err) {
|
346 |
+
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
}
|
351 |
+
}
|
352 |
+
},
|
353 |
+
parameters: parameters
|
354 |
+
});
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
+
function exclude_unchecked_checkboxes(data)
|
359 |
+
{
|
360 |
+
var items = [];
|
361 |
+
for(var x=0; x < data.length; x++) {
|
362 |
+
var item = data[x];
|
363 |
+
if(item.type == 'checkbox') {
|
364 |
+
if(item.checked) {
|
365 |
+
items.push(item);
|
366 |
+
}
|
367 |
+
}
|
368 |
+
else {
|
369 |
+
items.push(item);
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
return items;
|
374 |
+
}
|
375 |
+
|
376 |
+
function get_save_billing_function(url, set_methods_url, update_payments, triggered)
|
377 |
+
{
|
378 |
+
if(typeof update_payments == 'undefined') {
|
379 |
+
var update_payments = false;
|
380 |
+
}
|
381 |
+
|
382 |
+
if(typeof triggered == 'undefined') {
|
383 |
+
var triggered = true;
|
384 |
+
}
|
385 |
+
|
386 |
+
if(!triggered){
|
387 |
+
return function(){return;};
|
388 |
+
}
|
389 |
+
|
390 |
+
return function() {
|
391 |
+
var form = $('onestepcheckout-form');
|
392 |
+
var items = exclude_unchecked_checkboxes($$('input[name^=billing]').concat($$('select[name^=billing]')));
|
393 |
+
var names = items.pluck('name');
|
394 |
+
var values = items.pluck('value');
|
395 |
+
var parameters = {
|
396 |
+
shipping_method: $RF(form, 'shipping_method')
|
397 |
+
};
|
398 |
+
|
399 |
+
|
400 |
+
var street_count = 0;
|
401 |
+
for(var x=0; x < names.length; x++) {
|
402 |
+
if(names[x] != 'payment[method]') {
|
403 |
+
|
404 |
+
var current_name = names[x];
|
405 |
+
|
406 |
+
if(names[x] == 'billing[street][]') {
|
407 |
+
current_name = 'billing[street][' + street_count + ']';
|
408 |
+
street_count = street_count + 1;
|
409 |
+
}
|
410 |
+
|
411 |
+
parameters[current_name] = values[x];
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
var use_for_shipping = $('billing:use_for_shipping_yes');
|
416 |
+
|
417 |
+
|
418 |
+
|
419 |
+
|
420 |
+
if(use_for_shipping && use_for_shipping.getValue() != '1') {
|
421 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
422 |
+
var shipping_names = items.pluck('name');
|
423 |
+
var shipping_values = items.pluck('value');
|
424 |
+
var shipping_parameters = {};
|
425 |
+
var street_count = 0;
|
426 |
+
|
427 |
+
for(var x=0; x < shipping_names.length; x++) {
|
428 |
+
if(shipping_names[x] != 'shipping_method') {
|
429 |
+
var current_name = shipping_names[x];
|
430 |
+
if(shipping_names[x] == 'shipping[street][]') {
|
431 |
+
current_name = 'shipping[street][' + street_count + ']';
|
432 |
+
street_count = street_count + 1;
|
433 |
+
}
|
434 |
+
|
435 |
+
parameters[current_name] = shipping_values[x];
|
436 |
+
}
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
var shipment_methods = $$('div.onestepcheckout-shipping-method-block')[0];
|
441 |
+
var shipment_methods_found = false;
|
442 |
+
|
443 |
+
if(typeof shipment_methods != 'undefined') {
|
444 |
+
shipment_methods_found = true;
|
445 |
+
}
|
446 |
+
|
447 |
+
if(shipment_methods_found) {
|
448 |
+
shipment_methods.update('<div class="loading-ajax"> </div>');
|
449 |
+
}
|
450 |
+
|
451 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
452 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
453 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
454 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
455 |
+
var payment_method = $RF(form, 'payment[method]');
|
456 |
+
parameters['payment_method'] = payment_method;
|
457 |
+
parameters['payment[method]'] = payment_method;
|
458 |
+
|
459 |
+
if(update_payments){
|
460 |
+
var payment_methods = $$('div.payment-methods')[0];
|
461 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
462 |
+
}
|
463 |
+
|
464 |
+
var totals = get_totals_element();
|
465 |
+
totals.update('<div class="loading-ajax"> </div>');
|
466 |
+
|
467 |
+
|
468 |
+
new Ajax.Request(url, {
|
469 |
+
method: 'post',
|
470 |
+
onSuccess: function(transport) {
|
471 |
+
if(transport.status == 200) {
|
472 |
+
|
473 |
+
var data = transport.responseText.evalJSON();
|
474 |
+
|
475 |
+
// Update shipment methods
|
476 |
+
if(shipment_methods_found) {
|
477 |
+
shipment_methods.update(data.shipping_method);
|
478 |
+
}
|
479 |
+
|
480 |
+
if(update_payments){
|
481 |
+
payment_methods.replace(data.payment_method);
|
482 |
+
}
|
483 |
+
|
484 |
+
totals.update(data.summary);
|
485 |
+
|
486 |
+
|
487 |
+
}
|
488 |
+
},
|
489 |
+
onComplete: function(transport){
|
490 |
+
if(transport.status == 200) {
|
491 |
+
if(shipment_methods_found) {
|
492 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url, update_payments));
|
493 |
+
$$('dl.shipment-methods input').invoke('observe', 'click', function() {
|
494 |
+
$$('div.onestepcheckout-shipment-method-error').each(function(item) {
|
495 |
+
new Effect.Fade(item);
|
496 |
+
});
|
497 |
+
});
|
498 |
+
}
|
499 |
+
|
500 |
+
if(update_payments){
|
501 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url));
|
502 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
503 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
504 |
+
|
505 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
506 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
507 |
+
new Effect.Fade(item);
|
508 |
+
});
|
509 |
+
});
|
510 |
+
|
511 |
+
if($RF(form, 'payment[method]') != null) {
|
512 |
+
try {
|
513 |
+
var payment_method = $RF(form, 'payment[method]');
|
514 |
+
$('container_payment_method_' + payment_method).show();
|
515 |
+
var payment_form = $('payment_form_' + payment_method);
|
516 |
+
if(payment_form)
|
517 |
+
$(payment_form).show();
|
518 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
519 |
+
// set sub payment method back
|
520 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
521 |
+
|
522 |
+
// check if ideal payment bank is chosen
|
523 |
+
if(payment_hpp_type == "ideal") {
|
524 |
+
if(payment_hpp_ideal_type) {
|
525 |
+
// get issue_id this is before the slash
|
526 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
527 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
528 |
+
}
|
529 |
+
$('payment_form_ideal').show();
|
530 |
+
}
|
531 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
532 |
+
// set sub payment method back
|
533 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
534 |
+
// set back the cvc code
|
535 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
536 |
+
// show the cvc code block
|
537 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
538 |
+
$(cvc_block).show();
|
539 |
+
}
|
540 |
+
} catch(err) {
|
541 |
+
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
}
|
546 |
+
},
|
547 |
+
parameters: parameters
|
548 |
+
});
|
549 |
+
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
function get_separate_save_methods_function(url, update_payments)
|
554 |
+
{
|
555 |
+
if(typeof update_payments == 'undefined') {
|
556 |
+
var update_payments = false;
|
557 |
+
}
|
558 |
+
|
559 |
+
return function(e) {
|
560 |
+
if(typeof e != 'undefined') {
|
561 |
+
var element = e.element();
|
562 |
+
|
563 |
+
if(element.name != 'shipping_method') {
|
564 |
+
update_payments = false;
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
var form = $('onestepcheckout-form');
|
569 |
+
var shipping_method = $RF(form, 'shipping_method');
|
570 |
+
var payment_method = $RF(form, 'payment[method]');
|
571 |
+
var payment_hpp_type = $RF(form, 'payment[hpp_type]');
|
572 |
+
var payment_hpp_ideal_type = $RF(form, 'payment[hpp_ideal_type]');
|
573 |
+
var payment_recurring_type = $RF(form, 'payment[recurring]');
|
574 |
+
var payment_recurring_type_cvc = $('adyen_oneclick_oneclick_cid_'+payment_recurring_type);
|
575 |
+
|
576 |
+
var totals = get_totals_element();
|
577 |
+
|
578 |
+
var freeMethod = $('p_method_free');
|
579 |
+
if(freeMethod){
|
580 |
+
payment.reloadcallback = true;
|
581 |
+
payment.countreload = 1;
|
582 |
+
}
|
583 |
+
|
584 |
+
totals.update('<div class="loading-ajax"> </div>');
|
585 |
+
|
586 |
+
if(update_payments) {
|
587 |
+
var payment_methods = $$('div.payment-methods')[0];
|
588 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
589 |
+
}
|
590 |
+
|
591 |
+
var parameters = {
|
592 |
+
shipping_method: shipping_method,
|
593 |
+
payment_method: payment_method
|
594 |
+
}
|
595 |
+
|
596 |
+
/* Find payment parameters and include */
|
597 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
598 |
+
var names = items.pluck('name');
|
599 |
+
var values = items.pluck('value');
|
600 |
+
|
601 |
+
for(var x=0; x < names.length; x++) {
|
602 |
+
if(names[x] != 'payment[method]') {
|
603 |
+
parameters[names[x]] = values[x];
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
new Ajax.Request(url, {
|
608 |
+
method: 'post',
|
609 |
+
onSuccess: function(transport) {
|
610 |
+
if(transport.status == 200) {
|
611 |
+
var data = transport.responseText.evalJSON();
|
612 |
+
var form = $('onestepcheckout-form');
|
613 |
+
|
614 |
+
totals.update(data.summary);
|
615 |
+
|
616 |
+
if(update_payments) {
|
617 |
+
|
618 |
+
payment_methods.replace(data.payment_method);
|
619 |
+
|
620 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
621 |
+
$$('div.payment-methods input[name="payment[hpp_type]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange hpp method reload
|
622 |
+
$$('div.payment-methods input[name="payment[recurring]"]').invoke('observe', 'click', get_separate_save_methods_function(url)); // for Adyen onchange oneclick method reload
|
623 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
624 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
625 |
+
new Effect.Fade(item);
|
626 |
+
});
|
627 |
+
});
|
628 |
+
|
629 |
+
if($RF($('onestepcheckout-form'), 'payment[method]') != null) {
|
630 |
+
try {
|
631 |
+
var payment_method = $RF(form, 'payment[method]');
|
632 |
+
$('container_payment_method_' + payment_method).show();
|
633 |
+
var payment_form = $('payment_form_' + payment_method);
|
634 |
+
if(payment_form)
|
635 |
+
$(payment_form).show();
|
636 |
+
else if(payment_method == "adyen_hpp") { // check if payment type is hpp (this has other id so should come in else )
|
637 |
+
// set sub payment method back
|
638 |
+
$('hpp_type_'+payment_hpp_type).checked = true;
|
639 |
+
|
640 |
+
// check if ideal payment bank is chosen
|
641 |
+
if(payment_hpp_type == "ideal") {
|
642 |
+
if(payment_hpp_ideal_type) {
|
643 |
+
// get issue_id this is before the slash
|
644 |
+
var issue_id = payment_hpp_ideal_type.substr(0, payment_hpp_ideal_type.indexOf('/'));
|
645 |
+
$('hpp_ideal_type_'+issue_id).checked = true;
|
646 |
+
}
|
647 |
+
$('payment_form_ideal').show();
|
648 |
+
}
|
649 |
+
} else if(payment_method == "adyen_oneclick") { // check if payment type is hpp
|
650 |
+
// set sub payment method back
|
651 |
+
$('recurring_type_'+payment_recurring_type).checked = true;
|
652 |
+
// set back the cvc code
|
653 |
+
$('adyen_oneclick_oneclick_cid_'+payment_recurring_type).value = payment_recurring_type_cvc.value;
|
654 |
+
// show the cvc code block
|
655 |
+
var cvc_block = "cvc_block_" + payment_recurring_type;
|
656 |
+
$(cvc_block).show();
|
657 |
+
// show update link url
|
658 |
+
var update_link = "update-expiration-date-" + payment_recurring_type;
|
659 |
+
$(update_link).show();
|
660 |
+
}
|
661 |
+
} catch(err) {
|
662 |
+
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
},
|
668 |
+
parameters: parameters
|
669 |
+
});
|
670 |
+
}
|
671 |
+
}
|
672 |
+
|
673 |
+
function paymentrefresh(url) {
|
674 |
+
var payment_methods = $$('div.payment-methods')[0];
|
675 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
676 |
+
new Ajax.Request(url, {
|
677 |
+
method: 'get',
|
678 |
+
onSuccess: function(transport){
|
679 |
+
if(transport.status == 200) {
|
680 |
+
var data = transport.responseText.evalJSON();
|
681 |
+
payment_methods.replace(data.payment_method);
|
682 |
+
|
683 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
684 |
+
$$('div.payment-methods input[name="payment\[method\]"]', 'div.payment-methods input[name="payment\[useProfile\]"]').invoke('observe', 'click', function() {
|
685 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
686 |
+
new Effect.Fade(item);
|
687 |
+
});
|
688 |
+
});
|
689 |
+
|
690 |
+
if($RF(form, 'payment[method]') != null) {
|
691 |
+
try {
|
692 |
+
var payment_method = $RF(form, 'payment[method]');
|
693 |
+
$('container_payment_method_' + payment_method).show();
|
694 |
+
$('payment_form_' + payment_method).show();
|
695 |
+
} catch(err){}
|
696 |
+
}
|
697 |
+
|
698 |
+
}
|
699 |
+
}
|
700 |
+
});
|
701 |
+
}
|
702 |
+
|
703 |
+
function addressPreview(templates, target) {
|
704 |
+
var bparams = {};
|
705 |
+
var sparams = {};
|
706 |
+
var savedBillingItems = $('billing-address-select');
|
707 |
+
if(savedBillingItems && savedBillingItems.getValue()){
|
708 |
+
index = savedBillingItems.selectedIndex;
|
709 |
+
bparams = customerBAddresses[index];
|
710 |
+
} else {
|
711 |
+
var items = $$('input[name^=billing]').concat($$('select[name^=billing]'));
|
712 |
+
items.each(function(s) {
|
713 |
+
if(s.getStyle('display') != 'none'){
|
714 |
+
selectText = s.options
|
715 |
+
if(selectText){
|
716 |
+
value = selectText[s.selectedIndex].text;
|
717 |
+
} else {
|
718 |
+
value = s.getValue();
|
719 |
+
}
|
720 |
+
if(value){
|
721 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
722 |
+
}
|
723 |
+
if(s.id == 'billing:region_id'){
|
724 |
+
bparams['billing:region'] = value;
|
725 |
+
} else {
|
726 |
+
bparams[s.id] = value;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
});
|
730 |
+
}
|
731 |
+
|
732 |
+
|
733 |
+
|
734 |
+
var savedShippingItems = $('shipping-address-select');
|
735 |
+
if(savedShippingItems && savedShippingItems.getValue()){
|
736 |
+
index = savedShippingItems.selectedIndex;
|
737 |
+
sparams = customerSAddresses[index];
|
738 |
+
} else {
|
739 |
+
var items = $$('input[name^=shipping]').concat($$('select[name^=shipping]'));
|
740 |
+
items.each(function(s) {
|
741 |
+
if(s.getStyle('display') != 'none'){
|
742 |
+
selectText = s.options
|
743 |
+
if(selectText){
|
744 |
+
value = selectText[s.selectedIndex].text;
|
745 |
+
} else {
|
746 |
+
value = s.getValue();
|
747 |
+
}
|
748 |
+
if(value){
|
749 |
+
value = '<span class="' + s.id.replace(':','-') + '">' + value.escapeHTML() + '</span>';
|
750 |
+
}
|
751 |
+
if(s.id == 'shipping:region_id'){
|
752 |
+
sparams['shipping:region'] = value;
|
753 |
+
} else {
|
754 |
+
sparams[s.id] = value;
|
755 |
+
}
|
756 |
+
}
|
757 |
+
});
|
758 |
+
}
|
759 |
+
|
760 |
+
|
761 |
+
var form = $('onestepcheckout-form');
|
762 |
+
|
763 |
+
var shipping_method = $RF(form, 'shipping_method');
|
764 |
+
if(shipping_method){
|
765 |
+
var shipping_label = $('s_method_' + shipping_method).up('dt').down('label').innerHTML.stripScripts();
|
766 |
+
var shipping_title = $('s_method_' + shipping_method).up('dt').previous('dd').innerHTML.stripScripts();
|
767 |
+
var shipping_row = shipping_title + ' - ' + shipping_label
|
768 |
+
}
|
769 |
+
|
770 |
+
var useOnlyBilling = $('billing:use_for_shipping_yes').getValue();
|
771 |
+
billinga_template = new Template(templates.billing);
|
772 |
+
|
773 |
+
if(useOnlyBilling){
|
774 |
+
shippinga_template = new Template(templates.billing);
|
775 |
+
}else{
|
776 |
+
shippinga_template = new Template(templates.shipping);
|
777 |
+
}
|
778 |
+
|
779 |
+
var payment_method = payment.currentMethod;
|
780 |
+
|
781 |
+
if(payment_method){
|
782 |
+
var payment_label = $('p_method_'+payment_method).up('dt').down('label').innerHTML.stripScripts();
|
783 |
+
}
|
784 |
+
|
785 |
+
var targetelem = $(target + '_billinga').childElements()[1];
|
786 |
+
if(targetelem){
|
787 |
+
targetelem.update(billinga_template.evaluate(bparams));
|
788 |
+
}
|
789 |
+
|
790 |
+
var targetelem = $(target + '_shippinga').childElements()[1];
|
791 |
+
if(targetelem){
|
792 |
+
if(useOnlyBilling){
|
793 |
+
targetelem.update(shippinga_template.evaluate(bparams));
|
794 |
+
}else{
|
795 |
+
targetelem.update(shippinga_template.evaluate(sparams));
|
796 |
+
}
|
797 |
+
}
|
798 |
+
|
799 |
+
var targetelem = $(target + '_shipping').childElements()[1];
|
800 |
+
if(targetelem){
|
801 |
+
targetelem.update(shipping_row);
|
802 |
+
}
|
803 |
+
|
804 |
+
var targetelem = $(target + '_payment').childElements()[1];
|
805 |
+
if(targetelem){
|
806 |
+
targetelem.update(payment_label);
|
807 |
+
}
|
808 |
+
|
809 |
+
var targetelem = $(target + '_summary').childElements()[1];
|
810 |
+
if(targetelem){
|
811 |
+
targetelem.update('');
|
812 |
+
targetelem.insert($$('table.onestepcheckout-summary')[0].cloneNode(true));
|
813 |
+
targetelem.insert($$('table.onestepcheckout-totals')[0].cloneNode(true));
|
814 |
+
}
|
815 |
+
}
|
816 |
+
|
817 |
+
|
818 |
+
var Checkout = Class.create();
|
819 |
+
Checkout.prototype = {
|
820 |
+
initialize: function(){
|
821 |
+
this.accordion = '';
|
822 |
+
this.progressUrl = '';
|
823 |
+
this.reviewUrl = '';
|
824 |
+
this.saveMethodUrl = '';
|
825 |
+
this.failureUrl = '';
|
826 |
+
this.billingForm = false;
|
827 |
+
this.shippingForm= false;
|
828 |
+
this.syncBillingShipping = false;
|
829 |
+
this.method = '';
|
830 |
+
this.payment = '';
|
831 |
+
this.loadWaiting = false;
|
832 |
+
},
|
833 |
+
|
834 |
+
ajaxFailure: function(){
|
835 |
+
location.href = this.failureUrl;
|
836 |
+
},
|
837 |
+
|
838 |
+
setLoadWaiting: function(step, keepDisabled) {
|
839 |
+
return true
|
840 |
+
}
|
841 |
+
};
|
842 |
+
|
843 |
+
//billing
|
844 |
+
var Billing = Class.create();
|
845 |
+
Billing.prototype = {
|
846 |
+
initialize: function(form, addressUrl, saveUrl){
|
847 |
+
this.form = form;
|
848 |
+
},
|
849 |
+
|
850 |
+
setAddress: function(addressId){
|
851 |
+
|
852 |
+
},
|
853 |
+
|
854 |
+
newAddress: function(isNew){
|
855 |
+
if (isNew) {
|
856 |
+
//this.resetSelectedAddress();
|
857 |
+
Element.show('billing_address_list');
|
858 |
+
if($('billing:use_for_shipping_yes').getValue() != "1" && $('shipping-address-select').getValue() == ''){
|
859 |
+
Element.show('shipping_address_list');
|
860 |
+
}
|
861 |
+
|
862 |
+
} else {
|
863 |
+
Element.hide('billing_address_list');
|
864 |
+
}
|
865 |
+
$$('input[name^=billing]', 'select[id=billing:region_id]').each(function(e){
|
866 |
+
if(e.name=='billing[use_for_shipping]' || e.name=='billing[save_in_address_book]'){
|
867 |
+
|
868 |
+
} else {
|
869 |
+
e.value = '';
|
870 |
+
}
|
871 |
+
});
|
872 |
+
},
|
873 |
+
|
874 |
+
resetSelectedAddress: function(){
|
875 |
+
var selectElement = $('shipping-address-select')
|
876 |
+
if (selectElement) {
|
877 |
+
selectElement.value='';
|
878 |
+
}
|
879 |
+
},
|
880 |
+
|
881 |
+
fillForm: function(transport){
|
882 |
+
|
883 |
+
},
|
884 |
+
|
885 |
+
setUseForShipping: function(flag) {
|
886 |
+
|
887 |
+
},
|
888 |
+
|
889 |
+
save: function(){
|
890 |
+
|
891 |
+
},
|
892 |
+
|
893 |
+
resetLoadWaiting: function(transport){
|
894 |
+
|
895 |
+
},
|
896 |
+
|
897 |
+
nextStep: function(transport){
|
898 |
+
|
899 |
+
}
|
900 |
+
};
|
901 |
+
|
902 |
+
//shipping
|
903 |
+
var Shipping = Class.create();
|
904 |
+
Shipping.prototype = {
|
905 |
+
initialize: function(form){
|
906 |
+
this.form = form;
|
907 |
+
},
|
908 |
+
|
909 |
+
setAddress: function(addressId){
|
910 |
+
|
911 |
+
},
|
912 |
+
|
913 |
+
newAddress: function(isNew){
|
914 |
+
if (isNew) {
|
915 |
+
this.resetSelectedAddress();
|
916 |
+
Element.show('shipping_address_list');
|
917 |
+
} else {
|
918 |
+
Element.hide('shipping_address_list');
|
919 |
+
}
|
920 |
+
|
921 |
+
$$('#shipping_address input[name^=shipping],#shipping_address select[id=shipping:region_id]').each(function(e){
|
922 |
+
if(e.name=='shipping[save_in_address_book]'){
|
923 |
+
|
924 |
+
} else {
|
925 |
+
e.value = '';
|
926 |
+
}
|
927 |
+
})
|
928 |
+
|
929 |
+
},
|
930 |
+
|
931 |
+
resetSelectedAddress: function(){
|
932 |
+
var selectElement = $('shipping-address-select')
|
933 |
+
if (selectElement) {
|
934 |
+
selectElement.value='';
|
935 |
+
}
|
936 |
+
},
|
937 |
+
|
938 |
+
fillForm: function(transport){
|
939 |
+
|
940 |
+
},
|
941 |
+
|
942 |
+
setSameAsBilling: function(flag) {
|
943 |
+
|
944 |
+
},
|
945 |
+
|
946 |
+
syncWithBilling: function () {
|
947 |
+
|
948 |
+
},
|
949 |
+
|
950 |
+
setRegionValue: function(){
|
951 |
+
//$('shipping:region').value = $('billing:region').value;
|
952 |
+
},
|
953 |
+
|
954 |
+
save: function(){
|
955 |
+
|
956 |
+
}
|
957 |
+
};
|
958 |
+
|
959 |
+
//payment object
|
960 |
+
var Payment = Class.create();
|
961 |
+
Payment.prototype = {
|
962 |
+
beforeInitFunc:$H({}),
|
963 |
+
afterInitFunc:$H({}),
|
964 |
+
beforeValidateFunc:$H({}),
|
965 |
+
afterValidateFunc:$H({}),
|
966 |
+
initialize: function(form, saveUrl){
|
967 |
+
this.form = form;
|
968 |
+
this.saveUrl = saveUrl;
|
969 |
+
},
|
970 |
+
|
971 |
+
init : function () {
|
972 |
+
var elements = Form.getElements(this.form);
|
973 |
+
if ($(this.form)) {
|
974 |
+
//$(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
|
975 |
+
}
|
976 |
+
var method = null;
|
977 |
+
for (var i=0; i<elements.length; i++) {
|
978 |
+
if (elements[i].name=='payment[method]') {
|
979 |
+
if (elements[i].checked) {
|
980 |
+
method = elements[i].value;
|
981 |
+
}
|
982 |
+
} else {
|
983 |
+
elements[i].disabled = true;
|
984 |
+
}
|
985 |
+
}
|
986 |
+
if (method) this.switchMethod(method);
|
987 |
+
},
|
988 |
+
|
989 |
+
switchMethod: function(method){
|
990 |
+
if (this.currentMethod && $('payment_form_'+this.currentMethod)) {
|
991 |
+
var form = $('payment_form_'+this.currentMethod);
|
992 |
+
form.style.display = 'none';
|
993 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
994 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = true;
|
995 |
+
}
|
996 |
+
|
997 |
+
if ($('payment_form_'+method)){
|
998 |
+
var form = $('payment_form_'+method);
|
999 |
+
form.style.display = '';
|
1000 |
+
var elements = form.select('input').concat(form.select('select')).concat(form.select('textarea'));
|
1001 |
+
for (var i=0; i<elements.length; i++) elements[i].disabled = false;
|
1002 |
+
this.currentMethod = method;
|
1003 |
+
}
|
1004 |
+
},
|
1005 |
+
|
1006 |
+
addBeforeValidateFunction : function(code, func) {
|
1007 |
+
this.beforeValidateFunc.set(code, func);
|
1008 |
+
},
|
1009 |
+
|
1010 |
+
beforeValidate : function() {
|
1011 |
+
var validateResult = true;
|
1012 |
+
var hasValidation = false;
|
1013 |
+
(this.beforeValidateFunc).each(function(validate){
|
1014 |
+
hasValidation = true;
|
1015 |
+
if ((validate.value)() == false) {
|
1016 |
+
validateResult = false;
|
1017 |
+
}
|
1018 |
+
}.bind(this));
|
1019 |
+
if (!hasValidation) {
|
1020 |
+
validateResult = false;
|
1021 |
+
}
|
1022 |
+
return validateResult;
|
1023 |
+
},
|
1024 |
+
|
1025 |
+
validate: function() {
|
1026 |
+
var methods = document.getElementsByName('payment[method]');
|
1027 |
+
if (methods.length==0) {
|
1028 |
+
alert(Translator.translate('Your order can not be completed at this time as there is no payment methods available for it.'));
|
1029 |
+
return false;
|
1030 |
+
}
|
1031 |
+
for (var i=0; i<methods.length; i++) {
|
1032 |
+
if (methods[i].checked) {
|
1033 |
+
return true;
|
1034 |
+
}
|
1035 |
+
}
|
1036 |
+
alert(Translator.translate('Please specify payment method.'));
|
1037 |
+
return false;
|
1038 |
+
},
|
1039 |
+
|
1040 |
+
save: function(){
|
1041 |
+
},
|
1042 |
+
addAfterInitFunction : function(code, func) {
|
1043 |
+
this.afterInitFunc.set(code, func);
|
1044 |
+
},
|
1045 |
+
|
1046 |
+
afterInit : function() {
|
1047 |
+
(this.afterInitFunc).each(function(init){
|
1048 |
+
(init.value)();
|
1049 |
+
});
|
1050 |
+
}
|
1051 |
+
};
|