Version Notes
Modification du paiement direct:
- Utilisation de token via API AJAX pour échange d'informations
- Intégration des cinématiques 3D secure
Refonte de la configuration et de la gestion des contrats
Download this release
Release Info
Developer | Payline |
Extension | Payline |
Version | 1.8.5 |
Comparing to | |
See all releases |
Code changes from version 1.8.3.3 to 1.8.5
- app/code/community/Monext/Payline/.DS_Store +0 -0
- app/code/community/Monext/Payline/Block/Adminhtml/Customer/Grid.php +199 -199
- app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts.php +57 -57
- app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Edit.php +28 -28
- app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Edit/Form.php +103 -93
- app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Grid.php +195 -170
- app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories.php +59 -56
- app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories/Assign/Form.php +73 -73
- app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories/Grid.php +96 -91
- app/code/community/Monext/Payline/Block/Adminhtml/Sales/Order/Creditmemo/Create/Items.php +59 -59
- app/code/community/Monext/Payline/Block/Adminhtml/Sales/Order/Total/Nxfees.php +38 -38
- app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Group.php +68 -0
- app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Payment.php +99 -0
- app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Welcome.php +114 -0
- app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Form/Field/Contracts.php +177 -0
- app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Html/Onoffswitch.php +30 -0
- app/code/community/Monext/Payline/Block/Checkout/Head.php +13 -0
- app/code/community/Monext/Payline/Block/Checkout/Total.php +20 -13
- app/code/community/Monext/Payline/Block/Checkout/Widget/Header.php +15 -0
- app/code/community/Monext/Payline/Block/Checkout/Widget/Opcheckout.php +116 -0
- app/code/community/Monext/Payline/Block/Cpt.php +0 -0
- app/code/community/Monext/Payline/Block/Direct.php +92 -20
- app/code/community/Monext/Payline/Block/Info/Default.php +12 -12
- app/code/community/Monext/Payline/Block/Info/Direct.php +54 -54
- app/code/community/Monext/Payline/Block/Logo.php +15 -15
- app/code/community/Monext/Payline/Block/Nx.php +0 -0
- app/code/community/Monext/Payline/Block/Wallet.php +23 -23
- app/code/community/Monext/Payline/Block/Wallet/Checkoutbtn.php +27 -27
- app/code/community/Monext/Payline/Block/Wallet/Details.php +20 -20
- app/code/community/Monext/Payline/Block/Wallet/Infos.php +40 -32
- app/code/community/Monext/Payline/Block/Wallet/Sidebar.php +131 -132
- app/code/community/Monext/Payline/Helper/Category.php +42 -0
- app/code/community/Monext/Payline/Helper/Data.php +214 -30
- app/code/community/Monext/Payline/Helper/Logger.php +65 -58
- app/code/community/Monext/Payline/Helper/Payment.php +557 -275
- app/code/community/Monext/Payline/Helper/Widget.php +110 -0
- app/code/community/Monext/Payline/Model/.DS_Store +0 -0
- app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Common.php +28 -0
- app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Contract.php +62 -0
- app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Enabled.php +22 -0
- app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Source/Environment.php +34 -0
- app/code/community/Monext/Payline/Model/Contract.php +14 -14
- app/code/community/Monext/Payline/Model/Contract/Status.php +14 -14
- app/code/community/Monext/Payline/Model/Cpt.php +3 -3
- app/code/community/Monext/Payline/Model/Datasource/Actions.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Billingcycles.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Billingoccurrences.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Capturepaymentoptions.php +42 -42
- app/code/community/Monext/Payline/Model/Datasource/Cms/Block.php +32 -32
- app/code/community/Monext/Payline/Model/Datasource/Costs.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Datatemplate.php +17 -0
- app/code/community/Monext/Payline/Model/Datasource/Environment.php +16 -16
- app/code/community/Monext/Payline/Model/Datasource/Languages.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Paylineproductcategories.php +46 -46
- app/code/community/Monext/Payline/Model/Datasource/Paymentactions.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Paymentactionsreauth.php +14 -14
- app/code/community/Monext/Payline/Model/Datasource/Return.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Securitymodes.php +0 -0
- app/code/community/Monext/Payline/Model/Datasource/Shippingmethods.php +21 -21
- app/code/community/Monext/Payline/Model/Datasource/Status.php +40 -40
- app/code/community/Monext/Payline/Model/Datasource/Status/Canceled.php +11 -11
- app/code/community/Monext/Payline/Model/Datasource/Status/Invoice.php +40 -40
- app/code/community/Monext/Payline/Model/Datasource/Statusrowempty.php +45 -45
- app/code/community/Monext/Payline/Model/Datasource/Walletsecurity.php +16 -16
- app/code/community/Monext/Payline/Model/Datasource/Widgettemplate.php +16 -16
- app/code/community/Monext/Payline/Model/Direct.php +99 -179
- app/code/community/Monext/Payline/Model/Fees.php +14 -14
- app/code/community/Monext/Payline/Model/Mysql4/Contract.php +169 -175
- app/code/community/Monext/Payline/Model/Mysql4/Contract/Collection.php +134 -78
- app/code/community/Monext/Payline/Model/Mysql4/Contract/Status.php +279 -269
- app/code/community/Monext/Payline/Model/Mysql4/Contract/Status/Collection.php +13 -13
- app/code/community/Monext/Payline/Model/Mysql4/Fees.php +13 -13
- app/code/community/Monext/Payline/Model/Mysql4/Fees/Collection.php +12 -12
- app/code/community/Monext/Payline/Model/Mysql4/Productcategories.php +13 -13
- app/code/community/Monext/Payline/Model/Mysql4/Productcategories/Collection.php +35 -27
- app/code/community/Monext/Payline/Model/Mysql4/Token.php +13 -13
- app/code/community/Monext/Payline/Model/Mysql4/Token/Collection.php +12 -12
- app/code/community/Monext/Payline/Model/Nx.php +0 -0
- app/code/community/Monext/Payline/Model/Observer.php +523 -326
- app/code/community/Monext/Payline/Model/Order/Invoice.php +31 -31
- app/code/community/Monext/Payline/Model/Order/Payment.php +55 -55
- app/code/community/Monext/Payline/Model/Productcategories.php +22 -22
- app/code/community/Monext/Payline/Model/Resource/Eav/Mysql4/Setup.php +26 -26
- app/code/community/Monext/Payline/Model/Session.php +34 -0
- app/code/community/Monext/Payline/Model/Token.php +14 -14
- app/code/community/Monext/Payline/Model/Total/Nx/Invoice.php +23 -23
- app/code/community/Monext/Payline/Model/Total/Nx/Quote.php +87 -87
- app/code/community/Monext/Payline/Model/Wallet.php +242 -236
- app/code/community/Monext/Payline/controllers/Adminhtml/Payline/ManagecontractsController.php +250 -212
- app/code/community/Monext/Payline/controllers/Adminhtml/Payline/ManageproductcategoriesController.php +114 -101
- app/code/community/Monext/Payline/controllers/CheckoutonepageController.php +172 -172
- app/code/community/Monext/Payline/controllers/IndexController.php +655 -356
- app/code/community/Monext/Payline/controllers/UnloggedwalletController.php +114 -114
- app/code/community/Monext/Payline/controllers/WalletController.php +296 -297
- app/code/community/Monext/Payline/etc/adminhtml.xml +55 -0
- app/code/community/Monext/Payline/etc/config.xml +74 -43
- app/code/community/Monext/Payline/etc/system.xml +654 -371
- app/code/community/Monext/Payline/lib/PaylineByMonext.wsdl +168 -168
- app/code/community/Monext/Payline/lib/paylineSDK.php +2053 -2215
- app/code/community/Monext/Payline/lib/v4.44.1.wsdl +0 -3523
- app/code/community/Monext/Payline/lib/v4.44.wsdl +0 -2485
app/code/community/Monext/Payline/.DS_Store
ADDED
Binary file
|
app/code/community/Monext/Payline/Block/Adminhtml/Customer/Grid.php
CHANGED
@@ -1,200 +1,200 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* $Id: Grid.php 27 2012-01-24 09:56:23Z cesav $
|
4 |
-
* $HeadURL: https://sources.mpl.intranet/svn/monext/trunk/Payline/Monext/Payline/Block/Adminhtml/Customer/Grid.php $
|
5 |
-
*
|
6 |
-
*/
|
7 |
-
|
8 |
-
class Monext_Payline_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
9 |
-
{
|
10 |
-
public function __construct()
|
11 |
-
{
|
12 |
-
parent::__construct();
|
13 |
-
$this->setId('customerGrid');
|
14 |
-
$this->setUseAjax(true);
|
15 |
-
$this->setDefaultSort('entity_id');
|
16 |
-
$this->setSaveParametersInSession(true);
|
17 |
-
}
|
18 |
-
|
19 |
-
protected function _prepareCollection()
|
20 |
-
{
|
21 |
-
$collection = Mage::getResourceModel('customer/customer_collection')
|
22 |
-
->addNameToSelect()
|
23 |
-
->addAttributeToSelect('email')
|
24 |
-
->addAttributeToSelect('created_at')
|
25 |
-
->addAttributeToSelect('group_id')
|
26 |
-
->addAttributeToSelect('wallet_id')
|
27 |
-
->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
|
28 |
-
->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
|
29 |
-
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
|
30 |
-
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
|
31 |
-
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');
|
32 |
-
|
33 |
-
$this->setCollection($collection);
|
34 |
-
|
35 |
-
return parent::_prepareCollection();
|
36 |
-
}
|
37 |
-
|
38 |
-
protected function _prepareColumns()
|
39 |
-
{
|
40 |
-
$this->addColumn('entity_id', array(
|
41 |
-
'header' => Mage::helper('customer')->__('ID'),
|
42 |
-
'width' => '50px',
|
43 |
-
'index' => 'entity_id',
|
44 |
-
'type' => 'number',
|
45 |
-
));
|
46 |
-
/*$this->addColumn('firstname', array(
|
47 |
-
'header' => Mage::helper('customer')->__('First Name'),
|
48 |
-
'index' => 'firstname'
|
49 |
-
));
|
50 |
-
$this->addColumn('lastname', array(
|
51 |
-
'header' => Mage::helper('customer')->__('Last Name'),
|
52 |
-
'index' => 'lastname'
|
53 |
-
));*/
|
54 |
-
$this->addColumn('name', array(
|
55 |
-
'header' => Mage::helper('customer')->__('Name'),
|
56 |
-
'index' => 'name'
|
57 |
-
));
|
58 |
-
$this->addColumn('email', array(
|
59 |
-
'header' => Mage::helper('customer')->__('Email'),
|
60 |
-
'width' => '150',
|
61 |
-
'index' => 'email'
|
62 |
-
));
|
63 |
-
$this->addColumn('wallet_id', array(
|
64 |
-
'header' => Mage::helper('payline')->__('Wallet Payline'),
|
65 |
-
'width' => '150',
|
66 |
-
'index' => 'wallet_id'
|
67 |
-
));
|
68 |
-
|
69 |
-
$groups = Mage::getResourceModel('customer/group_collection')
|
70 |
-
->addFieldToFilter('customer_group_id', array('gt'=> 0))
|
71 |
-
->load()
|
72 |
-
->toOptionHash();
|
73 |
-
|
74 |
-
$this->addColumn('group', array(
|
75 |
-
'header' => Mage::helper('customer')->__('Group'),
|
76 |
-
'width' => '100',
|
77 |
-
'index' => 'group_id',
|
78 |
-
'type' => 'options',
|
79 |
-
'options' => $groups,
|
80 |
-
));
|
81 |
-
|
82 |
-
$this->addColumn('Telephone', array(
|
83 |
-
'header' => Mage::helper('customer')->__('Telephone'),
|
84 |
-
'width' => '100',
|
85 |
-
'index' => 'billing_telephone'
|
86 |
-
));
|
87 |
-
|
88 |
-
$this->addColumn('billing_postcode', array(
|
89 |
-
'header' => Mage::helper('customer')->__('ZIP'),
|
90 |
-
'width' => '90',
|
91 |
-
'index' => 'billing_postcode',
|
92 |
-
));
|
93 |
-
|
94 |
-
$this->addColumn('billing_country_id', array(
|
95 |
-
'header' => Mage::helper('customer')->__('Country'),
|
96 |
-
'width' => '100',
|
97 |
-
'type' => 'country',
|
98 |
-
'index' => 'billing_country_id',
|
99 |
-
));
|
100 |
-
|
101 |
-
$this->addColumn('billing_region', array(
|
102 |
-
'header' => Mage::helper('customer')->__('State/Province'),
|
103 |
-
'width' => '100',
|
104 |
-
'index' => 'billing_region',
|
105 |
-
));
|
106 |
-
|
107 |
-
$this->addColumn('customer_since', array(
|
108 |
-
'header' => Mage::helper('customer')->__('Customer Since'),
|
109 |
-
'type' => 'datetime',
|
110 |
-
'align' => 'center',
|
111 |
-
'index' => 'created_at',
|
112 |
-
'gmtoffset' => true
|
113 |
-
));
|
114 |
-
|
115 |
-
if (!Mage::app()->isSingleStoreMode()) {
|
116 |
-
$this->addColumn('website_id', array(
|
117 |
-
'header' => Mage::helper('customer')->__('Website'),
|
118 |
-
'align' => 'center',
|
119 |
-
'width' => '80px',
|
120 |
-
'type' => 'options',
|
121 |
-
'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true),
|
122 |
-
'index' => 'website_id',
|
123 |
-
));
|
124 |
-
}
|
125 |
-
|
126 |
-
$this->addColumn('action',
|
127 |
-
array(
|
128 |
-
'header' => Mage::helper('customer')->__('Action'),
|
129 |
-
'width' => '100',
|
130 |
-
'type' => 'action',
|
131 |
-
'getter' => 'getId',
|
132 |
-
'actions' => array(
|
133 |
-
array(
|
134 |
-
'caption' => Mage::helper('customer')->__('Edit'),
|
135 |
-
'url' => array('base'=> '*/*/edit'),
|
136 |
-
'field' => 'id'
|
137 |
-
)
|
138 |
-
),
|
139 |
-
'filter' => false,
|
140 |
-
'sortable' => false,
|
141 |
-
'index' => 'stores',
|
142 |
-
'is_system' => true,
|
143 |
-
));
|
144 |
-
|
145 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV'));
|
146 |
-
$this->addExportType('*/*/exportXml', Mage::helper('customer')->__('Excel XML'));
|
147 |
-
return parent::_prepareColumns();
|
148 |
-
}
|
149 |
-
|
150 |
-
protected function _prepareMassaction()
|
151 |
-
{
|
152 |
-
$this->setMassactionIdField('entity_id');
|
153 |
-
$this->getMassactionBlock()->setFormFieldName('customer');
|
154 |
-
|
155 |
-
$this->getMassactionBlock()->addItem('delete', array(
|
156 |
-
'label' => Mage::helper('customer')->__('Delete'),
|
157 |
-
'url' => $this->getUrl('*/*/massDelete'),
|
158 |
-
'confirm' => Mage::helper('customer')->__('Are you sure?')
|
159 |
-
));
|
160 |
-
|
161 |
-
$this->getMassactionBlock()->addItem('newsletter_subscribe', array(
|
162 |
-
'label' => Mage::helper('customer')->__('Subscribe to Newsletter'),
|
163 |
-
'url' => $this->getUrl('*/*/massSubscribe')
|
164 |
-
));
|
165 |
-
|
166 |
-
$this->getMassactionBlock()->addItem('newsletter_unsubscribe', array(
|
167 |
-
'label' => Mage::helper('customer')->__('Unsubscribe from Newsletter'),
|
168 |
-
'url' => $this->getUrl('*/*/massUnsubscribe')
|
169 |
-
));
|
170 |
-
|
171 |
-
$groups = $this->helper('customer')->getGroups()->toOptionArray();
|
172 |
-
|
173 |
-
array_unshift($groups, array('label'=> '', 'value'=> ''));
|
174 |
-
$this->getMassactionBlock()->addItem('assign_group', array(
|
175 |
-
'label' => Mage::helper('customer')->__('Assign a Customer Group'),
|
176 |
-
'url' => $this->getUrl('*/*/massAssignGroup'),
|
177 |
-
'additional' => array(
|
178 |
-
'visibility' => array(
|
179 |
-
'name' => 'group',
|
180 |
-
'type' => 'select',
|
181 |
-
'class' => 'required-entry',
|
182 |
-
'label' => Mage::helper('customer')->__('Group'),
|
183 |
-
'values' => $groups
|
184 |
-
)
|
185 |
-
)
|
186 |
-
));
|
187 |
-
|
188 |
-
return $this;
|
189 |
-
}
|
190 |
-
|
191 |
-
public function getGridUrl()
|
192 |
-
{
|
193 |
-
return $this->getUrl('*/*/grid', array('_current'=> true));
|
194 |
-
}
|
195 |
-
|
196 |
-
public function getRowUrl($row)
|
197 |
-
{
|
198 |
-
return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
|
199 |
-
}
|
200 |
}
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* $Id: Grid.php 27 2012-01-24 09:56:23Z cesav $
|
4 |
+
* $HeadURL: https://sources.mpl.intranet/svn/monext/trunk/Payline/Monext/Payline/Block/Adminhtml/Customer/Grid.php $
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Monext_Payline_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
9 |
+
{
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
parent::__construct();
|
13 |
+
$this->setId('customerGrid');
|
14 |
+
$this->setUseAjax(true);
|
15 |
+
$this->setDefaultSort('entity_id');
|
16 |
+
$this->setSaveParametersInSession(true);
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _prepareCollection()
|
20 |
+
{
|
21 |
+
$collection = Mage::getResourceModel('customer/customer_collection')
|
22 |
+
->addNameToSelect()
|
23 |
+
->addAttributeToSelect('email')
|
24 |
+
->addAttributeToSelect('created_at')
|
25 |
+
->addAttributeToSelect('group_id')
|
26 |
+
->addAttributeToSelect('wallet_id')
|
27 |
+
->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
|
28 |
+
->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
|
29 |
+
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
|
30 |
+
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
|
31 |
+
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');
|
32 |
+
|
33 |
+
$this->setCollection($collection);
|
34 |
+
|
35 |
+
return parent::_prepareCollection();
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareColumns()
|
39 |
+
{
|
40 |
+
$this->addColumn('entity_id', array(
|
41 |
+
'header' => Mage::helper('customer')->__('ID'),
|
42 |
+
'width' => '50px',
|
43 |
+
'index' => 'entity_id',
|
44 |
+
'type' => 'number',
|
45 |
+
));
|
46 |
+
/*$this->addColumn('firstname', array(
|
47 |
+
'header' => Mage::helper('customer')->__('First Name'),
|
48 |
+
'index' => 'firstname'
|
49 |
+
));
|
50 |
+
$this->addColumn('lastname', array(
|
51 |
+
'header' => Mage::helper('customer')->__('Last Name'),
|
52 |
+
'index' => 'lastname'
|
53 |
+
));*/
|
54 |
+
$this->addColumn('name', array(
|
55 |
+
'header' => Mage::helper('customer')->__('Name'),
|
56 |
+
'index' => 'name'
|
57 |
+
));
|
58 |
+
$this->addColumn('email', array(
|
59 |
+
'header' => Mage::helper('customer')->__('Email'),
|
60 |
+
'width' => '150',
|
61 |
+
'index' => 'email'
|
62 |
+
));
|
63 |
+
$this->addColumn('wallet_id', array(
|
64 |
+
'header' => Mage::helper('payline')->__('Wallet Payline'),
|
65 |
+
'width' => '150',
|
66 |
+
'index' => 'wallet_id'
|
67 |
+
));
|
68 |
+
|
69 |
+
$groups = Mage::getResourceModel('customer/group_collection')
|
70 |
+
->addFieldToFilter('customer_group_id', array('gt'=> 0))
|
71 |
+
->load()
|
72 |
+
->toOptionHash();
|
73 |
+
|
74 |
+
$this->addColumn('group', array(
|
75 |
+
'header' => Mage::helper('customer')->__('Group'),
|
76 |
+
'width' => '100',
|
77 |
+
'index' => 'group_id',
|
78 |
+
'type' => 'options',
|
79 |
+
'options' => $groups,
|
80 |
+
));
|
81 |
+
|
82 |
+
$this->addColumn('Telephone', array(
|
83 |
+
'header' => Mage::helper('customer')->__('Telephone'),
|
84 |
+
'width' => '100',
|
85 |
+
'index' => 'billing_telephone'
|
86 |
+
));
|
87 |
+
|
88 |
+
$this->addColumn('billing_postcode', array(
|
89 |
+
'header' => Mage::helper('customer')->__('ZIP'),
|
90 |
+
'width' => '90',
|
91 |
+
'index' => 'billing_postcode',
|
92 |
+
));
|
93 |
+
|
94 |
+
$this->addColumn('billing_country_id', array(
|
95 |
+
'header' => Mage::helper('customer')->__('Country'),
|
96 |
+
'width' => '100',
|
97 |
+
'type' => 'country',
|
98 |
+
'index' => 'billing_country_id',
|
99 |
+
));
|
100 |
+
|
101 |
+
$this->addColumn('billing_region', array(
|
102 |
+
'header' => Mage::helper('customer')->__('State/Province'),
|
103 |
+
'width' => '100',
|
104 |
+
'index' => 'billing_region',
|
105 |
+
));
|
106 |
+
|
107 |
+
$this->addColumn('customer_since', array(
|
108 |
+
'header' => Mage::helper('customer')->__('Customer Since'),
|
109 |
+
'type' => 'datetime',
|
110 |
+
'align' => 'center',
|
111 |
+
'index' => 'created_at',
|
112 |
+
'gmtoffset' => true
|
113 |
+
));
|
114 |
+
|
115 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
116 |
+
$this->addColumn('website_id', array(
|
117 |
+
'header' => Mage::helper('customer')->__('Website'),
|
118 |
+
'align' => 'center',
|
119 |
+
'width' => '80px',
|
120 |
+
'type' => 'options',
|
121 |
+
'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true),
|
122 |
+
'index' => 'website_id',
|
123 |
+
));
|
124 |
+
}
|
125 |
+
|
126 |
+
$this->addColumn('action',
|
127 |
+
array(
|
128 |
+
'header' => Mage::helper('customer')->__('Action'),
|
129 |
+
'width' => '100',
|
130 |
+
'type' => 'action',
|
131 |
+
'getter' => 'getId',
|
132 |
+
'actions' => array(
|
133 |
+
array(
|
134 |
+
'caption' => Mage::helper('customer')->__('Edit'),
|
135 |
+
'url' => array('base'=> '*/*/edit'),
|
136 |
+
'field' => 'id'
|
137 |
+
)
|
138 |
+
),
|
139 |
+
'filter' => false,
|
140 |
+
'sortable' => false,
|
141 |
+
'index' => 'stores',
|
142 |
+
'is_system' => true,
|
143 |
+
));
|
144 |
+
|
145 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV'));
|
146 |
+
$this->addExportType('*/*/exportXml', Mage::helper('customer')->__('Excel XML'));
|
147 |
+
return parent::_prepareColumns();
|
148 |
+
}
|
149 |
+
|
150 |
+
protected function _prepareMassaction()
|
151 |
+
{
|
152 |
+
$this->setMassactionIdField('entity_id');
|
153 |
+
$this->getMassactionBlock()->setFormFieldName('customer');
|
154 |
+
|
155 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
156 |
+
'label' => Mage::helper('customer')->__('Delete'),
|
157 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
158 |
+
'confirm' => Mage::helper('customer')->__('Are you sure?')
|
159 |
+
));
|
160 |
+
|
161 |
+
$this->getMassactionBlock()->addItem('newsletter_subscribe', array(
|
162 |
+
'label' => Mage::helper('customer')->__('Subscribe to Newsletter'),
|
163 |
+
'url' => $this->getUrl('*/*/massSubscribe')
|
164 |
+
));
|
165 |
+
|
166 |
+
$this->getMassactionBlock()->addItem('newsletter_unsubscribe', array(
|
167 |
+
'label' => Mage::helper('customer')->__('Unsubscribe from Newsletter'),
|
168 |
+
'url' => $this->getUrl('*/*/massUnsubscribe')
|
169 |
+
));
|
170 |
+
|
171 |
+
$groups = $this->helper('customer')->getGroups()->toOptionArray();
|
172 |
+
|
173 |
+
array_unshift($groups, array('label'=> '', 'value'=> ''));
|
174 |
+
$this->getMassactionBlock()->addItem('assign_group', array(
|
175 |
+
'label' => Mage::helper('customer')->__('Assign a Customer Group'),
|
176 |
+
'url' => $this->getUrl('*/*/massAssignGroup'),
|
177 |
+
'additional' => array(
|
178 |
+
'visibility' => array(
|
179 |
+
'name' => 'group',
|
180 |
+
'type' => 'select',
|
181 |
+
'class' => 'required-entry',
|
182 |
+
'label' => Mage::helper('customer')->__('Group'),
|
183 |
+
'values' => $groups
|
184 |
+
)
|
185 |
+
)
|
186 |
+
));
|
187 |
+
|
188 |
+
return $this;
|
189 |
+
}
|
190 |
+
|
191 |
+
public function getGridUrl()
|
192 |
+
{
|
193 |
+
return $this->getUrl('*/*/grid', array('_current'=> true));
|
194 |
+
}
|
195 |
+
|
196 |
+
public function getRowUrl($row)
|
197 |
+
{
|
198 |
+
return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
|
199 |
+
}
|
200 |
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts.php
CHANGED
@@ -1,57 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Block_Adminhtml_Managecontracts extends Mage_Adminhtml_Block_Widget_Container
|
4 |
-
{
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Set template
|
8 |
-
*/
|
9 |
-
public function __construct()
|
10 |
-
{
|
11 |
-
parent::__construct();
|
12 |
-
$this->setTemplate('payline/contracts.phtml');
|
13 |
-
}
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Prepare button and grid
|
17 |
-
*
|
18 |
-
* @return Monext_Payline_Block_Adminhtml_Managecontracts
|
19 |
-
*/
|
20 |
-
protected function _prepareLayout()
|
21 |
-
{
|
22 |
-
$this->_removeButton('add');
|
23 |
-
|
24 |
-
$this->_addButton('import_contract', array(
|
25 |
-
'label' => Mage::helper('payline')->__('Import contracts'),
|
26 |
-
'onclick' => "setLocation('".$this->getUrl('*/*/import')."')",
|
27 |
-
'class' => 'add')
|
28 |
-
);
|
29 |
-
|
30 |
-
$this->setChild('grid', $this->getLayout()->createBlock('payline/adminhtml_managecontracts_grid', 'contract.grid'));
|
31 |
-
return parent::_prepareLayout();
|
32 |
-
}
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Render grid
|
37 |
-
*
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
public function getGridHtml()
|
41 |
-
{
|
42 |
-
return $this->getChildHtml('grid');
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Check whether it is single store mode
|
47 |
-
*
|
48 |
-
* @return bool
|
49 |
-
*/
|
50 |
-
public function isSingleStoreMode()
|
51 |
-
{
|
52 |
-
if (!Mage::app()->isSingleStoreMode()) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
return true;
|
56 |
-
}
|
57 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_Managecontracts extends Mage_Adminhtml_Block_Widget_Container
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Set template
|
8 |
+
*/
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
parent::__construct();
|
12 |
+
$this->setTemplate('payline/contracts.phtml');
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Prepare button and grid
|
17 |
+
*
|
18 |
+
* @return Monext_Payline_Block_Adminhtml_Managecontracts
|
19 |
+
*/
|
20 |
+
protected function _prepareLayout()
|
21 |
+
{
|
22 |
+
$this->_removeButton('add');
|
23 |
+
|
24 |
+
$this->_addButton('import_contract', array(
|
25 |
+
'label' => Mage::helper('payline')->__('Import contracts'),
|
26 |
+
'onclick' => "setLocation('".$this->getUrl('*/*/import')."')",
|
27 |
+
'class' => 'add')
|
28 |
+
);
|
29 |
+
|
30 |
+
$this->setChild('grid', $this->getLayout()->createBlock('payline/adminhtml_managecontracts_grid', 'contract.grid'));
|
31 |
+
return parent::_prepareLayout();
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Render grid
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function getGridHtml()
|
41 |
+
{
|
42 |
+
return $this->getChildHtml('grid');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Check whether it is single store mode
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
public function isSingleStoreMode()
|
51 |
+
{
|
52 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
return true;
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Edit.php
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Block_Adminhtml_Managecontracts_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->_objectId = 'id';
|
8 |
-
$this->_blockGroup = 'payline';
|
9 |
-
$this->_controller = 'adminhtml_managecontracts';
|
10 |
-
|
11 |
-
parent::__construct();
|
12 |
-
|
13 |
-
$this->setData('form_action_url', Mage::getUrl('*/payline_managecontracts/save'));
|
14 |
-
|
15 |
-
$this->_updateButton('save', 'label', Mage::helper('payline')->__('Save contract'));
|
16 |
-
$this->_removeButton('delete');
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get edit form container header text
|
21 |
-
*
|
22 |
-
* @return string
|
23 |
-
*/
|
24 |
-
public function getHeaderText()
|
25 |
-
{
|
26 |
-
return Mage::helper('payline')->__('Edit contract');
|
27 |
-
}
|
28 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_Managecontracts_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->_objectId = 'id';
|
8 |
+
$this->_blockGroup = 'payline';
|
9 |
+
$this->_controller = 'adminhtml_managecontracts';
|
10 |
+
|
11 |
+
parent::__construct();
|
12 |
+
|
13 |
+
$this->setData('form_action_url', Mage::getUrl('*/payline_managecontracts/save'));
|
14 |
+
|
15 |
+
$this->_updateButton('save', 'label', Mage::helper('payline')->__('Save contract'));
|
16 |
+
$this->_removeButton('delete');
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get edit form container header text
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
public function getHeaderText()
|
25 |
+
{
|
26 |
+
return Mage::helper('payline')->__('Edit contract');
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Edit/Form.php
CHANGED
@@ -1,95 +1,105 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Block_Adminhtml_Managecontracts_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Init form
|
7 |
-
*/
|
8 |
-
public function __construct()
|
9 |
-
{
|
10 |
-
parent::__construct();
|
11 |
-
$this->setId('contract_form');
|
12 |
-
$this->setTitle(Mage::helper('payline')->__('Contract Informations'));
|
13 |
-
}
|
14 |
-
|
15 |
-
protected function _prepareForm()
|
16 |
-
{
|
17 |
-
$model = Mage::registry('current_contract');
|
18 |
-
|
19 |
-
$form = new Varien_Data_Form(array(
|
20 |
-
'id' => 'edit_form',
|
21 |
-
'action' => $this->getData('action'),
|
22 |
-
'method' => 'post',
|
23 |
-
'enctype' => 'multipart/form-data'
|
24 |
-
));
|
25 |
-
|
26 |
-
/*************************************************************************************************************/
|
27 |
-
/* Fieldset */
|
28 |
-
/*************************************************************************************************************/
|
29 |
-
$fieldset = $form->addFieldset('base_fieldset', array(
|
30 |
-
'legend' => Mage::helper('payline')->__('Contract Informations'),
|
31 |
-
'class' => 'fieldset-wide'
|
32 |
-
));
|
33 |
-
|
34 |
-
|
35 |
-
$fieldset->addField('name', 'text', array(
|
36 |
-
'name' => 'name',
|
37 |
-
'label' => Mage::helper('payline')->__('Name'),
|
38 |
-
'title' => Mage::helper('payline')->__('Name'),
|
39 |
-
'required' => true,
|
40 |
-
'disabled' => true
|
41 |
-
));
|
42 |
-
|
43 |
-
$fieldset->addField('number', 'text', array(
|
44 |
-
'name' => 'number',
|
45 |
-
'label' => Mage::helper('payline')->__('Number'),
|
46 |
-
'title' => Mage::helper('payline')->__('Number'),
|
47 |
-
'required' => true,
|
48 |
-
'disabled' => true
|
49 |
-
));
|
50 |
-
|
51 |
-
$fieldset->addField('point_of_sell', 'text', array(
|
52 |
-
'name' => 'point_of_sell',
|
53 |
-
'label' => Mage::helper('payline')->__('Point Of Sell'),
|
54 |
-
'title' => Mage::helper('payline')->__('Point Of Sell'),
|
55 |
-
'required' => true,
|
56 |
-
'disabled' => true
|
57 |
-
));
|
58 |
-
|
59 |
-
$fieldset->addField('is_primary', 'checkbox', array(
|
60 |
-
'name' => 'is_primary',
|
61 |
-
'label' => Mage::helper('payline')->__('Primary'),
|
62 |
-
'title' => Mage::helper('payline')->__('Primary'),
|
63 |
-
'required' => false,
|
64 |
-
'checked' => ($model->getIsPrimary() ? true : false),
|
65 |
-
'onclick' => 'this.value = this.checked ? 1 : 0'
|
66 |
-
));
|
67 |
-
|
68 |
-
$fieldset->addField('is_secondary', 'checkbox', array(
|
69 |
-
'name' => 'is_secondary',
|
70 |
-
'label' => Mage::helper('payline')->__('Secondary'),
|
71 |
-
'title' => Mage::helper('payline')->__('Secondary'),
|
72 |
-
'required' => false,
|
73 |
-
'checked' => ($model->getIsSecondary() ? true : false),
|
74 |
-
'onclick' => 'this.value = this.checked ? 1 : 0'
|
75 |
-
));
|
76 |
-
|
77 |
-
/*************************************************************************************************************/
|
78 |
-
/* Id */
|
79 |
-
/*************************************************************************************************************/
|
80 |
-
|
81 |
-
// Process id is transmitted when editting processes
|
82 |
-
if ($model->getId()) {
|
83 |
-
$fieldset->addField('id', 'hidden', array(
|
84 |
-
'name' => 'id',
|
85 |
-
));
|
86 |
-
}
|
87 |
-
|
88 |
-
$form->setValues($model->getData());
|
89 |
-
$form->setUseContainer(true);
|
90 |
-
$this->setForm($form);
|
91 |
-
|
92 |
-
return parent::_prepareForm();
|
93 |
-
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_Managecontracts_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Init form
|
7 |
+
*/
|
8 |
+
public function __construct()
|
9 |
+
{
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('contract_form');
|
12 |
+
$this->setTitle(Mage::helper('payline')->__('Contract Informations'));
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareForm()
|
16 |
+
{
|
17 |
+
$model = Mage::registry('current_contract');
|
18 |
+
|
19 |
+
$form = new Varien_Data_Form(array(
|
20 |
+
'id' => 'edit_form',
|
21 |
+
'action' => $this->getData('action'),
|
22 |
+
'method' => 'post',
|
23 |
+
'enctype' => 'multipart/form-data'
|
24 |
+
));
|
25 |
+
|
26 |
+
/*************************************************************************************************************/
|
27 |
+
/* Fieldset */
|
28 |
+
/*************************************************************************************************************/
|
29 |
+
$fieldset = $form->addFieldset('base_fieldset', array(
|
30 |
+
'legend' => Mage::helper('payline')->__('Contract Informations'),
|
31 |
+
'class' => 'fieldset-wide'
|
32 |
+
));
|
33 |
+
|
34 |
+
|
35 |
+
$fieldset->addField('name', 'text', array(
|
36 |
+
'name' => 'name',
|
37 |
+
'label' => Mage::helper('payline')->__('Name'),
|
38 |
+
'title' => Mage::helper('payline')->__('Name'),
|
39 |
+
'required' => true,
|
40 |
+
'disabled' => true
|
41 |
+
));
|
42 |
+
|
43 |
+
$fieldset->addField('number', 'text', array(
|
44 |
+
'name' => 'number',
|
45 |
+
'label' => Mage::helper('payline')->__('Number'),
|
46 |
+
'title' => Mage::helper('payline')->__('Number'),
|
47 |
+
'required' => true,
|
48 |
+
'disabled' => true
|
49 |
+
));
|
50 |
+
|
51 |
+
$fieldset->addField('point_of_sell', 'text', array(
|
52 |
+
'name' => 'point_of_sell',
|
53 |
+
'label' => Mage::helper('payline')->__('Point Of Sell'),
|
54 |
+
'title' => Mage::helper('payline')->__('Point Of Sell'),
|
55 |
+
'required' => true,
|
56 |
+
'disabled' => true
|
57 |
+
));
|
58 |
+
|
59 |
+
$fieldset->addField('is_primary', 'checkbox', array(
|
60 |
+
'name' => 'is_primary',
|
61 |
+
'label' => Mage::helper('payline')->__('Primary'),
|
62 |
+
'title' => Mage::helper('payline')->__('Primary'),
|
63 |
+
'required' => false,
|
64 |
+
'checked' => ($model->getIsPrimary() ? true : false),
|
65 |
+
'onclick' => 'this.value = this.checked ? 1 : 0'
|
66 |
+
));
|
67 |
+
|
68 |
+
$fieldset->addField('is_secondary', 'checkbox', array(
|
69 |
+
'name' => 'is_secondary',
|
70 |
+
'label' => Mage::helper('payline')->__('Secondary'),
|
71 |
+
'title' => Mage::helper('payline')->__('Secondary'),
|
72 |
+
'required' => false,
|
73 |
+
'checked' => ($model->getIsSecondary() ? true : false),
|
74 |
+
'onclick' => 'this.value = this.checked ? 1 : 0'
|
75 |
+
));
|
76 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
$fieldset->addField('is_secure', 'checkbox', array(
|
79 |
+
'name' => 'is_secure',
|
80 |
+
'label' => Mage::helper('payline')->__('Secure'),
|
81 |
+
'title' => Mage::helper('payline')->__('Secure'),
|
82 |
+
'required' => false,
|
83 |
+
'checked' => ($model->getIsSecure() ? true : false),
|
84 |
+
'onclick' => 'this.value = this.checked ? 1 : 0'
|
85 |
+
));
|
86 |
+
|
87 |
+
/*************************************************************************************************************/
|
88 |
+
/* Id */
|
89 |
+
/*************************************************************************************************************/
|
90 |
+
|
91 |
+
// Process id is transmitted when editting processes
|
92 |
+
if ($model->getId()) {
|
93 |
+
$fieldset->addField('id', 'hidden', array(
|
94 |
+
'name' => 'id',
|
95 |
+
));
|
96 |
+
}
|
97 |
+
|
98 |
+
$form->setValues($model->getData());
|
99 |
+
$form->setUseContainer(true);
|
100 |
+
$this->setForm($form);
|
101 |
+
|
102 |
+
return parent::_prepareForm();
|
103 |
+
}
|
104 |
+
|
105 |
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Managecontracts/Grid.php
CHANGED
@@ -1,172 +1,197 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
));
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
$this->setDefaultDir('ASC');
|
96 |
-
|
97 |
-
return parent::_prepareColumns();
|
98 |
-
}
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
protected function _preparePointOfSell() {
|
103 |
-
$pointOfSells = Mage::getModel('payline/contract')->getCollection()
|
104 |
-
->getSelect()
|
105 |
-
->reset(Zend_Db_Select::COLUMNS)
|
106 |
-
->columns('point_of_sell', 'main_table')
|
107 |
-
->distinct();
|
108 |
-
$result = $pointOfSells->query()->fetchAll();
|
109 |
-
|
110 |
-
$res = array();
|
111 |
-
foreach ($result as $p) {
|
112 |
-
$res[$p['point_of_sell']] = $p['point_of_sell'];
|
113 |
-
}
|
114 |
-
|
115 |
-
return $res;
|
116 |
-
}
|
117 |
-
|
118 |
-
protected function _prepareMassaction()
|
119 |
-
{
|
120 |
-
$this->setMassactionIdField('id');
|
121 |
-
$this->getMassactionBlock()->setFormFieldName('contract');
|
122 |
-
|
123 |
-
$this->getMassactionBlock()->addItem('walletList', array(
|
124 |
-
'label' => Mage::helper('payline')->__('Subscribe to wallet'),
|
125 |
-
'url' => $this->getUrl('*/*/massWallet', array('_current'=>true)),
|
126 |
-
'additional' => array(
|
127 |
-
'visibility' => array(
|
128 |
-
'name' => 'walletList',
|
129 |
-
'type' => 'select',
|
130 |
-
'class' => 'required-entry',
|
131 |
-
'label' => Mage::helper('payline')->__('Set'),
|
132 |
-
'values' => array(
|
133 |
-
1 => 'On',
|
134 |
-
0 => 'Off'
|
135 |
-
)
|
136 |
)
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
$this
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
)
|
155 |
-
));
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
return $this;
|
160 |
-
}
|
161 |
-
|
162 |
-
public function getGridUrl()
|
163 |
-
{
|
164 |
-
return $this->getUrl('*/*/grid', array('_current'=>true));
|
165 |
-
}
|
166 |
-
|
167 |
-
public function getRowUrl($row)
|
168 |
-
{
|
169 |
-
|
170 |
-
}
|
171 |
-
|
172 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_Managecontracts_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('paylineManageContractsGrid');
|
10 |
+
$this->setUseAjax(true);
|
11 |
+
//$this->setVarNameFilter('contract_filter');
|
12 |
+
$this->setDefaultLimit(50);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _getStore()
|
16 |
+
{
|
17 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
18 |
+
return Mage::app()->getStore($storeId);
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
protected function _prepareCollection()
|
23 |
+
{
|
24 |
+
$collection = Mage::getModel('payline/contract')->getCollection();
|
25 |
+
$store = $this->getRequest()->getParam('store', '');
|
26 |
+
$website = $this->getRequest()->getParam('website', '');
|
27 |
+
if($store) {
|
28 |
+
$storeId = Mage::getModel('core/store')->load($store)->getId();
|
29 |
+
$collection->addStoreFilter($storeId);
|
30 |
+
} elseif ($website) {
|
31 |
+
$websiteId = Mage::getModel('core/website')->load($website)->getId();
|
32 |
+
$collection->addWebsiteFilter($websiteId);
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->setCollection($collection);
|
36 |
+
|
37 |
+
$temp = clone($collection);
|
38 |
+
foreach($temp as $c) {
|
39 |
+
if($c->getIsPrimary()) {
|
40 |
+
$this->setDefaultFilter(array('point_of_sell'=>$c->getPointOfSell()));
|
41 |
+
break;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
return parent::_prepareCollection();
|
46 |
+
}
|
47 |
+
|
48 |
+
protected function _prepareColumns()
|
49 |
+
{
|
50 |
+
$this->addColumn('name', array(
|
51 |
+
'header' => Mage::helper('payline')->__('Name'),
|
52 |
+
'index' => 'name',
|
53 |
+
'filter' => false,
|
54 |
+
'type' => 'text'
|
55 |
+
));
|
56 |
+
|
57 |
+
$this->addColumn('number', array(
|
58 |
+
'header' => Mage::helper('payline')->__('Number'),
|
59 |
+
'index' => 'number',
|
60 |
+
'filter' => false,
|
61 |
+
'type' => 'text'
|
62 |
+
));
|
63 |
+
|
64 |
+
$this->addColumn('point_of_sell', array(
|
65 |
+
'header' => Mage::helper('payline')->__('Point Of Sell'),
|
66 |
+
'index' => 'point_of_sell',
|
67 |
+
'type' => 'text',
|
68 |
+
'filter' => false
|
69 |
+
));
|
70 |
+
|
71 |
+
$this->addColumn('is_primary', array(
|
72 |
+
'header' => Mage::helper('payline')->__('Primary'),
|
73 |
+
'index' => 'is_primary',
|
74 |
+
'type' => 'options',
|
75 |
+
'filter' => false,
|
76 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
77 |
+
));
|
78 |
+
|
79 |
+
$this->addColumn('is_secondary', array(
|
80 |
+
'header' => Mage::helper('payline')->__('Secondary'),
|
81 |
+
'index' => 'is_secondary',
|
82 |
+
'type' => 'options',
|
83 |
+
'filter' => false,
|
84 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
85 |
+
));
|
86 |
+
|
87 |
|
88 |
+
$this->addColumn('is_secure', array(
|
89 |
+
'header' => Mage::helper('payline')->__('Secure'),
|
90 |
+
'index' => 'is_secure',
|
91 |
+
'type' => 'options',
|
92 |
+
'filter' => false,
|
93 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
94 |
+
));
|
95 |
+
|
96 |
+
$this->addColumn('is_included_wallet_list', array(
|
97 |
+
'header' => Mage::helper('payline')->__('Wallet'),
|
98 |
+
'index' => 'is_included_wallet_list',
|
99 |
+
'type' => 'options',
|
100 |
+
'filter' => false,
|
101 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
102 |
+
));
|
103 |
+
$this->setDefaultSort('point_of_sell', 'desc');
|
104 |
+
$this->setDefaultDir('ASC');
|
105 |
+
|
106 |
+
return parent::_prepareColumns();
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
protected function _preparePointOfSell() {
|
112 |
+
$pointOfSells = Mage::getModel('payline/contract')->getCollection()
|
113 |
+
->getSelect()
|
114 |
+
->reset(Zend_Db_Select::COLUMNS)
|
115 |
+
->columns('point_of_sell', 'main_table')
|
116 |
+
->distinct();
|
117 |
+
$result = $pointOfSells->query()->fetchAll();
|
118 |
+
|
119 |
+
$res = array();
|
120 |
+
foreach ($result as $p) {
|
121 |
+
$res[$p['point_of_sell']] = $p['point_of_sell'];
|
122 |
+
}
|
123 |
+
|
124 |
+
return $res;
|
125 |
+
}
|
126 |
+
|
127 |
+
protected function _prepareMassaction()
|
128 |
+
{
|
129 |
+
$this->setMassactionIdField('id');
|
130 |
+
$this->getMassactionBlock()->setFormFieldName('contract');
|
131 |
+
|
132 |
+
$this->getMassactionBlock()->addItem('walletList', array(
|
133 |
+
'label' => Mage::helper('payline')->__('Subscribe to wallet'),
|
134 |
+
'url' => $this->getUrl('*/*/massWallet', array('_current'=>true)),
|
135 |
+
'additional' => array(
|
136 |
+
'visibility' => array(
|
137 |
+
'name' => 'walletList',
|
138 |
+
'type' => 'select',
|
139 |
+
'class' => 'required-entry',
|
140 |
+
'label' => Mage::helper('payline')->__('Set'),
|
141 |
+
'values' => array(
|
142 |
+
1 => 'On',
|
143 |
+
0 => 'Off'
|
144 |
+
)
|
145 |
+
)
|
146 |
+
)
|
147 |
+
) );
|
148 |
+
|
149 |
+
$this->getMassactionBlock()->addItem('status', array(
|
150 |
+
'label'=> Mage::helper('payline')->__('Change status'),
|
151 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
152 |
+
'additional' => array(
|
153 |
+
'visibility' => array(
|
154 |
+
'name' => 'status',
|
155 |
+
'type' => 'select',
|
156 |
+
'class' => 'required-entry',
|
157 |
+
'label' => Mage::helper('catalog')->__('Status'),
|
158 |
+
'values' => array(0 => Mage::helper('payline')->__('Primary'),
|
159 |
+
1 => Mage::helper('payline')->__('Secondary'),
|
160 |
+
2 => Mage::helper('payline')->__('Primary') . ' & ' . Mage::helper('payline')->__('Secondary'),
|
161 |
+
3 => Mage::helper('payline')->__('Nothing'))
|
162 |
+
)
|
163 |
+
)
|
164 |
+
));
|
165 |
+
|
166 |
+
$this->getMassactionBlock()->addItem('setSecure', array(
|
167 |
+
'label' => Mage::helper('payline')->__('Set as secured'),
|
168 |
+
'url' => $this->getUrl('*/*/massSecure', array('_current'=>true)),
|
169 |
+
'additional' => array(
|
170 |
+
'visibility' => array(
|
171 |
+
'name' => 'setSecure',
|
172 |
+
'type' => 'select',
|
173 |
+
'class' => 'required-entry',
|
174 |
+
'label' => Mage::helper('payline')->__('Set'),
|
175 |
+
'values' => array(
|
176 |
+
1 => 'On',
|
177 |
+
0 => 'Off'
|
178 |
+
)
|
179 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
)
|
181 |
+
) );
|
182 |
+
|
183 |
+
|
184 |
+
return $this;
|
185 |
+
}
|
186 |
+
|
187 |
+
public function getGridUrl()
|
188 |
+
{
|
189 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
190 |
+
}
|
191 |
+
|
192 |
+
public function getRowUrl($row)
|
193 |
+
{
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories.php
CHANGED
@@ -1,56 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
*
|
17 |
-
*
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
}
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Adminhtml_Manageproductcategories extends Mage_Adminhtml_Block_Widget_Container
|
3 |
+
{
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Set template
|
7 |
+
*/
|
8 |
+
public function __construct()
|
9 |
+
{
|
10 |
+
parent::__construct();
|
11 |
+
$this->setTemplate('payline/productcategories.phtml');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Prepare button and grid
|
16 |
+
*
|
17 |
+
* @return Monext_Payline_Block_Adminhtml_Manageproductcategories
|
18 |
+
*/
|
19 |
+
protected function _prepareLayout()
|
20 |
+
{
|
21 |
+
$this->_removeButton('add');
|
22 |
+
|
23 |
+
$this->_addButton('update', array(
|
24 |
+
'label' => Mage::helper('payline')->__('Insert unassigned categories'),
|
25 |
+
'onclick' => "setLocation('" . $this->getUrl('*/*/update') . "')"));
|
26 |
+
|
27 |
+
$this->_addButton('reset', array(
|
28 |
+
'label' => Mage::helper('payline')->__('Reset all assignments'),
|
29 |
+
'onclick' => "setLocation('" . $this->getUrl('*/*/reset') . "')"));
|
30 |
+
|
31 |
+
$this->setChild('grid', $this->getLayout()
|
32 |
+
->createBlock('payline/adminhtml_manageproductcategories_grid', 'productcategories.grid'));
|
33 |
+
|
34 |
+
return parent::_prepareLayout();
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Render grid
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function getGridHtml()
|
43 |
+
{
|
44 |
+
return $this->getChildHtml('grid');
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Check whether it is single store mode
|
49 |
+
*
|
50 |
+
* @return bool
|
51 |
+
*/
|
52 |
+
public function isSingleStoreMode()
|
53 |
+
{
|
54 |
+
if (! Mage::app()->isSingleStoreMode()) {
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
return true;
|
58 |
+
}
|
59 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories/Assign/Form.php
CHANGED
@@ -1,73 +1,73 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Assign store product category to Payline product category
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Block_Adminhtml_Manageproductcategories_Assign_Form extends Mage_Adminhtml_Block_Widget_Form
|
6 |
-
{
|
7 |
-
|
8 |
-
private $_storeCatLabel;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Prepare form fields
|
12 |
-
*
|
13 |
-
* @return Monext_Payline_Block_Adminhtml_Manageproductcategories_Assign_Form
|
14 |
-
*/
|
15 |
-
protected function _prepareForm()
|
16 |
-
{
|
17 |
-
$rowId = Mage::getSingleton('core/session')->getData('rowCatToAssign');
|
18 |
-
$assignment = Mage::getModel('payline/productcategories')->load($rowId)->getData();
|
19 |
-
$this->_storeCatLabel = $assignment['store_category_label'];
|
20 |
-
|
21 |
-
$form = new Varien_Data_Form(array(
|
22 |
-
'id' => 'edit_form',
|
23 |
-
'action' => $this->getUrl('*/payline_manageproductcategories/assignPost'),
|
24 |
-
'method' => 'post'
|
25 |
-
));
|
26 |
-
|
27 |
-
$form->setUseContainer(true);
|
28 |
-
$this->setForm($form);
|
29 |
-
|
30 |
-
$fieldset = $form->addFieldset('base_fieldset', array(
|
31 |
-
'legend' => Mage::helper('payline')->__('
|
32 |
-
'class' => 'fieldset-wide'
|
33 |
-
));
|
34 |
-
|
35 |
-
$paylinecat = Mage::getModel('payline/datasource_paylineproductcategories')->toOptionArray();
|
36 |
-
|
37 |
-
$fieldset->addField('paylinecat', 'select',
|
38 |
-
array(
|
39 |
-
'name' => 'paylinecat',
|
40 |
-
'label' => Mage::helper('payline')->__('Payline category'),
|
41 |
-
'class' => 'required-entry',
|
42 |
-
'values' => $paylinecat,
|
43 |
-
'required' => true,
|
44 |
-
)
|
45 |
-
);
|
46 |
-
|
47 |
-
return parent::_prepareForm();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Retrieve text for header element
|
52 |
-
*
|
53 |
-
* @return string
|
54 |
-
*/
|
55 |
-
public function getHeaderText()
|
56 |
-
{
|
57 |
-
return Mage::helper('payline')->__('Assign Payline product category to').' '.$this->_storeCatLabel;
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
*
|
62 |
-
* Add submit button
|
63 |
-
*/
|
64 |
-
public function getButtonsHtml()
|
65 |
-
{
|
66 |
-
$addButtonData = array(
|
67 |
-
'label' => Mage::helper('payline')->__('Save assignment'),
|
68 |
-
'onclick' => 'edit_form.submit()',
|
69 |
-
'class' => 'add',
|
70 |
-
);
|
71 |
-
return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
|
72 |
-
}
|
73 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Assign store product category to Payline product category
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Block_Adminhtml_Manageproductcategories_Assign_Form extends Mage_Adminhtml_Block_Widget_Form
|
6 |
+
{
|
7 |
+
|
8 |
+
private $_storeCatLabel;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Prepare form fields
|
12 |
+
*
|
13 |
+
* @return Monext_Payline_Block_Adminhtml_Manageproductcategories_Assign_Form
|
14 |
+
*/
|
15 |
+
protected function _prepareForm()
|
16 |
+
{
|
17 |
+
$rowId = Mage::getSingleton('core/session')->getData('rowCatToAssign');
|
18 |
+
$assignment = Mage::getModel('payline/productcategories')->load($rowId)->getData();
|
19 |
+
$this->_storeCatLabel = $assignment['store_category_label'];
|
20 |
+
|
21 |
+
$form = new Varien_Data_Form(array(
|
22 |
+
'id' => 'edit_form',
|
23 |
+
'action' => $this->getUrl('*/payline_manageproductcategories/assignPost'),
|
24 |
+
'method' => 'post'
|
25 |
+
));
|
26 |
+
|
27 |
+
$form->setUseContainer(true);
|
28 |
+
$this->setForm($form);
|
29 |
+
|
30 |
+
$fieldset = $form->addFieldset('base_fieldset', array(
|
31 |
+
'legend' => Mage::helper('payline')->__('Choose a category for').' '.$this->_storeCatLabel,
|
32 |
+
'class' => 'fieldset-wide'
|
33 |
+
));
|
34 |
+
|
35 |
+
$paylinecat = Mage::getModel('payline/datasource_paylineproductcategories')->toOptionArray();
|
36 |
+
|
37 |
+
$fieldset->addField('paylinecat', 'select',
|
38 |
+
array(
|
39 |
+
'name' => 'paylinecat',
|
40 |
+
'label' => Mage::helper('payline')->__('Payline category'),
|
41 |
+
'class' => 'required-entry',
|
42 |
+
'values' => $paylinecat,
|
43 |
+
'required' => true,
|
44 |
+
)
|
45 |
+
);
|
46 |
+
|
47 |
+
return parent::_prepareForm();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Retrieve text for header element
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function getHeaderText()
|
56 |
+
{
|
57 |
+
return Mage::helper('payline')->__('Assign Payline product category to').' '.$this->_storeCatLabel;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
*
|
62 |
+
* Add submit button
|
63 |
+
*/
|
64 |
+
public function getButtonsHtml()
|
65 |
+
{
|
66 |
+
$addButtonData = array(
|
67 |
+
'label' => Mage::helper('payline')->__('Save assignment'),
|
68 |
+
'onclick' => 'edit_form.submit()',
|
69 |
+
'class' => 'add',
|
70 |
+
);
|
71 |
+
return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml();
|
72 |
+
}
|
73 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Manageproductcategories/Grid.php
CHANGED
@@ -1,91 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
$this->
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Adminhtml_Manageproductcategories_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('paylineManageProductCategoriesGrid');
|
9 |
+
$this->setUseAjax(true);
|
10 |
+
$this->setDefaultLimit(50);
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _getStore()
|
14 |
+
{
|
15 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
16 |
+
return Mage::app()->getStore($storeId);
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _prepareCollection()
|
20 |
+
{
|
21 |
+
$collection = Mage::getModel('payline/productcategories')->getCollection();
|
22 |
+
// $store = $this->getRequest()->getParam('store', '');
|
23 |
+
// $website = $this->getRequest()->getParam('website', '');
|
24 |
+
// if ($store) {
|
25 |
+
// $storeId = Mage::getModel('core/store')->load($store)->getId();
|
26 |
+
// $collection->addStoreFilter($storeId);
|
27 |
+
// } elseif ($website) {
|
28 |
+
// $websiteId = Mage::getModel('core/website')->load($website)->getId();
|
29 |
+
// $collection->addWebsiteFilter($websiteId);
|
30 |
+
// }
|
31 |
+
$this->setCollection($collection);
|
32 |
+
return parent::_prepareCollection();
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function _prepareColumns()
|
36 |
+
{
|
37 |
+
|
38 |
+
$this->addColumn('storecat', array(
|
39 |
+
'header' => Mage::helper('payline')->__('Store category'),
|
40 |
+
'index' => 'store_category_label',
|
41 |
+
'filter' => false,
|
42 |
+
'type' => 'text'));
|
43 |
+
$this->addColumn('paylinecat', array(
|
44 |
+
'header' => Mage::helper('payline')->__('Payline category'),
|
45 |
+
'index' => 'payline_category_label',
|
46 |
+
'filter' => false,
|
47 |
+
'type' => 'text'));
|
48 |
+
$this->addColumn('action', array(
|
49 |
+
'header' => Mage::helper('sales')->__('Action'),
|
50 |
+
'width' => '50px',
|
51 |
+
'type' => 'action',
|
52 |
+
'getter' => 'getId',
|
53 |
+
'actions' => array(
|
54 |
+
array(
|
55 |
+
'caption' => Mage::helper('payline')->__('Assign'),
|
56 |
+
'url' => array(
|
57 |
+
'base' => '*/*/assign'),
|
58 |
+
'field' => 'id',
|
59 |
+
'data-column' => 'action'),
|
60 |
+
array(
|
61 |
+
'caption' => Mage::helper('payline')->__('Unassign'),
|
62 |
+
'url' => array(
|
63 |
+
'base' => '*/*/unassign'),
|
64 |
+
'field' => 'id',
|
65 |
+
'data-column' => 'action')),
|
66 |
+
'filter' => false,
|
67 |
+
'sortable' => false,
|
68 |
+
'index' => 'store_category_id',
|
69 |
+
'is_system' => true));
|
70 |
+
$this->setDefaultSort('storecat', 'desc');
|
71 |
+
$this->setDefaultDir('ASC');
|
72 |
+
return parent::_prepareColumns();
|
73 |
+
}
|
74 |
+
|
75 |
+
public function getGridUrl()
|
76 |
+
{
|
77 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
public function getRowUrl($row)
|
82 |
+
{
|
83 |
+
return $this->getUrl('*/*/assign', array('id' => $row->getId()));
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get children of specified item
|
88 |
+
*
|
89 |
+
* @param Varien_Object $item
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function getMultipleRows($item)
|
93 |
+
{
|
94 |
+
return false;
|
95 |
+
}
|
96 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Sales/Order/Creditmemo/Create/Items.php
CHANGED
@@ -1,60 +1,60 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class corrects an unexpected behavour on Magento EE 1.9
|
5 |
-
* (looks like invoice MUST be captured online to do a refund)
|
6 |
-
*/
|
7 |
-
class Monext_Payline_Block_Adminhtml_Sales_Order_Creditmemo_Create_Items extends Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items{
|
8 |
-
/**
|
9 |
-
* Prepare child blocks
|
10 |
-
*
|
11 |
-
* @return Monext_Payline_Block_Adminhtml_Sales_Order_Creditmemo_Create_Items
|
12 |
-
*/
|
13 |
-
protected function _prepareLayout()
|
14 |
-
{
|
15 |
-
$onclick = "submitAndReloadArea($('creditmemo_item_container'),'".$this->getUpdateUrl()."')";
|
16 |
-
$this->setChild(
|
17 |
-
'update_button',
|
18 |
-
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
19 |
-
'label' => Mage::helper('sales')->__('Update Qty\'s'),
|
20 |
-
'class' => 'update-button',
|
21 |
-
'onclick' => $onclick,
|
22 |
-
))
|
23 |
-
);
|
24 |
-
$isNotMagento1_3=version_compare(Mage::getVersion(), '1.4', 'ge');
|
25 |
-
if ($this->getCreditmemo()->canRefund()) {
|
26 |
-
//No transaction for an invoice
|
27 |
-
if ($this->getCreditmemo()->getInvoice()){// && $this->getCreditmemo()->getInvoice()->getTransactionId()) {
|
28 |
-
$this->setChild(
|
29 |
-
'submit_button',
|
30 |
-
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
31 |
-
'label' => Mage::helper('sales')->__('Refund'),
|
32 |
-
'class' => 'save submit-button',
|
33 |
-
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');submitCreditMemo()':'editForm.submit();',
|
34 |
-
))
|
35 |
-
);
|
36 |
-
}
|
37 |
-
$this->setChild(
|
38 |
-
'submit_offline',
|
39 |
-
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
40 |
-
'label' => Mage::helper('sales')->__('Refund offline'),
|
41 |
-
'class' => 'save submit-button',
|
42 |
-
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');submitCreditMemoOffline()':'editForm.submit();',
|
43 |
-
))
|
44 |
-
);
|
45 |
-
|
46 |
-
}
|
47 |
-
else {
|
48 |
-
$this->setChild(
|
49 |
-
'submit_button',
|
50 |
-
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
51 |
-
'label' => Mage::helper('sales')->__('Refund Offline'),
|
52 |
-
'class' => 'save submit-button',
|
53 |
-
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');editForm.submit()':'editForm.submit();',
|
54 |
-
))
|
55 |
-
);
|
56 |
-
}
|
57 |
-
|
58 |
-
return $this;
|
59 |
-
}
|
60 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class corrects an unexpected behavour on Magento EE 1.9
|
5 |
+
* (looks like invoice MUST be captured online to do a refund)
|
6 |
+
*/
|
7 |
+
class Monext_Payline_Block_Adminhtml_Sales_Order_Creditmemo_Create_Items extends Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items{
|
8 |
+
/**
|
9 |
+
* Prepare child blocks
|
10 |
+
*
|
11 |
+
* @return Monext_Payline_Block_Adminhtml_Sales_Order_Creditmemo_Create_Items
|
12 |
+
*/
|
13 |
+
protected function _prepareLayout()
|
14 |
+
{
|
15 |
+
$onclick = "submitAndReloadArea($('creditmemo_item_container'),'".$this->getUpdateUrl()."')";
|
16 |
+
$this->setChild(
|
17 |
+
'update_button',
|
18 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
19 |
+
'label' => Mage::helper('sales')->__('Update Qty\'s'),
|
20 |
+
'class' => 'update-button',
|
21 |
+
'onclick' => $onclick,
|
22 |
+
))
|
23 |
+
);
|
24 |
+
$isNotMagento1_3=version_compare(Mage::getVersion(), '1.4', 'ge');
|
25 |
+
if ($this->getCreditmemo()->canRefund()) {
|
26 |
+
//No transaction for an invoice
|
27 |
+
if ($this->getCreditmemo()->getInvoice()){// && $this->getCreditmemo()->getInvoice()->getTransactionId()) {
|
28 |
+
$this->setChild(
|
29 |
+
'submit_button',
|
30 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
31 |
+
'label' => Mage::helper('sales')->__('Refund'),
|
32 |
+
'class' => 'save submit-button',
|
33 |
+
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');submitCreditMemo()':'editForm.submit();',
|
34 |
+
))
|
35 |
+
);
|
36 |
+
}
|
37 |
+
$this->setChild(
|
38 |
+
'submit_offline',
|
39 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
40 |
+
'label' => Mage::helper('sales')->__('Refund offline'),
|
41 |
+
'class' => 'save submit-button',
|
42 |
+
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');submitCreditMemoOffline()':'editForm.submit();',
|
43 |
+
))
|
44 |
+
);
|
45 |
+
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
$this->setChild(
|
49 |
+
'submit_button',
|
50 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
|
51 |
+
'label' => Mage::helper('sales')->__('Refund Offline'),
|
52 |
+
'class' => 'save submit-button',
|
53 |
+
'onclick' => $isNotMagento1_3?'disableElements(\'submit-button\');editForm.submit()':'editForm.submit();',
|
54 |
+
))
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
}
|
app/code/community/Monext/Payline/Block/Adminhtml/Sales/Order/Total/Nxfees.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Block to display payline nx payment fees on order and invoice
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Block_Adminhtml_Sales_Order_Total_Nxfees extends Mage_Core_Block_Abstract
|
8 |
-
{
|
9 |
-
public function initTotals()
|
10 |
-
{
|
11 |
-
$parent = $this->getParentBlock();
|
12 |
-
|
13 |
-
$entity = $parent->getSource();
|
14 |
-
$orderId = $entity->getOrderId(); //invoice
|
15 |
-
$order = false;
|
16 |
-
if(!$orderId) {
|
17 |
-
$orderId = $entity->getId(); //order
|
18 |
-
$order = true;
|
19 |
-
}
|
20 |
-
|
21 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
22 |
-
->addFieldtoFilter('order_id',$orderId)->getFirstItem();
|
23 |
-
|
24 |
-
if ($fee->getId() &&
|
25 |
-
($order || (!$order && $fee->getInvoiceId()==$entity->getId())))
|
26 |
-
{
|
27 |
-
$total = new Varien_Object(array(
|
28 |
-
'code' => 'payline_nx',
|
29 |
-
'value' => $fee->getAmount(),
|
30 |
-
'base_value' => $fee->getBaseAmount(),
|
31 |
-
'label' => Mage::helper('payline')->__('Payline fees'),
|
32 |
-
'field' => 'payline_nx'
|
33 |
-
));
|
34 |
-
$parent->addTotal($total, 'payline_nx');
|
35 |
-
}
|
36 |
-
|
37 |
-
return $this;
|
38 |
-
}
|
39 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Block to display payline nx payment fees on order and invoice
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Block_Adminhtml_Sales_Order_Total_Nxfees extends Mage_Core_Block_Abstract
|
8 |
+
{
|
9 |
+
public function initTotals()
|
10 |
+
{
|
11 |
+
$parent = $this->getParentBlock();
|
12 |
+
|
13 |
+
$entity = $parent->getSource();
|
14 |
+
$orderId = $entity->getOrderId(); //invoice
|
15 |
+
$order = false;
|
16 |
+
if(!$orderId) {
|
17 |
+
$orderId = $entity->getId(); //order
|
18 |
+
$order = true;
|
19 |
+
}
|
20 |
+
|
21 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
22 |
+
->addFieldtoFilter('order_id',$orderId)->getFirstItem();
|
23 |
+
|
24 |
+
if ($fee->getId() &&
|
25 |
+
($order || (!$order && $fee->getInvoiceId()==$entity->getId())))
|
26 |
+
{
|
27 |
+
$total = new Varien_Object(array(
|
28 |
+
'code' => 'payline_nx',
|
29 |
+
'value' => $fee->getAmount(),
|
30 |
+
'base_value' => $fee->getBaseAmount(),
|
31 |
+
'label' => Mage::helper('payline')->__('Payline fees'),
|
32 |
+
'field' => 'payline_nx'
|
33 |
+
));
|
34 |
+
$parent->addTotal($total, 'payline_nx');
|
35 |
+
}
|
36 |
+
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
}
|
app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Group.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fieldset renderer for PayPal solutions group
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package Mage_Paypal
|
7 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
8 |
+
*/
|
9 |
+
class Monext_Payline_Block_Adminhtml_System_Config_Fieldset_Group
|
10 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Return header comment part of html for fieldset
|
14 |
+
*
|
15 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
protected function _getHeaderCommentHtml($element)
|
19 |
+
{
|
20 |
+
$groupConfig = $this->getGroup($element)->asArray();
|
21 |
+
|
22 |
+
if (empty($groupConfig['help_url']) || !$element->getComment()) {
|
23 |
+
return parent::_getHeaderCommentHtml($element);
|
24 |
+
}
|
25 |
+
|
26 |
+
$html = '<div class="comment">' . $element->getComment()
|
27 |
+
. ' <a target="_blank" href="' . $groupConfig['help_url'] . '">'
|
28 |
+
. Mage::helper('paypal')->__('Help') . '</a></div>';
|
29 |
+
|
30 |
+
return $html;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Return collapse state
|
35 |
+
*
|
36 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
37 |
+
* @return bool
|
38 |
+
*/
|
39 |
+
protected function _getCollapseState($element)
|
40 |
+
{
|
41 |
+
$extra = Mage::getSingleton('admin/session')->getUser()->getExtra();
|
42 |
+
if (isset($extra['configState'][$element->getId()])) {
|
43 |
+
return $extra['configState'][$element->getId()];
|
44 |
+
}
|
45 |
+
|
46 |
+
if ($element->getExpanded() !== null) {
|
47 |
+
return 1;
|
48 |
+
}
|
49 |
+
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Return header title part of html for fieldset
|
55 |
+
*
|
56 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
57 |
+
* @return string
|
58 |
+
*/
|
59 |
+
protected function _getHeaderTitleHtml($element)
|
60 |
+
{
|
61 |
+
// return '<div class="entry-edit-head collapseable disabled" ><a id="' . $element->getHtmlId()
|
62 |
+
// . '-head" href="#" onclick="return false;">' . $element->getLegend() . '</a></div>';
|
63 |
+
|
64 |
+
return '<div class="entry-edit-head can-be-disabled collapseable" ><a id="' . $element->getHtmlId()
|
65 |
+
. '-head" href="#" onclick="paylineToggleSection(this, \'' . $element->getHtmlId() . '\', \''
|
66 |
+
. $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a></div>';
|
67 |
+
}
|
68 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Payment.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_System_Config_Fieldset_Payment
|
4 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* Add custom css class
|
8 |
+
*
|
9 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
10 |
+
* @return string
|
11 |
+
*/
|
12 |
+
protected function _getFrontendClass($element)
|
13 |
+
{
|
14 |
+
return parent::_getFrontendClass($element) . ' with-button '
|
15 |
+
. ($this->_isPaymentEnabled($element) ? ' enabled' : '');
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Check whether current payment method is enabled
|
20 |
+
*
|
21 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
22 |
+
* @return bool
|
23 |
+
*/
|
24 |
+
protected function _isPaymentEnabled($element)
|
25 |
+
{
|
26 |
+
$groupConfig = $this->getGroup($element)->asArray();
|
27 |
+
$activityPath = isset($groupConfig['activity_path']) ? $groupConfig['activity_path'] : '';
|
28 |
+
|
29 |
+
if (empty($activityPath)) {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
$isPaymentEnabled = (string)Mage::getSingleton('adminhtml/config_data')->getConfigDataValue($activityPath);
|
34 |
+
|
35 |
+
return (bool)$isPaymentEnabled;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Return header title part of html for payment solution
|
40 |
+
*
|
41 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
protected function _getHeaderTitleHtml($element)
|
45 |
+
{
|
46 |
+
$html = '<div class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
|
47 |
+
|
48 |
+
$groupConfig = $this->getGroup($element)->asArray();
|
49 |
+
if (!empty($groupConfig['learn_more_link'])) {
|
50 |
+
$html .= '<a class="link-more" href="' . $groupConfig['learn_more_link'] . '" target="_blank">'
|
51 |
+
. $this->__('Learn More') . '</a>';
|
52 |
+
}
|
53 |
+
if (!empty($groupConfig['demo_link'])) {
|
54 |
+
$html .= '<a class="link-demo" href="' . $groupConfig['demo_link'] . '" target="_blank">'
|
55 |
+
. $this->__('View Demo') . '</a>';
|
56 |
+
}
|
57 |
+
$html .= '</strong>';
|
58 |
+
|
59 |
+
if ($element->getComment()) {
|
60 |
+
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
|
61 |
+
}
|
62 |
+
$html .= '</div>';
|
63 |
+
|
64 |
+
$html .= '<div class="button-container"><button type="button"'
|
65 |
+
//. ($this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"')
|
66 |
+
. ' class="button'
|
67 |
+
//. (empty($groupConfig['payline_ec_separate']) ? '' : ' payline-ec-separate')
|
68 |
+
//. ($this->_isPaymentEnabled($element) ? '' : ' disabled')
|
69 |
+
. '" id="' . $element->getHtmlId()
|
70 |
+
. '-head" onclick="paylineToggleSolution.call(this, \'' . $element->getHtmlId() . '\', \''
|
71 |
+
. $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">'
|
72 |
+
. $this->__('Configure') . '</span><span class="state-opened">'
|
73 |
+
. $this->__('Close') . '</span></button></div></div>';
|
74 |
+
|
75 |
+
return $html;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Return header comment part of html for payment solution
|
80 |
+
*
|
81 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
protected function _getHeaderCommentHtml($element)
|
85 |
+
{
|
86 |
+
return '';
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get collapsed state on-load
|
91 |
+
*
|
92 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
93 |
+
* @return bool
|
94 |
+
*/
|
95 |
+
protected function _getCollapseState($element)
|
96 |
+
{
|
97 |
+
return false;
|
98 |
+
}
|
99 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Fieldset/Welcome.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once(Mage::getBaseDir() . '/app/code/community/Monext/Payline/lib/paylineSDK.php');
|
4 |
+
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Renderer for Payline banner in System Configuration
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
class Monext_Payline_Block_Adminhtml_System_Config_Fieldset_Welcome
|
11 |
+
extends Mage_Adminhtml_Block_Abstract
|
12 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
13 |
+
{
|
14 |
+
protected $_template = 'payline/system/config/fieldset/welcome.phtml';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Render fieldset html
|
18 |
+
*
|
19 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
23 |
+
{
|
24 |
+
$elementOriginalData = $element->getOriginalData();
|
25 |
+
if (isset($elementOriginalData['help_link'])) {
|
26 |
+
$this->setHelpLink($elementOriginalData['help_link']);
|
27 |
+
}
|
28 |
+
$js = '
|
29 |
+
paylineToggleSection = function(section, id, url) {
|
30 |
+
if (section.up("div").hasClassName("can-be-disabled") && section.up("div").hasClassName("disabled")) {
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
Fieldset.toggleCollapse(id, url);
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
paylineToggleSolution = function(id, url) {
|
38 |
+
var doScroll = false;
|
39 |
+
Fieldset.toggleCollapse(id, url);
|
40 |
+
if ($(this).hasClassName("open")) {
|
41 |
+
$$(".with-button button.button").each(function(anotherButton) {
|
42 |
+
if (anotherButton != this && $(anotherButton).hasClassName("open")) {
|
43 |
+
$(anotherButton).click();
|
44 |
+
doScroll = true;
|
45 |
+
}
|
46 |
+
}.bind(this));
|
47 |
+
}
|
48 |
+
if (doScroll) {
|
49 |
+
var pos = Element.cumulativeOffset($(this));
|
50 |
+
window.scrollTo(pos[0], pos[1] - 45);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
paylineToggleAllSections = function()
|
55 |
+
{
|
56 |
+
var isEnabled = $("payline_payline_common_payline_enabled").value
|
57 |
+
$$(".can-be-disabled").each(function(elem) {
|
58 |
+
if (isEnabled>0) {
|
59 |
+
elem.removeClassName("disabled");
|
60 |
+
} else {
|
61 |
+
if( elem.adjacent("fieldset")) {
|
62 |
+
var sectionId = elem.adjacent("fieldset")[0].id;
|
63 |
+
var state = $(sectionId+"-state").value;
|
64 |
+
if(state>0) {
|
65 |
+
Fieldset.toggleCollapse(sectionId);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
elem.addClassName("disabled");
|
69 |
+
}
|
70 |
+
})
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
document.observe("dom:loaded", function() {
|
75 |
+
paylineToggleAllSections();
|
76 |
+
$("payline_payline_common_payline_enabled").observe("change", paylineToggleAllSections);
|
77 |
+
});
|
78 |
+
';
|
79 |
+
return $this->toHtml() . $this->helper('adminhtml/js')->getScript($js);
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getVersion()
|
83 |
+
{
|
84 |
+
$version = (string) $this->_getModuleConfig()->version;
|
85 |
+
|
86 |
+
return $version;
|
87 |
+
}
|
88 |
+
|
89 |
+
public function getRelease()
|
90 |
+
{
|
91 |
+
$release = (string) $this->_getModuleConfig()->release;
|
92 |
+
|
93 |
+
return $release;
|
94 |
+
}
|
95 |
+
|
96 |
+
protected function _getModuleConfig()
|
97 |
+
{
|
98 |
+
$config = Mage::getConfig();
|
99 |
+
return $config->getModuleConfig('Monext_Payline');
|
100 |
+
}
|
101 |
+
|
102 |
+
public function getPaylineLogo()
|
103 |
+
{
|
104 |
+
return $this->getSkinUrl('images/monext/payline-logo.png', array('_area'=>'frontend'));
|
105 |
+
}
|
106 |
+
|
107 |
+
public function isProduction()
|
108 |
+
{
|
109 |
+
return Mage::helper('payline')->isProduction();
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Form/Field/Contracts.php
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Monext_Payline_Block_Adminhtml_System_Config_Form_Field_Contracts extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
5 |
+
{
|
6 |
+
protected $_yesNoRenderer=array();
|
7 |
+
|
8 |
+
//protected $_renderer = 'select';
|
9 |
+
protected $_renderer = 'onoffswitch';
|
10 |
+
|
11 |
+
public function __construct()
|
12 |
+
{
|
13 |
+
$this->setTemplate('payline/system/config/form/field/array.phtml');
|
14 |
+
parent::__construct();
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _getYesnoRenderer($input)
|
18 |
+
{
|
19 |
+
if (empty($this->_yesNoRenderer[$input])) {
|
20 |
+
$this->_yesNoRenderer[$input] = $this->getLayout()->createBlock(
|
21 |
+
(($this->_renderer == 'select') ?'core/html_select' :'payline/adminhtml_system_config_html_onoffswitch'),
|
22 |
+
'contract_yesno_' . $input,
|
23 |
+
array('is_render_to_js_template' => true, 'name'=>'contract_list[#{id}]['.$input.']', 'id'=>$input)
|
24 |
+
);
|
25 |
+
$this->_yesNoRenderer[$input]->setOptions(array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-')));
|
26 |
+
$this->_yesNoRenderer[$input]->setExtraParams('style="width:60px"');
|
27 |
+
}
|
28 |
+
return $this->_yesNoRenderer[$input];
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Prepare to render
|
33 |
+
*/
|
34 |
+
protected function _prepareToRender()
|
35 |
+
{
|
36 |
+
$this->addColumn('name', array(
|
37 |
+
'label' => Mage::helper('payline')->__('Name'),
|
38 |
+
));
|
39 |
+
|
40 |
+
$this->addColumn('number', array(
|
41 |
+
'label' => Mage::helper('payline')->__('Number'),
|
42 |
+
));
|
43 |
+
|
44 |
+
$this->addColumn('point_of_sell', array(
|
45 |
+
'label' => Mage::helper('payline')->__('Point Of Sell'),
|
46 |
+
));
|
47 |
+
|
48 |
+
$this->addColumn('is_primary', array(
|
49 |
+
'label' => Mage::helper('payline')->__('Primary'),
|
50 |
+
'renderer' => $this->_getYesnoRenderer('is_primary'),
|
51 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
52 |
+
));
|
53 |
+
|
54 |
+
$this->addColumn('is_secondary', array(
|
55 |
+
'label' => Mage::helper('payline')->__('Secondary'),
|
56 |
+
'renderer' => $this->_getYesnoRenderer('is_secondary'),
|
57 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
58 |
+
));
|
59 |
+
|
60 |
+
$this->addColumn('is_secure', array(
|
61 |
+
'label' => Mage::helper('payline')->__('Secure'),
|
62 |
+
'renderer' => $this->_getYesnoRenderer('is_secure'),
|
63 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
64 |
+
));
|
65 |
+
|
66 |
+
$this->addColumn('is_included_wallet_list', array(
|
67 |
+
'label' => Mage::helper('payline')->__('Wallet'),
|
68 |
+
'renderer' => $this->_getYesnoRenderer('is_included_wallet_list'),
|
69 |
+
'options' => array('1' => Mage::helper('payline')->__('X'), '0' => Mage::helper('payline')->__('-'))
|
70 |
+
));
|
71 |
+
|
72 |
+
$this->_addAfter = false;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Add type property to column
|
77 |
+
*
|
78 |
+
* @param string $name
|
79 |
+
* @param array $params
|
80 |
+
*/
|
81 |
+
public function addColumn($name, $params)
|
82 |
+
{
|
83 |
+
parent::addColumn($name, $params);
|
84 |
+
if(array_key_exists($name,$this->_columns))
|
85 |
+
$this->_columns[$name]['type'] = empty($params['type']) ? 'readonly' : $params['type'];
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Prepare existing row data object
|
91 |
+
*
|
92 |
+
* @param Varien_Object
|
93 |
+
*/
|
94 |
+
protected function _prepareArrayRow(Varien_Object $row)
|
95 |
+
{
|
96 |
+
|
97 |
+
if ($this->_renderer == 'select') {
|
98 |
+
$defaultOptionSet = 'selected="selected"';
|
99 |
+
} else {
|
100 |
+
$defaultOptionSet = 'checked="checked"';
|
101 |
+
}
|
102 |
+
|
103 |
+
|
104 |
+
if ($row->getData('is_primary')) {
|
105 |
+
$row->setData(
|
106 |
+
'option_extra_attr_' . $this->_getYesnoRenderer('is_primary')->calcOptionHash(1),
|
107 |
+
$defaultOptionSet
|
108 |
+
);
|
109 |
+
}
|
110 |
+
|
111 |
+
if ($row->getData('is_secondary')) {
|
112 |
+
$row->setData(
|
113 |
+
'option_extra_attr_' . $this->_getYesnoRenderer('is_secondary')->calcOptionHash(1),
|
114 |
+
$defaultOptionSet
|
115 |
+
);
|
116 |
+
}
|
117 |
+
|
118 |
+
if ($row->getData('is_secure')) {
|
119 |
+
$row->setData(
|
120 |
+
'option_extra_attr_' . $this->_getYesnoRenderer('is_secure')->calcOptionHash(1),
|
121 |
+
$defaultOptionSet
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
+
if ($row->getData('is_included_wallet_list')) {
|
126 |
+
$row->setData(
|
127 |
+
'option_extra_attr_' . $this->_getYesnoRenderer('is_included_wallet_list')->calcOptionHash(1),
|
128 |
+
$defaultOptionSet
|
129 |
+
);
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Check if type property is defined and render array cell for prototypeJS template
|
136 |
+
*
|
137 |
+
* @param string $columnName
|
138 |
+
* @return string
|
139 |
+
*/
|
140 |
+
protected function _renderCellTemplate($columnName)
|
141 |
+
{
|
142 |
+
if (empty($this->_columns[$columnName])) {
|
143 |
+
throw new Exception('Wrong column name specified.');
|
144 |
+
}
|
145 |
+
$column = $this->_columns[$columnName];
|
146 |
+
if(!array_key_exists('type',$column) || $column['type'] == 'text' || $column['renderer'])
|
147 |
+
return parent::_renderCellTemplate($columnName);
|
148 |
+
|
149 |
+
$inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
|
150 |
+
if (!empty($column['type'])) {
|
151 |
+
if ($column['type']=='readonly') {
|
152 |
+
return '#{' . $columnName . '}';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
return '<input type="' . $column['type'] . '" name="' . $inputName . '" value="#{' . $columnName . '}" ' .
|
157 |
+
($column['size'] ? 'size="' . $column['size'] . '"' : '') . ' class="' .
|
158 |
+
(isset($column['class']) ? $column['class'] : 'input-text') . '"'.
|
159 |
+
(isset($column['style']) ? ' style="'.$column['style'] . '"' : '') . '/>';
|
160 |
+
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
*
|
165 |
+
*/
|
166 |
+
public function getImportContractUrl()
|
167 |
+
{
|
168 |
+
return Mage::helper("adminhtml")->getUrl('adminhtml/payline_managecontracts/importFromConfig');
|
169 |
+
}
|
170 |
+
|
171 |
+
public function canDisplayImportButton()
|
172 |
+
{
|
173 |
+
$element = $this->getElement();
|
174 |
+
|
175 |
+
return (!$element->getCanUseWebsiteValue() && !$element->getCanUseDefaultValue());
|
176 |
+
}
|
177 |
+
}
|
app/code/community/Monext/Payline/Block/Adminhtml/System/Config/Html/Onoffswitch.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Adminhtml_System_Config_Html_Onoffswitch extends Mage_Core_Block_Html_Select
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Render HTML
|
7 |
+
*
|
8 |
+
* @return string
|
9 |
+
*/
|
10 |
+
protected function _toHtml()
|
11 |
+
{
|
12 |
+
if (!$this->_beforeToHtml()) {
|
13 |
+
return '';
|
14 |
+
}
|
15 |
+
|
16 |
+
$html = '<div class="onoffswitch">' .
|
17 |
+
'<input type="checkbox" name="' . $this->getName() . '" class="onoffswitch-checkbox" id="' . preg_replace('/[\[\]]+/', '_', $this->getName()) . '" value="1" ' .
|
18 |
+
'#{option_extra_attr_' . self::calcOptionHash(1) . '}' .
|
19 |
+
'>' .
|
20 |
+
'<label class="onoffswitch-label" for="' . preg_replace('/[\[\]]+/', '_', $this->getName()) . '">' .
|
21 |
+
'<span class="onoffswitch-inner"></span>' .
|
22 |
+
'<span class="onoffswitch-switch"></span>' .
|
23 |
+
'</label>' .
|
24 |
+
'</div>';
|
25 |
+
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
}
|
app/code/community/Monext/Payline/Block/Checkout/Head.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* payline fees total block for checkout
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Monext_Payline_Block_Checkout_Total extends Mage_Checkout_Block_Total_Default
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
protected $_template = 'payline/checkout/total.phtml';
|
13 |
+
}
|
app/code/community/Monext/Payline/Block/Checkout/Total.php
CHANGED
@@ -1,13 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Checkout_Head extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Adding JS scripts and styles to block
|
6 |
+
*
|
7 |
+
* @throws Mage_Core_Exception
|
8 |
+
* @return Mage_Adminhtml_Block_Widget_Form_Container
|
9 |
+
*/
|
10 |
+
protected function _prepareLayout()
|
11 |
+
{
|
12 |
+
if (!Mage::helper('payline')->disableOnepagePaymentStep()) {
|
13 |
+
return $this;
|
14 |
+
}
|
15 |
+
|
16 |
+
$blockHead = $this->getLayout()->getBlock('head');
|
17 |
+
|
18 |
+
return parent::_prepareLayout();
|
19 |
+
}
|
20 |
+
}
|
app/code/community/Monext/Payline/Block/Checkout/Widget/Header.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Checkout_Widget_Header extends Mage_Core_Block_Text {
|
3 |
+
|
4 |
+
|
5 |
+
public function getText()
|
6 |
+
{
|
7 |
+
$paylineSDK = Mage::helper('payline')->initPayline('CPT');
|
8 |
+
|
9 |
+
$text = array();
|
10 |
+
$text []= '<script src="' . $paylineSDK->getWidgetJavascriptUrl() .'"></script>';
|
11 |
+
$text []= '<link rel="stylesheet" href="' . $paylineSDK->getWidgetCssUrl() .'">';
|
12 |
+
|
13 |
+
return implode(PHP_EOL, $text);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/Monext/Payline/Block/Checkout/Widget/Opcheckout.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Checkout_Widget_Opcheckout extends Mage_Checkout_Block_Onepage_Payment_Methods
|
4 |
+
{
|
5 |
+
protected $_custom_methods;
|
6 |
+
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
$this->setTemplate('payline/checkout/onepage/widget-opcheckout-js.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
*
|
15 |
+
* @param Mage_Sales_Block_Order_History $block
|
16 |
+
* @param Varien_Object $transport
|
17 |
+
*/
|
18 |
+
public function addHtmlAsChild($block, $transport)
|
19 |
+
{
|
20 |
+
$transport->setHtml($transport->getHtml() . $this->_toHtml());
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Retrieve available payment methods
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function getAllMethods()
|
31 |
+
{
|
32 |
+
$quote = $this->getQuote();
|
33 |
+
$store = $quote ? $quote->getStoreId() : null;
|
34 |
+
$methods = array();
|
35 |
+
foreach ($this->helper('payment')->getStoreMethods($store, $quote) as $method) {
|
36 |
+
$methods[] = $method;
|
37 |
+
}
|
38 |
+
return $methods;
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
public function getJsonAllMethods()
|
45 |
+
{
|
46 |
+
if (is_null($this->_custom_methods)) {
|
47 |
+
$customMethods = array();
|
48 |
+
$methods = $this->getAllMethods();
|
49 |
+
if (!empty($methods)) {
|
50 |
+
foreach ($methods as $_method) {
|
51 |
+
$_code = $_method->getCode();
|
52 |
+
if(stripos($_code,'payline')!==false) {
|
53 |
+
continue;
|
54 |
+
}
|
55 |
+
$html = preg_replace('/display:none;/', '', $this->getPaymentMethodFormHtml($_method));
|
56 |
+
$html = str_replace(array("\r\n","\r","\n"),"",$this->jsQuoteEscape($html));
|
57 |
+
|
58 |
+
//$html = $this->getPaymentMethodFormHtml($_method);
|
59 |
+
$customMethods[] = array('code'=>$_code,
|
60 |
+
'title'=>$this->escapeHtml($this->getMethodTitle($_method)),
|
61 |
+
'label'=>$this->getMethodLabelAfterHtml($_method),
|
62 |
+
'html' => ($html) ? $html : $this->getMethodTitle($_method)
|
63 |
+
);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
$this->_custom_methods = $customMethods;
|
68 |
+
}
|
69 |
+
return Mage::helper('core')->jsonEncode($this->_custom_methods);
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getJsonCurrentMethods()
|
73 |
+
{
|
74 |
+
$currentMethods = array();
|
75 |
+
$methods = $this->getMethods();
|
76 |
+
if (!empty($methods)) {
|
77 |
+
foreach ($methods as $_method) {
|
78 |
+
$_code = $_method->getCode();
|
79 |
+
if(stripos($_code,'payline')!==false) {
|
80 |
+
continue;
|
81 |
+
} else {
|
82 |
+
$currentMethods[$_code] = $_code;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
return Mage::helper('core')->jsonEncode($currentMethods);
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getSaveUrl()
|
91 |
+
{
|
92 |
+
return Mage::getUrl('payline/index/cptWidgetCustom');
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Getter
|
97 |
+
*
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function getCurrencyCode()
|
101 |
+
{
|
102 |
+
return $this->getQuote()->getBaseCurrencyCode();
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Getter
|
107 |
+
*
|
108 |
+
* @return float
|
109 |
+
*/
|
110 |
+
public function getQuoteBaseGrandTotal()
|
111 |
+
{
|
112 |
+
return (float)$this->getQuote()->getBaseGrandTotal();
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
}
|
app/code/community/Monext/Payline/Block/Cpt.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Block/Direct.php
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
4 |
{
|
5 |
-
|
6 |
-
protected $_canUseForMultishipping = false;
|
7 |
|
8 |
/**
|
9 |
* Cc available types
|
@@ -16,7 +14,7 @@ class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
|
16 |
parent::_construct();
|
17 |
|
18 |
$this->setTemplate('payline/Direct.phtml');
|
19 |
-
$redirectMsg
|
20 |
$this->setRedirectMessage($redirectMsg);
|
21 |
$this->setBannerSrc($this->getSkinUrl('images/monext/payline-logo.png'));
|
22 |
}
|
@@ -24,20 +22,45 @@ class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
|
24 |
public function getCcAvailableTypes()
|
25 |
{
|
26 |
if ($this->_ccAvailableTypes === null) {
|
27 |
-
$
|
28 |
-
->addFilterStatus(true, Mage::app()->getStore()->getId())
|
29 |
-
->addFieldToFilter('contract_type', array('CB', 'AMEX', 'MCVISA'));
|
30 |
-
|
31 |
-
$this->_ccAvailableTypes = $contracts->toOptionHash();
|
32 |
}
|
33 |
|
34 |
return $this->_ccAvailableTypes;
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
public function getCcMonths()
|
38 |
{
|
39 |
-
$months
|
40 |
-
$months[0]
|
41 |
$months['01'] = '01';
|
42 |
$months['02'] = '02';
|
43 |
$months['03'] = '03';
|
@@ -55,15 +78,15 @@ class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
|
55 |
|
56 |
public function getCcYears()
|
57 |
{
|
58 |
-
$years
|
59 |
-
$today
|
60 |
-
$years[0] =
|
61 |
-
$index1
|
62 |
-
|
63 |
-
$years[$index1]
|
64 |
-
$years[$index1
|
65 |
-
$years[$index1
|
66 |
-
$years[$index1
|
67 |
$years[$index1 + 4] = $years[$index1] + 4;
|
68 |
$years[$index1 + 5] = $years[$index1] + 5;
|
69 |
return $years;
|
@@ -72,6 +95,55 @@ class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
|
72 |
public function hasVerification()
|
73 |
{
|
74 |
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
1 |
<?php
|
|
|
2 |
class Monext_Payline_Block_Direct extends Mage_Payment_Block_Form
|
3 |
{
|
4 |
+
protected $_canUseForMultishipping = false;
|
|
|
5 |
|
6 |
/**
|
7 |
* Cc available types
|
14 |
parent::_construct();
|
15 |
|
16 |
$this->setTemplate('payline/Direct.phtml');
|
17 |
+
$redirectMsg=Mage::getStoreConfig('payment/PaylineNX/redirect_message');
|
18 |
$this->setRedirectMessage($redirectMsg);
|
19 |
$this->setBannerSrc($this->getSkinUrl('images/monext/payline-logo.png'));
|
20 |
}
|
22 |
public function getCcAvailableTypes()
|
23 |
{
|
24 |
if ($this->_ccAvailableTypes === null) {
|
25 |
+
$this->_ccAvailableTypes = Mage::helper('payline')->getCcContracts();
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
return $this->_ccAvailableTypes;
|
29 |
}
|
30 |
|
31 |
+
public function getCurrrentCcType()
|
32 |
+
{
|
33 |
+
$ccType = $this->getInfoData('cc_type');
|
34 |
+
|
35 |
+
//TODO: If a card should be selected by default we have to choose one
|
36 |
+
foreach ($this->getCcAvailableTypes() as $contract) {
|
37 |
+
$ccType = $contract->getId();
|
38 |
+
break;
|
39 |
+
}
|
40 |
+
|
41 |
+
return $ccType;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
public function getTypeLogo($type)
|
46 |
+
{
|
47 |
+
return $this->getSkinUrl('images/monext/payline_moyens_paiement/' . strtolower($type) . '.png');
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getSecureLogo()
|
51 |
+
{
|
52 |
+
return $this->getSkinUrl('images/monext/payline_moyens_paiement/default.png');
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getSecureLegend()
|
56 |
+
{
|
57 |
+
return $this->__('secured with Payline');
|
58 |
+
}
|
59 |
+
|
60 |
public function getCcMonths()
|
61 |
{
|
62 |
+
$months = array();
|
63 |
+
$months[0] = Mage::helper('payline')->__('Month');
|
64 |
$months['01'] = '01';
|
65 |
$months['02'] = '02';
|
66 |
$months['03'] = '03';
|
78 |
|
79 |
public function getCcYears()
|
80 |
{
|
81 |
+
$years = array();
|
82 |
+
$today = getdate();
|
83 |
+
$years[0] = Mage::helper('payline')->__('Year');
|
84 |
+
$index1 = substr($today['year'],2);
|
85 |
+
|
86 |
+
$years[$index1] = $today['year'];
|
87 |
+
$years[$index1+1] = $years[$index1]+1;
|
88 |
+
$years[$index1+2] = $years[$index1]+2;
|
89 |
+
$years[$index1+3] = $years[$index1]+3;
|
90 |
$years[$index1 + 4] = $years[$index1] + 4;
|
91 |
$years[$index1 + 5] = $years[$index1] + 5;
|
92 |
return $years;
|
95 |
public function hasVerification()
|
96 |
{
|
97 |
return true;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function getAjaxErrors()
|
101 |
+
{
|
102 |
+
|
103 |
+
if(!Mage::helper('payline')->isProduction()) {
|
104 |
+
$errors=array( '09101'=>'Accès non autorisé',
|
105 |
+
'09102'=>'Compte commerçant bloqué ou désactivé',
|
106 |
+
'02703'=>'Action non autorisée',
|
107 |
+
'02303'=>'Numéro de contrat invalide',
|
108 |
+
'02623'=>'Nombre d’essai maximal atteint',
|
109 |
+
'02624'=>'Carte expirée',
|
110 |
+
'02625'=>'Format du numéro de carte incorrect',
|
111 |
+
'02626'=>'Format de la date d’expiration incorrect ou date non fournie',
|
112 |
+
'02627'=>'Format du CVV incorrect ou CVV non fourni',
|
113 |
+
'02628'=>'Format de l’URL de retour incorrect',
|
114 |
+
'02631'=>'Delay exceeded'
|
115 |
+
);
|
116 |
+
} else {
|
117 |
+
$errors = array();
|
118 |
+
}
|
119 |
+
|
120 |
+
return Mage::helper('core')->jsonEncode($errors);
|
121 |
+
}
|
122 |
+
|
123 |
+
public function getTokenUrl()
|
124 |
+
{
|
125 |
+
return Mage::helper('payline')->initPayline('DIRECT')->getServletTokenUrl();
|
126 |
+
}
|
127 |
+
|
128 |
+
public function getTokenReturnURL()
|
129 |
+
{
|
130 |
+
return Mage::getUrl('payline/index/tokenReturn');
|
131 |
}
|
132 |
|
133 |
+
|
134 |
+
public function getCryptedKeys()
|
135 |
+
{
|
136 |
+
return Mage::helper('core')->jsonEncode(Mage::helper('payline')->getCryptedKeys());
|
137 |
+
}
|
138 |
+
|
139 |
+
|
140 |
+
public function getAccessKeyRef()
|
141 |
+
{
|
142 |
+
return Mage::helper('payline')->getWeb2TokenKey();
|
143 |
+
}
|
144 |
+
|
145 |
+
public function isWalletEnabled()
|
146 |
+
{
|
147 |
+
return Mage::getStoreConfig('payment/PaylineWALLET/active');
|
148 |
+
}
|
149 |
}
|
app/code/community/Monext/Payline/Block/Info/Default.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Base payment iformation block
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
class Monext_Payline_Block_Info_Default extends Mage_Payment_Block_Info
|
7 |
-
{
|
8 |
-
protected function _construct()
|
9 |
-
{
|
10 |
-
parent::_construct();
|
11 |
-
$this->setTemplate('payline/payment/info/monext.phtml');
|
12 |
-
}
|
13 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Base payment iformation block
|
4 |
+
*
|
5 |
+
*/
|
6 |
+
class Monext_Payline_Block_Info_Default extends Mage_Payment_Block_Info
|
7 |
+
{
|
8 |
+
protected function _construct()
|
9 |
+
{
|
10 |
+
parent::_construct();
|
11 |
+
$this->setTemplate('payline/payment/info/monext.phtml');
|
12 |
+
}
|
13 |
}
|
app/code/community/Monext/Payline/Block/Info/Direct.php
CHANGED
@@ -1,55 +1,55 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Block_Info_Direct extends Mage_Payment_Block_Info_Cc
|
4 |
-
{
|
5 |
-
|
6 |
-
protected function _construct()
|
7 |
-
{
|
8 |
-
parent::_construct();
|
9 |
-
$this->setTemplate('payline/payment/info/monext.phtml');
|
10 |
-
}
|
11 |
-
|
12 |
-
protected function _prepareSpecificInformation($transport = null)
|
13 |
-
{
|
14 |
-
if (null !== $this->_paymentSpecificInformation) {
|
15 |
-
return $this->_paymentSpecificInformation;
|
16 |
-
}
|
17 |
-
$transport = new Varien_Object($transport);
|
18 |
-
$data = array();
|
19 |
-
if ($this->getInfo()->getCcType()) {
|
20 |
-
$contract = $this->_getContract($this->getInfo());
|
21 |
-
$ccType = strtolower($contract->getContractType());
|
22 |
-
|
23 |
-
// Force to the frontend area
|
24 |
-
$currentArea = Mage::getDesign()->getArea();
|
25 |
-
Mage::getDesign()->setArea(Mage_Core_Model_Design_Package::DEFAULT_AREA);
|
26 |
-
|
27 |
-
// The images are only in the rontend skin directory
|
28 |
-
$img = '<img src="'.$this->getSkinUrl('images/monext/'.$ccType.'.gif').'" />';
|
29 |
-
|
30 |
-
// Un-Force the area
|
31 |
-
Mage::getDesign()->setArea($currentArea);
|
32 |
-
|
33 |
-
$data[Mage::helper('payline')->__('Credit Card Type')] = $img;
|
34 |
-
}
|
35 |
-
if ($this->getInfo()->getCcLast4()) {
|
36 |
-
$data[Mage::helper('payment')->__('Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4());
|
37 |
-
}
|
38 |
-
$year = $this->getInfo()->getCcExpYear();
|
39 |
-
$month = $this->getInfo()->getCcExpMonth();
|
40 |
-
if ($year && $month) {
|
41 |
-
$data[Mage::helper('payline')->__('Exp date')] = $this->_formatCardDate($year, $month);
|
42 |
-
}
|
43 |
-
$this->_paymentSpecificInformation = $transport;
|
44 |
-
return $transport->setData(array_merge($data, $transport->getData()));
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Get the contract
|
49 |
-
* @return Monext_Payline_Model_Contract
|
50 |
-
*/
|
51 |
-
protected function _getContract(Varien_Object $info)
|
52 |
-
{
|
53 |
-
return Mage::helper('payline/payment')->getContractByData($info);
|
54 |
-
}
|
55 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Info_Direct extends Mage_Payment_Block_Info_Cc
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->setTemplate('payline/payment/info/monext.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _prepareSpecificInformation($transport = null)
|
13 |
+
{
|
14 |
+
if (null !== $this->_paymentSpecificInformation) {
|
15 |
+
return $this->_paymentSpecificInformation;
|
16 |
+
}
|
17 |
+
$transport = new Varien_Object($transport);
|
18 |
+
$data = array();
|
19 |
+
if ($this->getInfo()->getCcType()) {
|
20 |
+
$contract = $this->_getContract($this->getInfo());
|
21 |
+
$ccType = strtolower($contract->getContractType());
|
22 |
+
|
23 |
+
// Force to the frontend area
|
24 |
+
$currentArea = Mage::getDesign()->getArea();
|
25 |
+
Mage::getDesign()->setArea(Mage_Core_Model_Design_Package::DEFAULT_AREA);
|
26 |
+
|
27 |
+
// The images are only in the rontend skin directory
|
28 |
+
$img = '<img src="'.$this->getSkinUrl('images/monext/'.$ccType.'.gif').'" />';
|
29 |
+
|
30 |
+
// Un-Force the area
|
31 |
+
Mage::getDesign()->setArea($currentArea);
|
32 |
+
|
33 |
+
$data[Mage::helper('payline')->__('Credit Card Type')] = $img;
|
34 |
+
}
|
35 |
+
if ($this->getInfo()->getCcLast4()) {
|
36 |
+
$data[Mage::helper('payment')->__('Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4());
|
37 |
+
}
|
38 |
+
$year = $this->getInfo()->getCcExpYear();
|
39 |
+
$month = $this->getInfo()->getCcExpMonth();
|
40 |
+
if ($year && $month) {
|
41 |
+
$data[Mage::helper('payline')->__('Exp date')] = $this->_formatCardDate($year, $month);
|
42 |
+
}
|
43 |
+
$this->_paymentSpecificInformation = $transport;
|
44 |
+
return $transport->setData(array_merge($data, $transport->getData()));
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get the contract
|
49 |
+
* @return Monext_Payline_Model_Contract
|
50 |
+
*/
|
51 |
+
protected function _getContract(Varien_Object $info)
|
52 |
+
{
|
53 |
+
return Mage::helper('payline/payment')->getContractByData($info);
|
54 |
+
}
|
55 |
}
|
app/code/community/Monext/Payline/Block/Logo.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Block_Logo extends Mage_Core_Block_Template{
|
3 |
-
protected function isPaylineAvailable(){
|
4 |
-
if (
|
5 |
-
Mage::getStoreConfig('payment/PaylineCPT/active') ||
|
6 |
-
Mage::getStoreConfig('payment/PaylineNX/active') ||
|
7 |
-
Mage::getStoreConfig('payment/PaylineDIRECT/active') ||
|
8 |
-
Mage::getStoreConfig('payment/PaylineWALLET/active'))
|
9 |
-
{
|
10 |
-
return true;
|
11 |
-
}else{
|
12 |
-
return false;
|
13 |
-
}
|
14 |
-
}
|
15 |
-
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Logo extends Mage_Core_Block_Template{
|
3 |
+
protected function isPaylineAvailable(){
|
4 |
+
if (
|
5 |
+
Mage::getStoreConfig('payment/PaylineCPT/active') ||
|
6 |
+
Mage::getStoreConfig('payment/PaylineNX/active') ||
|
7 |
+
Mage::getStoreConfig('payment/PaylineDIRECT/active') ||
|
8 |
+
Mage::getStoreConfig('payment/PaylineWALLET/active'))
|
9 |
+
{
|
10 |
+
return true;
|
11 |
+
}else{
|
12 |
+
return false;
|
13 |
+
}
|
14 |
+
}
|
15 |
+
}
|
app/code/community/Monext/Payline/Block/Nx.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Block/Wallet.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Block_Wallet extends Mage_Payment_Block_Form {
|
3 |
-
protected $_walletData;
|
4 |
-
|
5 |
-
protected function _construct() {
|
6 |
-
parent::_construct();
|
7 |
-
|
8 |
-
$this->setTemplate('payline/wallet/form.phtml');
|
9 |
-
}
|
10 |
-
|
11 |
-
public function getWalletData(){
|
12 |
-
if (!empty($this->_walletData)){
|
13 |
-
return $this->_walletData;
|
14 |
-
}
|
15 |
-
$wallet=$this->getMethod()->getWalletData();
|
16 |
-
$data=array(
|
17 |
-
$this->__('Card type')=>$wallet['card']['type'],
|
18 |
-
$this->__('Number')=>$wallet['card']['number'],
|
19 |
-
$this->__('Exp. date')=>$wallet['card']['expirationDate']
|
20 |
-
);
|
21 |
-
$this->_walletData=$data;
|
22 |
-
return $data;
|
23 |
-
}
|
24 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Wallet extends Mage_Payment_Block_Form {
|
3 |
+
protected $_walletData;
|
4 |
+
|
5 |
+
protected function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
|
8 |
+
$this->setTemplate('payline/wallet/form.phtml');
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getWalletData(){
|
12 |
+
if (!empty($this->_walletData)){
|
13 |
+
return $this->_walletData;
|
14 |
+
}
|
15 |
+
$wallet=$this->getMethod()->getWalletData();
|
16 |
+
$data=array(
|
17 |
+
$this->__('Card type')=>$wallet['card']['type'],
|
18 |
+
$this->__('Number')=>$wallet['card']['number'],
|
19 |
+
$this->__('Exp. date')=>$wallet['card']['expirationDate']
|
20 |
+
);
|
21 |
+
$this->_walletData=$data;
|
22 |
+
return $data;
|
23 |
+
}
|
24 |
}
|
app/code/community/Monext/Payline/Block/Wallet/Checkoutbtn.php
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Block_Wallet_Checkoutbtn extends Mage_Core_Block_Template{
|
3 |
-
protected $_template='payline/wallet/checkoutbtn.phtml';
|
4 |
-
|
5 |
-
public function getRedirectUrl(){
|
6 |
-
$redirectUrl = Mage::getUrl('payline/wallet/subscribe');
|
7 |
-
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
8 |
-
$customer=Mage::getSingleton('customer/session')->getCustomer();
|
9 |
-
if ($customer->getWalletId()){
|
10 |
-
//Check if the wallet payment is available
|
11 |
-
/* @var $walletPaymentMethod Monext_Payline_Model_Wallet */
|
12 |
-
$walletPaymentMethod=Mage::getModel('payline/wallet');
|
13 |
-
if ($walletPaymentMethod->checkExpirationDate()){
|
14 |
-
$redirectUrl = Mage::getUrl('payline/checkoutonepage/');
|
15 |
-
}
|
16 |
-
}
|
17 |
-
}
|
18 |
-
return $redirectUrl;
|
19 |
-
}
|
20 |
-
|
21 |
-
public function hasToDisplay()
|
22 |
-
{
|
23 |
-
$walletEnable = Mage::getStoreConfig('payment/PaylineWALLET/active');
|
24 |
-
$oneClicEnable = Mage::getStoreConfig('payment/PaylineWALLET/enable_one_clic');
|
25 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
26 |
-
return $walletEnable && $oneClicEnable && $customer->getWalletId() != '';
|
27 |
-
}
|
28 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Wallet_Checkoutbtn extends Mage_Core_Block_Template{
|
3 |
+
protected $_template='payline/wallet/checkoutbtn.phtml';
|
4 |
+
|
5 |
+
public function getRedirectUrl(){
|
6 |
+
$redirectUrl = Mage::getUrl('payline/wallet/subscribe');
|
7 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
8 |
+
$customer=Mage::getSingleton('customer/session')->getCustomer();
|
9 |
+
if ($customer->getWalletId()){
|
10 |
+
//Check if the wallet payment is available
|
11 |
+
/* @var $walletPaymentMethod Monext_Payline_Model_Wallet */
|
12 |
+
$walletPaymentMethod=Mage::getModel('payline/wallet');
|
13 |
+
if ($walletPaymentMethod->checkExpirationDate()){
|
14 |
+
$redirectUrl = Mage::getUrl('payline/checkoutonepage/');
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}
|
18 |
+
return $redirectUrl;
|
19 |
+
}
|
20 |
+
|
21 |
+
public function hasToDisplay()
|
22 |
+
{
|
23 |
+
$walletEnable = Mage::getStoreConfig('payment/PaylineWALLET/active');
|
24 |
+
$oneClicEnable = Mage::getStoreConfig('payment/PaylineWALLET/enable_one_clic');
|
25 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
26 |
+
return $walletEnable && $oneClicEnable && $customer->getWalletId() != '';
|
27 |
+
}
|
28 |
}
|
app/code/community/Monext/Payline/Block/Wallet/Details.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Block_Wallet_Details extends Mage_Core_Block_Template
|
4 |
-
{
|
5 |
-
|
6 |
-
public $wallet = array();
|
7 |
-
public $showShippingDetails;
|
8 |
-
|
9 |
-
public function _construct($flag = null)
|
10 |
-
{
|
11 |
-
if ($flag === null) {
|
12 |
-
$flag = (bool) Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details');
|
13 |
-
}
|
14 |
-
$this->showShippingDetails = $flag;
|
15 |
-
|
16 |
-
parent::_construct();
|
17 |
-
$this->setTemplate('payline/wallet/details.phtml');
|
18 |
-
}
|
19 |
-
|
20 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Block_Wallet_Details extends Mage_Core_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
public $wallet = array();
|
7 |
+
public $showShippingDetails;
|
8 |
+
|
9 |
+
public function _construct($flag = null)
|
10 |
+
{
|
11 |
+
if ($flag === null) {
|
12 |
+
$flag = (bool) Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details');
|
13 |
+
}
|
14 |
+
$this->showShippingDetails = $flag;
|
15 |
+
|
16 |
+
parent::_construct();
|
17 |
+
$this->setTemplate('payline/wallet/details.phtml');
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Monext/Payline/Block/Wallet/Infos.php
CHANGED
@@ -1,34 +1,42 @@
|
|
1 |
-
<?php
|
2 |
-
/** Display wallet payment info (usually in the checkout progress bar
|
3 |
-
*/
|
4 |
-
class Monext_Payline_Block_Wallet_Infos extends Mage_Payment_Block_Info{
|
5 |
-
|
6 |
-
|
7 |
-
*
|
8 |
-
* @param Varien_Object|array $transport
|
9 |
-
* @return Varien_Object
|
10 |
-
*/
|
11 |
-
protected function _prepareSpecificInformation($transport = null)
|
12 |
{
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
1 |
+
<?php
|
2 |
+
/** Display wallet payment info (usually in the checkout progress bar
|
3 |
+
*/
|
4 |
+
class Monext_Payline_Block_Wallet_Infos extends Mage_Payment_Block_Info{
|
5 |
+
|
6 |
+
protected function _construct()
|
|
|
|
|
|
|
|
|
|
|
7 |
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->setTemplate('payline/payment/info/monext.phtml');
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Prepare credit card related payment info
|
14 |
+
*
|
15 |
+
* @param Varien_Object|array $transport
|
16 |
+
* @return Varien_Object
|
17 |
+
*/
|
18 |
+
protected function _prepareSpecificInformation($transport = null)
|
19 |
+
{
|
20 |
+
if (null !== $this->_paymentSpecificInformation) {
|
21 |
+
return $this->_paymentSpecificInformation;
|
22 |
+
}
|
23 |
+
$transport = parent::_prepareSpecificInformation($transport);
|
24 |
+
$wallet=$this->getInfo()->getMethodInstance()->getWalletData();
|
25 |
+
$data=array();
|
26 |
+
if (!empty($wallet)){
|
27 |
+
$cardNumber = substr($wallet['card']['number'], -4);
|
28 |
+
$expMonth = substr($wallet['card']['expirationDate'], 0, 2);
|
29 |
+
$expYear = substr($wallet['card']['expirationDate'], -2);
|
30 |
+
$cardType = $wallet['card']['type'];
|
31 |
+
$cardType = strtolower($cardType);
|
32 |
+
$img = '<img src="'.$this->getSkinUrl('images/monext/'.$cardType.'.gif').'" />';
|
33 |
+
$data=array(
|
34 |
+
$this->__('Card type') => $img,
|
35 |
+
$this->__('Number') => sprintf('xxxx-%s', $cardNumber),
|
36 |
+
$this->__('Exp date') => $expMonth.'/'.$expYear
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
return $transport->setData(array_merge($transport->getData(),$data));
|
41 |
+
}
|
42 |
}
|
app/code/community/Monext/Payline/Block/Wallet/Sidebar.php
CHANGED
@@ -1,132 +1,131 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Block_Wallet_Sidebar extends Mage_Core_Block_Template{
|
3 |
-
|
4 |
-
protected $_customer;
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Get logged in customer
|
8 |
-
*
|
9 |
-
* @return Mage_Customer_Model_Customer
|
10 |
-
*/
|
11 |
-
public function getCustomer()
|
12 |
-
{
|
13 |
-
if (empty($this->_customer)) {
|
14 |
-
$this->_customer = Mage::getSingleton('customer/session')->getCustomer();
|
15 |
-
}
|
16 |
-
return $this->_customer;
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @return bool
|
21 |
-
*/
|
22 |
-
public function isCustomerLoggedIn()
|
23 |
-
{
|
24 |
-
return Mage::getSingleton('customer/session')->isLoggedIn();
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Define if the sidebar is displayed
|
29 |
-
*
|
30 |
-
* @return bool
|
31 |
-
*/
|
32 |
-
public function getIsNeedToDisplaySideBar()
|
33 |
-
{
|
34 |
-
if (Mage::getStoreConfig('payment/PaylineWALLET/active')){
|
35 |
-
if (Mage::getStoreConfig('payment/PaylineWALLET/payline_register-oneclick_catalog') != ''){
|
36 |
-
$showCmsBlock=true;
|
37 |
-
}else{
|
38 |
-
$showCmsBlock=false;
|
39 |
-
}
|
40 |
-
if($this->isCustomerLoggedIn()){
|
41 |
-
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
42 |
-
$customer=$this->getCustomer();
|
43 |
-
if ($customer->getWalletId() && $quote !== null && $quote->hasItems()){
|
44 |
-
//if user doesn't have addresses, we don't display block
|
45 |
-
if ($this->getAddressesHtmlSelect()){
|
46 |
-
return true;
|
47 |
-
}
|
48 |
-
}else{
|
49 |
-
//Customer doesn't have walletId, the CMS block will be shown if config is OK
|
50 |
-
return $showCmsBlock;
|
51 |
-
}
|
52 |
-
}else{
|
53 |
-
//Customer isn't logged in, the CMS blcok will be shown if config is OK
|
54 |
-
return $showCmsBlock;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
return false;
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* If customer logged & registered to wallet, display form
|
62 |
-
* Otherwise, display configured static CMS bloc
|
63 |
-
* @return string html code
|
64 |
-
*/
|
65 |
-
public function getContent(){
|
66 |
-
$hasWallet = false;
|
67 |
-
if($this->isCustomerLoggedIn()){
|
68 |
-
$customer=$this->getCustomer();
|
69 |
-
if ($walletId=$customer->getWalletId()){
|
70 |
-
$hasWallet = true;
|
71 |
-
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
72 |
-
if ($quote !== null && $quote->hasItems()) {
|
73 |
-
$formBlock=$this->getLayout()->createBlock('core/template');
|
74 |
-
$formBlock->setTemplate('payline/wallet/sidebar/form.phtml');
|
75 |
-
$formBlock->setBillingAddresses($this->getAddressesHtmlSelect('billing'));
|
76 |
-
$formBlock->setShippingAddresses($this->getAddressesHtmlSelect('shipping'));
|
77 |
-
|
78 |
-
return $formBlock->toHtml();
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
$blockId=Mage::getStoreConfig('payment/PaylineWALLET/payline_register-oneclick_catalog');
|
83 |
-
/* @var $cmsBlock Mage_Cms_Block_Block */
|
84 |
-
$cmsBlock=$this->getLayout()->createBlock('cms/block')->setBlockId($blockId);
|
85 |
-
/* @var $notLoggedBlock Mage_Core_Block_Template */
|
86 |
-
$notLoggedBlock = $this->getLayout()->createBlock('core/template')
|
87 |
-
->setTemplate('payline/wallet/sidebar/notlogged.phtml')
|
88 |
-
->setHasWallet($hasWallet);
|
89 |
-
$notLoggedBlock->append($cmsBlock);
|
90 |
-
return $notLoggedBlock->toHtml();
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Return a html select with the customer addresses
|
95 |
-
* Retrieve wether billing or shipping addresses, depending on the $type param
|
96 |
-
* @param string $type
|
97 |
-
*/
|
98 |
-
public function getAddressesHtmlSelect($type=null)
|
99 |
-
{
|
100 |
-
if ($this->getCustomer()!=null) {
|
101 |
-
$options = array();
|
102 |
-
foreach ($this->getCustomer()->getAddresses() as $address) {
|
103 |
-
$options[] = array(
|
104 |
-
'value'=>$address->getId(),
|
105 |
-
'label'=>$address->format('oneline')
|
106 |
-
);
|
107 |
-
}
|
108 |
-
if (count($options)==0){
|
109 |
-
return '';
|
110 |
-
}
|
111 |
-
if ($type=='billing') {
|
112 |
-
$address = $this->getCustomer()->getPrimaryBillingAddress();
|
113 |
-
} else {
|
114 |
-
$address = $this->getCustomer()->getPrimaryShippingAddress();
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
->
|
122 |
-
|
123 |
-
|
124 |
-
->setValue($
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Block_Wallet_Sidebar extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
protected $_customer;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Get logged in customer
|
8 |
+
*
|
9 |
+
* @return Mage_Customer_Model_Customer
|
10 |
+
*/
|
11 |
+
public function getCustomer()
|
12 |
+
{
|
13 |
+
if (empty($this->_customer)) {
|
14 |
+
$this->_customer = Mage::getSingleton('customer/session')->getCustomer();
|
15 |
+
}
|
16 |
+
return $this->_customer;
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return bool
|
21 |
+
*/
|
22 |
+
public function isCustomerLoggedIn()
|
23 |
+
{
|
24 |
+
return Mage::getSingleton('customer/session')->isLoggedIn();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Define if the sidebar is displayed
|
29 |
+
*
|
30 |
+
* @return bool
|
31 |
+
*/
|
32 |
+
public function getIsNeedToDisplaySideBar()
|
33 |
+
{
|
34 |
+
if (Mage::getStoreConfig('payment/PaylineWALLET/active')){
|
35 |
+
if (Mage::getStoreConfig('payment/PaylineWALLET/payline_register-oneclick_catalog') != ''){
|
36 |
+
$showCmsBlock=true;
|
37 |
+
}else{
|
38 |
+
$showCmsBlock=false;
|
39 |
+
}
|
40 |
+
if($this->isCustomerLoggedIn()){
|
41 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
42 |
+
$customer=$this->getCustomer();
|
43 |
+
if ($customer->getWalletId() && $quote !== null && $quote->hasItems()){
|
44 |
+
//if user doesn't have addresses, we don't display block
|
45 |
+
if ($this->getAddressesHtmlSelect()){
|
46 |
+
return true;
|
47 |
+
}
|
48 |
+
}else{
|
49 |
+
//Customer doesn't have walletId, the CMS block will be shown if config is OK
|
50 |
+
return $showCmsBlock;
|
51 |
+
}
|
52 |
+
}else{
|
53 |
+
//Customer isn't logged in, the CMS blcok will be shown if config is OK
|
54 |
+
return $showCmsBlock;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
return false;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* If customer logged & registered to wallet, display form
|
62 |
+
* Otherwise, display configured static CMS bloc
|
63 |
+
* @return string html code
|
64 |
+
*/
|
65 |
+
public function getContent(){
|
66 |
+
$hasWallet = false;
|
67 |
+
if($this->isCustomerLoggedIn()){
|
68 |
+
$customer=$this->getCustomer();
|
69 |
+
if ($walletId=$customer->getWalletId()){
|
70 |
+
$hasWallet = true;
|
71 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
72 |
+
if ($quote !== null && $quote->hasItems()) {
|
73 |
+
$formBlock=$this->getLayout()->createBlock('core/template');
|
74 |
+
$formBlock->setTemplate('payline/wallet/sidebar/form.phtml');
|
75 |
+
$formBlock->setBillingAddresses($this->getAddressesHtmlSelect('billing'));
|
76 |
+
$formBlock->setShippingAddresses($this->getAddressesHtmlSelect('shipping'));
|
77 |
+
|
78 |
+
return $formBlock->toHtml();
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
$blockId=Mage::getStoreConfig('payment/PaylineWALLET/payline_register-oneclick_catalog');
|
83 |
+
/* @var $cmsBlock Mage_Cms_Block_Block */
|
84 |
+
$cmsBlock=$this->getLayout()->createBlock('cms/block')->setBlockId($blockId);
|
85 |
+
/* @var $notLoggedBlock Mage_Core_Block_Template */
|
86 |
+
$notLoggedBlock = $this->getLayout()->createBlock('core/template')
|
87 |
+
->setTemplate('payline/wallet/sidebar/notlogged.phtml')
|
88 |
+
->setHasWallet($hasWallet);
|
89 |
+
$notLoggedBlock->append($cmsBlock);
|
90 |
+
return $notLoggedBlock->toHtml();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Return a html select with the customer addresses
|
95 |
+
* Retrieve wether billing or shipping addresses, depending on the $type param
|
96 |
+
* @param string $type
|
97 |
+
*/
|
98 |
+
public function getAddressesHtmlSelect($type=null)
|
99 |
+
{
|
100 |
+
if ($this->getCustomer()!=null) {
|
101 |
+
$options = array();
|
102 |
+
foreach ($this->getCustomer()->getAddresses() as $address) {
|
103 |
+
$options[] = array(
|
104 |
+
'value'=>$address->getId(),
|
105 |
+
'label'=>$address->format('oneline')
|
106 |
+
);
|
107 |
+
}
|
108 |
+
if (count($options)==0){
|
109 |
+
return '';
|
110 |
+
}
|
111 |
+
if ($type=='billing') {
|
112 |
+
$address = $this->getCustomer()->getPrimaryBillingAddress();
|
113 |
+
} else {
|
114 |
+
$address = $this->getCustomer()->getPrimaryShippingAddress();
|
115 |
+
}
|
116 |
+
|
117 |
+
$select = $this->getLayout()->createBlock('core/html_select')
|
118 |
+
->setName($type.'_address_id')
|
119 |
+
->setId($type.'-address-select')
|
120 |
+
->setClass('address-select')
|
121 |
+
->setOptions($options);
|
122 |
+
|
123 |
+
if ($address) {
|
124 |
+
$select->setValue($address->getId());
|
125 |
+
}
|
126 |
+
|
127 |
+
return $select->getHtml();
|
128 |
+
}
|
129 |
+
return '';
|
130 |
+
}
|
131 |
+
}
|
|
app/code/community/Monext/Payline/Helper/Category.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Helper_Category extends Mage_Core_Helper_Data
|
4 |
+
{
|
5 |
+
protected $_category_tree;
|
6 |
+
|
7 |
+
public function getAllCategoriesWithFullpathName()
|
8 |
+
{
|
9 |
+
if (is_null($this->_category_tree)) {
|
10 |
+
$this->_category_tree = array();
|
11 |
+
|
12 |
+
$categoryCollection = Mage::getModel('catalog/category')->getCollection()
|
13 |
+
->addAttributeToSelect('name')
|
14 |
+
->addAttributeToFilter('is_active','1');
|
15 |
+
|
16 |
+
foreach ($categoryCollection as $category)
|
17 |
+
{
|
18 |
+
$path = explode('/', $category->getPath());
|
19 |
+
$categoryFullPath = array();
|
20 |
+
foreach ($path as $pathId)
|
21 |
+
{
|
22 |
+
$categoryByPath = $categoryCollection->getItemById($pathId);
|
23 |
+
if($categoryByPath) {
|
24 |
+
$categoryFullPath[] = $categoryByPath->getName();
|
25 |
+
}
|
26 |
+
}
|
27 |
+
$this->_category_tree[$category->getId()] = implode('/', $categoryFullPath);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
return $this->_category_tree;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getCategoryFullpathName($category_id)
|
35 |
+
{
|
36 |
+
$categoryTree = $this->getAllCategoriesWithFullpathName();
|
37 |
+
|
38 |
+
return (!empty($categoryTree[$category_id])) ? $categoryTree[$category_id] : '';
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
} // end class
|
app/code/community/Monext/Payline/Helper/Data.php
CHANGED
@@ -211,7 +211,7 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
211 |
protected $_availablePaymentMethods = array(
|
212 |
'DIRECT', 'CPT', 'NX', 'WALLET'
|
213 |
);
|
214 |
-
|
215 |
public $merchantId = '';
|
216 |
public $accessKey = '';
|
217 |
public $proxyHost = '';
|
@@ -291,14 +291,15 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
291 |
}
|
292 |
|
293 |
/**
|
294 |
-
*
|
295 |
* Test if we can create a new Wallet
|
296 |
*/
|
297 |
public function canSubscribeWallet()
|
298 |
{
|
|
|
299 |
$automateSubscriptionEnable = Mage::getStoreConfig('payment/payline_common/automate_wallet_subscription');
|
300 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
301 |
-
return $automateSubscriptionEnable && $customer->getWalletId() == '';
|
302 |
}
|
303 |
|
304 |
public function createWalletForCurrentCustomer($paylineSDK, $array)
|
@@ -306,14 +307,23 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
306 |
if ($this->canSubscribeWallet()) {
|
307 |
try {
|
308 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
309 |
-
|
310 |
$array['wallet']['walletId'] = Mage::getModel('payline/wallet')->generateWalletId($customer->id); // TODO
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
} catch (Mage_Core_Exception $e) {
|
318 |
Mage::logException($e);
|
319 |
}
|
@@ -321,7 +331,7 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
321 |
}
|
322 |
|
323 |
/**
|
324 |
-
*
|
325 |
* Initialize a payline webservice for payment
|
326 |
* @param string $paymentMethod (CPT, NX or DIRECT)
|
327 |
* @param $_numericCurrencyCode If provided, will also initialize currency
|
@@ -338,7 +348,7 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
338 |
}
|
339 |
$xmlConfigPath = 'payment/Payline' . $paymentMethod;
|
340 |
$commonConfigPath = 'payment/payline_common';
|
341 |
-
|
342 |
$this->merchantId = Mage::getStoreConfig($commonConfigPath . '/merchant_id');
|
343 |
$this->accessKey = Mage::getStoreConfig($commonConfigPath . '/access_key');
|
344 |
if (Mage::getStoreConfig($commonConfigPath . '/proxy_host') == '') {
|
@@ -354,6 +364,7 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
354 |
$this->proxyLogin = Mage::getStoreConfig($commonConfigPath . '/proxy_login');
|
355 |
$this->proxyPassword = Mage::getStoreConfig($commonConfigPath . '/proxy_password');
|
356 |
$this->environment = Mage::getStoreConfig($commonConfigPath . '/environment');
|
|
|
357 |
$this->securityMode = self::SECURITY_MODE;
|
358 |
$this->languageCode = Mage::getStoreConfig($commonConfigPath . '/language');
|
359 |
|
@@ -427,7 +438,8 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
427 |
$this->customPaymentPageCode = $customTheme;
|
428 |
}
|
429 |
|
430 |
-
|
|
|
431 |
$payline = new paylineSDK($this->merchantId, $this->accessKey, $this->proxyHost, $this->proxyPort, $this->proxyLogin, $this->proxyPassword, $this->environment, Mage::getBaseDir('var').'/log/paylineSDK_');
|
432 |
$payline->returnURL = $this->returnUrl;
|
433 |
$payline->cancelURL = $this->cancelUrl;
|
@@ -440,6 +452,13 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
440 |
return $payline;
|
441 |
}
|
442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
protected function _prepareContractList($primary = true, $filterCB = false)
|
444 |
{
|
445 |
$contractList = array();
|
@@ -513,9 +532,9 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
513 |
}
|
514 |
|
515 |
/**
|
516 |
-
*
|
517 |
* Get the contract number from a transaction (needen if defautl contract number!= of the one trully used - fore instance in a web payment & card AMEX)
|
518 |
-
* @param PaylineSDK $paylineSDK
|
519 |
* @param string $transactionId
|
520 |
* @param string $orderRef
|
521 |
*/
|
@@ -799,14 +818,14 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
799 |
}
|
800 |
return sizeof($contractsNumber) > 0 ? $contractsNumber : null;
|
801 |
}
|
802 |
-
|
803 |
public function getProxyParams(){
|
804 |
return array('host' => $this->proxyHost, 'port' => $this->proxyPort, 'login' => $this->proxyLogin, 'password' => $this->proxyPassword);
|
805 |
}
|
806 |
-
|
807 |
/**
|
808 |
-
*
|
809 |
-
* Sets order details in Payline request, from cart content
|
810 |
* @param $paylineSDK the current sdk instance
|
811 |
* @param $order the current order
|
812 |
* @param $sendPaylineproductCat flag to determine wether store or Payline product categories shall be sent
|
@@ -820,9 +839,6 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
820 |
$itemPrice = round($item->getPrice()*100);
|
821 |
if($itemPrice > 0){
|
822 |
$product = array();
|
823 |
-
$product['category'] = null;
|
824 |
-
$product['subcategory1'] = null;
|
825 |
-
$product['subcategory2'] = null;
|
826 |
$itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
827 |
$catIdsArray = $itemProduct->getCategoryIds();
|
828 |
$currentProductCategoryId = $catIdsArray[0];
|
@@ -864,18 +880,17 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
864 |
}
|
865 |
}
|
866 |
}
|
867 |
-
|
868 |
-
// delete special characters
|
869 |
$product['category'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['category']),0,50));
|
870 |
$product['subcategory1'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['subcategory1']),0,50));
|
871 |
$product['subcategory2'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['subcategory2']),0,50));
|
872 |
-
|
873 |
-
$product['ref'] =
|
874 |
$product['price'] = round($item->getPrice()*100);
|
875 |
$product['quantity'] = round($item->getQtyOrdered());
|
876 |
-
$product['comment'] =
|
877 |
$product['taxRate'] = round($item->getTaxPercent()*100);
|
878 |
-
$product['additionalData'] =
|
879 |
$product['brand'] = $itemProduct->getAttributeText('manufacturer');
|
880 |
$paylineSDK->setItem($product);
|
881 |
}
|
@@ -883,6 +898,175 @@ class Monext_Payline_Helper_Data extends Mage_Core_Helper_Data
|
|
883 |
}
|
884 |
}
|
885 |
}
|
886 |
-
}
|
887 |
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
protected $_availablePaymentMethods = array(
|
212 |
'DIRECT', 'CPT', 'NX', 'WALLET'
|
213 |
);
|
214 |
+
|
215 |
public $merchantId = '';
|
216 |
public $accessKey = '';
|
217 |
public $proxyHost = '';
|
291 |
}
|
292 |
|
293 |
/**
|
294 |
+
*
|
295 |
* Test if we can create a new Wallet
|
296 |
*/
|
297 |
public function canSubscribeWallet()
|
298 |
{
|
299 |
+
$walletActive = Mage::getStoreConfig('payment/PaylineWALLET/active');
|
300 |
$automateSubscriptionEnable = Mage::getStoreConfig('payment/payline_common/automate_wallet_subscription');
|
301 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
302 |
+
return $walletActive && $automateSubscriptionEnable && $customer->getWalletId() == '';
|
303 |
}
|
304 |
|
305 |
public function createWalletForCurrentCustomer($paylineSDK, $array)
|
307 |
if ($this->canSubscribeWallet()) {
|
308 |
try {
|
309 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
310 |
+
$array['contractNumber'] = $array['payment']['contractNumber'];
|
311 |
$array['wallet']['walletId'] = Mage::getModel('payline/wallet')->generateWalletId($customer->id); // TODO
|
312 |
+
$walletResult = $paylineSDK->createWallet($array);
|
313 |
+
|
314 |
+
if (isset($walletResult['result']['code']) && $walletResult['result']['code'] == '02500') {
|
315 |
+
$customer->setWalletId($array['wallet']['walletId'])
|
316 |
+
->setWalletContractNumber($array['contractNumber'])
|
317 |
+
->save();
|
318 |
+
} else {
|
319 |
+
$msg = '[createWallet] Error creating';
|
320 |
+
if (is_string($walletResult)) {
|
321 |
+
$msg = ' '.$walletResult;
|
322 |
+
} elseif (isset($walletResult['result']['code'])) {
|
323 |
+
$msg = ', code: '.$walletResult['result']['code'];
|
324 |
+
}
|
325 |
+
Mage::helper('payline/logger')->log($msg);
|
326 |
+
}
|
327 |
} catch (Mage_Core_Exception $e) {
|
328 |
Mage::logException($e);
|
329 |
}
|
331 |
}
|
332 |
|
333 |
/**
|
334 |
+
*
|
335 |
* Initialize a payline webservice for payment
|
336 |
* @param string $paymentMethod (CPT, NX or DIRECT)
|
337 |
* @param $_numericCurrencyCode If provided, will also initialize currency
|
348 |
}
|
349 |
$xmlConfigPath = 'payment/Payline' . $paymentMethod;
|
350 |
$commonConfigPath = 'payment/payline_common';
|
351 |
+
|
352 |
$this->merchantId = Mage::getStoreConfig($commonConfigPath . '/merchant_id');
|
353 |
$this->accessKey = Mage::getStoreConfig($commonConfigPath . '/access_key');
|
354 |
if (Mage::getStoreConfig($commonConfigPath . '/proxy_host') == '') {
|
364 |
$this->proxyLogin = Mage::getStoreConfig($commonConfigPath . '/proxy_login');
|
365 |
$this->proxyPassword = Mage::getStoreConfig($commonConfigPath . '/proxy_password');
|
366 |
$this->environment = Mage::getStoreConfig($commonConfigPath . '/environment');
|
367 |
+
|
368 |
$this->securityMode = self::SECURITY_MODE;
|
369 |
$this->languageCode = Mage::getStoreConfig($commonConfigPath . '/language');
|
370 |
|
438 |
$this->customPaymentPageCode = $customTheme;
|
439 |
}
|
440 |
|
441 |
+
|
442 |
+
require_once(Mage::getModuleDir('',"Monext_Payline") . '/lib/paylineSDK.php');
|
443 |
$payline = new paylineSDK($this->merchantId, $this->accessKey, $this->proxyHost, $this->proxyPort, $this->proxyLogin, $this->proxyPassword, $this->environment, Mage::getBaseDir('var').'/log/paylineSDK_');
|
444 |
$payline->returnURL = $this->returnUrl;
|
445 |
$payline->cancelURL = $this->cancelUrl;
|
452 |
return $payline;
|
453 |
}
|
454 |
|
455 |
+
public function isProduction()
|
456 |
+
{
|
457 |
+
require_once(Mage::getModuleDir('',"Monext_Payline") . '/lib/paylineSDK.php');
|
458 |
+
|
459 |
+
return Mage::getStoreConfig('payment/payline_common/environment') == paylineSDK::ENV_PROD;
|
460 |
+
}
|
461 |
+
|
462 |
protected function _prepareContractList($primary = true, $filterCB = false)
|
463 |
{
|
464 |
$contractList = array();
|
532 |
}
|
533 |
|
534 |
/**
|
535 |
+
*
|
536 |
* Get the contract number from a transaction (needen if defautl contract number!= of the one trully used - fore instance in a web payment & card AMEX)
|
537 |
+
* @param PaylineSDK $paylineSDK
|
538 |
* @param string $transactionId
|
539 |
* @param string $orderRef
|
540 |
*/
|
818 |
}
|
819 |
return sizeof($contractsNumber) > 0 ? $contractsNumber : null;
|
820 |
}
|
821 |
+
|
822 |
public function getProxyParams(){
|
823 |
return array('host' => $this->proxyHost, 'port' => $this->proxyPort, 'login' => $this->proxyLogin, 'password' => $this->proxyPassword);
|
824 |
}
|
825 |
+
|
826 |
/**
|
827 |
+
*
|
828 |
+
* Sets order details in Payline request, from cart content
|
829 |
* @param $paylineSDK the current sdk instance
|
830 |
* @param $order the current order
|
831 |
* @param $sendPaylineproductCat flag to determine wether store or Payline product categories shall be sent
|
839 |
$itemPrice = round($item->getPrice()*100);
|
840 |
if($itemPrice > 0){
|
841 |
$product = array();
|
|
|
|
|
|
|
842 |
$itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
843 |
$catIdsArray = $itemProduct->getCategoryIds();
|
844 |
$currentProductCategoryId = $catIdsArray[0];
|
880 |
}
|
881 |
}
|
882 |
}
|
883 |
+
// delete special characters
|
|
|
884 |
$product['category'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['category']),0,50));
|
885 |
$product['subcategory1'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['subcategory1']),0,50));
|
886 |
$product['subcategory2'] = preg_replace('/[^A-Za-z0-9\-]/', '', substr(str_replace(array("\r","\n","\t"," "), array('','','',''),$product['subcategory2']),0,50));
|
887 |
+
|
888 |
+
$product['ref'] = Mage::helper('payline')->encodeString(substr(str_replace(array("\r","\n","\t"), array('','',''),$item->getName()),0,50));
|
889 |
$product['price'] = round($item->getPrice()*100);
|
890 |
$product['quantity'] = round($item->getQtyOrdered());
|
891 |
+
$product['comment'] = Mage::helper('payline')->encodeString(substr(str_replace(array("\r","\n","\t"), array('','',''),$item->getDescription()), 0,255));
|
892 |
$product['taxRate'] = round($item->getTaxPercent()*100);
|
893 |
+
$product['additionalData'] = Mage::helper('payline')->encodeString(substr(str_replace(array("\r","\n","\t"), array('','',''),$item->getAdditionalData()), 0,255));
|
894 |
$product['brand'] = $itemProduct->getAttributeText('manufacturer');
|
895 |
$paylineSDK->setItem($product);
|
896 |
}
|
898 |
}
|
899 |
}
|
900 |
}
|
|
|
901 |
|
902 |
+
/**
|
903 |
+
* Return all contract with is_secure set to $securized.
|
904 |
+
*
|
905 |
+
* @param bool $securized
|
906 |
+
*
|
907 |
+
* @return Monext_Payline_Model_Mysql4_Contract_Collection
|
908 |
+
*/
|
909 |
+
public function getCcContracts($securized=true, $cbType= true, $primary=true)
|
910 |
+
{
|
911 |
+
$key = ($securized) ? 1 : 0;
|
912 |
+
$keyPrimary = ($primary) ? 1 : 0;
|
913 |
+
if (!isset($this->_ccContracts[$key]) || !isset($this->_ccContracts[$key][$keyPrimary])) {
|
914 |
+
|
915 |
+
$contracts = Mage::getModel('payline/contract')->getCollection()
|
916 |
+
->addFilterSecure($securized, Mage::app()->getStore()->getId());
|
917 |
+
|
918 |
+
if($cbType) {
|
919 |
+
$contracts->addFieldToFilter('contract_type', array('CB', 'AMEX', 'MCVISA'));
|
920 |
+
}
|
921 |
+
|
922 |
+
//No need to be primary nor secondary if contract is secure
|
923 |
+
if(!$securized) {
|
924 |
+
$contracts->addFilterStatus($primary, Mage::app()->getStore()->getId());
|
925 |
+
}
|
926 |
+
|
927 |
+
$this->_ccContracts[$key][$keyPrimary] = $contracts;
|
928 |
+
}
|
929 |
+
|
930 |
+
return $this->_ccContracts[$key][$keyPrimary];
|
931 |
+
}
|
932 |
+
|
933 |
+
/**
|
934 |
+
* Return contract by code en securise property
|
935 |
+
*
|
936 |
+
* @param string $type
|
937 |
+
* @param bool $securized
|
938 |
+
*
|
939 |
+
* @return Monext_Payline_Model_Contract
|
940 |
+
*/
|
941 |
+
public function getContractByType($type, $securized=false)
|
942 |
+
{
|
943 |
+
$returnContract=false;
|
944 |
+
$contractNumber=0;
|
945 |
+
$contracts = $this->getCcContracts($securized);
|
946 |
+
foreach ($contracts as $contract) {
|
947 |
+
if($type==$contract->getContractType()) {
|
948 |
+
$returnContract = $contract;
|
949 |
+
$contractNumber++;
|
950 |
+
}
|
951 |
+
}
|
952 |
+
if($contractNumber==1 and $returnContract) {
|
953 |
+
return $returnContract;
|
954 |
+
} else {
|
955 |
+
return false;
|
956 |
+
}
|
957 |
+
}
|
958 |
+
|
959 |
+
|
960 |
+
/**
|
961 |
+
* @return string
|
962 |
+
*/
|
963 |
+
public function getWeb2TokenKey()
|
964 |
+
{
|
965 |
+
return Mage::getStoreConfig('payment/PaylineDIRECT/web2token_key');
|
966 |
+
}
|
967 |
+
|
968 |
+
|
969 |
+
/**
|
970 |
+
* @return string
|
971 |
+
*/
|
972 |
+
protected function _getAes256()
|
973 |
+
{
|
974 |
+
return hash("SHA256", $this->accessKey, true);
|
975 |
+
}
|
976 |
+
|
977 |
+
/**
|
978 |
+
* Reserve an orderid and return a unique crypted key
|
979 |
+
*
|
980 |
+
* @return string
|
981 |
+
*/
|
982 |
+
public function getCryptedKeys($quote=null)
|
983 |
+
{
|
984 |
+
//Reserve an OrderId
|
985 |
+
if(is_null($quote)) {
|
986 |
+
$quote= Mage::getSingleton('checkout/session')->getQuote();
|
987 |
+
}
|
988 |
+
|
989 |
+
$quote->reserveOrderId()->save();
|
990 |
+
$crypted = array();
|
991 |
+
|
992 |
+
$numericCurrency = $this->getNumericCurrencyCode($quote->getBaseCurrencyCode());
|
993 |
+
|
994 |
+
$paylineSDK = $this->initPayline('DIRECT',$numericCurrency);
|
995 |
+
|
996 |
+
$orderRef = $quote->getReservedOrderId();
|
997 |
+
|
998 |
+
$availableContracts = $this->getCcContracts();
|
999 |
+
|
1000 |
+
foreach($availableContracts as $contract) {
|
1001 |
+
$messageUtf8 = utf8_encode($this->merchantId . ";" . $orderRef . ";" . $contract['number']);
|
1002 |
+
$crypted[$contract['id']] = $paylineSDK->getEncrypt($messageUtf8, $this->_getAes256());
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
return $crypted;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
/**
|
1009 |
+
*
|
1010 |
+
* @param string $tokenData
|
1011 |
+
* @param string $order
|
1012 |
+
*
|
1013 |
+
* @return array
|
1014 |
+
*/
|
1015 |
+
public function getDecryptedCardTokenPan($tokenData, $order)
|
1016 |
+
{
|
1017 |
+
$numericCurrency = $this->getNumericCurrencyCode($order->getBaseCurrencyCode());
|
1018 |
+
|
1019 |
+
$paylineSDK = $this->initPayline('DIRECT',$numericCurrency);
|
1020 |
+
|
1021 |
+
$decrypt = $paylineSDK->gzdecode($paylineSDK->getDecrypt($tokenData, $this->_getAes256()));
|
1022 |
+
$arrayDecrypt = explode(';',$decrypt);
|
1023 |
+
$paymentData = array(
|
1024 |
+
'cardTokenPan' => $arrayDecrypt[0],
|
1025 |
+
'cardExp' => $arrayDecrypt[1],
|
1026 |
+
'vCVV' => $arrayDecrypt[2],
|
1027 |
+
'orderRef' => $arrayDecrypt[3],
|
1028 |
+
'cardType' => $arrayDecrypt[4],
|
1029 |
+
'cardIsCVD ' => $arrayDecrypt[5],
|
1030 |
+
'cardCountry' => $arrayDecrypt[6],
|
1031 |
+
'cardProduct' => $arrayDecrypt[7],
|
1032 |
+
'bankCode' => $arrayDecrypt[8]
|
1033 |
+
);
|
1034 |
+
|
1035 |
+
return $paymentData;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
|
1039 |
+
public function getCptConfigTemplate()
|
1040 |
+
{
|
1041 |
+
return Mage::getStoreConfig('payment/PaylineCPT/data_template', Mage::app()->getStore());
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
public function disableOnepagePaymentStep()
|
1045 |
+
{
|
1046 |
+
$template = $this->getCptConfigTemplate();
|
1047 |
+
return !empty($template) && $template!='redirect';
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
|
1051 |
+
public function getContractsForWidget($primary=true)
|
1052 |
+
{
|
1053 |
+
$contractCPT = $this->getCcContracts(false, false,$primary);
|
1054 |
+
|
1055 |
+
$contracts = array();
|
1056 |
+
foreach($contractCPT as $contract) {
|
1057 |
+
$contracts[]= $contract->getNumber();
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
return $contracts;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
|
1064 |
+
public function getDefaultContractNumberForWidget()
|
1065 |
+
{
|
1066 |
+
$contracts = $this->getContractsForWidget();
|
1067 |
+
|
1068 |
+
return !empty($contracts) ? $contracts[0] : false;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
|
1072 |
+
} // end class
|
app/code/community/Monext/Payline/Helper/Logger.php
CHANGED
@@ -1,59 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* On Magento 1.3.2.4, the Mage::log method don't allow us to force log, so we've to log by an other way
|
4 |
-
*/
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
*
|
16 |
-
*
|
17 |
-
* @param string $
|
18 |
-
* @param
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* On Magento 1.3.2.4, the Mage::log method don't allow us to force log, so we've to log by an other way
|
4 |
+
*/
|
5 |
+
require_once(Mage::getModuleDir('',"Monext_Payline") . '/lib/paylineSDK.php');
|
6 |
+
|
7 |
+
class Monext_Payline_Helper_Logger extends Mage_Core_Helper_Abstract{
|
8 |
+
const FILE = 'payline.log';
|
9 |
+
const LEVEL = Zend_Log::DEBUG;
|
10 |
+
|
11 |
+
protected static $loggers=array();
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* forced log facility
|
16 |
+
*
|
17 |
+
* @param string $message
|
18 |
+
* @param integer $level
|
19 |
+
* @param string $file
|
20 |
+
* @param bool $forceLog
|
21 |
+
*/
|
22 |
+
public function log($message, $level=null, $file=null){
|
23 |
+
$level = is_null($level) ? self::LEVEL : $level;
|
24 |
+
$file = empty($file) ? self::FILE : $file;
|
25 |
+
|
26 |
+
try {
|
27 |
+
if (!isset(self::$loggers[$file])) {
|
28 |
+
$logFile = Mage::getBaseDir('var') . DS . 'log' . DS . $file;
|
29 |
+
|
30 |
+
if (!is_dir(Mage::getBaseDir('var').DS.'log')) {
|
31 |
+
mkdir(Mage::getBaseDir('var').DS.'log', 0777);
|
32 |
+
}
|
33 |
+
|
34 |
+
if (!file_exists($logFile)) {
|
35 |
+
file_put_contents($logFile, '');
|
36 |
+
chmod($logFile, 0777);
|
37 |
+
}
|
38 |
+
|
39 |
+
$format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL;
|
40 |
+
$formatter = new Zend_Log_Formatter_Simple($format);
|
41 |
+
$writerModel = Mage::getStoreConfig('global/log/core/writer_model');
|
42 |
+
if (!$writerModel) {
|
43 |
+
$writer = new Zend_Log_Writer_Stream($logFile);
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
$writer = new $writerModel($logFile);
|
47 |
+
}
|
48 |
+
$writer->setFormatter($formatter);
|
49 |
+
self::$loggers[$file] = new Zend_Log($writer);
|
50 |
+
}
|
51 |
+
|
52 |
+
if (is_array($message) || is_object($message)) {
|
53 |
+
$message = print_r($message, true);
|
54 |
+
}
|
55 |
+
|
56 |
+
if(Mage::getStoreConfig('payment/payline_common/environment') != paylineSDK::ENV_PROD and $level==Zend_Log::ERR) {
|
57 |
+
Mage::getSingleton('core/session')->addError($message);
|
58 |
+
}
|
59 |
+
|
60 |
+
self::$loggers[$file]->log($message, $level);
|
61 |
+
|
62 |
+
} catch (Exception $e) {
|
63 |
+
|
64 |
+
}
|
65 |
+
}
|
66 |
}
|
app/code/community/Monext/Payline/Helper/Payment.php
CHANGED
@@ -1,275 +1,557 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This file is part of Monext_Payline for Magento.
|
5 |
-
*
|
6 |
-
* @license GNU General Public License (GPL) v3
|
7 |
-
* @author Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com> <@jacquesbh>
|
8 |
-
* @category Monext
|
9 |
-
* @package Monext_Payline
|
10 |
-
* @copyright Copyright (c)
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Payment Helper
|
15 |
-
* @package Monext_Payline
|
16 |
-
*/
|
17 |
-
class Monext_Payline_Helper_Payment extends Mage_Core_Helper_Abstract
|
18 |
-
{
|
19 |
-
|
20 |
-
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function
|
25 |
-
{
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
$
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
$
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
$
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
$
|
66 |
-
|
67 |
-
|
68 |
-
$array['buyer']['
|
69 |
-
$array['buyer']['
|
70 |
-
|
71 |
-
$
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
$
|
116 |
-
$
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
$array['
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
Mage::helper('payline
|
139 |
-
|
140 |
-
|
141 |
-
$
|
142 |
-
|
143 |
-
|
144 |
-
if ($
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
$
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This file is part of Monext_Payline for Magento.
|
5 |
+
*
|
6 |
+
* @license GNU General Public License (GPL) v3
|
7 |
+
* @author Jacques Bodin-Hullin <j.bodinhullin@monsieurbiz.com> <@jacquesbh>
|
8 |
+
* @category Monext
|
9 |
+
* @package Monext_Payline
|
10 |
+
* @copyright Copyright (c) 2014 Monsieur Biz (http://monsieurbiz.com)
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Payment Helper
|
15 |
+
* @package Monext_Payline
|
16 |
+
*/
|
17 |
+
class Monext_Payline_Helper_Payment extends Mage_Core_Helper_Abstract
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Init a payment
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function initWithQuote(Mage_Sales_Model_Quote $quote)
|
25 |
+
{
|
26 |
+
return $this->_init($quote);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Init a payment
|
31 |
+
*
|
32 |
+
* @return array
|
33 |
+
*/
|
34 |
+
public function init(Mage_Sales_Model_Order $order)
|
35 |
+
{
|
36 |
+
return $this->_init($order);
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Init a payment
|
41 |
+
*
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
protected function _init($salesObject)
|
45 |
+
{
|
46 |
+
$array = array();
|
47 |
+
$_numericCurrencyCode = Mage::helper('payline')->getNumericCurrencyCode($salesObject->getBaseCurrencyCode());
|
48 |
+
// PAYMENT
|
49 |
+
$array['payment']['amount'] = round($salesObject->getBaseGrandTotal() * 100);
|
50 |
+
$array['payment']['currency'] = $_numericCurrencyCode;
|
51 |
+
|
52 |
+
// ORDER
|
53 |
+
$array['order']['ref'] = substr($salesObject->getRealOrderId(), 0, 50);
|
54 |
+
|
55 |
+
$array['order']['amount'] = $array['payment']['amount'];
|
56 |
+
$array['order']['currency'] = $_numericCurrencyCode;
|
57 |
+
$billingAddress = $salesObject->getBillingAddress();
|
58 |
+
// BUYER
|
59 |
+
$customer = Mage::getModel('customer/customer')->load($salesObject->getCustomerId());
|
60 |
+
$buyerLastName = substr($customer->getLastname(), 0, 50);
|
61 |
+
if ($buyerLastName == null || $buyerLastName == '') {
|
62 |
+
$buyerLastName = substr($billingAddress->getLastname(), 0, 50);
|
63 |
+
}
|
64 |
+
$buyerFirstName = substr($customer->getFirstname(), 0, 50);
|
65 |
+
if ($buyerFirstName == null || $buyerFirstName == '') {
|
66 |
+
$buyerFirstName = substr($billingAddress->getFirstname(), 0, 50);
|
67 |
+
}
|
68 |
+
$array['buyer']['lastName'] = Mage::helper('payline')->encodeString($buyerLastName);
|
69 |
+
$array['buyer']['firstName'] = Mage::helper('payline')->encodeString($buyerFirstName);
|
70 |
+
$email = $customer->getEmail();
|
71 |
+
if ($email == null || $email == '') {
|
72 |
+
$email = $salesObject->getCustomerEmail();
|
73 |
+
}
|
74 |
+
$pattern = '/\+/i';
|
75 |
+
$charPlusExist = preg_match($pattern, $email);
|
76 |
+
if (strlen($email) <= 50 && Zend_Validate::is($email, 'EmailAddress') && ! $charPlusExist) {
|
77 |
+
$array['buyer']['email'] = Mage::helper('payline')->encodeString($email);
|
78 |
+
} else {
|
79 |
+
$array['buyer']['email'] = '';
|
80 |
+
}
|
81 |
+
$array['buyer']['customerId'] = Mage::helper('payline')->encodeString($email);
|
82 |
+
$array['buyer']['accountCreateDate'] = date('d/m/y', $customer->getCreatedAtTimestamp());
|
83 |
+
$ordersHistory = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id', $salesObject->getCustomerId());
|
84 |
+
$cumulAmount = 0;
|
85 |
+
$maxEntity = 0;
|
86 |
+
foreach ($ordersHistory as $oldOrder) {
|
87 |
+
$oldOrderData = $oldOrder->getData();
|
88 |
+
if ($oldOrderData['entity_id'] > $maxEntity && $oldOrderData['state'] == Mage_Sales_Model_Order::STATE_COMPLETE) {
|
89 |
+
$maxEntity = $oldOrderData['entity_id'];
|
90 |
+
$array['plnLastCompleteOrderAge'] = round((time() - strtotime($oldOrderData['created_at'])) / (60 * 60 * 24));
|
91 |
+
}
|
92 |
+
$cumulAmount += $oldOrder->getBaseGrandTotal();
|
93 |
+
}
|
94 |
+
$ordersHistoryCount = $ordersHistory->count();
|
95 |
+
$array['buyer']['accountOrderCount'] = $ordersHistory->count(); // orders
|
96 |
+
// count
|
97 |
+
if($ordersHistoryCount>0) {
|
98 |
+
$array['buyer']['accountAverageAmount'] = round(($cumulAmount / $ordersHistoryCount) * 100); // average
|
99 |
+
// order
|
100 |
+
// amount,
|
101 |
+
// in
|
102 |
+
// cents
|
103 |
+
} else {
|
104 |
+
$array['buyer']['accountAverageAmount'] = 0;
|
105 |
+
}
|
106 |
+
$forbidenPhoneCars = array(
|
107 |
+
' ',
|
108 |
+
'.',
|
109 |
+
'(',
|
110 |
+
')',
|
111 |
+
'-',
|
112 |
+
'/',
|
113 |
+
'\\',
|
114 |
+
'#');
|
115 |
+
$regexpPhone = '/^\+?[0-9]{1,14}$/';
|
116 |
+
$shippingAddress = $salesObject->getShippingAddress();
|
117 |
+
if ($shippingAddress != null) {
|
118 |
+
$array['shippingAddress']['name'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getName(), 0, 100));
|
119 |
+
$array['shippingAddress']['title'] = Mage::helper('payline')->encodeString($shippingAddress->getPrefix());
|
120 |
+
$array['shippingAddress']['firstName'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getFirstname(), 0, 100));
|
121 |
+
$array['shippingAddress']['lastName'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getLastname(), 0, 100));
|
122 |
+
$array['shippingAddress']['street1'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getStreet1(), 0, 100));
|
123 |
+
$array['shippingAddress']['street2'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getStreet2(), 0, 100));
|
124 |
+
$array['shippingAddress']['cityName'] = Mage::helper('payline')->encodeString(substr($shippingAddress->getCity(), 0, 40));
|
125 |
+
$array['shippingAddress']['zipCode'] = substr($shippingAddress->getPostcode(), 0, 12);
|
126 |
+
$array['shippingAddress']['country'] = $shippingAddress->getCountry();
|
127 |
+
$array['shippingAddress']['state'] = Mage::helper('payline')->encodeString($shippingAddress->getRegion());
|
128 |
+
$shippingPhone = str_replace($forbidenPhoneCars, '', $shippingAddress->getTelephone());
|
129 |
+
if (preg_match($regexpPhone, $shippingPhone)) {
|
130 |
+
$array['shippingAddress']['phone'] = $shippingPhone;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
$array['billingAddress']['name'] = Mage::helper('payline')->encodeString(substr($billingAddress->getName(), 0, 100));
|
134 |
+
$array['billingAddress']['title'] = Mage::helper('payline')->encodeString($billingAddress->getPrefix());
|
135 |
+
$array['billingAddress']['firstName'] = Mage::helper('payline')->encodeString(substr($billingAddress->getFirstname(), 0, 100));
|
136 |
+
$array['billingAddress']['lastName'] = Mage::helper('payline')->encodeString(substr($billingAddress->getLastname(), 0, 100));
|
137 |
+
$array['billingAddress']['street1'] = Mage::helper('payline')->encodeString(substr($billingAddress->getStreet1(), 0, 100));
|
138 |
+
$array['billingAddress']['street2'] = Mage::helper('payline')->encodeString(substr($billingAddress->getStreet2(), 0, 100));
|
139 |
+
$array['billingAddress']['cityName'] = Mage::helper('payline')->encodeString(substr($billingAddress->getCity(), 0, 40));
|
140 |
+
$array['billingAddress']['zipCode'] = substr($billingAddress->getPostcode(), 0, 12);
|
141 |
+
$array['billingAddress']['country'] = $billingAddress->getCountry();
|
142 |
+
$array['billingAddress']['state'] = Mage::helper('payline')->encodeString($billingAddress->getRegion());
|
143 |
+
$billingPhone = str_replace($forbidenPhoneCars, '', $billingAddress->getTelephone());
|
144 |
+
if (preg_match($regexpPhone, $billingPhone)) {
|
145 |
+
$array['billingAddress']['phone'] = $billingPhone;
|
146 |
+
}
|
147 |
+
return $array;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Get User payment data collected by Monext_Payline_Model_Direct::assignData
|
152 |
+
*
|
153 |
+
* @return Varien_Object
|
154 |
+
*/
|
155 |
+
public function getPaymentUserData()
|
156 |
+
{
|
157 |
+
//If we do not have CardTokenPan
|
158 |
+
if(Mage::registry('current_payment_data')) {
|
159 |
+
$paymentData = Mage::registry('current_payment_data');
|
160 |
+
} else {
|
161 |
+
$paymentData = Mage::getSingleton('payline/session');
|
162 |
+
}
|
163 |
+
|
164 |
+
return $paymentData;
|
165 |
+
}
|
166 |
+
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Check for a securized contract
|
170 |
+
*/
|
171 |
+
public function switchToSecureContract()
|
172 |
+
{
|
173 |
+
$paymentData = $this->getPaymentUserData();
|
174 |
+
|
175 |
+
$currentCcType = $paymentData->getCcType();
|
176 |
+
|
177 |
+
$currentContractType = false;
|
178 |
+
$allAvailableContracts = Mage::helper('payline')->getCcContracts();
|
179 |
+
foreach ($allAvailableContracts as $contract) {
|
180 |
+
|
181 |
+
if($contract->getId()==$currentCcType) {
|
182 |
+
$currentContractType = $contract->getContractType();
|
183 |
+
break;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
$contract = Mage::helper('payline')->getContractByType($currentContractType,true);
|
188 |
+
if($contract) {
|
189 |
+
$paymentData->setCcType($contract->getId());
|
190 |
+
if(Mage::registry('current_payment_data')) {
|
191 |
+
Mage::unregister('current_payment_data');
|
192 |
+
Mage::register('current_payment_data', $paymentData);
|
193 |
+
}
|
194 |
+
return true;
|
195 |
+
} else {
|
196 |
+
return false;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* check if current contract is securized
|
202 |
+
*/
|
203 |
+
public function useSecureContract()
|
204 |
+
{
|
205 |
+
$paymentData = $this->getPaymentUserData();
|
206 |
+
$currentId = $paymentData->getCcType();
|
207 |
+
$contracts = Mage::helper('payline')->getCcContracts(true);
|
208 |
+
foreach ($contracts as $contract) {
|
209 |
+
if($contract->getId()==$currentId) {
|
210 |
+
return true;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
return false;
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Initialise the requests param array to share common information between doAuthorization and verifyEnrollment
|
220 |
+
*
|
221 |
+
* @return array
|
222 |
+
*/
|
223 |
+
public function getDirectActionHeader(Mage_Sales_Model_Order_Payment $payment = null)
|
224 |
+
{
|
225 |
+
if($payment) {
|
226 |
+
$order = $payment->getOrder();
|
227 |
+
} else {
|
228 |
+
$_session = Mage::getSingleton('checkout/session');
|
229 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($_session->getLastRealOrderId());
|
230 |
+
$payment = $order->getPayment();
|
231 |
+
}
|
232 |
+
|
233 |
+
$array = Mage::helper('payline/payment')->init($order);
|
234 |
+
|
235 |
+
// Get user data
|
236 |
+
$paymentData = $this->getPaymentUserData();
|
237 |
+
|
238 |
+
// Init the SDK with the currency and for DIRECT method
|
239 |
+
$paylineSDK = Mage::helper('payline')->initPayline('DIRECT', $array['payment']['currency']);
|
240 |
+
|
241 |
+
// PAYMENT
|
242 |
+
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineDIRECT/payline_payment_action');
|
243 |
+
$array['payment']['mode'] = 'CPT';
|
244 |
+
|
245 |
+
// Get the contract
|
246 |
+
$contract = Mage::getModel('payline/contract')->load($paymentData->getCcType());
|
247 |
+
|
248 |
+
|
249 |
+
$array['payment']['contractNumber'] = $contract->getNumber();
|
250 |
+
|
251 |
+
// Set the order date
|
252 |
+
$array['order']['date'] = date("d/m/Y H:i");
|
253 |
+
|
254 |
+
// Set private data (usefull in the payline admin)
|
255 |
+
$privateData1 = array();
|
256 |
+
$privateData1['key'] = 'orderRef';
|
257 |
+
$privateData1['value'] = substr(str_replace(array("\r", "\n", "\t"), array('', '', ''), $array['order']['ref']), 0, 255);
|
258 |
+
$paylineSDK->setPrivate($privateData1);
|
259 |
+
|
260 |
+
// Set the order details (each item, optional)
|
261 |
+
$items = $order->getAllItems();
|
262 |
+
if ($items) {
|
263 |
+
if (count($items) > 100)
|
264 |
+
$items = array_slice($items, 0, 100);
|
265 |
+
foreach ($items as $item) {
|
266 |
+
$itemPrice = round($item->getPrice() * 100);
|
267 |
+
if ($itemPrice > 0) {
|
268 |
+
$product = array();
|
269 |
+
$product['ref'] = Mage::helper('payline')->encodeString(substr(str_replace(array("\r", "\n", "\t"), array('', '', ''), $item->getName()), 0, 50));
|
270 |
+
$product['price'] = round($item->getPrice() * 100);
|
271 |
+
$product['quantity'] = round($item->getQtyOrdered());
|
272 |
+
$product['comment'] = Mage::helper('payline')->encodeString(substr(str_replace(array("\r", "\n", "\t"), array('', '', ''), $item->getDescription()), 0, 255));
|
273 |
+
$paylineSDK->setItem($product);
|
274 |
+
}
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
// Set the card info
|
279 |
+
$array['owner']['lastName'] = Mage::helper('payline')->encodeString($paymentData->getCcOwner());
|
280 |
+
|
281 |
+
// CARD INFO
|
282 |
+
if ($paymentData->getCardTokenPan()) {
|
283 |
+
$paymenTokentData = Mage::helper('payline')->getDecryptedCardTokenPan($paymentData->getCardTokenPan(), $order);
|
284 |
+
|
285 |
+
if ($paymenTokentData['orderRef'] != $order->getIncrementId()) {
|
286 |
+
Mage::logException('Payline error: Order incrementId in crypted token "%s" do not match with current order "%s"', $paymenTokentData['orderRef'], $order->getIncrementId());
|
287 |
+
}
|
288 |
+
$array['card']['token'] = $paymenTokentData['cardTokenPan'];
|
289 |
+
$array['card']['cvx'] = $paymenTokentData['vCVV'];
|
290 |
+
$array['card']['expirationDate'] = $paymenTokentData['cardExp'];
|
291 |
+
$array['card']['type'] = $paymenTokentData['cardType'];
|
292 |
+
} else {
|
293 |
+
// Should not be used any more
|
294 |
+
$array['card']['number'] = $paymentData->getCcNumber();
|
295 |
+
$array['card']['cvx'] = $paymentData->getCcId();
|
296 |
+
$array['card']['expirationDate'] = $paymentData->getCcExpMonth() . $paymentData->getCcExpYear();
|
297 |
+
$array['card']['type'] = $contract->getContractType();
|
298 |
+
}
|
299 |
+
$array['card']['cardholder'] = $paymentData->getCcOwner();
|
300 |
+
|
301 |
+
// Customer IP
|
302 |
+
$array['buyer']['ip'] = Mage::helper('core/http')->getRemoteAddr();
|
303 |
+
|
304 |
+
// 3D secure
|
305 |
+
$array['3DSecure'] = array();
|
306 |
+
|
307 |
+
// BANK ACCOUNT DATA
|
308 |
+
$array['BankAccountData'] = array();
|
309 |
+
|
310 |
+
// version
|
311 |
+
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
312 |
+
|
313 |
+
return $array;
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Finalize the final redirection from directAction or return from validateAcs
|
318 |
+
*
|
319 |
+
* @param array $author_result
|
320 |
+
* @param paylineSDK $paylineSDK
|
321 |
+
* @param array $array
|
322 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
323 |
+
*/
|
324 |
+
public function finalizeDirectAction($author_result, $paylineSDK, $array, Mage_Sales_Model_Order_Payment $payment = null)
|
325 |
+
{
|
326 |
+
if($payment) {
|
327 |
+
$order = $payment->getOrder();
|
328 |
+
} else {
|
329 |
+
$_session = Mage::getSingleton('checkout/session');
|
330 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($_session->getLastRealOrderId());
|
331 |
+
$payment = $order->getPayment();
|
332 |
+
}
|
333 |
+
|
334 |
+
$paymentData = $this->getPaymentUserData();
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Process the authorization response
|
338 |
+
*/
|
339 |
+
|
340 |
+
// The failed order status
|
341 |
+
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
342 |
+
|
343 |
+
// Authorization succeed
|
344 |
+
if (isset($author_result) && is_array($author_result) && $author_result['result']['code'] == '00000') {
|
345 |
+
/**
|
346 |
+
* Update the order with the new transaction
|
347 |
+
*/
|
348 |
+
// If everything is OK
|
349 |
+
if (Mage::helper('payline/payment')->updateOrder($order, $author_result, $author_result['transaction']['id'], 'DIRECT')) {
|
350 |
+
|
351 |
+
// Code 04003 - Fraud detected - BUT Transaction approved (04002 is Fraud with payment refused)
|
352 |
+
if ($author_result['result']['code'] == '04003') {
|
353 |
+
// Fraud suspected
|
354 |
+
$payment->setIsFraudDetected(true);
|
355 |
+
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
356 |
+
Mage::helper('payline')->setOrderStatus($order, $newOrderStatus);
|
357 |
+
} else {
|
358 |
+
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode($order, $array['payment']['action']);
|
359 |
+
}
|
360 |
+
|
361 |
+
if (Mage::getStoreConfig('payment/PaylineWALLET/active') and ($paymentData->getSubscribeWallet() or Mage::getStoreConfig('payment/payline_common/automate_wallet_subscription'))) {
|
362 |
+
// Create the wallet!
|
363 |
+
$array['wallet']['lastName'] = $array['buyer']['lastName'];
|
364 |
+
$array['wallet']['firstName'] = $array['buyer']['firstName'];
|
365 |
+
$array['wallet']['email'] = $array['buyer']['email'];
|
366 |
+
if (! empty($array['card']['token'])) {
|
367 |
+
$array['wallet']['token'] = $array['card']['token'];
|
368 |
+
// TODO: Supprimer le ccid
|
369 |
+
$array['card']['cvx'] = $paymentData->getCcCid();
|
370 |
+
}
|
371 |
+
// remember, the Beast is not so far
|
372 |
+
$array['address'] = $array['shippingAddress'];
|
373 |
+
$array['ownerAddress'] = null;
|
374 |
+
Mage::helper('payline')->createWalletForCurrentCustomer($paylineSDK, $array);
|
375 |
+
}
|
376 |
+
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('DIRECT', $order);
|
377 |
+
|
378 |
+
Mage::getSingleton('payline/session')->clear();
|
379 |
+
return true;
|
380 |
+
|
381 |
+
} else {
|
382 |
+
$msgLog = 'Error during order update (#' . $order->getIncrementId() . ')' . "\n";
|
383 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $failedOrderStatus, $msgLog, false);
|
384 |
+
//$order->save();
|
385 |
+
|
386 |
+
$payment->setSkipOrderProcessing(true);
|
387 |
+
$msg = Mage::helper('payline')->__('An error occured during the payment. Please retry or use an other payment method.');
|
388 |
+
Mage::getSingleton('core/session')->addError($msg);
|
389 |
+
Mage::throwException($msg);
|
390 |
+
return false;
|
391 |
+
}
|
392 |
+
} else {
|
393 |
+
if (isset($author_result) && is_array($author_result)) {
|
394 |
+
$msgLog = 'PAYLINE ERROR : ' . $author_result['result']['code'] . ' ' . $author_result['result']['shortMessage'] . ' (' . $author_result['result']['longMessage'] . ')';
|
395 |
+
} elseif (isset($author_result) && is_string($author_result)) {
|
396 |
+
$msgLog = 'PAYLINE ERROR : ' . $author_result;
|
397 |
+
} else {
|
398 |
+
$msgLog = 'Unknown PAYLINE ERROR';
|
399 |
+
}
|
400 |
+
Mage::helper('payline/payment')->updateStock($order);
|
401 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $failedOrderStatus, $msgLog, false);
|
402 |
+
|
403 |
+
// Error
|
404 |
+
$payment->setSkipOrderProcessing(true);
|
405 |
+
$msg = Mage::helper('payline')->__('An error occured during the payment. Please retry or use an other payment method.');
|
406 |
+
Mage::throwException($msg);
|
407 |
+
Mage::getSingleton('core/session')->addError($msg);
|
408 |
+
return false;
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Add payment transaction to the order, reinit stocks if needed
|
414 |
+
* @param $res array result of a request
|
415 |
+
* @param $transactionId
|
416 |
+
* @return boolean (true=>valid payment, false => invalid payment)
|
417 |
+
*/
|
418 |
+
public function updateOrder($order, $res, $transactionId, $paymentType = 'CPT')
|
419 |
+
{
|
420 |
+
// First, log message which says that we are updating the order
|
421 |
+
Mage::helper('payline/logger')->log("[updateOrder] Mise à jour commande " . $order->getIncrementId() . " (mode $paymentType) avec la transaction $transactionId");
|
422 |
+
|
423 |
+
// By default this process isn't OK
|
424 |
+
$orderOk = false;
|
425 |
+
|
426 |
+
// If we have a result code
|
427 |
+
if ($resultCode = $res['result']['code']) {
|
428 |
+
|
429 |
+
// List of accepted codes
|
430 |
+
$acceptedCodes = array(
|
431 |
+
'00000', // Credit card -> Transaction approved
|
432 |
+
'02500', // Wallet -> Operation successfull
|
433 |
+
'02501', // Wallet -> Operation Successfull with warning / Operation Successfull but wallet will expire
|
434 |
+
'04003', // Fraud detected - BUT Transaction approved (04002 is Fraud with payment refused)
|
435 |
+
'00100',
|
436 |
+
'03000',
|
437 |
+
'34230', // signature SDD
|
438 |
+
'34330' // prélèvement SDD
|
439 |
+
);
|
440 |
+
|
441 |
+
// Transaction OK
|
442 |
+
if (in_array($resultCode, $acceptedCodes)) {
|
443 |
+
|
444 |
+
// This process is not OK
|
445 |
+
$orderOk = true;
|
446 |
+
|
447 |
+
// N time payment?
|
448 |
+
if ($paymentType == 'NX') {
|
449 |
+
Mage::helper('payline/logger')->log("[updateOrder] Cas du paiement NX");
|
450 |
+
if (isset($res['billingRecordList']['billingRecord'][0])) {
|
451 |
+
$code_echeance = $res['billingRecordList']['billingRecord'][0]->result->code;
|
452 |
+
if ($code_echeance == '00000' || $code_echeance == '02501') {
|
453 |
+
Mage::helper('payline/logger')->log("[updateOrder] première échéance paiement NX OK");
|
454 |
+
$orderOk = true;
|
455 |
+
} else {
|
456 |
+
Mage::helper('payline/logger')->log("[updateOrder] première échéance paiement NX refusée, code " . $code_echeance);
|
457 |
+
$orderOk = false;
|
458 |
+
}
|
459 |
+
} else {
|
460 |
+
Mage::helper('payline/logger')->log("[updateOrder] La première échéance de paiement est à venir");
|
461 |
+
}
|
462 |
+
}
|
463 |
+
|
464 |
+
// Set the transaction in the payment object
|
465 |
+
$order->getPayment()->setCcTransId($transactionId);
|
466 |
+
if (isset($res['payment']) && isset($res['payment']['action'])) {
|
467 |
+
$paymentAction = $res['payment']['action'];
|
468 |
+
} else {
|
469 |
+
$paymentAction = Mage::getStoreConfig('payment/Payline' . $paymentType . '/payline_payment_action');
|
470 |
+
}
|
471 |
+
|
472 |
+
// Add transaction (with payment action)
|
473 |
+
$this->addTransaction($order, $transactionId, $paymentAction);
|
474 |
+
|
475 |
+
// Save the order
|
476 |
+
$order->save();
|
477 |
+
}
|
478 |
+
|
479 |
+
// Transaction NOT OK
|
480 |
+
else {
|
481 |
+
|
482 |
+
// Update the stock
|
483 |
+
$this->updateStock($order);
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
return $orderOk;
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Reinit stocks
|
492 |
+
*/
|
493 |
+
public function updateStock($order)
|
494 |
+
{
|
495 |
+
if (Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_CAN_SUBTRACT) == 1) { // le stock a été décrémenté à la commande
|
496 |
+
// ré-incrémentation du stock
|
497 |
+
$items = $order->getAllItems();
|
498 |
+
if ($items) {
|
499 |
+
foreach ($items as $item) {
|
500 |
+
$quantity = $item->getQtyOrdered(); // get Qty ordered
|
501 |
+
$product_id = $item->getProductId(); // get its ID
|
502 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); // Load the stock for this product
|
503 |
+
$stock->setQty($stock->getQty() + $quantity); // Set to new Qty
|
504 |
+
//if qtty = 0 after order and order fails, set stock status is_in_stock to true
|
505 |
+
if ($stock->getQty() > $stock->getMinQty() && !$stock->getIsInStock()) {
|
506 |
+
$stock->setIsInStock(1);
|
507 |
+
}
|
508 |
+
$stock->save(); // Save
|
509 |
+
}
|
510 |
+
Mage::helper('payline/logger')->log('[updateStock] done for order '.$order->getIncrementId());
|
511 |
+
}
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Add a transaction to the current order, depending on the payment type (Auth or Auth+Capture)
|
517 |
+
* @param string $transactionId
|
518 |
+
* @param string $paymentAction
|
519 |
+
* @return null
|
520 |
+
*/
|
521 |
+
public function addTransaction($order, $transactionId, $paymentAction)
|
522 |
+
{
|
523 |
+
if (version_compare(Mage::getVersion(), '1.4', 'ge')) {
|
524 |
+
/* @var $payment Mage_Payment_Model_Method_Abstract */
|
525 |
+
$payment = $order->getPayment();
|
526 |
+
if (!$payment->getTransaction($transactionId)) { // if transaction isn't saved yet
|
527 |
+
$transaction = Mage::getModel('sales/order_payment_transaction');
|
528 |
+
$transaction->setTxnId($transactionId);
|
529 |
+
$transaction->setOrderPaymentObject($order->getPayment());
|
530 |
+
if ($paymentAction == '100') {
|
531 |
+
|
532 |
+
} else if ($paymentAction == '101') {
|
533 |
+
$transaction->setTxnType(Mage_Sales_Model_Order_Payment_Transaction::TYPE_PAYMENT);
|
534 |
+
}
|
535 |
+
$transaction->save();
|
536 |
+
$order->sendNewOrderEmail();
|
537 |
+
}
|
538 |
+
} else {
|
539 |
+
$order->getPayment()->setLastTransId($transactionId);
|
540 |
+
$order->sendNewOrderEmail();
|
541 |
+
}
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Retrieve the contract object for specified data.
|
546 |
+
* We store the contract in the data and we load it only if it doesn't exist.
|
547 |
+
* @return Monext_Payline_Model_Contract The contract
|
548 |
+
*/
|
549 |
+
public function getContractByData(Varien_Object $data)
|
550 |
+
{
|
551 |
+
if (!$contract = $data->getContract()) {
|
552 |
+
$contract = Mage::getModel('payline/contract')->load($data->getCcType());
|
553 |
+
$data->setContract($contract);
|
554 |
+
}
|
555 |
+
return $contract;
|
556 |
+
}
|
557 |
+
}
|
app/code/community/Monext/Payline/Helper/Widget.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Helper_Widget extends Monext_Payline_Helper_Data
|
4 |
+
{
|
5 |
+
|
6 |
+
protected $_token;
|
7 |
+
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Order increment ID getter (either real from order or a reserved from quote)
|
11 |
+
*
|
12 |
+
* @return string
|
13 |
+
*/
|
14 |
+
protected function _getReservedOrderId($quote)
|
15 |
+
{
|
16 |
+
if (!$quote->getReservedOrderId()) {
|
17 |
+
$quote->reserveOrderId()->save();
|
18 |
+
}
|
19 |
+
return $quote->getReservedOrderId();
|
20 |
+
}
|
21 |
+
|
22 |
+
public function getDataToken()
|
23 |
+
{
|
24 |
+
if (is_null($this->_token)) {
|
25 |
+
$this->_token = false;
|
26 |
+
try {
|
27 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
28 |
+
$orderId = $this->_getReservedOrderId($quote);
|
29 |
+
$quote->setRealOrderId($orderId);
|
30 |
+
|
31 |
+
$array = Mage::helper('payline/payment')->initWithQuote($quote);
|
32 |
+
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
33 |
+
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineCPT/payline_payment_action');
|
34 |
+
$array['payment']['mode'] = 'CPT';
|
35 |
+
$array['payment']['contractNumber'] = $this->getDefaultContractNumberForWidget();
|
36 |
+
$array['contracts'] = $this->getContractsForWidget(true);
|
37 |
+
$array['secondContracts'] = $this->getContractsForWidget(false);
|
38 |
+
if(empty($array['secondContracts'])) {
|
39 |
+
$array['secondContracts'] = array('');
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
$paylineSDK = $this->initPayline('CPT', $array['payment']['currency']);
|
44 |
+
$paylineSDK->returnURL = Mage::getUrl('payline/index/cptReturnWidget');
|
45 |
+
$paylineSDK->cancelURL = $paylineSDK->returnURL;
|
46 |
+
$paylineSDK->notificationURL = $paylineSDK->returnURL;
|
47 |
+
|
48 |
+
|
49 |
+
// WALLET
|
50 |
+
// ADD CONTRACT WALLET ARRAY TO $array
|
51 |
+
$helperPayline = Mage::helper('payline');
|
52 |
+
$array['walletContracts'] = $helperPayline->buildContractNumberWalletList();
|
53 |
+
|
54 |
+
if (Mage::getStoreConfig('payment/PaylineCPT/send_wallet_id')) {
|
55 |
+
|
56 |
+
if (! isset($array['buyer']['walletId'])) {
|
57 |
+
if (isset($this->walletId)) {
|
58 |
+
$array['buyer']['walletId'] = $this->walletId;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
$expiredWalletId = false;
|
63 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
64 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
65 |
+
if ($customer->getWalletId() && ! Mage::getModel('payline/wallet')->checkExpirationDate()) {
|
66 |
+
$expiredWalletId = true;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
if ($expiredWalletId) {
|
71 |
+
$this->walletId = null;
|
72 |
+
}
|
73 |
+
|
74 |
+
if ($helperPayline->canSubscribeWallet()) {
|
75 |
+
// If the wallet is new (registered during payment), we must
|
76 |
+
// save it in the private data since it's not sent back by
|
77 |
+
// default
|
78 |
+
if ($this->isNewWallet) {
|
79 |
+
if ($this->walletId) {
|
80 |
+
$paylineSDK->setPrivate(array('key' => 'newWalletId',
|
81 |
+
'value' => $this->walletId));
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
$response = $paylineSDK->doWebPayment($array);
|
88 |
+
if(isset($response) and $response['result']['code'] == '00000' and !empty($response['token'])){
|
89 |
+
$this->_token = $response['token'];
|
90 |
+
Mage::getModel('payline/token')
|
91 |
+
->setOrderId($quote->getRealOrderId())
|
92 |
+
->setToken($this->_token)
|
93 |
+
->setDateCreate(time())
|
94 |
+
->save();
|
95 |
+
}
|
96 |
+
|
97 |
+
} catch (Exception $e) {
|
98 |
+
Mage::logException($e);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return $this->_token;
|
103 |
+
}
|
104 |
+
|
105 |
+
public function getDataTemplate()
|
106 |
+
{
|
107 |
+
return $this->getCptConfigTemplate();
|
108 |
+
}
|
109 |
+
|
110 |
+
} // end class
|
app/code/community/Monext/Payline/Model/.DS_Store
ADDED
Binary file
|
app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Common.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Adminhtml_System_Config_Backend_Common extends Mage_Core_Model_Config_Data
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Check settings after save
|
7 |
+
*/
|
8 |
+
protected function _afterSave()
|
9 |
+
{
|
10 |
+
if (Mage::getStoreConfig($this->getPath())!=$this->getFieldsetDataValue(basename($this->getPath()))) {
|
11 |
+
|
12 |
+
$change = Mage::registry('payline_config_change');
|
13 |
+
if (empty($change)) {
|
14 |
+
$change = array();
|
15 |
+
} else {
|
16 |
+
Mage::unregister('payline_config_change');
|
17 |
+
}
|
18 |
+
|
19 |
+
$change[$this->getPath()] = array('before'=>Mage::getStoreConfig($this->getPath()),
|
20 |
+
'after'=>$this->getFieldsetDataValue(basename($this->getPath())),
|
21 |
+
'scope_id'=>$this->getScopeId(),
|
22 |
+
'scope'=>$this->getScope()
|
23 |
+
);
|
24 |
+
|
25 |
+
Mage::register('payline_config_change', $change);
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Contract.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Adminhtml_System_Config_Backend_Contract extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
|
4 |
+
{
|
5 |
+
protected $_eventPrefix = 'payline_config_backend_contract';
|
6 |
+
|
7 |
+
|
8 |
+
protected function _afterLoad()
|
9 |
+
{
|
10 |
+
if (!is_array($this->getValue())) {
|
11 |
+
$value = $this->getValue();
|
12 |
+
|
13 |
+
$collection = Mage::getModel('payline/contract')->getCollection();
|
14 |
+
$store = Mage::app()->getRequest()->getParam('store', '');
|
15 |
+
$website = Mage::app()->getRequest()->getParam('website', '');
|
16 |
+
if($store) {
|
17 |
+
$storeId = Mage::getModel('core/store')->load($store)->getId();
|
18 |
+
$collection->addStoreFilter($storeId);
|
19 |
+
} elseif ($website) {
|
20 |
+
$websiteId = Mage::getModel('core/website')->load($website)->getId();
|
21 |
+
$collection->addWebsiteFilter($websiteId);
|
22 |
+
}
|
23 |
+
|
24 |
+
$contracts = $collection->toArray();
|
25 |
+
|
26 |
+
$values = $contracts['items'];
|
27 |
+
|
28 |
+
$this->setValue($values);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function _beforeSave()
|
33 |
+
{
|
34 |
+
$contract_lists = Mage::app()->getRequest()->getParam('contract_list');
|
35 |
+
|
36 |
+
$defaultValues=array('is_primary'=>0,'is_secondary'=>0,'is_secure'=>0,'is_included_wallet_list'=>0);
|
37 |
+
foreach ($contract_lists as $contactId=>$contractValues) {
|
38 |
+
$contract_lists[$contactId] = array_merge($defaultValues, $contractValues);
|
39 |
+
}
|
40 |
+
|
41 |
+
$this->setUnserializedValue($contract_lists);
|
42 |
+
$this->setValue($contract_lists);
|
43 |
+
|
44 |
+
parent::_beforeSave();
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _afterSave()
|
48 |
+
{
|
49 |
+
if (Mage::getStoreConfig($this->getPath())!=$this->getValue()) {
|
50 |
+
$contract_lists = $this->getUnserializedValue();
|
51 |
+
|
52 |
+
$store = Mage::app()->getRequest()->getParam('store', '');
|
53 |
+
$website = Mage::app()->getRequest()->getParam('website', '');
|
54 |
+
|
55 |
+
Mage::getResourceModel('payline/contract')->updateOptionsContractList(
|
56 |
+
$contract_lists, $website, $store
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
parent::_afterSave();
|
61 |
+
}
|
62 |
+
}
|
app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Backend/Enabled.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Adminhtml_System_Config_Backend_Enabled extends Mage_Core_Model_Config_Data
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Check settings after save
|
7 |
+
*/
|
8 |
+
protected function _afterSave()
|
9 |
+
{
|
10 |
+
if (Mage::getStoreConfig($this->getPath())!=$this->getFieldsetDataValue(basename($this->getPath()))) {
|
11 |
+
|
12 |
+
$change = Mage::registry('payline_config_disable_payments');
|
13 |
+
if (!empty($change)) {
|
14 |
+
Mage::unregister('payline_config_disable_payments');
|
15 |
+
}
|
16 |
+
|
17 |
+
if(!$this->getFieldsetDataValue(basename($this->getPath()))) {
|
18 |
+
Mage::register('payline_config_disable_payments', true);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
}
|
app/code/community/Monext/Payline/Model/Adminhtml/System/Config/Source/Environment.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once(Mage::getBaseDir() . '/app/code/community/Monext/Payline/lib/paylineSDK.php');
|
3 |
+
|
4 |
+
class Monext_Payline_Model_Adminhtml_System_Config_Source_Environment
|
5 |
+
{
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Options getter
|
9 |
+
*
|
10 |
+
* @return array
|
11 |
+
*/
|
12 |
+
public function toOptionArray()
|
13 |
+
{
|
14 |
+
return array(
|
15 |
+
//array('value' => paylineSDK::ENV_DEV, 'label'=>paylineSDK::ENV_DEV),
|
16 |
+
array('value' => paylineSDK::ENV_HOMO, 'label'=>paylineSDK::ENV_HOMO),
|
17 |
+
array('value' => paylineSDK::ENV_PROD, 'label'=>paylineSDK::ENV_PROD)
|
18 |
+
);
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Get options in "key-value" format
|
23 |
+
*
|
24 |
+
* @return array
|
25 |
+
*/
|
26 |
+
public function toArray()
|
27 |
+
{
|
28 |
+
return array(
|
29 |
+
paylineSDK::ENV_HOMO => Mage::helper('adminhtml')->__(paylineSDK::ENV_HOMO),
|
30 |
+
paylineSDK::ENV_PROD => Mage::helper('adminhtml')->__(paylineSDK::ENV_PROD),
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
app/code/community/Monext/Payline/Model/Contract.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline contracts model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Contract extends Mage_Core_Model_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
parent::_construct();
|
12 |
-
$this->_init('payline/contract');
|
13 |
-
}
|
14 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Contract extends Mage_Core_Model_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('payline/contract');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Monext/Payline/Model/Contract/Status.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline contracts status model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Contract_Status extends Mage_Core_Model_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
parent::_construct();
|
12 |
-
$this->_init('payline/contract_status');
|
13 |
-
}
|
14 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts status model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Contract_Status extends Mage_Core_Model_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('payline/contract_status');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Monext/Payline/Model/Cpt.php
CHANGED
@@ -20,8 +20,8 @@ class Monext_Payline_Model_Cpt extends Mage_Payment_Model_Method_Abstract
|
|
20 |
protected $_canCapture = true;
|
21 |
protected $_canCapturePartial = true;
|
22 |
protected $_canVoid = true;
|
|
|
23 |
|
24 |
-
|
25 |
/**
|
26 |
* Check whether payment method can be used
|
27 |
* Rewrited from Abstract class
|
@@ -36,8 +36,8 @@ class Monext_Payline_Model_Cpt extends Mage_Payment_Model_Method_Abstract
|
|
36 |
}else{
|
37 |
return false;
|
38 |
}
|
39 |
-
}
|
40 |
-
|
41 |
/**
|
42 |
* Return Order place redirect url
|
43 |
*
|
20 |
protected $_canCapture = true;
|
21 |
protected $_canCapturePartial = true;
|
22 |
protected $_canVoid = true;
|
23 |
+
|
24 |
|
|
|
25 |
/**
|
26 |
* Check whether payment method can be used
|
27 |
* Rewrited from Abstract class
|
36 |
}else{
|
37 |
return false;
|
38 |
}
|
39 |
+
}
|
40 |
+
|
41 |
/**
|
42 |
* Return Order place redirect url
|
43 |
*
|
app/code/community/Monext/Payline/Model/Datasource/Actions.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Billingcycles.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Billingoccurrences.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Capturepaymentoptions.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display available events to trigger payment capture
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Datasource_Capturepaymentoptions extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
6 |
-
{
|
7 |
-
|
8 |
-
protected $_options;
|
9 |
-
|
10 |
-
public function toOptionArray()
|
11 |
-
{
|
12 |
-
if ($this->_options === null) {
|
13 |
-
$options = array();
|
14 |
-
$options[] = array(
|
15 |
-
'value' => 'invoice',
|
16 |
-
'label' => 'When Invoice is created'
|
17 |
-
);
|
18 |
-
|
19 |
-
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
20 |
-
$collection = Mage::getResourceModel('sales/order_status_collection')
|
21 |
-
->orderByLabel();
|
22 |
-
foreach ($collection as $status) {
|
23 |
-
$options[] = array(
|
24 |
-
'value' => $status->getStatus(),
|
25 |
-
'label' => Mage::helper('payline')->__("When order status is '%s'", $status->getStoreLabel())
|
26 |
-
);
|
27 |
-
}
|
28 |
-
} else {
|
29 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
30 |
-
foreach ($statuses as $code=>$label) {
|
31 |
-
$options[] = array(
|
32 |
-
'value' => $code,
|
33 |
-
'label' => Mage::helper('payline')->__("When order status is '%s'", $label)
|
34 |
-
);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
$this->_options = $options;
|
39 |
-
}
|
40 |
-
|
41 |
-
return $this->_options;
|
42 |
-
}
|
43 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display available events to trigger payment capture
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Datasource_Capturepaymentoptions extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $_options;
|
9 |
+
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
if ($this->_options === null) {
|
13 |
+
$options = array();
|
14 |
+
$options[] = array(
|
15 |
+
'value' => 'invoice',
|
16 |
+
'label' => 'When Invoice is created'
|
17 |
+
);
|
18 |
+
|
19 |
+
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
20 |
+
$collection = Mage::getResourceModel('sales/order_status_collection')
|
21 |
+
->orderByLabel();
|
22 |
+
foreach ($collection as $status) {
|
23 |
+
$options[] = array(
|
24 |
+
'value' => $status->getStatus(),
|
25 |
+
'label' => Mage::helper('payline')->__("When order status is '%s'", $status->getStoreLabel())
|
26 |
+
);
|
27 |
+
}
|
28 |
+
} else {
|
29 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
30 |
+
foreach ($statuses as $code=>$label) {
|
31 |
+
$options[] = array(
|
32 |
+
'value' => $code,
|
33 |
+
'label' => Mage::helper('payline')->__("When order status is '%s'", $label)
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
$this->_options = $options;
|
39 |
+
}
|
40 |
+
|
41 |
+
return $this->_options;
|
42 |
+
}
|
43 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Cms/Block.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Datasource_Cms_Block
|
3 |
-
{
|
4 |
-
protected $_options;
|
5 |
-
|
6 |
-
public function toOptionArray()
|
7 |
-
{
|
8 |
-
if (!$this->_options) {
|
9 |
-
$options = Mage::getResourceModel('cms/block_collection')
|
10 |
-
->load();
|
11 |
-
$this->_options = $this->_toOptionIdArray($options);
|
12 |
-
}
|
13 |
-
return $this->_options;
|
14 |
-
}
|
15 |
-
|
16 |
-
protected function _toOptionIdArray($options)
|
17 |
-
{
|
18 |
-
$res = array();
|
19 |
-
$res[] = array('value' => '', 'label' => Mage::helper('payline')->__('none'));
|
20 |
-
foreach ($options as $item) {
|
21 |
-
$identifier = $item->getData('identifier');
|
22 |
-
|
23 |
-
$data['value'] = $identifier;
|
24 |
-
$data['label'] = $identifier;
|
25 |
-
|
26 |
-
$res[] = $data;
|
27 |
-
}
|
28 |
-
|
29 |
-
return $res;
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Datasource_Cms_Block
|
3 |
+
{
|
4 |
+
protected $_options;
|
5 |
+
|
6 |
+
public function toOptionArray()
|
7 |
+
{
|
8 |
+
if (!$this->_options) {
|
9 |
+
$options = Mage::getResourceModel('cms/block_collection')
|
10 |
+
->load();
|
11 |
+
$this->_options = $this->_toOptionIdArray($options);
|
12 |
+
}
|
13 |
+
return $this->_options;
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _toOptionIdArray($options)
|
17 |
+
{
|
18 |
+
$res = array();
|
19 |
+
$res[] = array('value' => '', 'label' => Mage::helper('payline')->__('none'));
|
20 |
+
foreach ($options as $item) {
|
21 |
+
$identifier = $item->getData('identifier');
|
22 |
+
|
23 |
+
$data['value'] = $identifier;
|
24 |
+
$data['label'] = $identifier;
|
25 |
+
|
26 |
+
$res[] = $data;
|
27 |
+
}
|
28 |
+
|
29 |
+
return $res;
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Costs.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Datatemplate.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display target Payline environment
|
4 |
+
*/
|
5 |
+
|
6 |
+
class Monext_Payline_Model_Datasource_Datatemplate
|
7 |
+
{
|
8 |
+
public function toOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
array('value' => 'redirect', 'label'=> Mage::helper('payline')->__('Redirection')),
|
12 |
+
array('value' => 'lightbox', 'label'=> Mage::helper('payline')->__('Lightbox')),
|
13 |
+
array('value' => 'tab', 'label'=> Mage::helper('payline')->__('Embedded tabs')),
|
14 |
+
array('value' => 'column', 'label'=> Mage::helper('payline')->__('Embedded columns'))
|
15 |
+
);
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Environment.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display target Payline environment
|
4 |
-
*/
|
5 |
-
require_once(Mage::getBaseDir() . '/app/code/community/Monext/Payline/lib/paylineSDK.php');
|
6 |
-
class Monext_Payline_Model_Datasource_Environment
|
7 |
-
{
|
8 |
-
public function toOptionArray()
|
9 |
-
{
|
10 |
-
return array(
|
11 |
-
//array('value' => paylineSDK::ENV_DEV, 'label'=>paylineSDK::ENV_DEV),
|
12 |
-
array('value' => paylineSDK::ENV_HOMO, 'label'=>paylineSDK::ENV_HOMO),
|
13 |
-
array('value' => paylineSDK::ENV_PROD, 'label'=>paylineSDK::ENV_PROD)
|
14 |
-
);
|
15 |
-
}
|
16 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display target Payline environment
|
4 |
+
*/
|
5 |
+
require_once(Mage::getBaseDir() . '/app/code/community/Monext/Payline/lib/paylineSDK.php');
|
6 |
+
class Monext_Payline_Model_Datasource_Environment
|
7 |
+
{
|
8 |
+
public function toOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
//array('value' => paylineSDK::ENV_DEV, 'label'=>paylineSDK::ENV_DEV),
|
12 |
+
array('value' => paylineSDK::ENV_HOMO, 'label'=>paylineSDK::ENV_HOMO),
|
13 |
+
array('value' => paylineSDK::ENV_PROD, 'label'=>paylineSDK::ENV_PROD)
|
14 |
+
);
|
15 |
+
}
|
16 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Languages.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Paylineproductcategories.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display Payline product categories
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Datasource_Paylineproductcategories
|
6 |
-
{
|
7 |
-
private $data = array(
|
8 |
-
1 => 'Informatique (matériel et logiciel)',
|
9 |
-
2 => 'Electronique',
|
10 |
-
3 => 'Téléphone',
|
11 |
-
4 => 'Electroménager',
|
12 |
-
5 => 'Habitat et jardin',
|
13 |
-
6 => 'Mode',
|
14 |
-
7 => 'Produit de beauté',
|
15 |
-
8 => 'Bijouterie',
|
16 |
-
9 => 'Sport',
|
17 |
-
10 => 'Loisirs',
|
18 |
-
11 => 'Automobiles / motos',
|
19 |
-
12 => 'Ammeublement',
|
20 |
-
13 => 'Enfants',
|
21 |
-
14 => 'Jeux video',
|
22 |
-
15 => 'Jouets',
|
23 |
-
16 => 'Animaux',
|
24 |
-
17 => 'Alimentation',
|
25 |
-
18 => 'Cadeaux',
|
26 |
-
19 => 'Spectacles',
|
27 |
-
20 => 'Voyages',
|
28 |
-
21 => 'Enchères',
|
29 |
-
22 => 'Services aux particuliers',
|
30 |
-
23 => 'Services aux professionnels'
|
31 |
-
);
|
32 |
-
|
33 |
-
public function toOptionArray()
|
34 |
-
{
|
35 |
-
$ret = array();
|
36 |
-
$n=1;
|
37 |
-
for($n=1;$n<sizeof($this->data)+1;$n++){
|
38 |
-
$ret[$n] = array('value' => $n, 'label' => $this->data[$n]);
|
39 |
-
}
|
40 |
-
return $ret;
|
41 |
-
}
|
42 |
-
|
43 |
-
public function getLabelbyId($id){
|
44 |
-
return $this->data[$id];
|
45 |
-
}
|
46 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display Payline product categories
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Datasource_Paylineproductcategories
|
6 |
+
{
|
7 |
+
private $data = array(
|
8 |
+
1 => 'Informatique (matériel et logiciel)',
|
9 |
+
2 => 'Electronique',
|
10 |
+
3 => 'Téléphone',
|
11 |
+
4 => 'Electroménager',
|
12 |
+
5 => 'Habitat et jardin',
|
13 |
+
6 => 'Mode',
|
14 |
+
7 => 'Produit de beauté',
|
15 |
+
8 => 'Bijouterie',
|
16 |
+
9 => 'Sport',
|
17 |
+
10 => 'Loisirs',
|
18 |
+
11 => 'Automobiles / motos',
|
19 |
+
12 => 'Ammeublement',
|
20 |
+
13 => 'Enfants',
|
21 |
+
14 => 'Jeux video',
|
22 |
+
15 => 'Jouets',
|
23 |
+
16 => 'Animaux',
|
24 |
+
17 => 'Alimentation',
|
25 |
+
18 => 'Cadeaux',
|
26 |
+
19 => 'Spectacles',
|
27 |
+
20 => 'Voyages',
|
28 |
+
21 => 'Enchères',
|
29 |
+
22 => 'Services aux particuliers',
|
30 |
+
23 => 'Services aux professionnels'
|
31 |
+
);
|
32 |
+
|
33 |
+
public function toOptionArray()
|
34 |
+
{
|
35 |
+
$ret = array();
|
36 |
+
$n=1;
|
37 |
+
for($n=1;$n<sizeof($this->data)+1;$n++){
|
38 |
+
$ret[$n] = array('value' => $n, 'label' => $this->data[$n]);
|
39 |
+
}
|
40 |
+
return $ret;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function getLabelbyId($id){
|
44 |
+
return $this->data[$id];
|
45 |
+
}
|
46 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Paymentactions.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Paymentactionsreauth.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display available payment actions
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Datasource_Paymentactionsreauth
|
6 |
-
{
|
7 |
-
public function toOptionArray()
|
8 |
-
{
|
9 |
-
return array(
|
10 |
-
array('value' => 101, 'label'=>Mage::helper('payline')->__('re-authorization + capture')),
|
11 |
-
array('value' => 100, 'label'=>Mage::helper('payline')->__('re-authorization'))
|
12 |
-
);
|
13 |
-
}
|
14 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display available payment actions
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Datasource_Paymentactionsreauth
|
6 |
+
{
|
7 |
+
public function toOptionArray()
|
8 |
+
{
|
9 |
+
return array(
|
10 |
+
array('value' => 101, 'label'=>Mage::helper('payline')->__('re-authorization + capture')),
|
11 |
+
array('value' => 100, 'label'=>Mage::helper('payline')->__('re-authorization'))
|
12 |
+
);
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Return.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Securitymodes.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Datasource/Shippingmethods.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display available shipping methods
|
4 |
-
* Only the 3 basic (no user configuration during checkout process) Magento methods are available
|
5 |
-
*/
|
6 |
-
class Monext_Payline_Model_Datasource_Shippingmethods
|
7 |
-
{
|
8 |
-
public function toOptionArray(){
|
9 |
-
$availableMethods=array();
|
10 |
-
$availableMethods[]=array('value'=>'', 'label'=>Mage::helper('payline')->__('- none -'));
|
11 |
-
if (Mage::getStoreConfig('carriers/flatrate/active')){
|
12 |
-
$availableMethods[]=array('value'=>'flatrate_flatrate', 'label'=>Mage::helper('payline')->__('Flat Rate'));
|
13 |
-
}
|
14 |
-
if (Mage::getStoreConfig('carriers/tablerate/active')){
|
15 |
-
$availableMethods[]=array('value'=>'tablerate_bestway', 'label'=>Mage::helper('payline')->__('Table Rate'));
|
16 |
-
}
|
17 |
-
if (Mage::getStoreConfig('carriers/freeshipping/active')){
|
18 |
-
$availableMethods[]=array('value'=>'freeshipping_freeshipping', 'label'=>Mage::helper('payline')->__('Free Shipping'));
|
19 |
-
}
|
20 |
-
return $availableMethods;
|
21 |
-
}
|
22 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display available shipping methods
|
4 |
+
* Only the 3 basic (no user configuration during checkout process) Magento methods are available
|
5 |
+
*/
|
6 |
+
class Monext_Payline_Model_Datasource_Shippingmethods
|
7 |
+
{
|
8 |
+
public function toOptionArray(){
|
9 |
+
$availableMethods=array();
|
10 |
+
$availableMethods[]=array('value'=>'', 'label'=>Mage::helper('payline')->__('- none -'));
|
11 |
+
if (Mage::getStoreConfig('carriers/flatrate/active')){
|
12 |
+
$availableMethods[]=array('value'=>'flatrate_flatrate', 'label'=>Mage::helper('payline')->__('Flat Rate'));
|
13 |
+
}
|
14 |
+
if (Mage::getStoreConfig('carriers/tablerate/active')){
|
15 |
+
$availableMethods[]=array('value'=>'tablerate_bestway', 'label'=>Mage::helper('payline')->__('Table Rate'));
|
16 |
+
}
|
17 |
+
if (Mage::getStoreConfig('carriers/freeshipping/active')){
|
18 |
+
$availableMethods[]=array('value'=>'freeshipping_freeshipping', 'label'=>Mage::helper('payline')->__('Free Shipping'));
|
19 |
+
}
|
20 |
+
return $availableMethods;
|
21 |
+
}
|
22 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Status.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Datasource_Status extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
3 |
-
{
|
4 |
-
protected $_options;
|
5 |
-
|
6 |
-
public function toOptionArray()
|
7 |
-
{
|
8 |
-
if ($this->_options === null) {
|
9 |
-
$options = array();
|
10 |
-
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
11 |
-
$collection = Mage::getResourceModel('sales/order_status_collection')
|
12 |
-
->orderByLabel();
|
13 |
-
$statusValue = '';
|
14 |
-
foreach ($collection as $status) {
|
15 |
-
$statusValue = $status->getStatus();
|
16 |
-
if( $statusValue === 'complete' || $statusValue === 'closed' ) {
|
17 |
-
continue;
|
18 |
-
}
|
19 |
-
$options[] = array(
|
20 |
-
'value' => $statusValue,
|
21 |
-
'label' => $status->getStoreLabel()
|
22 |
-
);
|
23 |
-
}
|
24 |
-
} else {
|
25 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
26 |
-
foreach ($statuses as $code=>$label) {
|
27 |
-
if( $code === 'complete' || $code === 'closed' ) {
|
28 |
-
continue;
|
29 |
-
}
|
30 |
-
$options[] = array(
|
31 |
-
'value' => $code,
|
32 |
-
'label' => $label
|
33 |
-
);
|
34 |
-
}
|
35 |
-
}
|
36 |
-
$this->_options = $options;
|
37 |
-
}
|
38 |
-
|
39 |
-
return $this->_options;
|
40 |
-
}
|
41 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Datasource_Status extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
3 |
+
{
|
4 |
+
protected $_options;
|
5 |
+
|
6 |
+
public function toOptionArray()
|
7 |
+
{
|
8 |
+
if ($this->_options === null) {
|
9 |
+
$options = array();
|
10 |
+
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
11 |
+
$collection = Mage::getResourceModel('sales/order_status_collection')
|
12 |
+
->orderByLabel();
|
13 |
+
$statusValue = '';
|
14 |
+
foreach ($collection as $status) {
|
15 |
+
$statusValue = $status->getStatus();
|
16 |
+
if( $statusValue === 'complete' || $statusValue === 'closed' ) {
|
17 |
+
continue;
|
18 |
+
}
|
19 |
+
$options[] = array(
|
20 |
+
'value' => $statusValue,
|
21 |
+
'label' => $status->getStoreLabel()
|
22 |
+
);
|
23 |
+
}
|
24 |
+
} else {
|
25 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
26 |
+
foreach ($statuses as $code=>$label) {
|
27 |
+
if( $code === 'complete' || $code === 'closed' ) {
|
28 |
+
continue;
|
29 |
+
}
|
30 |
+
$options[] = array(
|
31 |
+
'value' => $code,
|
32 |
+
'label' => $label
|
33 |
+
);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
$this->_options = $options;
|
37 |
+
}
|
38 |
+
|
39 |
+
return $this->_options;
|
40 |
+
}
|
41 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Status/Canceled.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class used as a datasource to display available states for canceled/refused orders
|
5 |
-
*/
|
6 |
-
class Monext_Payline_Model_Datasource_Status_Canceled extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
7 |
-
{
|
8 |
-
protected $_stateStatuses = array(
|
9 |
-
Mage_Sales_Model_Order::STATE_CANCELED,
|
10 |
-
Mage_Sales_Model_Order::STATE_HOLDED,
|
11 |
-
);
|
12 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class used as a datasource to display available states for canceled/refused orders
|
5 |
+
*/
|
6 |
+
class Monext_Payline_Model_Datasource_Status_Canceled extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
7 |
+
{
|
8 |
+
protected $_stateStatuses = array(
|
9 |
+
Mage_Sales_Model_Order::STATE_CANCELED,
|
10 |
+
Mage_Sales_Model_Order::STATE_HOLDED,
|
11 |
+
);
|
12 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Status/Invoice.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Datasource_Status_Invoice extends Monext_Payline_Model_Datasource_Status
|
3 |
-
{
|
4 |
-
public function toOptionArray()
|
5 |
-
{
|
6 |
-
|
7 |
-
if ($this->_options === null) {
|
8 |
-
$options = array();
|
9 |
-
$options[] = array(
|
10 |
-
'value' => '',
|
11 |
-
'label' => Mage::helper('adminhtml')->__('No')
|
12 |
-
);
|
13 |
-
$options[] = array(
|
14 |
-
'value' => 'return',
|
15 |
-
'label' => Mage::helper('payline')->__('Back to the shop')
|
16 |
-
);
|
17 |
-
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
18 |
-
$collection = Mage::getResourceModel('sales/order_status_collection')
|
19 |
-
->orderByLabel();
|
20 |
-
foreach ($collection as $status) {
|
21 |
-
$options[] = array(
|
22 |
-
'value' => $status->getStatus(),
|
23 |
-
'label' => Mage::helper('payline')->__("When order status is '%s'", $status->getStoreLabel())
|
24 |
-
);
|
25 |
-
}
|
26 |
-
} else {
|
27 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
28 |
-
foreach ($statuses as $code=>$label) {
|
29 |
-
$options[] = array(
|
30 |
-
'value' => $code,
|
31 |
-
'label' => Mage::helper('payline')->__("When order status is '%s'", $label)
|
32 |
-
);
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
$this->_options = $options;
|
37 |
-
}
|
38 |
-
|
39 |
-
return $this->_options;
|
40 |
-
}
|
41 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Datasource_Status_Invoice extends Monext_Payline_Model_Datasource_Status
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
|
7 |
+
if ($this->_options === null) {
|
8 |
+
$options = array();
|
9 |
+
$options[] = array(
|
10 |
+
'value' => '',
|
11 |
+
'label' => Mage::helper('adminhtml')->__('No')
|
12 |
+
);
|
13 |
+
$options[] = array(
|
14 |
+
'value' => 'return',
|
15 |
+
'label' => Mage::helper('payline')->__('Back to the shop')
|
16 |
+
);
|
17 |
+
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
18 |
+
$collection = Mage::getResourceModel('sales/order_status_collection')
|
19 |
+
->orderByLabel();
|
20 |
+
foreach ($collection as $status) {
|
21 |
+
$options[] = array(
|
22 |
+
'value' => $status->getStatus(),
|
23 |
+
'label' => Mage::helper('payline')->__("When order status is '%s'", $status->getStoreLabel())
|
24 |
+
);
|
25 |
+
}
|
26 |
+
} else {
|
27 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
28 |
+
foreach ($statuses as $code=>$label) {
|
29 |
+
$options[] = array(
|
30 |
+
'value' => $code,
|
31 |
+
'label' => Mage::helper('payline')->__("When order status is '%s'", $label)
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
$this->_options = $options;
|
37 |
+
}
|
38 |
+
|
39 |
+
return $this->_options;
|
40 |
+
}
|
41 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Statusrowempty.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Datasource_Statusrowempty extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
3 |
-
{
|
4 |
-
protected $_options;
|
5 |
-
|
6 |
-
public function toOptionArray()
|
7 |
-
{
|
8 |
-
if ($this->_options === null) {
|
9 |
-
$options = array();
|
10 |
-
$options[] = array(
|
11 |
-
'value' => '',
|
12 |
-
'label' => 'None'
|
13 |
-
);
|
14 |
-
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
15 |
-
$collection = Mage::getResourceModel('sales/order_status_collection')
|
16 |
-
->orderByLabel();
|
17 |
-
$statusValue = '';
|
18 |
-
foreach ($collection as $status) {
|
19 |
-
$statusValue = $status->getStatus();
|
20 |
-
if( $statusValue === 'complete' || $statusValue === 'closed' ) {
|
21 |
-
continue;
|
22 |
-
}
|
23 |
-
$options[] = array(
|
24 |
-
'value' => $statusValue,
|
25 |
-
'label' => $status->getStoreLabel()
|
26 |
-
);
|
27 |
-
}
|
28 |
-
} else {
|
29 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
30 |
-
foreach ($statuses as $code=>$label) {
|
31 |
-
if( $code === 'complete' || $code === 'closed' ) {
|
32 |
-
continue;
|
33 |
-
}
|
34 |
-
$options[] = array(
|
35 |
-
'value' => $code,
|
36 |
-
'label' => $label
|
37 |
-
);
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
$this->_options = $options;
|
42 |
-
}
|
43 |
-
|
44 |
-
return $this->_options;
|
45 |
-
}
|
46 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Datasource_Statusrowempty extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
|
3 |
+
{
|
4 |
+
protected $_options;
|
5 |
+
|
6 |
+
public function toOptionArray()
|
7 |
+
{
|
8 |
+
if ($this->_options === null) {
|
9 |
+
$options = array();
|
10 |
+
$options[] = array(
|
11 |
+
'value' => '',
|
12 |
+
'label' => 'None'
|
13 |
+
);
|
14 |
+
if (class_exists('Mage_Sales_Model_Mysql4_Order_Status_Collection')) {
|
15 |
+
$collection = Mage::getResourceModel('sales/order_status_collection')
|
16 |
+
->orderByLabel();
|
17 |
+
$statusValue = '';
|
18 |
+
foreach ($collection as $status) {
|
19 |
+
$statusValue = $status->getStatus();
|
20 |
+
if( $statusValue === 'complete' || $statusValue === 'closed' ) {
|
21 |
+
continue;
|
22 |
+
}
|
23 |
+
$options[] = array(
|
24 |
+
'value' => $statusValue,
|
25 |
+
'label' => $status->getStoreLabel()
|
26 |
+
);
|
27 |
+
}
|
28 |
+
} else {
|
29 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
30 |
+
foreach ($statuses as $code=>$label) {
|
31 |
+
if( $code === 'complete' || $code === 'closed' ) {
|
32 |
+
continue;
|
33 |
+
}
|
34 |
+
$options[] = array(
|
35 |
+
'value' => $code,
|
36 |
+
'label' => $label
|
37 |
+
);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
$this->_options = $options;
|
42 |
+
}
|
43 |
+
|
44 |
+
return $this->_options;
|
45 |
+
}
|
46 |
}
|
app/code/community/Monext/Payline/Model/Datasource/Walletsecurity.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display target Payline environment
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Datasource_Walletsecurity
|
6 |
-
{
|
7 |
-
public function toOptionArray()
|
8 |
-
{
|
9 |
-
return array(
|
10 |
-
array('value' => Monext_Payline_Helper_Data::WALLET_NONE, 'label'=>Mage::helper('payline')->__('- none -')),
|
11 |
-
// array('value' => Monext_Payline_Helper_Data::WALLET_CVV, 'label'=>Mage::helper('payline')->__('CVV')),
|
12 |
-
array('value' => Monext_Payline_Helper_Data::WALLET_3DS, 'label'=>Mage::helper('payline')->__('3DS'))
|
13 |
-
// array('value' => Monext_Payline_Helper_Data::WALLET_BOTH, 'label'=>Mage::helper('payline')->__('CVV + 3DS'))
|
14 |
-
);
|
15 |
-
}
|
16 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display target Payline environment
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Datasource_Walletsecurity
|
6 |
+
{
|
7 |
+
public function toOptionArray()
|
8 |
+
{
|
9 |
+
return array(
|
10 |
+
array('value' => Monext_Payline_Helper_Data::WALLET_NONE, 'label'=>Mage::helper('payline')->__('- none -')),
|
11 |
+
// array('value' => Monext_Payline_Helper_Data::WALLET_CVV, 'label'=>Mage::helper('payline')->__('CVV')),
|
12 |
+
array('value' => Monext_Payline_Helper_Data::WALLET_3DS, 'label'=>Mage::helper('payline')->__('3DS'))
|
13 |
+
// array('value' => Monext_Payline_Helper_Data::WALLET_BOTH, 'label'=>Mage::helper('payline')->__('CVV + 3DS'))
|
14 |
+
);
|
15 |
+
}
|
16 |
+
}
|
app/code/community/Monext/Payline/Model/Datasource/Widgettemplate.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class used as a datasource to display widget options
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Datasource_Widgettemplate
|
6 |
-
{
|
7 |
-
public function toOptionArray()
|
8 |
-
{
|
9 |
-
return array(
|
10 |
-
array('value' => 0, 'label'=>Mage::helper('payline')->__('disabled')),
|
11 |
-
array('value' => 'lightbox', 'label'=>Mage::helper('payline')->__('lightbox')),
|
12 |
-
array('value' => 'column', 'label'=>Mage::helper('payline')->__('column')),
|
13 |
-
array('value' => 'tab', 'label'=>Mage::helper('payline')->__('tab'))
|
14 |
-
);
|
15 |
-
}
|
16 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class used as a datasource to display widget options
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Datasource_Widgettemplate
|
6 |
+
{
|
7 |
+
public function toOptionArray()
|
8 |
+
{
|
9 |
+
return array(
|
10 |
+
array('value' => 0, 'label'=>Mage::helper('payline')->__('disabled')),
|
11 |
+
array('value' => 'lightbox', 'label'=>Mage::helper('payline')->__('lightbox')),
|
12 |
+
array('value' => 'column', 'label'=>Mage::helper('payline')->__('column')),
|
13 |
+
array('value' => 'tab', 'label'=>Mage::helper('payline')->__('tab'))
|
14 |
+
);
|
15 |
+
}
|
16 |
+
}
|
app/code/community/Monext/Payline/Model/Direct.php
CHANGED
@@ -3,16 +3,25 @@
|
|
3 |
* Payline direct payment method
|
4 |
*/
|
5 |
class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
6 |
-
{
|
7 |
-
protected $_code
|
8 |
-
|
9 |
-
protected $
|
10 |
-
|
11 |
-
protected $
|
12 |
-
|
13 |
-
protected $
|
14 |
-
|
15 |
-
protected $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
* Check whether payment method can be used
|
@@ -28,49 +37,53 @@ class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
28 |
}else{
|
29 |
return false;
|
30 |
}
|
31 |
-
}
|
32 |
-
|
33 |
public function assignData($data)
|
34 |
{
|
35 |
if (!($data instanceof Varien_Object)) {
|
36 |
$data = new Varien_Object($data);
|
37 |
}
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
*
|
60 |
-
* @return Monext_Payline_Model_Direct
|
61 |
-
*/
|
62 |
-
public function validate()
|
63 |
-
{
|
64 |
-
parent::validate();
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
return $this;
|
72 |
}
|
73 |
|
|
|
74 |
/**
|
75 |
* Order payment abstract method
|
76 |
*
|
@@ -91,79 +104,35 @@ class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
91 |
|
92 |
/**
|
93 |
* Order the payment via Payline Direct
|
|
|
|
|
|
|
94 |
*/
|
95 |
-
protected function _orderDirect(Mage_Sales_Model_Order_Payment $payment
|
96 |
{
|
97 |
-
$
|
98 |
-
$data = Mage::registry('current_payment_data');
|
99 |
-
$array = $this->_orderInit($order);
|
100 |
|
101 |
-
// Init the SDK with the currency and for DIRECT method
|
102 |
$paylineSDK = Mage::helper('payline')->initPayline('DIRECT', $array['payment']['currency']);
|
103 |
|
104 |
-
|
105 |
-
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineDIRECT/payline_payment_action');
|
106 |
-
$array['payment']['mode'] = 'CPT';
|
107 |
-
|
108 |
-
// Get the contract
|
109 |
-
$contract = Mage::helper('payline/payment')->getContractByData($data);
|
110 |
-
$array['payment']['contractNumber'] = $contract->getNumber();
|
111 |
-
|
112 |
-
// Set the order date
|
113 |
-
$array['order']['date'] = date("d/m/Y H:i");
|
114 |
-
|
115 |
-
// Set private data (usefull in the payline admin)
|
116 |
-
$privateData1 = array();
|
117 |
-
$privateData1['key'] = 'orderRef';
|
118 |
-
$privateData1['value'] = substr(str_replace(array("\r", "\n", "\t"), array('', '', ''), $array['order']['ref']), 0, 255);
|
119 |
-
$paylineSDK->setPrivate($privateData1);
|
120 |
-
|
121 |
-
// Set the order details (each item, optional)
|
122 |
-
$items = $order->getAllItems();
|
123 |
-
if ($items) {
|
124 |
-
if (count($items) > 100) {
|
125 |
-
$items = array_slice($items, 0, 100);
|
126 |
-
}
|
127 |
-
foreach ($items as $item) {
|
128 |
-
$itemPrice = round($item->getPrice() * 100);
|
129 |
-
if ($itemPrice > 0) {
|
130 |
-
$product = array();
|
131 |
-
$product['ref'] = substr(Mage::helper('payline')->encodeString(str_replace(array("\r", "\n", "\t"), array('', '', ''), $item->getName())), 0, 50);
|
132 |
-
$product['price'] = round($item->getPrice() * 100);
|
133 |
-
$product['quantity'] = round($item->getQtyOrdered());
|
134 |
-
$product['comment'] = substr(Mage::helper('payline')->encodeString(str_replace(array("\r", "\n", "\t"), array('', '', ''), $item->getDescription())), 0, 255);
|
135 |
-
$paylineSDK->setItem($product);
|
136 |
-
}
|
137 |
-
}
|
138 |
-
}
|
139 |
-
// Set the card info
|
140 |
-
$array['card']['number'] = $data->getCcNumber();
|
141 |
-
$array['card']['cardholder'] = $data->getCcOwner();
|
142 |
-
$array['card']['type'] = $contract->getContractType();
|
143 |
-
$array['card']['expirationDate'] = $data->getCcExpMonth() . $data->getCcExpYear();
|
144 |
-
$array['card']['cvx'] = $data->getCcCid();
|
145 |
-
|
146 |
-
// Set the customer's IP
|
147 |
-
$array['buyer']['ip'] = Mage::helper('core/http')->getRemoteAddr();
|
148 |
-
|
149 |
-
// Init 3DS to empty array
|
150 |
-
$array['3DSecure'] = array();
|
151 |
-
|
152 |
-
// Init bank acocunt data to empty array
|
153 |
-
$array['BankAccountData'] = array();
|
154 |
-
|
155 |
-
// Set the version
|
156 |
-
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
157 |
-
|
158 |
-
// Set the card owner's name
|
159 |
-
$array['owner']['lastName'] = Mage::helper('payline')->encodeString($data->getCcOwner());
|
160 |
-
|
161 |
try {
|
162 |
// Do autorization
|
163 |
$author_result = $paylineSDK->doAuthorization($array);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
} catch (Exception $e) {
|
166 |
-
|
167 |
// We get an exception, log it
|
168 |
Mage::logException($e);
|
169 |
|
@@ -177,87 +146,38 @@ class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
177 |
Mage::throwException($msg);
|
178 |
}
|
179 |
|
180 |
-
/**
|
181 |
-
* Process the authorization response
|
182 |
-
*/
|
183 |
-
|
184 |
-
// The failed order status
|
185 |
-
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
186 |
-
|
187 |
-
// Authorization succeed
|
188 |
-
if (isset($author_result) && is_array($author_result) && $author_result['result']['code'] == '00000') {
|
189 |
|
190 |
-
/**
|
191 |
-
* Update the order with the new transaction
|
192 |
-
*/
|
193 |
-
// If everything is OK
|
194 |
-
if (Mage::helper('payline/payment')->updateOrder($order, $author_result, $author_result['transaction']['id'], 'DIRECT')) {
|
195 |
-
|
196 |
-
// Code 04003 - Fraud detected - BUT Transaction approved (04002 is Fraud with payment refused)
|
197 |
-
if ($author_result['result']['code'] == '04003') {
|
198 |
-
// Fraud suspected
|
199 |
-
$payment->setIsFraudDetected(true);
|
200 |
-
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
201 |
-
Mage::helper('payline')->setOrderStatus($order, $newOrderStatus);
|
202 |
-
} else {
|
203 |
-
// Set the status depending on the configuration
|
204 |
-
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
205 |
-
$order, $array['payment']['action']);
|
206 |
-
}
|
207 |
-
|
208 |
-
// Create the wallet!
|
209 |
-
$array['wallet']['lastName'] = $array['buyer']['lastName'];
|
210 |
-
$array['wallet']['firstName'] = $array['buyer']['firstName'];
|
211 |
-
$array['wallet']['email'] = $array['buyer']['email'];
|
212 |
-
$array['address'] = $array['shippingAddress'];
|
213 |
-
$array['ownerAddress'] = null;
|
214 |
-
Mage::helper('payline')->createWalletForCurrentCustomer($paylineSDK, $array);
|
215 |
-
|
216 |
-
// Create the invoice
|
217 |
-
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('DIRECT', $order);
|
218 |
-
}
|
219 |
|
220 |
-
|
221 |
-
else {
|
222 |
-
|
223 |
-
// Log a message and cancel the order. Alert the customer
|
224 |
-
$msgLog = 'Error during order update (#' . $order->getIncrementId() . ')' . "\n";
|
225 |
-
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $failedOrderStatus, $msgLog, false);
|
226 |
-
Mage::helper('payline/logger')->log('[directAction] ' . $order->getIncrementId() . $msgLog);
|
227 |
-
|
228 |
-
// Error
|
229 |
-
$payment->setSkipOrderProcessing(true);
|
230 |
-
$msg = Mage::helper('payline')->__('An error occured during the payment. Please retry or use an other payment method.');
|
231 |
-
Mage::throwException($msg);
|
232 |
-
}
|
233 |
|
|
|
|
|
|
|
234 |
}
|
|
|
235 |
|
236 |
-
// Authorization doesn't succeed
|
237 |
-
else {
|
238 |
-
|
239 |
-
// Get the error message
|
240 |
-
if (isset($author_result) && is_array($author_result)) {
|
241 |
-
$msgLog = 'PAYLINE ERROR : ' . $author_result['result']['code'] . ' ' . $author_result['result']['shortMessage'] . ' (' . $author_result['result']['longMessage'] . ')';
|
242 |
-
} elseif (isset($author_result) && is_string($author_result)) {
|
243 |
-
$msgLog = 'PAYLINE ERROR : ' . $author_result;
|
244 |
-
} else {
|
245 |
-
$msgLog = 'Unknown PAYLINE ERROR';
|
246 |
-
}
|
247 |
-
|
248 |
-
// Update the stock
|
249 |
-
Mage::helper('payline/payment')->updateStock($order);
|
250 |
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
-
// Alert the customer and log message
|
255 |
-
Mage::helper('payline/logger')->log('[directAction] ' . $order->getIncrementId() . $msgLog);
|
256 |
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
}
|
263 |
|
@@ -269,7 +189,7 @@ class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
269 |
{
|
270 |
return Mage::helper('payline/payment')->init($order);
|
271 |
}
|
272 |
-
|
273 |
/**
|
274 |
* Capture payment
|
275 |
*
|
@@ -293,7 +213,7 @@ class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
|
293 |
Mage::getModel('payline/cpt')->refund($payment,$amount, 'DIRECT');
|
294 |
return $this;
|
295 |
}
|
296 |
-
|
297 |
/**
|
298 |
* Cancel payment
|
299 |
*
|
3 |
* Payline direct payment method
|
4 |
*/
|
5 |
class Monext_Payline_Model_Direct extends Mage_Payment_Model_Method_Abstract
|
6 |
+
{
|
7 |
+
protected $_code = 'PaylineDIRECT';
|
8 |
+
|
9 |
+
protected $_formBlockType = 'payline/direct';
|
10 |
+
|
11 |
+
protected $_infoBlockType = 'payline/info_direct';
|
12 |
+
|
13 |
+
protected $_canCapture = true;
|
14 |
+
|
15 |
+
protected $_canCapturePartial = true;
|
16 |
+
|
17 |
+
protected $_canRefund = true;
|
18 |
+
|
19 |
+
protected $_canRefundInvoicePartial = true;
|
20 |
+
|
21 |
+
protected $_canVoid = true;
|
22 |
+
|
23 |
+
protected $_canOrder = true;
|
24 |
+
|
25 |
|
26 |
/**
|
27 |
* Check whether payment method can be used
|
37 |
}else{
|
38 |
return false;
|
39 |
}
|
40 |
+
}
|
41 |
+
|
42 |
public function assignData($data)
|
43 |
{
|
44 |
if (!($data instanceof Varien_Object)) {
|
45 |
$data = new Varien_Object($data);
|
46 |
}
|
47 |
|
48 |
+
$saveInfo = true;
|
49 |
+
if(!$data->getCardTokenPan()) {
|
50 |
+
// If we don't have the token the CcNumber is stored in memory for the current process
|
51 |
+
Mage::register('current_payment_data', $data);
|
52 |
+
} else {
|
53 |
+
// With the token no need for CcNumber the data is stored in session so we can check 3DS
|
54 |
+
$paylineSession = Mage::getSingleton('payline/session');
|
55 |
+
if($data->getAssignSession()) {
|
56 |
+
|
57 |
+
$paylineSession->setCcType($data->getCcType())
|
58 |
+
//->setCcOwner($data->getCcOwner())
|
59 |
+
->setCcLast4($data->getCcLast4())
|
60 |
+
//TODO: Monext have to avoid using cid
|
61 |
+
->setCcCid($data->getCcCid())
|
62 |
+
->setCardTokenPan($data->getCardTokenPan())
|
63 |
+
->setSubscribeWallet($data->getSubscribeWallet());
|
64 |
+
} else {
|
65 |
+
$saveInfo = false;
|
66 |
+
}
|
67 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
if($saveInfo) {
|
70 |
+
// Fill the info instance
|
71 |
+
$info = $this->getInfoInstance();
|
72 |
+
$info->setCcType($data->getCcType())
|
73 |
+
->setCcOwner($data->getCcOwner())
|
74 |
+
->setCcLast4($data->getCcLast4())
|
75 |
+
->setCcExpMonth($data->getCcExpMonth())
|
76 |
+
->setCcExpYear($data->getCcExpYear())
|
77 |
+
->setCcSsIssue($data->getCcSsIssue())
|
78 |
+
->setCcSsStartMonth($data->getCcSsStartMonth())
|
79 |
+
->setCcSsStartYear($data->getCcSsStartYear())
|
80 |
+
->setCardTokenPan($data->getCardTokenPan());
|
81 |
}
|
82 |
|
83 |
return $this;
|
84 |
}
|
85 |
|
86 |
+
|
87 |
/**
|
88 |
* Order payment abstract method
|
89 |
*
|
104 |
|
105 |
/**
|
106 |
* Order the payment via Payline Direct
|
107 |
+
*
|
108 |
+
* @param Mage_Sales_Model_Order_Payment $payment
|
109 |
+
* @throws Exception
|
110 |
*/
|
111 |
+
protected function _orderDirect(Mage_Sales_Model_Order_Payment $payment)
|
112 |
{
|
113 |
+
$array = Mage::helper('payline/payment')->getDirectActionHeader($payment);
|
|
|
|
|
114 |
|
|
|
115 |
$paylineSDK = Mage::helper('payline')->initPayline('DIRECT', $array['payment']['currency']);
|
116 |
|
117 |
+
$order = $payment->getOrder();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
try {
|
119 |
// Do autorization
|
120 |
$author_result = $paylineSDK->doAuthorization($array);
|
121 |
+
if(Mage::helper('payline/payment')->useSecureContract()) {
|
122 |
+
return $this->_flagRedirectSecurized();
|
123 |
+
//Check $author_result and redirect to directSecurizedAction if 3DS needed
|
124 |
+
} elseif ($author_result['transaction'] and !empty($author_result['transaction']['isPossibleFraud'])) {
|
125 |
+
if (Mage::helper('payline/payment')->switchToSecureContract()) {
|
126 |
+
$msgLog = ' Payline detect a possible fraud';
|
127 |
+
Mage::helper('payline/logger')->log('[directAction] ' . $order->getIncrementId() . $msgLog);
|
128 |
+
return $this->_flagRedirectSecurized();
|
129 |
+
} else {
|
130 |
+
$msg = 'Fraud suspected and no 3DS contract found for ccType: ' . Mage::helper('payline/payment')->getPaymentUserData()->getCcType();
|
131 |
+
throw new Exception($msg);
|
132 |
+
}
|
133 |
+
}
|
134 |
|
135 |
} catch (Exception $e) {
|
|
|
136 |
// We get an exception, log it
|
137 |
Mage::logException($e);
|
138 |
|
146 |
Mage::throwException($msg);
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
+
$statusFinalize = Mage::helper('payline/payment')->finalizeDirectAction($author_result, $paylineSDK, $array, $payment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
+
if (!$statusFinalize) {
|
154 |
+
// Alert the customer and log message
|
155 |
+
Mage::helper('payline/logger')->log('[directAction] ' . $order->getIncrementId() . $msgLog);
|
156 |
}
|
157 |
+
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
/**
|
161 |
+
* Set flag to control the PlaceRedirectUrl
|
162 |
+
*
|
163 |
+
* @param string $action
|
164 |
+
*/
|
165 |
+
protected function _flagRedirectSecurized()
|
166 |
+
{
|
167 |
+
Mage::register('payline_redirect_securized', true);
|
168 |
+
}
|
169 |
|
|
|
|
|
170 |
|
171 |
+
/**
|
172 |
+
* Return url for redirection after order placed
|
173 |
+
* @return string
|
174 |
+
*/
|
175 |
+
public function getOrderPlaceRedirectUrl()
|
176 |
+
{
|
177 |
+
if(Mage::registry('payline_redirect_securized')) {
|
178 |
+
return Mage::getUrl('payline/index/directSecurized');
|
179 |
+
} else {
|
180 |
+
return false;
|
181 |
}
|
182 |
}
|
183 |
|
189 |
{
|
190 |
return Mage::helper('payline/payment')->init($order);
|
191 |
}
|
192 |
+
|
193 |
/**
|
194 |
* Capture payment
|
195 |
*
|
213 |
Mage::getModel('payline/cpt')->refund($payment,$amount, 'DIRECT');
|
214 |
return $this;
|
215 |
}
|
216 |
+
|
217 |
/**
|
218 |
* Cancel payment
|
219 |
*
|
app/code/community/Monext/Payline/Model/Fees.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline nx fees model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Fees extends Mage_Core_Model_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
parent::_construct();
|
12 |
-
$this->_init('payline/fees');
|
13 |
-
}
|
14 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline nx fees model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Fees extends Mage_Core_Model_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('payline/fees');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Contract.php
CHANGED
@@ -1,38 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline contracts resource model
|
5 |
-
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
$this->_init('payline/contract', 'id');
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* set primary = 0 and secondary = 0 for contracts that are not in $pointOfSell
|
16 |
-
* @param type $pointOfSell
|
17 |
-
*/
|
18 |
-
public function removePrimaryAndSecondaryNotIn($pointOfSell)
|
19 |
-
{
|
20 |
-
$connection = $this->_getWriteAdapter();
|
21 |
-
$connection->beginTransaction();
|
22 |
-
$fields = array();
|
23 |
-
$fields['is_primary'] = 0;
|
24 |
-
$fields['is_secondary'] = 0;
|
25 |
-
$where = $connection->quoteInto('point_of_sell != ?', $pointOfSell);
|
26 |
-
$connection->update($this->getTable('payline/contract'), $fields, $where);
|
27 |
-
$connection->commit();
|
28 |
-
}
|
29 |
|
30 |
// Use fallback history pattern
|
31 |
-
public function updateContractWalletList($ids, $optionToSet, $website_code, $store_code)
|
32 |
-
{
|
33 |
if(!is_array($ids)) {
|
34 |
$ids = array($ids);
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
$pointOfSell = $this->getPointOfSell($ids);
|
38 |
$otherContracts = $this->getContractsNotIn($pointOfSell);
|
@@ -41,7 +71,10 @@ class Monext_Payline_Model_Mysql4_Contract extends Mage_Core_Model_Mysql4_Abstra
|
|
41 |
$isDefaultLevel = false;
|
42 |
$isWebsiteLevel = false;
|
43 |
$isStoreViewLevel = false;
|
44 |
-
$connection = $this->_getWriteAdapter();
|
|
|
|
|
|
|
45 |
|
46 |
// set store & website code
|
47 |
if(!$store_code) {
|
@@ -56,10 +89,10 @@ class Monext_Payline_Model_Mysql4_Contract extends Mage_Core_Model_Mysql4_Abstra
|
|
56 |
} else {
|
57 |
$isStoreViewLevel = true;
|
58 |
$storeIds = array(Mage::app()->getStore($store_code)->getId());
|
59 |
-
}
|
60 |
-
|
61 |
$connection->beginTransaction();
|
62 |
-
|
63 |
// process update
|
64 |
if($isDefaultLevel) {
|
65 |
// default level override son's options
|
@@ -67,72 +100,84 @@ class Monext_Payline_Model_Mysql4_Contract extends Mage_Core_Model_Mysql4_Abstra
|
|
67 |
$conditions[] = $connection->quoteInto('contract_id in (?)', $ids);
|
68 |
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
77 |
$count = Mage::getModel('payline/contract')->getCollection()->addFieldToFilter('is_primary',1)->getSize();
|
78 |
} else {
|
79 |
$contractStatusRModel = Mage::getResourceModel('payline/contract_status');
|
80 |
|
81 |
-
$
|
82 |
-
|
83 |
-
$
|
|
|
84 |
|
85 |
// temporarily stock deleted rows to avoid is_primary and is_secondary data lost
|
86 |
-
$deletedRows = $contractStatusRModel->queryContractStatus($ids, $storeIds, $websiteId);
|
87 |
-
|
88 |
-
$connection->delete($this->getTable('payline/contract_status')
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
90 |
$fields['is_primary'] = 0;
|
91 |
$fields['is_secondary'] = 0;
|
92 |
-
|
|
|
|
|
|
|
93 |
if($isWebsiteLevel) {
|
94 |
$data = array(
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
);
|
102 |
// time to restore deleted info (if needed)
|
103 |
-
$backup = $contractStatusRModel->getMatchingRowByKeys( $deletedRows, $data );
|
104 |
-
|
105 |
-
$
|
106 |
-
|
107 |
-
|
|
|
|
|
108 |
$connection->insert($this->getTable('payline/contract_status'),$data);
|
109 |
}
|
110 |
foreach ($storeIds as $storeId) {
|
111 |
$data = array(
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
);
|
119 |
-
|
120 |
-
|
121 |
-
$
|
122 |
-
|
123 |
-
|
|
|
124 |
$connection->insert($this->getTable('payline/contract_status'),$data);
|
125 |
}
|
126 |
-
}
|
127 |
-
|
128 |
-
// wallet subscription can be set for all point of sell. Uncomment below to avoid that.
|
129 |
-
// $this->resetContractWallet($connection, ($isWebsiteLevel ? 2 : 3), $otherContracts, $websiteId, $storeIds);
|
130 |
|
131 |
if($isWebsiteLevel) {
|
132 |
$count= Mage::getModel('payline/contract_status')->getCollection()
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
} else {
|
137 |
$count = Mage::getModel('payline/contract')->getCollection()->addFilterStatus(true,$storeId)->getSize();
|
138 |
}
|
@@ -142,98 +187,47 @@ class Monext_Payline_Model_Mysql4_Contract extends Mage_Core_Model_Mysql4_Abstra
|
|
142 |
|
143 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contracts modified successfully'));
|
144 |
|
145 |
-
} // end updateContractWalletList()
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
*
|
150 |
-
* @param
|
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 |
-
'is_primary' => $fields['is_primary'],
|
190 |
-
'is_secondary' => $fields['is_secondary']
|
191 |
-
);
|
192 |
-
$connection->insert($this->getTable('payline/contract_status'),$data);
|
193 |
-
}
|
194 |
-
} // end foreach( $ids
|
195 |
-
} // end else $level
|
196 |
-
}
|
197 |
-
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Get the point of sell of contracts
|
201 |
-
* @param array $contract_ids
|
202 |
-
* @return string
|
203 |
-
*/
|
204 |
-
public function getPointOfSell($contract_ids) {
|
205 |
-
$read = $this->_getReadAdapter();
|
206 |
-
|
207 |
-
$select = $read->select()
|
208 |
-
->distinct()
|
209 |
-
->from($this->getTable('payline/contract'),array('point_of_sell'))
|
210 |
-
->where('id in (?)', $contract_ids);
|
211 |
-
|
212 |
-
$result = $select->query();
|
213 |
-
$row = $result->fetchAll();
|
214 |
-
return $row[0]['point_of_sell'];
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Get contract ids of contracts not int $pointOfSell
|
219 |
-
* @param string $pointOfSell
|
220 |
-
* @return array
|
221 |
-
*/
|
222 |
-
public function getContractsNotIn($pointOfSell) {
|
223 |
-
$read = $this->_getReadAdapter();
|
224 |
-
|
225 |
-
$select = $read->select()
|
226 |
-
->distinct()
|
227 |
-
->from($this->getTable('payline/contract'),array('id'))
|
228 |
-
->where('point_of_sell != ?', $pointOfSell);
|
229 |
-
|
230 |
-
$result = $select->query();
|
231 |
-
$row = $result->fetchAll();
|
232 |
-
$res = array();
|
233 |
-
foreach($row as $r) {
|
234 |
-
$res[] = $r['id'];
|
235 |
-
}
|
236 |
-
return $res;
|
237 |
-
}
|
238 |
-
|
239 |
-
} //end class
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts resource model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Contract extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('payline/contract', 'id');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* set primary = 0 and secondary = 0 for contracts that are not in $pointOfSell
|
16 |
+
* @param type $pointOfSell
|
17 |
+
*/
|
18 |
+
public function removePrimaryAndSecondaryNotIn($pointOfSell)
|
19 |
+
{
|
20 |
+
$connection = $this->_getWriteAdapter();
|
21 |
+
$connection->beginTransaction();
|
22 |
+
$fields = array();
|
23 |
+
$fields['is_primary'] = 0;
|
24 |
+
$fields['is_secondary'] = 0;
|
25 |
+
$where = $connection->quoteInto('point_of_sell != ?', $pointOfSell);
|
26 |
+
$connection->update($this->getTable('payline/contract'), $fields, $where);
|
27 |
+
$connection->commit();
|
28 |
+
}
|
29 |
+
|
30 |
+
// Use fallback history pattern
|
31 |
+
public function updateContractSecureList($ids, $optionToSet, $website_code, $store_code)
|
32 |
+
{
|
33 |
+
if(!is_array($ids)) {
|
34 |
+
$ids = array($ids);
|
35 |
+
}
|
36 |
+
|
37 |
+
$contractOptions= array();
|
38 |
+
foreach($ids as $contractId) {
|
39 |
+
$contractOptions[$contractId] = array('is_secure'=>$optionToSet);
|
40 |
+
}
|
41 |
+
|
42 |
|
43 |
+
$this->updateOptionsContractList($contractOptions, $website_code, $store_code);
|
44 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
// Use fallback history pattern
|
47 |
+
public function updateContractWalletList($ids, $optionToSet, $website_code, $store_code)
|
48 |
+
{
|
49 |
if(!is_array($ids)) {
|
50 |
$ids = array($ids);
|
51 |
+
}
|
52 |
+
|
53 |
+
$contractOptions= array();
|
54 |
+
foreach($ids as $contractId) {
|
55 |
+
$contractOptions[$contractId] = array('is_included_wallet_list'=>$optionToSet);
|
56 |
+
}
|
57 |
+
|
58 |
+
$this->updateOptionsContractList($contractOptions, $website_code, $store_code);
|
59 |
+
}
|
60 |
+
|
61 |
+
// Use fallback history pattern
|
62 |
+
public function updateOptionsContractList($contractOptions, $website_code, $store_code)
|
63 |
+
{
|
64 |
+
|
65 |
+
$ids = array_keys($contractOptions);
|
66 |
|
67 |
$pointOfSell = $this->getPointOfSell($ids);
|
68 |
$otherContracts = $this->getContractsNotIn($pointOfSell);
|
71 |
$isDefaultLevel = false;
|
72 |
$isWebsiteLevel = false;
|
73 |
$isStoreViewLevel = false;
|
74 |
+
$connection = $this->_getWriteAdapter();
|
75 |
+
|
76 |
+
|
77 |
+
$keepOptionList=array('is_included_wallet_list','is_secure','is_primary','is_secondary');
|
78 |
|
79 |
// set store & website code
|
80 |
if(!$store_code) {
|
89 |
} else {
|
90 |
$isStoreViewLevel = true;
|
91 |
$storeIds = array(Mage::app()->getStore($store_code)->getId());
|
92 |
+
}
|
93 |
+
|
94 |
$connection->beginTransaction();
|
95 |
+
|
96 |
// process update
|
97 |
if($isDefaultLevel) {
|
98 |
// default level override son's options
|
100 |
$conditions[] = $connection->quoteInto('contract_id in (?)', $ids);
|
101 |
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
102 |
|
103 |
+
//Update contracts
|
104 |
+
foreach ($contractOptions as $id=>$optionToSet) {
|
105 |
+
$fields = $optionToSet;
|
106 |
+
$where = $connection->quoteInto('id in (?)', $id);
|
107 |
+
$connection->update($this->getTable('payline/contract'), $optionToSet, $where);
|
108 |
+
}
|
109 |
+
|
110 |
+
//Unset other options
|
111 |
+
$optionToUnsset = array_fill_keys(array_keys(current($contractOptions)), 0);
|
112 |
+
$connection->update($this->getTable('payline/contract'), $optionToUnsset, $connection->quoteInto('id not in (?)', array_keys($contractOptions)));
|
113 |
+
|
114 |
$count = Mage::getModel('payline/contract')->getCollection()->addFieldToFilter('is_primary',1)->getSize();
|
115 |
} else {
|
116 |
$contractStatusRModel = Mage::getResourceModel('payline/contract_status');
|
117 |
|
118 |
+
$conditionContract = 'contract_id in ('.implode(',',$ids).')';
|
119 |
+
$conditionLevel= '(';
|
120 |
+
if($isWebsiteLevel) $conditionLevel .= 'website_id = '. $websiteId . ' OR ';
|
121 |
+
$conditionLevel .= 'store_id in (' . implode(',',$storeIds) . '))';
|
122 |
|
123 |
// temporarily stock deleted rows to avoid is_primary and is_secondary data lost
|
124 |
+
$deletedRows = $contractStatusRModel->queryContractStatus($ids, $storeIds, $websiteId);
|
125 |
+
|
126 |
+
$connection->delete($this->getTable('payline/contract_status'), $conditionContract . ' AND ' . $conditionLevel);
|
127 |
+
|
128 |
+
//Unset other options
|
129 |
+
$optionToUnsset = array_fill_keys(array_keys(current($contractOptions)), 0);
|
130 |
+
$connection->update($this->getTable('payline/contract_status'), $optionToUnsset, $connection->quoteInto('contract_id not in (?)', array_keys($contractOptions)) . ' AND ' . $conditionLevel);
|
131 |
+
|
132 |
+
$fields=array();
|
133 |
$fields['is_primary'] = 0;
|
134 |
$fields['is_secondary'] = 0;
|
135 |
+
$fields['is_secure'] = 0;
|
136 |
+
$fields['is_included_wallet_list'] = 0;
|
137 |
+
|
138 |
+
foreach ($contractOptions as $id=>$optionToSet) {
|
139 |
if($isWebsiteLevel) {
|
140 |
$data = array(
|
141 |
+
'contract_id' => $id,
|
142 |
+
'website_id' => $websiteId,
|
143 |
+
'store_id' => null,
|
144 |
+
);
|
145 |
+
|
146 |
+
$data=array_merge($data, $fields, $optionToSet);
|
|
|
147 |
// time to restore deleted info (if needed)
|
148 |
+
$backup = $contractStatusRModel->getMatchingRowByKeys( $deletedRows, $data );
|
149 |
+
foreach($keepOptionList as $fieldToBackup) {
|
150 |
+
if(!array_key_exists($fieldToBackup, $optionToSet)) {
|
151 |
+
$data[$fieldToBackup] = $backup[$fieldToBackup];
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
$connection->insert($this->getTable('payline/contract_status'),$data);
|
156 |
}
|
157 |
foreach ($storeIds as $storeId) {
|
158 |
$data = array(
|
159 |
+
'contract_id' => $id,
|
160 |
+
'website_id' => null,
|
161 |
+
'store_id' => $storeId,
|
162 |
+
);
|
163 |
+
$data=array_merge($data, $fields, $optionToSet);
|
164 |
+
// time to restore deleted info (if needed)
|
165 |
+
$backup = $contractStatusRModel->getMatchingRowByKeys( $deletedRows, $data );
|
166 |
+
|
167 |
+
foreach($keepOptionList as $fieldToBackup) {
|
168 |
+
if(!array_key_exists($fieldToBackup, $optionToSet)) {
|
169 |
+
$data[$fieldToBackup] = $backup[$fieldToBackup];
|
170 |
+
}
|
171 |
+
}
|
172 |
$connection->insert($this->getTable('payline/contract_status'),$data);
|
173 |
}
|
174 |
+
}
|
|
|
|
|
|
|
175 |
|
176 |
if($isWebsiteLevel) {
|
177 |
$count= Mage::getModel('payline/contract_status')->getCollection()
|
178 |
+
->addFieldToFilter('is_primary',1)
|
179 |
+
->addFieldToFilter('store_id',$storeIds)
|
180 |
+
->getSize();
|
181 |
} else {
|
182 |
$count = Mage::getModel('payline/contract')->getCollection()->addFilterStatus(true,$storeId)->getSize();
|
183 |
}
|
187 |
|
188 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contracts modified successfully'));
|
189 |
|
190 |
+
} // end updateContractWalletList()
|
191 |
+
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Get the point of sell of contracts
|
195 |
+
* @param array $contract_ids
|
196 |
+
* @return string
|
197 |
+
*/
|
198 |
+
public function getPointOfSell($contract_ids) {
|
199 |
+
$read = $this->_getReadAdapter();
|
200 |
+
|
201 |
+
$select = $read->select()
|
202 |
+
->distinct()
|
203 |
+
->from($this->getTable('payline/contract'),array('point_of_sell'))
|
204 |
+
->where('id in (?)', $contract_ids);
|
205 |
+
|
206 |
+
$result = $select->query();
|
207 |
+
$row = $result->fetchAll();
|
208 |
+
return $row[0]['point_of_sell'];
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Get contract ids of contracts not int $pointOfSell
|
213 |
+
* @param string $pointOfSell
|
214 |
+
* @return array
|
215 |
+
*/
|
216 |
+
public function getContractsNotIn($pointOfSell) {
|
217 |
+
$read = $this->_getReadAdapter();
|
218 |
+
|
219 |
+
$select = $read->select()
|
220 |
+
->distinct()
|
221 |
+
->from($this->getTable('payline/contract'),array('id'))
|
222 |
+
->where('point_of_sell != ?', $pointOfSell);
|
223 |
+
|
224 |
+
$result = $select->query();
|
225 |
+
$row = $result->fetchAll();
|
226 |
+
$res = array();
|
227 |
+
foreach($row as $r) {
|
228 |
+
$res[] = $r['id'];
|
229 |
+
}
|
230 |
+
return $res;
|
231 |
+
}
|
232 |
+
|
233 |
+
} //end class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Monext/Payline/Model/Mysql4/Contract/Collection.php
CHANGED
@@ -1,81 +1,137 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
public function addFilterStatus($primary = false,$storeId = null)
|
14 |
-
{
|
15 |
-
if($storeId === null) return $this;
|
16 |
-
|
17 |
-
$this->getSelect()
|
18 |
-
->joinLeft(
|
19 |
-
array('status'=>$this->getTable('payline/contract_status')),
|
20 |
-
'`main_table`.`id`=`status`.`contract_id` AND `status`.`store_id`='.$storeId,
|
21 |
-
array());
|
22 |
-
|
23 |
-
if($primary) {
|
24 |
-
$this->getSelect()->where('status.is_primary = 1 or (status.is_primary is null and main_table.is_primary = 1)');
|
25 |
-
} else {
|
26 |
-
$this->getSelect()->where('status.is_secondary = 1 or (status.is_secondary is null and main_table.is_secondary = 1)');
|
27 |
-
}
|
28 |
-
|
29 |
-
$this->getSelect()->reset(Zend_Db_Select::COLUMNS)
|
30 |
-
->columns('id', 'main_table')
|
31 |
-
->columns('name', 'main_table')
|
32 |
-
->columns('number', 'main_table')
|
33 |
-
->columns('contract_type', 'main_table')
|
34 |
-
->columns('is_included_wallet_list', 'main_table')
|
35 |
-
->distinct();
|
36 |
-
|
37 |
-
return $this;
|
38 |
-
}
|
39 |
-
|
40 |
-
public function addStoreFilter($storeId = null)
|
41 |
-
{
|
42 |
-
if($storeId === null) return $this;
|
43 |
-
|
44 |
-
$this->getSelect()
|
45 |
-
->joinLeft(
|
46 |
-
array('status'=>$this->getTable('payline/contract_status')),
|
47 |
-
'`main_table`.`id`=`status`.`contract_id` AND `status`.`store_id`='.$storeId,
|
48 |
-
array())
|
49 |
-
->reset(Zend_Db_Select::COLUMNS)
|
50 |
-
->columns('id', 'main_table')
|
51 |
-
->columns('name', 'main_table')
|
52 |
-
->columns('number', 'main_table')
|
53 |
-
->columns('point_of_sell', 'main_table')
|
54 |
-
->columns(array('is_primary' => new Zend_Db_Expr('IFNULL(status.is_primary,main_table.is_primary)')), 'status')
|
55 |
-
->columns(array('is_secondary' => new Zend_Db_Expr('IFNULL(status.is_secondary,main_table.is_secondary)')), 'status')
|
56 |
-
->columns(array('is_included_wallet_list' => new Zend_Db_Expr('IFNULL(status.is_included_wallet_list,main_table.is_included_wallet_list)')), 'status');
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
->
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts collection
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Contract_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('payline/contract');
|
11 |
+
}
|
12 |
+
|
13 |
+
public function addFilterStatus($primary = false,$storeId = null)
|
14 |
+
{
|
15 |
+
if($storeId === null) return $this;
|
16 |
+
|
17 |
+
$this->getSelect()
|
18 |
+
->joinLeft(
|
19 |
+
array('status'=>$this->getTable('payline/contract_status')),
|
20 |
+
'`main_table`.`id`=`status`.`contract_id` AND `status`.`store_id`='.$storeId,
|
21 |
+
array());
|
22 |
+
|
23 |
+
if($primary) {
|
24 |
+
$this->getSelect()->where('status.is_primary = 1 or (status.is_primary is null and main_table.is_primary = 1)');
|
25 |
+
} else {
|
26 |
+
$this->getSelect()->where('status.is_secondary = 1 or (status.is_secondary is null and main_table.is_secondary = 1)');
|
27 |
+
}
|
28 |
+
|
29 |
+
$this->getSelect()->reset(Zend_Db_Select::COLUMNS)
|
30 |
+
->columns('id', 'main_table')
|
31 |
+
->columns('name', 'main_table')
|
32 |
+
->columns('number', 'main_table')
|
33 |
+
->columns('contract_type', 'main_table')
|
34 |
+
->columns('is_secure', 'main_table')
|
35 |
+
->columns('is_included_wallet_list', 'main_table')
|
36 |
+
->distinct();
|
37 |
+
|
38 |
+
return $this;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add a secure filter to retrieve 3DS contract
|
43 |
+
*
|
44 |
+
* @param bool $secure
|
45 |
+
* @param int $storeId
|
46 |
+
*
|
47 |
+
* @return Monext_Payline_Model_Mysql4_Contract_Collection
|
48 |
+
*/
|
49 |
+
public function addFilterSecure($secure = false,$storeId = null)
|
50 |
+
{
|
51 |
+
if($storeId === null) {
|
52 |
+
$storeId = Mage::app()->getStore()->getId();
|
53 |
+
}
|
54 |
|
55 |
+
$this->getSelect()
|
56 |
+
->joinLeft(
|
57 |
+
array('secure'=>$this->getTable('payline/contract_status')),
|
58 |
+
'`main_table`.`id`=`secure`.`contract_id` AND `secure`.`store_id`='.$storeId,
|
59 |
+
array());
|
60 |
|
61 |
+
if($secure) {
|
62 |
+
$this->getSelect()->where('secure.is_secure = 1 or (secure.is_secure is null and main_table.is_secure = 1)');
|
63 |
+
} else {
|
64 |
+
$this->getSelect()->where('secure.is_secure = 0 or (secure.is_secure is null and main_table.is_secure = 0)');
|
65 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
+
$this->getSelect()->reset(Zend_Db_Select::COLUMNS)
|
68 |
+
->columns('id', 'main_table')
|
69 |
+
->columns('name', 'main_table')
|
70 |
+
->columns('number', 'main_table')
|
71 |
+
->columns('contract_type', 'main_table')
|
72 |
+
->columns('is_secure', 'main_table')
|
73 |
+
->columns('is_included_wallet_list', 'main_table')
|
74 |
+
->distinct();
|
75 |
+
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
+
|
79 |
+
public function addStoreFilter($storeId = null)
|
80 |
+
{
|
81 |
+
if($storeId === null) return $this;
|
82 |
+
|
83 |
+
$this->getSelect()
|
84 |
+
->joinLeft(
|
85 |
+
array('status'=>$this->getTable('payline/contract_status')),
|
86 |
+
'`main_table`.`id`=`status`.`contract_id` AND `status`.`store_id`='.$storeId,
|
87 |
+
array())
|
88 |
+
->reset(Zend_Db_Select::COLUMNS)
|
89 |
+
->columns('id', 'main_table')
|
90 |
+
->columns('name', 'main_table')
|
91 |
+
->columns('number', 'main_table')
|
92 |
+
->columns('point_of_sell', 'main_table')
|
93 |
+
->columns(array('is_primary' => new Zend_Db_Expr('IFNULL(status.is_primary,main_table.is_primary)')), 'status')
|
94 |
+
->columns(array('is_secondary' => new Zend_Db_Expr('IFNULL(status.is_secondary,main_table.is_secondary)')), 'status')
|
95 |
+
->columns(array('is_secure' => new Zend_Db_Expr('IFNULL(status.is_secure,main_table.is_secure)')), 'status')
|
96 |
+
->columns(array('is_included_wallet_list' => new Zend_Db_Expr('IFNULL(status.is_included_wallet_list,main_table.is_included_wallet_list)')), 'status');
|
97 |
+
|
98 |
+
return $this;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function addWebsiteFilter($websiteId = null)
|
102 |
+
{
|
103 |
+
if($websiteId === null) return $this;
|
104 |
+
|
105 |
+
$this->getSelect()
|
106 |
+
->joinLeft(
|
107 |
+
array('status'=>$this->getTable('payline/contract_status')),
|
108 |
+
'`main_table`.`id`=`status`.`contract_id` AND `status`.`website_id`='.$websiteId,
|
109 |
+
array())
|
110 |
+
->reset(Zend_Db_Select::COLUMNS)
|
111 |
+
->columns('id', 'main_table')
|
112 |
+
->columns('name', 'main_table')
|
113 |
+
->columns('number', 'main_table')
|
114 |
+
->columns('point_of_sell', 'main_table')
|
115 |
+
->columns(array('is_primary' => new Zend_Db_Expr('IFNULL(status.is_primary,main_table.is_primary)')), 'status')
|
116 |
+
->columns(array('is_secondary' => new Zend_Db_Expr('IFNULL(status.is_secondary,main_table.is_secondary)')), 'status')
|
117 |
+
->columns(array('is_secure' => new Zend_Db_Expr('IFNULL(status.is_secure,main_table.is_secure)')), 'status')
|
118 |
+
->columns(array('is_included_wallet_list' => new Zend_Db_Expr('IFNULL(status.is_included_wallet_list,main_table.is_included_wallet_list)')), 'status');
|
119 |
+
|
120 |
+
return $this;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Convert items array to hash for select options
|
125 |
+
*
|
126 |
+
* return items hash
|
127 |
+
* array($value => $label)
|
128 |
+
*
|
129 |
+
* @param string $valueField
|
130 |
+
* @param string $labelField
|
131 |
+
* @return array
|
132 |
+
*/
|
133 |
+
public function toOptionHashByContractTypes()
|
134 |
+
{
|
135 |
+
return parent::_toOptionHash('id', 'contract_type');
|
136 |
+
}
|
137 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Contract/Status.php
CHANGED
@@ -1,269 +1,279 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline contracts status resource model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Contract_Status extends Mage_Core_Model_Mysql4_Abstract
|
8 |
-
{
|
9 |
-
|
10 |
-
{
|
11 |
-
$this->_init('payline/contract_status', 'id');
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
$backup = $this->getMatchingRowByKeys(
|
97 |
-
if(
|
98 |
-
$data['is_included_wallet_list'] = $backup['is_included_wallet_list'];
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
$
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
'
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
*
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
$
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts status resource model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Contract_Status extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('payline/contract_status', 'id');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Update contract status by scope
|
16 |
+
* @param type $ids
|
17 |
+
* @param type $status
|
18 |
+
* @param type $website
|
19 |
+
* @param type $store
|
20 |
+
* @return type
|
21 |
+
*/
|
22 |
+
public function updateContractStatus($ids,$status,$website_code,$store_code)
|
23 |
+
{
|
24 |
+
if(!is_array($ids)) {
|
25 |
+
$ids = array($ids);
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
$pointOfSell = $this->getPointOfSell($ids);
|
30 |
+
$otherContracts = $this->getContractsNotIn($pointOfSell);
|
31 |
+
$storeIds = array();
|
32 |
+
$websiteId = null;
|
33 |
+
$isDefaultLevel = false;
|
34 |
+
$isWebsiteLevel = false;
|
35 |
+
$isStoreViewLevel= false;
|
36 |
+
|
37 |
+
if(!$store_code) {
|
38 |
+
if($website_code) {
|
39 |
+
$isWebsiteLevel = true;
|
40 |
+
$website = Mage::app()->getWebsite($website_code);
|
41 |
+
$websiteId = $website->getId();
|
42 |
+
$storeIds = $website->getStoreIds();
|
43 |
+
} else {
|
44 |
+
$isDefaultLevel = true;
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
$isStoreViewLevel = true;
|
48 |
+
$storeIds = array(Mage::app()->getStore($store_code)->getId());
|
49 |
+
}
|
50 |
+
$connection = $this->_getWriteAdapter();
|
51 |
+
$connection->beginTransaction();
|
52 |
+
$fields = array();
|
53 |
+
switch($status) {
|
54 |
+
case 0:
|
55 |
+
$fields['is_primary'] = 1; $fields['is_secondary'] = 0;
|
56 |
+
break;
|
57 |
+
case 1:
|
58 |
+
$fields['is_primary'] = 0; $fields['is_secondary'] = 1;
|
59 |
+
break;
|
60 |
+
case 2:
|
61 |
+
$fields['is_primary'] = 1; $fields['is_secondary'] = 1;
|
62 |
+
break;
|
63 |
+
case 3:
|
64 |
+
$fields['is_primary'] = 0; $fields['is_secondary'] = 0;
|
65 |
+
break;
|
66 |
+
default :
|
67 |
+
$fields['is_primary'] = 0; $fields['is_secondary'] = 0;
|
68 |
+
}
|
69 |
+
|
70 |
+
if($isDefaultLevel) {
|
71 |
+
$conditions = array();
|
72 |
+
$conditions[] = $connection->quoteInto('contract_id in (?)', $ids);
|
73 |
+
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
74 |
+
|
75 |
+
$where = $connection->quoteInto('id in (?)', $ids);
|
76 |
+
$connection->update($this->getTable('payline/contract'), $fields, $where);
|
77 |
+
|
78 |
+
$this->resetContractStatus($connection, 0, $otherContracts, $websiteId, $storeIds);
|
79 |
+
|
80 |
+
$count = Mage::getModel('payline/contract')->getCollection()->addFieldToFilter('is_primary',1)->getSize();
|
81 |
+
} else {
|
82 |
+
$conditions = 'contract_id in ('.implode(',',$ids).') AND (';
|
83 |
+
if($isWebsiteLevel) $conditions .= 'website_id = '. $websiteId . ' OR ';
|
84 |
+
$conditions .= 'store_id in (' . implode(',',$storeIds) . '))';
|
85 |
+
$deletedRows = $this->queryContractStatus($ids, $storeIds, $websiteId);
|
86 |
+
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
87 |
+
foreach ($ids as $id) {
|
88 |
+
if ($isWebsiteLevel) {
|
89 |
+
$data = array(
|
90 |
+
'contract_id' => $id,
|
91 |
+
'website_id' => $websiteId,
|
92 |
+
'store_id' => null,
|
93 |
+
'is_primary' => $fields['is_primary'],
|
94 |
+
'is_secondary' => $fields['is_secondary']
|
95 |
+
);
|
96 |
+
$backup = $this->getMatchingRowByKeys($deletedRows, $data);
|
97 |
+
if ($backup) {
|
98 |
+
$data['is_included_wallet_list'] = $backup['is_included_wallet_list'];
|
99 |
+
$data['is_secure'] = $backup['is_secure'];
|
100 |
+
}
|
101 |
+
$connection->insert($this->getTable('payline/contract_status'), $data);
|
102 |
+
}
|
103 |
+
foreach ($storeIds as $storeId) {
|
104 |
+
$data = array(
|
105 |
+
'contract_id' => $id,
|
106 |
+
'store_id' => $storeId,
|
107 |
+
'website_id' => null,
|
108 |
+
'is_primary' => $fields['is_primary'],
|
109 |
+
'is_secondary' => $fields['is_secondary']
|
110 |
+
);
|
111 |
+
$backup = $this->getMatchingRowByKeys($deletedRows, $data);
|
112 |
+
if ($backup) {
|
113 |
+
$data['is_included_wallet_list'] = $backup['is_included_wallet_list'];
|
114 |
+
$data['is_secure'] = $backup['is_secure'];
|
115 |
+
}
|
116 |
+
$connection->insert($this->getTable('payline/contract_status'), $data);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
$this->resetContractStatus($connection, ($isWebsiteLevel ? 2 : 3), $otherContracts, $websiteId, $storeIds);
|
121 |
+
|
122 |
+
if($isWebsiteLevel) {
|
123 |
+
$count= Mage::getModel('payline/contract_status')->getCollection()
|
124 |
+
->addFieldToFilter('is_primary',1)
|
125 |
+
->addFieldToFilter('store_id',$storeIds)
|
126 |
+
->getSize();
|
127 |
+
} else {
|
128 |
+
$count = Mage::getModel('payline/contract')->getCollection()->addFilterStatus(true,$storeId)->getSize();
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
//at least one contract must be primary
|
133 |
+
if(!$count) {
|
134 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('payline')->__('At leat one contract must be primary'));
|
135 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('payline')->__('Please set a primary contract beforefor this point of sell'));
|
136 |
+
return;
|
137 |
+
}
|
138 |
+
|
139 |
+
$connection->commit();
|
140 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contracts modified successfully'));
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Reset contract status for contracts that are not in $pointOfSell
|
145 |
+
*
|
146 |
+
* @param type $connection
|
147 |
+
* @param type $level
|
148 |
+
* @param type $ids
|
149 |
+
* @param type $websiteId
|
150 |
+
* @param type $storeIds
|
151 |
+
*/
|
152 |
+
public function resetContractStatus($connection,$level,$ids,$websiteId,$storeIds) {
|
153 |
+
|
154 |
+
if(empty($ids)) {
|
155 |
+
return;
|
156 |
+
}
|
157 |
+
|
158 |
+
$fields = array();
|
159 |
+
$fields['is_primary'] = 0;
|
160 |
+
$fields['is_secondary'] = 0;
|
161 |
+
if($level == 0) {
|
162 |
+
$conditions = array();
|
163 |
+
$conditions[] = $connection->quoteInto('contract_id in (?)', $ids);
|
164 |
+
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
165 |
+
|
166 |
+
$where = $connection->quoteInto('id in (?)', $ids);
|
167 |
+
$connection->update($this->getTable('payline/contract'), $fields, $where);
|
168 |
+
} else {
|
169 |
+
$conditions = 'contract_id in ('.implode(',',$ids).') AND (';
|
170 |
+
if($level == 2) $conditions .= 'website_id = '. $websiteId . ' OR ';
|
171 |
+
$conditions .= 'store_id in (' . implode(',',$storeIds) . '))';
|
172 |
+
$deletedRows = $this->queryContractStatus($ids, $storeIds, $websiteId);
|
173 |
+
|
174 |
+
$connection->delete($this->getTable('payline/contract_status'),$conditions);
|
175 |
+
foreach ($ids as $id) {
|
176 |
+
if ($level == 2) {
|
177 |
+
$data = array(
|
178 |
+
'contract_id' => $id,
|
179 |
+
'website_id' => $websiteId,
|
180 |
+
'store_id' => null,
|
181 |
+
'is_primary' => $fields['is_primary'],
|
182 |
+
'is_secondary' => $fields['is_secondary']
|
183 |
+
);
|
184 |
+
$backup = $this->getMatchingRowByKeys($deletedRows, $data);
|
185 |
+
if ($backup) {
|
186 |
+
$data['is_included_wallet_list'] = $backup['is_included_wallet_list'];
|
187 |
+
$data['is_secure'] = $backup['is_secure'];
|
188 |
+
}
|
189 |
+
$connection->insert($this->getTable('payline/contract_status'), $data);
|
190 |
+
}
|
191 |
+
foreach ($storeIds as $storeId) {
|
192 |
+
$data = array(
|
193 |
+
'contract_id' => $id,
|
194 |
+
'store_id' => $storeId,
|
195 |
+
'website_id' => null,
|
196 |
+
'is_primary' => $fields['is_primary'],
|
197 |
+
'is_secondary' => $fields['is_secondary']
|
198 |
+
);
|
199 |
+
$backup = $this->getMatchingRowByKeys($deletedRows, $data);
|
200 |
+
if ($backup) {
|
201 |
+
$data['is_included_wallet_list'] = $backup['is_included_wallet_list'];
|
202 |
+
$data['is_secure'] = $backup['is_secure'];
|
203 |
+
}
|
204 |
+
$connection->insert($this->getTable('payline/contract_status'), $data);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Get contract ids of contracts not int $pointOfSell
|
213 |
+
* @param string $pointOfSell
|
214 |
+
* @return array
|
215 |
+
*/
|
216 |
+
public function getContractsNotIn($pointOfSell) {
|
217 |
+
return Mage::getResourceModel('payline/contract')->getContractsNotIn( $pointOfSell );
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Get the point of sell of contracts
|
223 |
+
* @param array $contract_ids
|
224 |
+
* @return string
|
225 |
+
*/
|
226 |
+
public function getPointOfSell($contract_ids) {
|
227 |
+
return Mage::getResourceModel('payline/contract')->getPointOfSell( $contract_ids );
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Return contract_status rows by contract ids, store ids and website id
|
232 |
+
* @param $contractIds {array} contain n contract_status.contract_id
|
233 |
+
* @param $storeIds {array} contain n contact_status.store_id
|
234 |
+
* @param $websiteId {int} website id
|
235 |
+
* @return {array} Return an array of rows returned by the query
|
236 |
+
*/
|
237 |
+
public function queryContractStatus($contractIds, $storeIds, $websiteId)
|
238 |
+
{
|
239 |
+
$read = $this->_getReadAdapter();
|
240 |
+
$select = $read
|
241 |
+
->select()
|
242 |
+
->from( $this->getTable('payline/contract_status') );
|
243 |
+
|
244 |
+
$condition = 'contract_id IN ('. implode(',',$contractIds) .') AND (';
|
245 |
+
if( isset( $websiteId ) ) {
|
246 |
+
$condition .= 'website_id='.$websiteId.' OR ';
|
247 |
+
}
|
248 |
+
$condition .= 'store_id IN ('. implode(',', $storeIds) . ') )';
|
249 |
+
|
250 |
+
$select->where( $condition );
|
251 |
+
|
252 |
+
return $select->query()->fetchAll();
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Return the matching array $matchMe in $rows.
|
257 |
+
*The match is done by checking the contract_status db table keys
|
258 |
+
* @param $rows
|
259 |
+
* @param $matchMe
|
260 |
+
* @return array The matching array or false
|
261 |
+
*/
|
262 |
+
public function getMatchingRowByKeys($rows, $matchMe)
|
263 |
+
{
|
264 |
+
$matchCounter = 0;
|
265 |
+
foreach( $rows as $row ) {
|
266 |
+
if( $row['contract_id'] == $matchMe['contract_id'] ) {
|
267 |
+
$matchCounter++;
|
268 |
+
$matchCounter = $row['store_id'] == $matchMe['store_id'] ? $matchCounter + 1 : $matchCounter;
|
269 |
+
$matchCounter = $row['website_id'] == $matchMe['website_id'] ? $matchCounter + 1 : $matchCounter;
|
270 |
+
}
|
271 |
+
|
272 |
+
if( $matchCounter == 3 ) {return $row; }
|
273 |
+
else { $matchCounter = 0; }
|
274 |
+
}
|
275 |
+
// no match
|
276 |
+
return false;
|
277 |
+
}
|
278 |
+
|
279 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Contract/Status/Collection.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline contracts status collection
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Contract_Status_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
-
{
|
9 |
-
public function _construct() {
|
10 |
-
$this->_init('payline/contract_status');
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline contracts status collection
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Contract_Status_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('payline/contract_status');
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
app/code/community/Monext/Payline/Model/Mysql4/Fees.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline nx fees resource model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Fees extends Mage_Core_Model_Mysql4_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
$this->_init('payline/fees', 'id');
|
12 |
-
}
|
13 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline nx fees resource model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Fees extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('payline/fees', 'id');
|
12 |
+
}
|
13 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Fees/Collection.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline nx fees collection
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Fees_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
-
{
|
9 |
-
public function _construct() {
|
10 |
-
$this->_init('payline/fees');
|
11 |
-
}
|
12 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline nx fees collection
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Fees_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('payline/fees');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Productcategories.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline product categories resource model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Productcategories extends Mage_Core_Model_Mysql4_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
$this->_init('payline/productcategories', 'id');
|
12 |
-
}
|
13 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline product categories resource model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Productcategories extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('payline/productcategories', 'id');
|
12 |
+
}
|
13 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Productcategories/Collection.php
CHANGED
@@ -1,27 +1,35 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline product categories collection
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Productcategories_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
-
{
|
9 |
-
public function _construct() {
|
10 |
-
$this->_init('payline/productcategories');
|
11 |
-
}
|
12 |
-
|
13 |
-
public function getAssignedPaylineCatId($storeCatId){
|
14 |
-
$assignmentData = $this->getData();
|
15 |
-
$continue = true;
|
16 |
-
$n=0;
|
17 |
-
$paylineCatId = null;
|
18 |
-
while($continue){
|
19 |
-
if($assignmentData[$n]['store_category_id'] == $storeCatId){
|
20 |
-
$paylineCatId = $assignmentData[$n]['payline_category_id'];
|
21 |
-
$continue = false;
|
22 |
-
}
|
23 |
-
$n++;
|
24 |
-
}
|
25 |
-
return $paylineCatId;
|
26 |
-
}
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline product categories collection
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Productcategories_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('payline/productcategories');
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getAssignedPaylineCatId($storeCatId){
|
14 |
+
$assignmentData = $this->getData();
|
15 |
+
$continue = true;
|
16 |
+
$n=0;
|
17 |
+
$paylineCatId = null;
|
18 |
+
while($continue){
|
19 |
+
if($assignmentData[$n]['store_category_id'] == $storeCatId){
|
20 |
+
$paylineCatId = $assignmentData[$n]['payline_category_id'];
|
21 |
+
$continue = false;
|
22 |
+
}
|
23 |
+
$n++;
|
24 |
+
}
|
25 |
+
return $paylineCatId;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function addStoreFilter($storeId = null)
|
29 |
+
{
|
30 |
+
if($storeId === null)
|
31 |
+
return $this;
|
32 |
+
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Token.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline token resource model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Token extends Mage_Core_Model_Mysql4_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
$this->_init('payline/token', 'id');
|
12 |
-
}
|
13 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline token resource model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Token extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
$this->_init('payline/token', 'id');
|
12 |
+
}
|
13 |
+
}
|
app/code/community/Monext/Payline/Model/Mysql4/Token/Collection.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline token collection
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Mysql4_Token_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
-
{
|
9 |
-
public function _construct() {
|
10 |
-
$this->_init('payline/token');
|
11 |
-
}
|
12 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline token collection
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Mysql4_Token_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct() {
|
10 |
+
$this->_init('payline/token');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Monext/Payline/Model/Nx.php
CHANGED
File without changes
|
app/code/community/Monext/Payline/Model/Observer.php
CHANGED
@@ -1,326 +1,523 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Model_Observer
|
4 |
-
{
|
5 |
-
|
6 |
-
protected $_mode;
|
7 |
-
|
8 |
-
public function createInvoiceWhenStatusChange(Varien_Event_Observer $observer)
|
9 |
-
{
|
10 |
-
// Only if the payment method is one of Payline
|
11 |
-
$code = $observer->getOrder()->getPayment()->getMethodInstance()->getCode();
|
12 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
|
16 |
-
// infinite loop protection
|
17 |
-
if (is_null(Mage::registry('payline_create_invoice'))) {
|
18 |
-
$order = $observer->getEvent()->getOrder();
|
19 |
-
if ($this->_canCreateInvoice($order)) {
|
20 |
-
$this->_createInvoice($order);
|
21 |
-
}
|
22 |
-
// capture or not, that is the question
|
23 |
-
$paymentMethod = $order->getPayment()->getMethod();
|
24 |
-
$paymentActionConf = Mage::getStoreConfig('payment/' . $paymentMethod . '/payline_payment_action');
|
25 |
-
// if payment action user conf == authorization => need to capture
|
26 |
-
if ($paymentActionConf == "100") {
|
27 |
-
$fireCaptureOption = Mage::getStoreConfig('payment/' . $paymentMethod . '/capture_payment_when_i_said');
|
28 |
-
// if status match w/ user conf && !PaylineNX
|
29 |
-
if ($order->getStatus() == $fireCaptureOption && $paymentMethod != 'PaylineNX') {
|
30 |
-
$invoice = $this->_getInvoiceFromOrder($order);
|
31 |
-
if ($invoice) {
|
32 |
-
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
|
33 |
-
}
|
34 |
-
if ($invoice && $invoice->parentCanCapture()) { // invoice present && ok => capture
|
35 |
-
Mage::register('payline_create_invoice', true);
|
36 |
-
$invoice->capture();
|
37 |
-
Mage::unregister('payline_create_invoice');
|
38 |
-
}
|
39 |
-
} // end if status matches
|
40 |
-
} // end if( $paymentActionConf == 100 )
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
// end createInvoiceWhenStatusChange()
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Return the invoice's order data or false if not exist or NX payment
|
48 |
-
*/
|
49 |
-
protected function _getInvoiceFromOrder($order)
|
50 |
-
{
|
51 |
-
$invoice = $order->getInvoiceCollection();
|
52 |
-
$invoice = sizeof($invoice) == 1 ? $invoice->getFirstItem() : false;
|
53 |
-
return $invoice;
|
54 |
-
}
|
55 |
-
|
56 |
-
protected function _getMode($order)
|
57 |
-
{
|
58 |
-
if ($this->_mode === null) {
|
59 |
-
$paymentMethod = $order->getPayment()->getMethod();
|
60 |
-
$mode = explode('Payline', $paymentMethod);
|
61 |
-
if (isset($mode[1])) {
|
62 |
-
$mode = $mode[1];
|
63 |
-
$this->_mode = $mode;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
return $this->_mode;
|
67 |
-
}
|
68 |
-
|
69 |
-
protected function _canCreateInvoice($order)
|
70 |
-
{
|
71 |
-
$result = false;
|
72 |
-
if ($order->canInvoice()) {
|
73 |
-
$paymentMethod = $order->getPayment()->getMethod();
|
74 |
-
if (strstr($paymentMethod, 'Payline') !== false) {
|
75 |
-
$mode = $this->_getMode($order);
|
76 |
-
if (!empty($mode)) {
|
77 |
-
$statusToCreateInvoice = Mage::getStoreConfig('payment/' . $paymentMethod . '/automate_invoice_creation');
|
78 |
-
if ($order->getStatus() == $statusToCreateInvoice && !empty($statusToCreateInvoice)) {
|
79 |
-
if ($order->getData('status') !== $order->getOrigData('status')) {
|
80 |
-
$result = true;
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
return $result;
|
87 |
-
}
|
88 |
-
|
89 |
-
protected function _createInvoice($order)
|
90 |
-
{
|
91 |
-
$transId = $order->getPayment()->getCcTransId();
|
92 |
-
if (!empty($transId)) {
|
93 |
-
$array = array(
|
94 |
-
'transactionId' => $transId,
|
95 |
-
'orderRef' => $order->getRealOrderId(),
|
96 |
-
'startDate' => '',
|
97 |
-
'endDate' => '',
|
98 |
-
'transactionHistory' => '',
|
99 |
-
'version' => Monext_Payline_Helper_Data::VERSION,
|
100 |
-
'archiveSearch' => ''
|
101 |
-
);
|
102 |
-
try {
|
103 |
-
$mode = $this->_getMode($order);
|
104 |
-
$res = Mage::helper('payline')->initPayline($mode)->getTransactionDetails($array);
|
105 |
-
if (isset($res['payment']['action'])) {
|
106 |
-
$order->setCreateInvoice(true);
|
107 |
-
$action = $res['payment']['action'];
|
108 |
-
if ($mode == 'NX') {
|
109 |
-
$action = Monext_Payline_Model_Cpt::ACTION_AUTH_CAPTURE;
|
110 |
-
}
|
111 |
-
Mage::helper('payline')->createInvoice($action, $order);
|
112 |
-
}
|
113 |
-
} catch (Exception $e) {
|
114 |
-
Mage::logException($e);
|
115 |
-
Mage::helper('payline/logger')->log(
|
116 |
-
'[createInvoiceWhenStatusChange] '
|
117 |
-
. '[' . $order->getIncrementId() . '] '
|
118 |
-
. '[' . $transId . '] '
|
119 |
-
. $e->getMessage()
|
120 |
-
);
|
121 |
-
}
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
public function saveQuoteNxFees(Varien_Event_Observer $observer)
|
126 |
-
{
|
127 |
-
// Only if the payment method is one of Payline
|
128 |
-
$code = $observer->getQuote()->getPayment()->getMethod();
|
129 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
130 |
-
return;
|
131 |
-
}
|
132 |
-
|
133 |
-
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
134 |
-
if (!$applyCosts) {
|
135 |
-
return;
|
136 |
-
}
|
137 |
-
|
138 |
-
$quote = $observer->getEvent()->getQuote();
|
139 |
-
|
140 |
-
if (!$quote->getPaylineFee()) {
|
141 |
-
$payment = $quote->getPayment();
|
142 |
-
if ($payment) {
|
143 |
-
$paymentMethod = $payment->getMethod();
|
144 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
145 |
-
->addFieldtoFilter('quote_id', $quote->getId())->getFirstItem();
|
146 |
-
$quote->setPaylineFee($fee);
|
147 |
-
if ($paymentMethod == 'PaylineNX') {
|
148 |
-
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
149 |
-
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
150 |
-
|
151 |
-
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
152 |
-
$amount = round(($quote->getSubtotal() * $amount) / 100, 2);
|
153 |
-
$baseamount = round(($quote->getBaseSubtotal() * $baseamount) / 100, 2);
|
154 |
-
}
|
155 |
-
|
156 |
-
//save fees
|
157 |
-
if ($fee->getId()) {
|
158 |
-
$fee->setAmount($amount)->setBaseAmount($baseamount)->save();
|
159 |
-
} else {
|
160 |
-
Mage::getModel('payline/fees')->setQuoteId($quote->getId())
|
161 |
-
->setAmount($amount)
|
162 |
-
->setBaseAmount($baseamount)
|
163 |
-
->save();
|
164 |
-
}
|
165 |
-
} elseif ($fee->getId()) {
|
166 |
-
$fee->delete();
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
}
|
171 |
-
|
172 |
-
public function saveOrderNxFees(Varien_Event_Observer $observer)
|
173 |
-
{
|
174 |
-
// Only if the payment method is one of Payline
|
175 |
-
$code = $observer->getOrder()->getPayment()->getMethodInstance()->getCode();
|
176 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
177 |
-
return;
|
178 |
-
}
|
179 |
-
|
180 |
-
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
181 |
-
if (!$applyCosts) {
|
182 |
-
return;
|
183 |
-
}
|
184 |
-
|
185 |
-
$order = $observer->getEvent()->getOrder();
|
186 |
-
if (!$order->getPaylineFee()) {
|
187 |
-
$quoteId = $order->getQuoteId();
|
188 |
-
$payment = $order->getPayment();
|
189 |
-
if ($quoteId && $payment) {
|
190 |
-
$paymentMethod = $payment->getMethod();
|
191 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
192 |
-
->addFieldtoFilter('quote_id', $quoteId)->getFirstItem();
|
193 |
-
$order->setPaylineFee($fee);
|
194 |
-
if ($paymentMethod == 'PaylineNX') {
|
195 |
-
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
196 |
-
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
197 |
-
|
198 |
-
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
199 |
-
$amount = round(($order->getSubtotal() * $amount) / 100, 2);
|
200 |
-
$baseamount = round(($order->getBaseSubtotal() * $baseamount) / 100, 2);
|
201 |
-
}
|
202 |
-
|
203 |
-
//save fees
|
204 |
-
if ($fee->getId()) {
|
205 |
-
$fee->setOrderId($order->getId())->setAmount($amount)->setBaseAmount($baseamount)->save();
|
206 |
-
}
|
207 |
-
} elseif ($fee->getId()) {
|
208 |
-
$fee->delete();
|
209 |
-
}
|
210 |
-
}
|
211 |
-
}
|
212 |
-
}
|
213 |
-
|
214 |
-
public function saveInvoiceNxFees(Varien_Event_Observer $observer)
|
215 |
-
{
|
216 |
-
// Only if the payment method is one of Payline
|
217 |
-
$code = $observer->getInvoice()->getOrder()->getPayment()->getMethodInstance()->getCode();
|
218 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
219 |
-
return;
|
220 |
-
}
|
221 |
-
|
222 |
-
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
223 |
-
if (!$applyCosts) {
|
224 |
-
return;
|
225 |
-
}
|
226 |
-
|
227 |
-
$invoice = $observer->getEvent()->getInvoice();
|
228 |
-
$order = $invoice->getOrder();
|
229 |
-
$payment = $order->getPayment();
|
230 |
-
if ($payment) {
|
231 |
-
$paymentMethod = $payment->getMethod();
|
232 |
-
if ($paymentMethod == 'PaylineNX') {
|
233 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
234 |
-
->addFieldtoFilter('order_id', $order->getId())->getFirstItem();
|
235 |
-
|
236 |
-
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
237 |
-
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
238 |
-
|
239 |
-
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
240 |
-
$amount = round(($order->getSubtotal() * $amount) / 100, 2);
|
241 |
-
$baseamount = round(($order->getBaseSubtotal() * $baseamount) / 100, 2);
|
242 |
-
}
|
243 |
-
|
244 |
-
//save fees
|
245 |
-
if ($fee->getId() && !$fee->getInvoiceId()) {
|
246 |
-
$fee->setInvoiceId($invoice->getId())->save();
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
}
|
251 |
-
|
252 |
-
public function afterSaveShippingAction(Varien_Event_Observer $observer)
|
253 |
-
{
|
254 |
-
$controller = $observer->getControllerAction();
|
255 |
-
|
256 |
-
$paymentMethodsBlock = $controller->getLayout()->createBlock('checkout/onepage_payment_methods');
|
257 |
-
$methods = $paymentMethodsBlock->getMethods();
|
258 |
-
|
259 |
-
// check if more than one methods available
|
260 |
-
if (count($methods) != 1) {
|
261 |
-
return;
|
262 |
-
}
|
263 |
-
|
264 |
-
$method = current($methods);
|
265 |
-
|
266 |
-
// check if only payline methods (direct method should not be skipped)
|
267 |
-
if (!in_array($method->getCode(), array('PaylineCPT', 'PaylineNX', 'PaylineWALLET'))) {
|
268 |
-
return;
|
269 |
-
}
|
270 |
-
|
271 |
-
$data = array('method' => $method->getCode());
|
272 |
-
|
273 |
-
if ($method->getCode() == 'PaylineCPT') {
|
274 |
-
// retrive sub methods (card types)
|
275 |
-
$cptBlock = $controller->getLayout()->createBlock('payline/cpt');
|
276 |
-
$ccTypes = $cptBlock->getPaymentMethods();
|
277 |
-
if (count($ccTypes) != 1) {
|
278 |
-
return;
|
279 |
-
}
|
280 |
-
$ccType = current($ccTypes);
|
281 |
-
$data['cc_type'] = $ccType['number'];
|
282 |
-
}
|
283 |
-
|
284 |
-
// seems that payment step can be skipped, so save the unique payment method now
|
285 |
-
$result = Mage::getSingleton('checkout/type_onepage')->savePayment($data);
|
286 |
-
if (!empty($result['error'])) {
|
287 |
-
return;
|
288 |
-
}
|
289 |
-
|
290 |
-
$layout = Mage::getModel('core/layout');
|
291 |
-
$layout->getUpdate()->load('checkout_onepage_review');
|
292 |
-
$layout->generateXml()->generateBlocks();
|
293 |
-
$layout->getBlock('root')->getChild('button')->setTemplate('checkout/onepage/review/button.phtml');
|
294 |
-
$reviewHtml = $layout->getBlock('root')->toHtml();
|
295 |
-
|
296 |
-
$result['goto_section'] = 'review';
|
297 |
-
$result['update_section'] = array(
|
298 |
-
'name' => 'review',
|
299 |
-
'html' => $reviewHtml
|
300 |
-
);
|
301 |
-
|
302 |
-
$json = Mage::helper('core')->jsonEncode($result);
|
303 |
-
$response = Mage::helper('core')->jsonDecode($controller->getResponse()->getBody());
|
304 |
-
|
305 |
-
$response['update_section']['html'].= '<script type="text/javascript">
|
306 |
-
//<![CDATA[
|
307 |
-
paylinePaymentSavedTransport = ' . $json . ';
|
308 |
-
paylineTrySkipPaymentMethod();
|
309 |
-
//]]>
|
310 |
-
</script>';
|
311 |
-
|
312 |
-
|
313 |
-
$controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Clean payline
|
318 |
-
* @see customer_logout
|
319 |
-
*/
|
320 |
-
public function cleanPayline(Varien_Event_Observer $observer)
|
321 |
-
{
|
322 |
-
// Clean the wallet
|
323 |
-
Mage::getSingleton('payline/wallet')->clean();
|
324 |
-
}
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Observer
|
4 |
+
{
|
5 |
+
|
6 |
+
protected $_mode;
|
7 |
+
|
8 |
+
public function createInvoiceWhenStatusChange(Varien_Event_Observer $observer)
|
9 |
+
{
|
10 |
+
// Only if the payment method is one of Payline
|
11 |
+
$code = $observer->getOrder()->getPayment()->getMethodInstance()->getCode();
|
12 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
|
16 |
+
// infinite loop protection
|
17 |
+
if (is_null(Mage::registry('payline_create_invoice'))) {
|
18 |
+
$order = $observer->getEvent()->getOrder();
|
19 |
+
if ($this->_canCreateInvoice($order)) {
|
20 |
+
$this->_createInvoice($order);
|
21 |
+
}
|
22 |
+
// capture or not, that is the question
|
23 |
+
$paymentMethod = $order->getPayment()->getMethod();
|
24 |
+
$paymentActionConf = Mage::getStoreConfig('payment/' . $paymentMethod . '/payline_payment_action');
|
25 |
+
// if payment action user conf == authorization => need to capture
|
26 |
+
if ($paymentActionConf == "100") {
|
27 |
+
$fireCaptureOption = Mage::getStoreConfig('payment/' . $paymentMethod . '/capture_payment_when_i_said');
|
28 |
+
// if status match w/ user conf && !PaylineNX
|
29 |
+
if ($order->getStatus() == $fireCaptureOption && $paymentMethod != 'PaylineNX') {
|
30 |
+
$invoice = $this->_getInvoiceFromOrder($order);
|
31 |
+
if ($invoice) {
|
32 |
+
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
|
33 |
+
}
|
34 |
+
if ($invoice && $invoice->parentCanCapture()) { // invoice present && ok => capture
|
35 |
+
Mage::register('payline_create_invoice', true);
|
36 |
+
$invoice->capture();
|
37 |
+
Mage::unregister('payline_create_invoice');
|
38 |
+
}
|
39 |
+
} // end if status matches
|
40 |
+
} // end if( $paymentActionConf == 100 )
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// end createInvoiceWhenStatusChange()
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Return the invoice's order data or false if not exist or NX payment
|
48 |
+
*/
|
49 |
+
protected function _getInvoiceFromOrder($order)
|
50 |
+
{
|
51 |
+
$invoice = $order->getInvoiceCollection();
|
52 |
+
$invoice = sizeof($invoice) == 1 ? $invoice->getFirstItem() : false;
|
53 |
+
return $invoice;
|
54 |
+
}
|
55 |
+
|
56 |
+
protected function _getMode($order)
|
57 |
+
{
|
58 |
+
if ($this->_mode === null) {
|
59 |
+
$paymentMethod = $order->getPayment()->getMethod();
|
60 |
+
$mode = explode('Payline', $paymentMethod);
|
61 |
+
if (isset($mode[1])) {
|
62 |
+
$mode = $mode[1];
|
63 |
+
$this->_mode = $mode;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
return $this->_mode;
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function _canCreateInvoice($order)
|
70 |
+
{
|
71 |
+
$result = false;
|
72 |
+
if ($order->canInvoice()) {
|
73 |
+
$paymentMethod = $order->getPayment()->getMethod();
|
74 |
+
if (strstr($paymentMethod, 'Payline') !== false) {
|
75 |
+
$mode = $this->_getMode($order);
|
76 |
+
if (!empty($mode)) {
|
77 |
+
$statusToCreateInvoice = Mage::getStoreConfig('payment/' . $paymentMethod . '/automate_invoice_creation');
|
78 |
+
if ($order->getStatus() == $statusToCreateInvoice && !empty($statusToCreateInvoice)) {
|
79 |
+
if ($order->getData('status') !== $order->getOrigData('status')) {
|
80 |
+
$result = true;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
return $result;
|
87 |
+
}
|
88 |
+
|
89 |
+
protected function _createInvoice($order)
|
90 |
+
{
|
91 |
+
$transId = $order->getPayment()->getCcTransId();
|
92 |
+
if (!empty($transId)) {
|
93 |
+
$array = array(
|
94 |
+
'transactionId' => $transId,
|
95 |
+
'orderRef' => $order->getRealOrderId(),
|
96 |
+
'startDate' => '',
|
97 |
+
'endDate' => '',
|
98 |
+
'transactionHistory' => '',
|
99 |
+
'version' => Monext_Payline_Helper_Data::VERSION,
|
100 |
+
'archiveSearch' => ''
|
101 |
+
);
|
102 |
+
try {
|
103 |
+
$mode = $this->_getMode($order);
|
104 |
+
$res = Mage::helper('payline')->initPayline($mode)->getTransactionDetails($array);
|
105 |
+
if (isset($res['payment']['action'])) {
|
106 |
+
$order->setCreateInvoice(true);
|
107 |
+
$action = $res['payment']['action'];
|
108 |
+
if ($mode == 'NX') {
|
109 |
+
$action = Monext_Payline_Model_Cpt::ACTION_AUTH_CAPTURE;
|
110 |
+
}
|
111 |
+
Mage::helper('payline')->createInvoice($action, $order);
|
112 |
+
}
|
113 |
+
} catch (Exception $e) {
|
114 |
+
Mage::logException($e);
|
115 |
+
Mage::helper('payline/logger')->log(
|
116 |
+
'[createInvoiceWhenStatusChange] '
|
117 |
+
. '[' . $order->getIncrementId() . '] '
|
118 |
+
. '[' . $transId . '] '
|
119 |
+
. $e->getMessage()
|
120 |
+
);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
public function saveQuoteNxFees(Varien_Event_Observer $observer)
|
126 |
+
{
|
127 |
+
// Only if the payment method is one of Payline
|
128 |
+
$code = $observer->getQuote()->getPayment()->getMethod();
|
129 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
|
133 |
+
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
134 |
+
if (!$applyCosts) {
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
|
138 |
+
$quote = $observer->getEvent()->getQuote();
|
139 |
+
|
140 |
+
if (!$quote->getPaylineFee()) {
|
141 |
+
$payment = $quote->getPayment();
|
142 |
+
if ($payment) {
|
143 |
+
$paymentMethod = $payment->getMethod();
|
144 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
145 |
+
->addFieldtoFilter('quote_id', $quote->getId())->getFirstItem();
|
146 |
+
$quote->setPaylineFee($fee);
|
147 |
+
if ($paymentMethod == 'PaylineNX') {
|
148 |
+
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
149 |
+
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
150 |
+
|
151 |
+
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
152 |
+
$amount = round(($quote->getSubtotal() * $amount) / 100, 2);
|
153 |
+
$baseamount = round(($quote->getBaseSubtotal() * $baseamount) / 100, 2);
|
154 |
+
}
|
155 |
+
|
156 |
+
//save fees
|
157 |
+
if ($fee->getId()) {
|
158 |
+
$fee->setAmount($amount)->setBaseAmount($baseamount)->save();
|
159 |
+
} else {
|
160 |
+
Mage::getModel('payline/fees')->setQuoteId($quote->getId())
|
161 |
+
->setAmount($amount)
|
162 |
+
->setBaseAmount($baseamount)
|
163 |
+
->save();
|
164 |
+
}
|
165 |
+
} elseif ($fee->getId()) {
|
166 |
+
$fee->delete();
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
public function saveOrderNxFees(Varien_Event_Observer $observer)
|
173 |
+
{
|
174 |
+
// Only if the payment method is one of Payline
|
175 |
+
$code = $observer->getOrder()->getPayment()->getMethodInstance()->getCode();
|
176 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
177 |
+
return;
|
178 |
+
}
|
179 |
+
|
180 |
+
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
181 |
+
if (!$applyCosts) {
|
182 |
+
return;
|
183 |
+
}
|
184 |
+
|
185 |
+
$order = $observer->getEvent()->getOrder();
|
186 |
+
if (!$order->getPaylineFee()) {
|
187 |
+
$quoteId = $order->getQuoteId();
|
188 |
+
$payment = $order->getPayment();
|
189 |
+
if ($quoteId && $payment) {
|
190 |
+
$paymentMethod = $payment->getMethod();
|
191 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
192 |
+
->addFieldtoFilter('quote_id', $quoteId)->getFirstItem();
|
193 |
+
$order->setPaylineFee($fee);
|
194 |
+
if ($paymentMethod == 'PaylineNX') {
|
195 |
+
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
196 |
+
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
197 |
+
|
198 |
+
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
199 |
+
$amount = round(($order->getSubtotal() * $amount) / 100, 2);
|
200 |
+
$baseamount = round(($order->getBaseSubtotal() * $baseamount) / 100, 2);
|
201 |
+
}
|
202 |
+
|
203 |
+
//save fees
|
204 |
+
if ($fee->getId()) {
|
205 |
+
$fee->setOrderId($order->getId())->setAmount($amount)->setBaseAmount($baseamount)->save();
|
206 |
+
}
|
207 |
+
} elseif ($fee->getId()) {
|
208 |
+
$fee->delete();
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
public function saveInvoiceNxFees(Varien_Event_Observer $observer)
|
215 |
+
{
|
216 |
+
// Only if the payment method is one of Payline
|
217 |
+
$code = $observer->getInvoice()->getOrder()->getPayment()->getMethodInstance()->getCode();
|
218 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
219 |
+
return;
|
220 |
+
}
|
221 |
+
|
222 |
+
$applyCosts = (int) Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
223 |
+
if (!$applyCosts) {
|
224 |
+
return;
|
225 |
+
}
|
226 |
+
|
227 |
+
$invoice = $observer->getEvent()->getInvoice();
|
228 |
+
$order = $invoice->getOrder();
|
229 |
+
$payment = $order->getPayment();
|
230 |
+
if ($payment) {
|
231 |
+
$paymentMethod = $payment->getMethod();
|
232 |
+
if ($paymentMethod == 'PaylineNX') {
|
233 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
234 |
+
->addFieldtoFilter('order_id', $order->getId())->getFirstItem();
|
235 |
+
|
236 |
+
$amount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
237 |
+
$baseamount = (float) Mage::getStoreConfig('payment/PaylineNX/cost_amount');
|
238 |
+
|
239 |
+
if ($applyCosts == Monext_Payline_Model_Datasource_Costs::COST_PERCENT) {
|
240 |
+
$amount = round(($order->getSubtotal() * $amount) / 100, 2);
|
241 |
+
$baseamount = round(($order->getBaseSubtotal() * $baseamount) / 100, 2);
|
242 |
+
}
|
243 |
+
|
244 |
+
//save fees
|
245 |
+
if ($fee->getId() && !$fee->getInvoiceId()) {
|
246 |
+
$fee->setInvoiceId($invoice->getId())->save();
|
247 |
+
}
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
public function afterSaveShippingAction(Varien_Event_Observer $observer)
|
253 |
+
{
|
254 |
+
$controller = $observer->getControllerAction();
|
255 |
+
|
256 |
+
$paymentMethodsBlock = $controller->getLayout()->createBlock('checkout/onepage_payment_methods');
|
257 |
+
$methods = $paymentMethodsBlock->getMethods();
|
258 |
+
|
259 |
+
// check if more than one methods available
|
260 |
+
if (count($methods) != 1) {
|
261 |
+
return;
|
262 |
+
}
|
263 |
+
|
264 |
+
$method = current($methods);
|
265 |
+
|
266 |
+
// check if only payline methods (direct method should not be skipped)
|
267 |
+
if (!in_array($method->getCode(), array('PaylineCPT', 'PaylineNX', 'PaylineWALLET'))) {
|
268 |
+
return;
|
269 |
+
}
|
270 |
+
|
271 |
+
$data = array('method' => $method->getCode());
|
272 |
+
|
273 |
+
if ($method->getCode() == 'PaylineCPT') {
|
274 |
+
// retrive sub methods (card types)
|
275 |
+
$cptBlock = $controller->getLayout()->createBlock('payline/cpt');
|
276 |
+
$ccTypes = $cptBlock->getPaymentMethods();
|
277 |
+
if (count($ccTypes) != 1) {
|
278 |
+
return;
|
279 |
+
}
|
280 |
+
$ccType = current($ccTypes);
|
281 |
+
$data['cc_type'] = $ccType['number'];
|
282 |
+
}
|
283 |
+
|
284 |
+
// seems that payment step can be skipped, so save the unique payment method now
|
285 |
+
$result = Mage::getSingleton('checkout/type_onepage')->savePayment($data);
|
286 |
+
if (!empty($result['error'])) {
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
|
290 |
+
$layout = Mage::getModel('core/layout');
|
291 |
+
$layout->getUpdate()->load('checkout_onepage_review');
|
292 |
+
$layout->generateXml()->generateBlocks();
|
293 |
+
$layout->getBlock('root')->getChild('button')->setTemplate('checkout/onepage/review/button.phtml');
|
294 |
+
$reviewHtml = $layout->getBlock('root')->toHtml();
|
295 |
+
|
296 |
+
$result['goto_section'] = 'review';
|
297 |
+
$result['update_section'] = array(
|
298 |
+
'name' => 'review',
|
299 |
+
'html' => $reviewHtml
|
300 |
+
);
|
301 |
+
|
302 |
+
$json = Mage::helper('core')->jsonEncode($result);
|
303 |
+
$response = Mage::helper('core')->jsonDecode($controller->getResponse()->getBody());
|
304 |
+
|
305 |
+
$response['update_section']['html'].= '<script type="text/javascript">
|
306 |
+
//<![CDATA[
|
307 |
+
paylinePaymentSavedTransport = ' . $json . ';
|
308 |
+
paylineTrySkipPaymentMethod();
|
309 |
+
//]]>
|
310 |
+
</script>';
|
311 |
+
|
312 |
+
|
313 |
+
$controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Clean payline
|
318 |
+
* @see customer_logout
|
319 |
+
*/
|
320 |
+
public function cleanPayline(Varien_Event_Observer $observer)
|
321 |
+
{
|
322 |
+
// Clean the wallet
|
323 |
+
Mage::getSingleton('payline/wallet')->clean();
|
324 |
+
}
|
325 |
+
|
326 |
+
|
327 |
+
/**
|
328 |
+
*
|
329 |
+
* @param Varien_Event_Observer $observer
|
330 |
+
*/
|
331 |
+
public function checkForConfigChanged(Varien_Event_Observer $observer)
|
332 |
+
{
|
333 |
+
$disablePayments = Mage::registry('payline_config_disable_payments');
|
334 |
+
if ($disablePayments) {
|
335 |
+
$config=Mage::getModel('core/config');
|
336 |
+
$store=null;
|
337 |
+
$paymentConfig = Mage::getStoreConfig('payment', $store);
|
338 |
+
foreach ($paymentConfig as $code => $methodConfig) {
|
339 |
+
if (Mage::getStoreConfigFlag('payment/'.$code.'/active', $store) and stripos($code,'payline')!==false ) {
|
340 |
+
$config->saveConfig('payment/'.$code.'/active', 0);
|
341 |
+
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
|
346 |
+
$change = Mage::registry('payline_config_change');
|
347 |
+
if ($change) {
|
348 |
+
$url = Mage::helper("adminhtml")->getUrl('adminhtml/payline_managecontracts/importFromConfig');
|
349 |
+
|
350 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
351 |
+
Mage::app()->getResponse()->sendResponse();
|
352 |
+
exit;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
*
|
358 |
+
* @param Varien_Event_Observer $observer
|
359 |
+
* @return void
|
360 |
+
*/
|
361 |
+
public function configNestedPayment(Varien_Event_Observer $observer)
|
362 |
+
{
|
363 |
+
$paymentGroups = $observer->getEvent()->getConfig()->getNode('sections/payline/groups');
|
364 |
+
|
365 |
+
$payments = $paymentGroups->xpath('payline_payments_availables/*');
|
366 |
+
foreach ($payments as $payment) {
|
367 |
+
if ((int)$payment->include) {
|
368 |
+
|
369 |
+
$fields = $paymentGroups->xpath((string)$payment->group . '/fields');
|
370 |
+
if (isset($fields[0])) {
|
371 |
+
$fields[0]->appendChild($payment, true);
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
|
377 |
+
|
378 |
+
/**
|
379 |
+
*
|
380 |
+
* @param Varien_Event_Observer $observer
|
381 |
+
* @return Monext_Payline_Model_Observer
|
382 |
+
*/
|
383 |
+
public function updateHandleToUnsetPaymentStep(Varien_Event_Observer $observer)
|
384 |
+
{
|
385 |
+
$action = $observer->getEvent()->getAction();
|
386 |
+
if ($action->getFullActionName() == "checkout_onepage_index" && Mage::helper('payline')->disableOnepagePaymentStep()) {
|
387 |
+
$update = $observer->getEvent()->getLayout()->getUpdate();
|
388 |
+
$update->addHandle('payline_remove_onepage_payment_step_handler');
|
389 |
+
}
|
390 |
+
return $this;
|
391 |
+
}
|
392 |
+
|
393 |
+
|
394 |
+
/**
|
395 |
+
*
|
396 |
+
* @param Varien_Event_Observer $observer
|
397 |
+
* @return Monext_Payline_Model_Observer
|
398 |
+
*/
|
399 |
+
public function updateSectionTitle(Varien_Event_Observer $observer)
|
400 |
+
{
|
401 |
+
$action = $observer->getEvent()->getAction();
|
402 |
+
if ($action->getFullActionName() == "checkout_onepage_index" && Mage::helper('payline')->disableOnepagePaymentStep()) {
|
403 |
+
Mage::getSingleton('checkout/session')->setStepData('payment', array(
|
404 |
+
'label' => Mage::helper('checkout')->__('Payment Information'),
|
405 |
+
'is_show' => true
|
406 |
+
));
|
407 |
+
Mage::getSingleton('checkout/session')->setStepData('review', array(
|
408 |
+
'label' => Mage::helper('checkout')->__('Payment Information'),
|
409 |
+
'is_show' => true
|
410 |
+
));;
|
411 |
+
}
|
412 |
+
return $this;
|
413 |
+
}
|
414 |
+
|
415 |
+
|
416 |
+
/**
|
417 |
+
*
|
418 |
+
* @param Varien_Event_Observer $observer
|
419 |
+
* @return Monext_Payline_Model_Observer
|
420 |
+
*/
|
421 |
+
public function postdispatchOnepageSaveShippingMethod(Varien_Event_Observer $observer)
|
422 |
+
{
|
423 |
+
if (!Mage::helper('payline')->disableOnepagePaymentStep()) {
|
424 |
+
return $this;
|
425 |
+
}
|
426 |
+
|
427 |
+
/* @var $controller Mage_Checkout_OnepageController */
|
428 |
+
$controller = $observer->getEvent()->getControllerAction();
|
429 |
+
$response = Mage::app()->getFrontController()->getResponse()->getBody(true);
|
430 |
+
|
431 |
+
if (!isset($response['default'])) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
|
435 |
+
$response = Mage::helper('core')->jsonDecode($response['default']);
|
436 |
+
|
437 |
+
if ($response['goto_section'] == 'payment') {
|
438 |
+
|
439 |
+
$contractNumber = Mage::helper('payline')->getDefaultContractNumberForWidget();
|
440 |
+
if(empty($contractNumber)) {
|
441 |
+
throw new Exception('Cannot find valid contract number');
|
442 |
+
}
|
443 |
+
$onePage = Mage::getSingleton('checkout/type_onepage');
|
444 |
+
$onePage->getQuote()->getPayment()->importData(array('method'=>'PaylineCPT', 'cc_type'=>$contractNumber));
|
445 |
+
|
446 |
+
|
447 |
+
$layout = $controller->getLayout();
|
448 |
+
$update = $layout->getUpdate();
|
449 |
+
// Needed with cache activated
|
450 |
+
$update->setCacheId(uniqid("payline_onepage_review_payline"));
|
451 |
+
|
452 |
+
$controller->loadLayout(array('checkout_onepage_review','payline_onepage_review_handler'), true, true);
|
453 |
+
$response['goto_section'] = 'review';
|
454 |
+
$response['update_section'] = array(
|
455 |
+
'name' => 'review',
|
456 |
+
'html' => $controller->getLayout()->getBlock('root')->toHtml()
|
457 |
+
);
|
458 |
+
|
459 |
+
$controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
|
460 |
+
}
|
461 |
+
|
462 |
+
return $this;
|
463 |
+
}
|
464 |
+
|
465 |
+
|
466 |
+
/**
|
467 |
+
*
|
468 |
+
* @param Varien_Event_Observer $observer
|
469 |
+
*/
|
470 |
+
public function alterBlockHtmlAfter(Varien_Event_Observer $observer)
|
471 |
+
{
|
472 |
+
if (!Mage::helper('payline')->disableOnepagePaymentStep()) {
|
473 |
+
return $this;
|
474 |
+
}
|
475 |
+
|
476 |
+
$block = $observer->getEvent()->getBlock();
|
477 |
+
$transport = $observer->getEvent()->getTransport();
|
478 |
+
|
479 |
+
if($block instanceof Mage_Checkout_Block_Onepage_Shipping_Method) {
|
480 |
+
$block->getLayout()
|
481 |
+
->createBlock('payline/checkout_widget_opcheckout', 'payline_checkout_widget_opcheckout_init')
|
482 |
+
->setTemplate('payline/checkout/onepage/widget-opcheckout-js-init.phtml')
|
483 |
+
->addHtmlAsChild($block, $transport);
|
484 |
+
}
|
485 |
+
|
486 |
+
}
|
487 |
+
|
488 |
+
|
489 |
+
/**
|
490 |
+
*
|
491 |
+
* @param Varien_Event_Observer $observer
|
492 |
+
*/
|
493 |
+
public function predispatchCheckoutOnepage(Varien_Event_Observer $observer)
|
494 |
+
{
|
495 |
+
if (!Mage::helper('payline')->disableOnepagePaymentStep()) {
|
496 |
+
return $this;
|
497 |
+
}
|
498 |
+
|
499 |
+
$needRedirect = false;
|
500 |
+
|
501 |
+
/* @var $controller Mage_Checkout_OnepageController */
|
502 |
+
$controller = $observer->getEvent()->getControllerAction();
|
503 |
+
$paylinetoken = $controller->getRequest()->getParam('paylinetoken');
|
504 |
+
|
505 |
+
$referer = Mage::helper('core/http')->getHttpReferer();
|
506 |
+
if ($paylinetoken) {
|
507 |
+
$token = Mage::getModel('payline/token')->load($paylinetoken, 'token');
|
508 |
+
if($token->getId()) {
|
509 |
+
$needRedirect = true;
|
510 |
+
}
|
511 |
+
}
|
512 |
+
|
513 |
+
if ($needRedirect) {
|
514 |
+
$params = $controller->getRequest()->getParams();
|
515 |
+
$params['_secure'] = true;
|
516 |
+
|
517 |
+
$controller->getResponse()->setRedirect(
|
518 |
+
Mage::getUrl('payline/index/cptReturnWidget', $params)
|
519 |
+
);
|
520 |
+
$controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);
|
521 |
+
}
|
522 |
+
}
|
523 |
+
}
|
app/code/community/Monext/Payline/Model/Order/Invoice.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Order_Invoice extends Mage_Sales_Model_Order_Invoice
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* Override parent to add the admin BO conf
|
6 |
-
* @return bool true if can capture, otherwise false
|
7 |
-
*/
|
8 |
-
public function canCapture()
|
9 |
-
{
|
10 |
-
// Only if the payment method is one of Payline
|
11 |
-
$code = $this->getOrder()->getPayment()->getMethod();
|
12 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
13 |
-
return parent::canCapture();
|
14 |
-
}
|
15 |
-
|
16 |
-
$canCapture = parent::canCapture();
|
17 |
-
$paymentMethod = $this->getOrder()->getPayment()->getMethod();
|
18 |
-
$paymentActionConf = Mage::getStoreConfig('payment/'.$paymentMethod.'/payline_payment_action');
|
19 |
-
$result = true;
|
20 |
-
// if only auth (100), check if it's time to capture
|
21 |
-
if( $paymentActionConf == "100" ) {
|
22 |
-
$fireCaptureOption = Mage::getStoreConfig('payment/'.$paymentMethod.'/capture_payment_when_i_said');
|
23 |
-
$result = ( strcasecmp('invoice', $fireCaptureOption) == 0 );
|
24 |
-
}
|
25 |
-
return $canCapture && $result ;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function parentCanCapture()
|
29 |
-
{
|
30 |
-
return parent::canCapture();
|
31 |
-
}
|
32 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Order_Invoice extends Mage_Sales_Model_Order_Invoice
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override parent to add the admin BO conf
|
6 |
+
* @return bool true if can capture, otherwise false
|
7 |
+
*/
|
8 |
+
public function canCapture()
|
9 |
+
{
|
10 |
+
// Only if the payment method is one of Payline
|
11 |
+
$code = $this->getOrder()->getPayment()->getMethod();
|
12 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
13 |
+
return parent::canCapture();
|
14 |
+
}
|
15 |
+
|
16 |
+
$canCapture = parent::canCapture();
|
17 |
+
$paymentMethod = $this->getOrder()->getPayment()->getMethod();
|
18 |
+
$paymentActionConf = Mage::getStoreConfig('payment/'.$paymentMethod.'/payline_payment_action');
|
19 |
+
$result = true;
|
20 |
+
// if only auth (100), check if it's time to capture
|
21 |
+
if( $paymentActionConf == "100" ) {
|
22 |
+
$fireCaptureOption = Mage::getStoreConfig('payment/'.$paymentMethod.'/capture_payment_when_i_said');
|
23 |
+
$result = ( strcasecmp('invoice', $fireCaptureOption) == 0 );
|
24 |
+
}
|
25 |
+
return $canCapture && $result ;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function parentCanCapture()
|
29 |
+
{
|
30 |
+
return parent::canCapture();
|
31 |
+
}
|
32 |
}
|
app/code/community/Monext/Payline/Model/Order/Payment.php
CHANGED
@@ -1,56 +1,56 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Order_Payment extends Mage_Sales_Model_Order_Payment
|
3 |
-
{
|
4 |
-
/* @Override
|
5 |
-
* Exec parent, then set order status according to user conf
|
6 |
-
*/
|
7 |
-
public function capture($invoice)
|
8 |
-
{
|
9 |
-
// Only if the payment method is one of Payline
|
10 |
-
$code = $this->getOrder()->getPayment()->getMethod();
|
11 |
-
if (!Mage::helper('payline')->isPayline($code)) {
|
12 |
-
return parent::capture($invoice);
|
13 |
-
}
|
14 |
-
|
15 |
-
parent::capture( $invoice );
|
16 |
-
|
17 |
-
$msgError = '[Monext_Payline_Model_Order_Payment#capture] ERROR Unable to set order status';
|
18 |
-
|
19 |
-
if( $invoice->getTransactionId() ) {
|
20 |
-
$order = $this->getOrder();
|
21 |
-
$method = str_replace( 'Payline', '', $order->getPayment()->getMethod() );
|
22 |
-
$paylineSDK = Mage::helper('payline')->initPayline( $method );
|
23 |
-
// get the last transaction id in order to get the details from payline in order to get the action, then i die
|
24 |
-
$transId = Mage::getModel('sales/order_payment_transaction')
|
25 |
-
->getCollection()
|
26 |
-
->addFieldToFilter('order_id', $order->getId() )
|
27 |
-
->setOrder('txn_id', 'DESC')
|
28 |
-
->getFirstItem()
|
29 |
-
->getTxnId();
|
30 |
-
|
31 |
-
$array_details = array();
|
32 |
-
$array_details['orderRef'] = $order->getRealOrderId();
|
33 |
-
$array_details['transactionId'] = $transId;
|
34 |
-
$array_details['startDate'] = '';
|
35 |
-
$array_details['endDate'] = '';
|
36 |
-
$array_details['transactionHistory']= '';
|
37 |
-
$array_details['version'] = Monext_Payline_Helper_Data::VERSION;
|
38 |
-
$array_details['archiveSearch'] = '';
|
39 |
-
$transDetails = $paylineSDK->getTransactionDetails( $array_details );
|
40 |
-
|
41 |
-
if( isset( $transDetails ) ) {
|
42 |
-
$isReAuth = $transDetails['payment']['action'] == Monext_Payline_Model_Cpt::ACTION_RE_AUTH ? true:false;
|
43 |
-
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
44 |
-
$order, $transDetails['payment']['action'], $isReAuth );
|
45 |
-
$order->save();
|
46 |
-
|
47 |
-
} else {
|
48 |
-
Mage::log( $msgError );
|
49 |
-
}
|
50 |
-
} else {
|
51 |
-
Mage::log( $msgError );
|
52 |
-
}
|
53 |
-
|
54 |
-
return $this;
|
55 |
-
}
|
56 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Order_Payment extends Mage_Sales_Model_Order_Payment
|
3 |
+
{
|
4 |
+
/* @Override
|
5 |
+
* Exec parent, then set order status according to user conf
|
6 |
+
*/
|
7 |
+
public function capture($invoice)
|
8 |
+
{
|
9 |
+
// Only if the payment method is one of Payline
|
10 |
+
$code = $this->getOrder()->getPayment()->getMethod();
|
11 |
+
if (!Mage::helper('payline')->isPayline($code)) {
|
12 |
+
return parent::capture($invoice);
|
13 |
+
}
|
14 |
+
|
15 |
+
parent::capture( $invoice );
|
16 |
+
|
17 |
+
$msgError = '[Monext_Payline_Model_Order_Payment#capture] ERROR Unable to set order status';
|
18 |
+
|
19 |
+
if( $invoice->getTransactionId() ) {
|
20 |
+
$order = $this->getOrder();
|
21 |
+
$method = str_replace( 'Payline', '', $order->getPayment()->getMethod() );
|
22 |
+
$paylineSDK = Mage::helper('payline')->initPayline( $method );
|
23 |
+
// get the last transaction id in order to get the details from payline in order to get the action, then i die
|
24 |
+
$transId = Mage::getModel('sales/order_payment_transaction')
|
25 |
+
->getCollection()
|
26 |
+
->addFieldToFilter('order_id', $order->getId() )
|
27 |
+
->setOrder('txn_id', 'DESC')
|
28 |
+
->getFirstItem()
|
29 |
+
->getTxnId();
|
30 |
+
|
31 |
+
$array_details = array();
|
32 |
+
$array_details['orderRef'] = $order->getRealOrderId();
|
33 |
+
$array_details['transactionId'] = $transId;
|
34 |
+
$array_details['startDate'] = '';
|
35 |
+
$array_details['endDate'] = '';
|
36 |
+
$array_details['transactionHistory']= '';
|
37 |
+
$array_details['version'] = Monext_Payline_Helper_Data::VERSION;
|
38 |
+
$array_details['archiveSearch'] = '';
|
39 |
+
$transDetails = $paylineSDK->getTransactionDetails( $array_details );
|
40 |
+
|
41 |
+
if( isset( $transDetails ) ) {
|
42 |
+
$isReAuth = $transDetails['payment']['action'] == Monext_Payline_Model_Cpt::ACTION_RE_AUTH ? true:false;
|
43 |
+
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
44 |
+
$order, $transDetails['payment']['action'], $isReAuth );
|
45 |
+
$order->save();
|
46 |
+
|
47 |
+
} else {
|
48 |
+
Mage::log( $msgError );
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
Mage::log( $msgError );
|
52 |
+
}
|
53 |
+
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
}
|
app/code/community/Monext/Payline/Model/Productcategories.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline product categories model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Productcategories extends Mage_Core_Model_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
parent::_construct();
|
12 |
-
$this->_init('payline/productcategories');
|
13 |
-
}
|
14 |
-
|
15 |
-
public function getStoreCategoryId(){
|
16 |
-
return $this->_data['store_category_id'];
|
17 |
-
}
|
18 |
-
|
19 |
-
public function getPaylineCategoryId(){
|
20 |
-
return $this->_data['payline_category_id'];
|
21 |
-
}
|
22 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline product categories model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Productcategories extends Mage_Core_Model_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('payline/productcategories');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getStoreCategoryId(){
|
16 |
+
return $this->_data['store_category_id'];
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getPaylineCategoryId(){
|
20 |
+
return $this->_data['payline_category_id'];
|
21 |
+
}
|
22 |
+
}
|
app/code/community/Monext/Payline/Model/Resource/Eav/Mysql4/Setup.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
class Monext_Payline_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* @return array
|
6 |
-
*/
|
7 |
-
public function getDefaultEntities(){
|
8 |
-
return array(
|
9 |
-
'customer'=>array(
|
10 |
-
'entity_model' => 'customer/customer',
|
11 |
-
'table' => 'customer/entity',
|
12 |
-
'increment_model' => 'eav/entity_increment_numeric',
|
13 |
-
'increment_per_store' => false,
|
14 |
-
'additional_attribute_table' => 'customer/eav_attribute',
|
15 |
-
'entity_attribute_collection' => 'customer/eav_attribute',
|
16 |
-
'attributes' => array(
|
17 |
-
'wallet_id'=>array(
|
18 |
-
'label' => 'Wallet ID',
|
19 |
-
'type' => 'varchar',
|
20 |
-
'visible' => false,
|
21 |
-
'required' => false,
|
22 |
-
)
|
23 |
-
)
|
24 |
-
)
|
25 |
-
);
|
26 |
-
}
|
27 |
}
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* @return array
|
6 |
+
*/
|
7 |
+
public function getDefaultEntities(){
|
8 |
+
return array(
|
9 |
+
'customer'=>array(
|
10 |
+
'entity_model' => 'customer/customer',
|
11 |
+
'table' => 'customer/entity',
|
12 |
+
'increment_model' => 'eav/entity_increment_numeric',
|
13 |
+
'increment_per_store' => false,
|
14 |
+
'additional_attribute_table' => 'customer/eav_attribute',
|
15 |
+
'entity_attribute_collection' => 'customer/eav_attribute',
|
16 |
+
'attributes' => array(
|
17 |
+
'wallet_id'=>array(
|
18 |
+
'label' => 'Wallet ID',
|
19 |
+
'type' => 'varchar',
|
20 |
+
'visible' => false,
|
21 |
+
'required' => false,
|
22 |
+
)
|
23 |
+
)
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
}
|
app/code/community/Monext/Payline/Model/Session.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Monext_Payline_Model_Session extends Mage_Core_Model_Session_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Class constructor. Initialize checkout session namespace
|
6 |
+
*/
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
$this->init('payline');
|
10 |
+
}
|
11 |
+
|
12 |
+
public function switchToSecureContract()
|
13 |
+
{
|
14 |
+
$currentCcType = $this->getCcType();
|
15 |
+
|
16 |
+
$currentContractType = false;
|
17 |
+
$allAvailableContracts = Mage::helper('payline')->getCcContracts();
|
18 |
+
foreach ($allAvailableContracts as $contract) {
|
19 |
+
|
20 |
+
if($contract->getId()==$currentCcType) {
|
21 |
+
$currentContractType = $contract->getContractType();
|
22 |
+
break;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
$contract = Mage::helper('payline')->getContractByType($currentContractType,true);
|
27 |
+
if($contract) {
|
28 |
+
$this->setCcType($contract->getId());
|
29 |
+
return true;
|
30 |
+
} else {
|
31 |
+
return false;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
app/code/community/Monext/Payline/Model/Token.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Payline token model
|
5 |
-
*/
|
6 |
-
|
7 |
-
class Monext_Payline_Model_Token extends Mage_Core_Model_Abstract
|
8 |
-
{
|
9 |
-
public function _construct()
|
10 |
-
{
|
11 |
-
parent::_construct();
|
12 |
-
$this->_init('payline/token');
|
13 |
-
}
|
14 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Payline token model
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Monext_Payline_Model_Token extends Mage_Core_Model_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('payline/token');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Monext/Payline/Model/Total/Nx/Invoice.php
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Model_Total_Nx_Invoice
|
4 |
-
extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
5 |
-
{
|
6 |
-
// Collect the totals for the invoice
|
7 |
-
public function collect(Mage_Sales_Model_Order_Invoice $invoice)
|
8 |
-
{
|
9 |
-
$order = $invoice->getOrder();
|
10 |
-
$orderId = $order->getId();
|
11 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
12 |
-
->addFieldtoFilter('order_id',$orderId)->getFirstItem();
|
13 |
-
|
14 |
-
if($fee->getId() && ($invoice->getId() == $fee->getInvoiceId())) {
|
15 |
-
$myTotal = $fee->getAmount();
|
16 |
-
$baseMyTotal = $fee->getBaseAmount();
|
17 |
-
|
18 |
-
$invoice->setGrandTotal($invoice->getGrandTotal() + $myTotal);
|
19 |
-
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseMyTotal);
|
20 |
-
}
|
21 |
-
return $this;
|
22 |
-
}
|
23 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Total_Nx_Invoice
|
4 |
+
extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
5 |
+
{
|
6 |
+
// Collect the totals for the invoice
|
7 |
+
public function collect(Mage_Sales_Model_Order_Invoice $invoice)
|
8 |
+
{
|
9 |
+
$order = $invoice->getOrder();
|
10 |
+
$orderId = $order->getId();
|
11 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
12 |
+
->addFieldtoFilter('order_id',$orderId)->getFirstItem();
|
13 |
+
|
14 |
+
if($fee->getId() && ($invoice->getId() == $fee->getInvoiceId())) {
|
15 |
+
$myTotal = $fee->getAmount();
|
16 |
+
$baseMyTotal = $fee->getBaseAmount();
|
17 |
+
|
18 |
+
$invoice->setGrandTotal($invoice->getGrandTotal() + $myTotal);
|
19 |
+
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseMyTotal);
|
20 |
+
}
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Monext/Payline/Model/Total/Nx/Quote.php
CHANGED
@@ -1,87 +1,87 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Monext_Payline_Model_Total_Nx_Quote extends Mage_Sales_Model_Quote_Address_Total_Abstract
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
$this->setCode('payline_nx');
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Get label
|
12 |
-
*
|
13 |
-
* @return string
|
14 |
-
*/
|
15 |
-
public function getLabel()
|
16 |
-
{
|
17 |
-
return Mage::helper('payline')->__('Payline fees');
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Collect totals information
|
22 |
-
*
|
23 |
-
* @param Mage_Sales_Model_Quote_Address $address
|
24 |
-
*/
|
25 |
-
public function collect(Mage_Sales_Model_Quote_Address $address)
|
26 |
-
{
|
27 |
-
parent::collect($address);
|
28 |
-
|
29 |
-
$applyCosts = (int)Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
30 |
-
if(!$applyCosts) {
|
31 |
-
return $this;
|
32 |
-
}
|
33 |
-
|
34 |
-
if (($address->getAddressType() == 'billing')) { // we collect fee for only one address
|
35 |
-
return $this;
|
36 |
-
}
|
37 |
-
|
38 |
-
$quote = $address->getQuote();
|
39 |
-
if($quote) {
|
40 |
-
$payment = $quote->getPayment();
|
41 |
-
if($payment && ($payment->getMethod() == 'PaylineNX')) {
|
42 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
43 |
-
->addFieldtoFilter('quote_id',$quote->getId())->getFirstItem();
|
44 |
-
if($fee->getId()) {
|
45 |
-
$this->_addAmount($fee->getAmount());
|
46 |
-
$this->_addBaseAmount($fee->getBaseAmount());
|
47 |
-
}
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
return $this;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Add fees to address object
|
56 |
-
*
|
57 |
-
* @param Mage_Sales_Model_Quote_Address $address
|
58 |
-
*/
|
59 |
-
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
60 |
-
{
|
61 |
-
$applyCosts = (int)Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
62 |
-
if(!$applyCosts) {
|
63 |
-
return $this;
|
64 |
-
}
|
65 |
-
|
66 |
-
if (($address->getAddressType() == 'billing')) { // we collect fee for only one address
|
67 |
-
$quote = $address->getQuote();
|
68 |
-
if($quote) {
|
69 |
-
$payment = $quote->getPayment();
|
70 |
-
if($payment && ($payment->getMethod() == 'PaylineNX')) {
|
71 |
-
$fee = Mage::getModel('payline/fees')->getCollection()
|
72 |
-
->addFieldtoFilter('quote_id',$quote->getId())->getFirstItem();
|
73 |
-
if($fee->getId()) {
|
74 |
-
$address->addTotal(array(
|
75 |
-
'code' => $this->getCode(),
|
76 |
-
'title' => $this->getLabel(),
|
77 |
-
'value' => $fee->getAmount()
|
78 |
-
));
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
return $this;
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Monext_Payline_Model_Total_Nx_Quote extends Mage_Sales_Model_Quote_Address_Total_Abstract
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->setCode('payline_nx');
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Get label
|
12 |
+
*
|
13 |
+
* @return string
|
14 |
+
*/
|
15 |
+
public function getLabel()
|
16 |
+
{
|
17 |
+
return Mage::helper('payline')->__('Payline fees');
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Collect totals information
|
22 |
+
*
|
23 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
24 |
+
*/
|
25 |
+
public function collect(Mage_Sales_Model_Quote_Address $address)
|
26 |
+
{
|
27 |
+
parent::collect($address);
|
28 |
+
|
29 |
+
$applyCosts = (int)Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
30 |
+
if(!$applyCosts) {
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
if (($address->getAddressType() == 'billing')) { // we collect fee for only one address
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
$quote = $address->getQuote();
|
39 |
+
if($quote) {
|
40 |
+
$payment = $quote->getPayment();
|
41 |
+
if($payment && ($payment->getMethod() == 'PaylineNX')) {
|
42 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
43 |
+
->addFieldtoFilter('quote_id',$quote->getId())->getFirstItem();
|
44 |
+
if($fee->getId()) {
|
45 |
+
$this->_addAmount($fee->getAmount());
|
46 |
+
$this->_addBaseAmount($fee->getBaseAmount());
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Add fees to address object
|
56 |
+
*
|
57 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
58 |
+
*/
|
59 |
+
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
60 |
+
{
|
61 |
+
$applyCosts = (int)Mage::getStoreConfig('payment/PaylineNX/cost_type');
|
62 |
+
if(!$applyCosts) {
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
if (($address->getAddressType() == 'billing')) { // we collect fee for only one address
|
67 |
+
$quote = $address->getQuote();
|
68 |
+
if($quote) {
|
69 |
+
$payment = $quote->getPayment();
|
70 |
+
if($payment && ($payment->getMethod() == 'PaylineNX')) {
|
71 |
+
$fee = Mage::getModel('payline/fees')->getCollection()
|
72 |
+
->addFieldtoFilter('quote_id',$quote->getId())->getFirstItem();
|
73 |
+
if($fee->getId()) {
|
74 |
+
$address->addTotal(array(
|
75 |
+
'code' => $this->getCode(),
|
76 |
+
'title' => $this->getLabel(),
|
77 |
+
'value' => $fee->getAmount()
|
78 |
+
));
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
return $this;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
app/code/community/Monext/Payline/Model/Wallet.php
CHANGED
@@ -1,237 +1,243 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Payline Wallet payment method, or pay in 1 click
|
4 |
-
*/
|
5 |
-
class Monext_Payline_Model_Wallet extends Mage_Payment_Model_Method_Abstract
|
6 |
-
{
|
7 |
-
protected $_code = 'PaylineWALLET';
|
8 |
-
protected $_formBlockType = 'payline/wallet';
|
9 |
-
protected $_infoBlockType = 'payline/wallet_infos';
|
10 |
-
protected $_isInitializeNeeded = true;
|
11 |
-
protected $_canUseInternal = false;
|
12 |
-
protected $_canUseForMultishipping = false;
|
13 |
-
protected $_canRefund = true;
|
14 |
-
protected $_canRefundInvoicePartial = true;
|
15 |
-
protected $_canCapture = true;
|
16 |
-
protected $_canCapturePartial = true;
|
17 |
-
protected $_canVoid = true;
|
18 |
-
|
19 |
-
protected $_walletData;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Return Order place redirect url
|
23 |
-
*
|
24 |
-
* @return string
|
25 |
-
*/
|
26 |
-
public function getOrderPlaceRedirectUrl()
|
27 |
-
{
|
28 |
-
return Mage::getUrl('payline/index/wallet');
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Retrieve the expiration date of the saved credit card
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
public function getExpirationDate(){
|
36 |
-
$wallet=$this->getWalletData();
|
37 |
-
if (isset($wallet['card']) && isset($wallet['card']['expirationDate'])){
|
38 |
-
$exp=$wallet['card']['expirationDate'];
|
39 |
-
return $exp;
|
40 |
-
}else{
|
41 |
-
Mage::helper('payline/logger')->log('[getExpirationDate] Error while retrieving wallet for expiration date');
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Check if the saved credit card expiration date is OK
|
47 |
-
* @return bool
|
48 |
-
*/
|
49 |
-
public function checkExpirationDate()
|
50 |
-
{
|
51 |
-
if (Mage::getSingleton('customer/session')->getCustomer()->getWalletId()) {
|
52 |
-
$exp = $this->getExpirationDate();
|
53 |
-
$date_exp=substr($exp, 2).substr($exp,0,2);
|
54 |
-
if (date('ym')<=$date_exp){
|
55 |
-
return true;
|
56 |
-
}else{
|
57 |
-
return false;
|
58 |
-
}
|
59 |
-
} else {
|
60 |
-
return false;
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Check whether payment method can be used
|
66 |
-
* Rewrited from Abstract class
|
67 |
-
* TODO: payment method instance is not supposed to know about quote
|
68 |
-
* @param Mage_Sales_Model_Quote
|
69 |
-
* @return bool
|
70 |
-
*/
|
71 |
-
public function isAvailable($quote = null){
|
72 |
-
// if cart amount is null, this payment method is not shown on front
|
73 |
-
if(!is_null($quote) && Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0){
|
74 |
-
return false;
|
75 |
-
}
|
76 |
-
|
77 |
-
$checkResult
|
78 |
-
$
|
79 |
-
$customerSession
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
$checkResult->isAvailable
|
86 |
-
|
87 |
-
$
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
'
|
96 |
-
'
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
if ($customerSession->
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
$
|
127 |
-
}
|
128 |
-
|
129 |
-
if (
|
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 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Payline Wallet payment method, or pay in 1 click
|
4 |
+
*/
|
5 |
+
class Monext_Payline_Model_Wallet extends Mage_Payment_Model_Method_Abstract
|
6 |
+
{
|
7 |
+
protected $_code = 'PaylineWALLET';
|
8 |
+
protected $_formBlockType = 'payline/wallet';
|
9 |
+
protected $_infoBlockType = 'payline/wallet_infos';
|
10 |
+
protected $_isInitializeNeeded = true;
|
11 |
+
protected $_canUseInternal = false;
|
12 |
+
protected $_canUseForMultishipping = false;
|
13 |
+
protected $_canRefund = true;
|
14 |
+
protected $_canRefundInvoicePartial = true;
|
15 |
+
protected $_canCapture = true;
|
16 |
+
protected $_canCapturePartial = true;
|
17 |
+
protected $_canVoid = true;
|
18 |
+
|
19 |
+
protected $_walletData;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Return Order place redirect url
|
23 |
+
*
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
public function getOrderPlaceRedirectUrl()
|
27 |
+
{
|
28 |
+
return Mage::getUrl('payline/index/wallet');
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Retrieve the expiration date of the saved credit card
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getExpirationDate(){
|
36 |
+
$wallet=$this->getWalletData();
|
37 |
+
if (isset($wallet['card']) && isset($wallet['card']['expirationDate'])){
|
38 |
+
$exp=$wallet['card']['expirationDate'];
|
39 |
+
return $exp;
|
40 |
+
}else{
|
41 |
+
Mage::helper('payline/logger')->log('[getExpirationDate] Error while retrieving wallet for expiration date');
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Check if the saved credit card expiration date is OK
|
47 |
+
* @return bool
|
48 |
+
*/
|
49 |
+
public function checkExpirationDate()
|
50 |
+
{
|
51 |
+
if (Mage::getSingleton('customer/session')->getCustomer()->getWalletId()) {
|
52 |
+
$exp = $this->getExpirationDate();
|
53 |
+
$date_exp=substr($exp, 2).substr($exp,0,2);
|
54 |
+
if (date('ym')<=$date_exp){
|
55 |
+
return true;
|
56 |
+
}else{
|
57 |
+
return false;
|
58 |
+
}
|
59 |
+
} else {
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Check whether payment method can be used
|
66 |
+
* Rewrited from Abstract class
|
67 |
+
* TODO: payment method instance is not supposed to know about quote
|
68 |
+
* @param Mage_Sales_Model_Quote
|
69 |
+
* @return bool
|
70 |
+
*/
|
71 |
+
public function isAvailable($quote = null){
|
72 |
+
// if cart amount is null, this payment method is not shown on front
|
73 |
+
if(!is_null($quote) && Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0){
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
$checkResult = new StdClass;
|
77 |
+
$checkResult->isAvailable=false;
|
78 |
+
$customerSession = Mage::getSingleton('customer/session');
|
79 |
+
if ($customerSession->isLoggedIn()) {
|
80 |
+
if ($customerSession->getCustomer()->getWalletId()) {
|
81 |
+
$checkResult->isAvailable=true;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
$checkResult->isAvailable=$this->checkExpirationDate();
|
85 |
+
$checkResult->isAvailable = (
|
86 |
+
$checkResult->isAvailable &&
|
87 |
+
$this->getConfigData('active', ($quote ? $quote->getStoreId() : null))
|
88 |
+
);
|
89 |
+
|
90 |
+
// On Magento Pro 1.8, reward module is broken without quote. Let's provide it...
|
91 |
+
if (!$quote)
|
92 |
+
$quote=Mage::getSingleton('checkout/type_onepage')->getQuote();
|
93 |
+
Mage::dispatchEvent('payment_method_is_active', array(
|
94 |
+
'result' => $checkResult,
|
95 |
+
'method_instance' => $this,
|
96 |
+
'quote' => $quote,
|
97 |
+
));
|
98 |
+
|
99 |
+
// disable method if it cannot implement recurring profiles management and there are recurring items in quote
|
100 |
+
if ($checkResult->isAvailable) {
|
101 |
+
//This is not implemented on Magenot 1.3
|
102 |
+
if (method_exists($this,'canManageRecurringProfiles')){
|
103 |
+
$implementsRecurring = $this->canManageRecurringProfiles();
|
104 |
+
// the $quote->hasRecurringItems() causes big performance impact, thus it has to be called last
|
105 |
+
if ($quote && (!$implementsRecurring) && $quote->hasRecurringItems()) {
|
106 |
+
$checkResult->isAvailable = false;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
return $checkResult->isAvailable;
|
111 |
+
}
|
112 |
+
|
113 |
+
public function getWalletData(){
|
114 |
+
|
115 |
+
$customerSession=Mage::getSingleton('customer/session');
|
116 |
+
if ($customerSession->hasWalletData()) {
|
117 |
+
$this->_walletData = $customerSession->getWalletData();
|
118 |
+
}
|
119 |
+
|
120 |
+
if ($customerSession->isLoggedIn()){
|
121 |
+
$customer=$customerSession->getCustomer();
|
122 |
+
$walletId=$customer->getWalletId();
|
123 |
+
}
|
124 |
+
|
125 |
+
if (!isset($walletId) || empty($walletId)){
|
126 |
+
$this->_walletData = false;
|
127 |
+
}
|
128 |
+
|
129 |
+
if (is_null($this->_walletData)) {
|
130 |
+
/* @var $paylineSDK PaylineSDK */
|
131 |
+
$helperPayline = Mage::helper('payline');
|
132 |
+
$paylineSDK = $helperPayline->initPayline('WALLET');
|
133 |
+
$walletContractNumber = $customer->getWalletContractNumber();
|
134 |
+
if (! $walletContractNumber) {
|
135 |
+
$walletContractNumber = $helperPayline->contractNumber;
|
136 |
+
}
|
137 |
+
$array = array(
|
138 |
+
'walletId' => $walletId,
|
139 |
+
'cardInd' => '',
|
140 |
+
'contractNumber' => $walletContractNumber,
|
141 |
+
'version' => Monext_Payline_Helper_Data::VERSION);
|
142 |
+
|
143 |
+
try {
|
144 |
+
$res = $paylineSDK->getWallet($array);
|
145 |
+
} catch (Exception $e) {
|
146 |
+
$msgLog = 'Unknown PAYLINE ERROR on getWallet for wallet ' . $walletId . ' (Payline unreachable?)';
|
147 |
+
$msg = Mage::helper('payline')->__('Error while retrieving wallet information');
|
148 |
+
Mage::helper('payline/logger')->log('[getWalletData] ' . $msgLog);
|
149 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
150 |
+
$this->_walletData = false;
|
151 |
+
}
|
152 |
+
if (is_string($res) or ! isset($res['result']) || $res['result']['code'] != '02500') {
|
153 |
+
$this->_walletData = false;
|
154 |
+
if (is_string($res)) {
|
155 |
+
$msgLog = 'PAYLINE ERROR on getWallet: ' . $res;
|
156 |
+
} elseif (isset($res['result'])) {
|
157 |
+
$msgLog = 'PAYLINE ERROR on getWallet: ' . $res['result']['code'] . ' ' . $res['result']['longMessage'] . ' (wallet ' . $walletId . ')';
|
158 |
+
} else {
|
159 |
+
$msgLog = 'Unknown PAYLINE ERROR on getWallet for wallet ' . $walletId;
|
160 |
+
}
|
161 |
+
$msg = Mage::helper('payline')->__('Error while retrieving wallet information');
|
162 |
+
Mage::helper('payline/logger')->log('[getWalletData] ' . $msgLog);
|
163 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
164 |
+
} else {
|
165 |
+
$this->_walletData = $res['wallet'];
|
166 |
+
}
|
167 |
+
}
|
168 |
+
$customerSession->setWalletData($this->_walletData);
|
169 |
+
return $this->_walletData;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Clean the session and all necessary data
|
174 |
+
* @return Monext_Payline_Model_Wallet
|
175 |
+
*/
|
176 |
+
public function clean()
|
177 |
+
{
|
178 |
+
// Clean wallet in customer session
|
179 |
+
Mage::getSingleton('customer/session')->unsWalletData();
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Generate a random wallet_id
|
184 |
+
* @param int $length
|
185 |
+
* @return string
|
186 |
+
*/
|
187 |
+
public function generateWalletId($length=10){
|
188 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
189 |
+
$prefix = $customer->getId() ? $customer->getId() : "XXX"; // prefix start with current customer ID if set, XXX otherwise
|
190 |
+
$prefix .= '_'.date('Ymd',time()); // current date (format YYYYMMDD) is added to the prefix
|
191 |
+
$characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZ";
|
192 |
+
$customerData = array('1','1'); // fake data in order to enter while loop
|
193 |
+
$walletId = "";
|
194 |
+
|
195 |
+
while(sizeof($customerData) != 0){ // this loop make sure that generated wallet ID is not already used
|
196 |
+
$string = '_';
|
197 |
+
for ($p = 0; $p < $length; $p++) {
|
198 |
+
$string .= $characters[mt_rand(0, strlen($characters)-1)];
|
199 |
+
}
|
200 |
+
$walletId = $prefix.$string;
|
201 |
+
$customerModel = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('wallet_id',$walletId); // search for a cistomer having this wallet ID
|
202 |
+
$customerData = $customerModel->getFirstItem()->getData();
|
203 |
+
}
|
204 |
+
|
205 |
+
return $walletId;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Capture payment
|
210 |
+
*
|
211 |
+
* @param Varien_Object $orderPayment
|
212 |
+
* @return Monext_Payline_Model_Cpt
|
213 |
+
*/
|
214 |
+
public function capture(Varien_Object $payment, $amount)
|
215 |
+
{
|
216 |
+
Mage::getModel('payline/cpt')->capture($payment,$amount, 'WALLET');
|
217 |
+
return $this;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Refund money
|
222 |
+
*
|
223 |
+
* @param Varien_Object $invoicePayment
|
224 |
+
* @return Monext_Payline_Model_Cpt
|
225 |
+
*/
|
226 |
+
public function refund(Varien_Object $payment, $amount)
|
227 |
+
{
|
228 |
+
Mage::getModel('payline/cpt')->refund($payment,$amount, 'WALLET');
|
229 |
+
return $this;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Cancel payment
|
234 |
+
*
|
235 |
+
* @param Varien_Object $payment
|
236 |
+
* @return Monext_Payline_Model_Cpt
|
237 |
+
*/
|
238 |
+
public function void(Varien_Object $payment)
|
239 |
+
{
|
240 |
+
Mage::getModel('payline/cpt')->void($payment, 'WALLET');
|
241 |
+
return $this;
|
242 |
+
}
|
243 |
}
|
app/code/community/Monext/Payline/controllers/Adminhtml/Payline/ManagecontractsController.php
CHANGED
@@ -1,223 +1,261 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This controller manage primary and secondary payline contracts in back office
|
5 |
-
*/
|
6 |
-
class Monext_Payline_Adminhtml_Payline_ManagecontractsController extends Mage_Adminhtml_Controller_Action
|
7 |
-
{
|
8 |
-
|
9 |
-
public function indexAction()
|
10 |
-
{
|
11 |
-
$this->_title($this->__('Manage Payline Contracts'));
|
12 |
-
$this->loadLayout();
|
13 |
-
$this->_setActiveMenu('system');
|
14 |
-
$this->renderLayout();
|
15 |
-
}
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
public function importAction()
|
18 |
-
{
|
19 |
-
$
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
if (stristr('Authorization Required', $result)) {
|
38 |
$msgError .= '. ' . Mage::helper('payline')->__('Please check your authentication params (merchant Id / access key / environment) in System > Configuration');
|
39 |
-
} elseif (stristr('could not connect to host', $result)) {
|
40 |
-
$msgError .= '. ' . Mage::helper('payline')->__('Please check your proxy params (Proxy host / port / login / password) in System > Configuration');
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
Mage::getSingleton('adminhtml/session')->addError($msgError);
|
44 |
-
Mage::helper('payline/logger')->log('[importAction] ' . $
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
->
|
89 |
-
->
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
Mage::
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
$this->
|
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 |
-
//primary and secondary contracts must ne defined in only one point of sell
|
152 |
-
//because it's impossible to send to webservice contracts that are not in the same point of sell
|
153 |
-
//Mage::getResourceModel('payline/contract')->removePrimaryAndSecondaryNotIn($contract->getPointOfSell());
|
154 |
-
|
155 |
-
$contract->setIsPrimary($is_primary)
|
156 |
-
->setIsSecondary($is_secondary)
|
157 |
-
->save();
|
158 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contract saved successfully'));
|
159 |
-
}
|
160 |
-
} catch (Exception $e) {
|
161 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
162 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
163 |
-
return;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
$this->_redirect('*/*/');
|
168 |
-
}
|
169 |
-
|
170 |
-
public function editAction()
|
171 |
-
{
|
172 |
-
$contract = Mage::getModel('payline/contract')->load($this->getRequest()->getParam('id', false));
|
173 |
-
|
174 |
-
//checks if the item has been loaded correctly
|
175 |
-
if (!$contract->getId()) {
|
176 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('payline')->__("Required contract does not exist"));
|
177 |
-
$this->_redirect('*/*/index');
|
178 |
-
return;
|
179 |
-
}
|
180 |
-
|
181 |
-
// Register model to use later in blocks
|
182 |
-
Mage::register('current_contract', $contract);
|
183 |
-
|
184 |
-
$this->loadLayout();
|
185 |
-
$this->renderLayout();
|
186 |
-
}
|
187 |
-
|
188 |
-
public function massStatusAction()
|
189 |
{
|
190 |
$contractIds = (array) $this->getRequest()->getParam('contract');
|
191 |
-
$
|
192 |
$store = $this->getRequest()->getParam('store', 0);
|
193 |
-
$website = $this->getRequest()->getParam('website', 0);
|
194 |
-
|
195 |
-
Mage::getResourceModel('payline/
|
196 |
-
|
197 |
-
$this->_redirect('*/*/', array('website' => $website, 'store' => $store));
|
198 |
-
}
|
199 |
-
|
200 |
-
public function massWalletAction()
|
201 |
-
{
|
202 |
-
$contractIds = (array) $this->getRequest()->getParam('contract');
|
203 |
-
$subscribe = (int) $this->getRequest()->getParam('walletList');
|
204 |
-
$store = $this->getRequest()->getParam('store', 0);
|
205 |
-
$website = $this->getRequest()->getParam('website', 0);
|
206 |
-
|
207 |
-
Mage::getResourceModel('payline/contract')->updateContractWalletList(
|
208 |
-
$contractIds, $subscribe, $website, $store
|
209 |
);
|
210 |
|
211 |
$this->_redirect('*/*/', array('website' => $website, 'store' => $store));
|
212 |
-
}
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
$this->
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This controller manage primary and secondary payline contracts in back office
|
5 |
+
*/
|
6 |
+
class Monext_Payline_Adminhtml_Payline_ManagecontractsController extends Mage_Adminhtml_Controller_Action
|
7 |
+
{
|
8 |
+
|
9 |
+
public function indexAction()
|
10 |
+
{
|
11 |
+
$this->_title($this->__('Manage Payline Contracts'));
|
12 |
+
$this->loadLayout();
|
13 |
+
$this->_setActiveMenu('system');
|
14 |
+
$this->renderLayout();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function importFromConfigAction()
|
18 |
+
{
|
19 |
+
return $this->_importContract('adminhtml/system_config/edit/section/payline');
|
20 |
+
}
|
21 |
+
|
22 |
public function importAction()
|
23 |
+
{
|
24 |
+
return $this->_importContract('*/*');
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
protected function _importContract($utlPath='*/*')
|
29 |
+
{
|
30 |
+
$updatedAt = new Zend_Date();
|
31 |
+
$updatedAt = $updatedAt->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
32 |
+
|
33 |
+
$paylineSDK = Mage::helper('payline')->initPayline('CPT');
|
34 |
+
|
35 |
+
|
36 |
+
try {
|
37 |
+
$result = $paylineSDK->getMerchantSettings(array('version' => Monext_Payline_Helper_Data::VERSION));
|
38 |
+
} catch (Exception $e) {
|
39 |
+
Mage::logException($e);
|
40 |
+
$msg = Mage::helper('payline')->__('Error during import');
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
42 |
+
$msgLog = 'Unknown PAYLINE ERROR (payline unreachable?)';
|
43 |
+
Mage::helper('payline/logger')->log('[importAction] ' . $this->order->getIncrementId() . $msgLog);
|
44 |
+
$this->_redirect($utlPath);
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
if (is_string($result)) { //error message from web service
|
49 |
+
$msgError = $result;
|
50 |
if (stristr('Authorization Required', $result)) {
|
51 |
$msgError .= '. ' . Mage::helper('payline')->__('Please check your authentication params (merchant Id / access key / environment) in System > Configuration');
|
52 |
+
} elseif (stristr('could not connect to host', $result)) {
|
53 |
+
$msgError .= '. ' . Mage::helper('payline')->__('Please check your proxy params (Proxy host / port / login / password) in System > Configuration');
|
54 |
+
}
|
55 |
+
|
56 |
+
Mage::getSingleton('adminhtml/session')->addError($msgError);
|
57 |
+
Mage::helper('payline/logger')->log('[importAction] ' . $result);
|
58 |
+
} elseif (isset($result['listPointOfSell']['pointOfSell'])) {
|
59 |
+
$nbContracts = Mage::getModel('payline/contract')->getCollection()->getSize();
|
60 |
+
$first = true;
|
61 |
+
$listPointOfSell = array();
|
62 |
+
$listPointOfSell = $result['listPointOfSell']['pointOfSell'];
|
63 |
+
foreach ($listPointOfSell as $key => $pointOfSell) {
|
64 |
+
if (is_object($pointOfSell)) {
|
65 |
+
$contracts = $pointOfSell->contracts->contract;
|
66 |
+
$pointOfSellLabel = $pointOfSell->label;
|
67 |
+
} else { //if only one point of sell, we parse an array
|
68 |
+
if ($key == 'contracts') {
|
69 |
+
$contracts = $pointOfSell['contract'];
|
70 |
+
} elseif ($key == 'label') {
|
71 |
+
$pointOfSellLabel = $pointOfSell;
|
72 |
+
continue;
|
73 |
+
} else {
|
74 |
+
continue;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
if (!is_array($contracts)) {
|
79 |
+
$contracts = array($contracts);
|
80 |
+
}
|
81 |
+
|
82 |
+
if (is_array($contracts) && isset($contracts['contractNumber'])) {
|
83 |
+
$contracts = array((object) $contracts);
|
84 |
+
}
|
85 |
+
|
86 |
+
foreach ($contracts as $contract) {
|
87 |
+
$myContract = Mage::getModel('payline/contract')
|
88 |
+
->getCollection()
|
89 |
+
->addFieldToFilter('number', $contract->contractNumber)
|
90 |
+
->getFirstItem();
|
91 |
+
|
92 |
+
if ($myContract->getId()) { //contract exists, update
|
93 |
+
$myContract->setName($contract->label)
|
94 |
+
->setPointOfSell($pointOfSellLabel)
|
95 |
+
->setContractDate($updatedAt)
|
96 |
+
->setContractType($contract->cardType)
|
97 |
+
->save();
|
98 |
+
} else {
|
99 |
+
$new_contract = Mage::getModel('payline/contract')
|
100 |
+
->setName($contract->label)
|
101 |
+
->setNumber($contract->contractNumber)
|
102 |
+
->setPointOfSell($pointOfSellLabel)
|
103 |
+
->setContractType($contract->cardType)
|
104 |
+
->setContractDate($updatedAt);
|
105 |
+
|
106 |
+
if ($first && !$nbContracts) { //force to have a primary contract
|
107 |
+
$new_contract->setIsPrimary(1);
|
108 |
+
$first = false;
|
109 |
+
}
|
110 |
+
|
111 |
+
$new_contract->save();
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
//delete contracts not updated
|
117 |
+
$toDelete = Mage::getModel('payline/contract')->getCollection()
|
118 |
+
->addFieldToFilter('contract_date', array('neq' => $updatedAt));
|
119 |
+
foreach ($toDelete as $contract) {
|
120 |
+
$contract->delete();
|
121 |
+
}
|
122 |
+
|
123 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contracts imported successfully. Don\'t forget to define primary and secondary contracts!'));
|
124 |
+
} else {
|
125 |
+
|
126 |
+
$msgError = 'Unknown error occured while importing contract';
|
127 |
+
if (!empty($result['result']['longMessage'])) {
|
128 |
+
$msgError .= ' ('.$result['result']['longMessage'].')';
|
129 |
+
} elseif (!empty($result['result']['code'])) {
|
130 |
+
$msgError .= ' (code: '.$result['result']['code'].')';
|
131 |
+
}
|
132 |
|
133 |
Mage::getSingleton('adminhtml/session')->addError($msgError);
|
134 |
+
Mage::helper('payline/logger')->log('[importAction] ' . $msgError);
|
135 |
+
|
136 |
+
}
|
137 |
+
$this->_redirect($utlPath);
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* can't create new contract, forward to edit action
|
142 |
+
*/
|
143 |
+
public function newAction()
|
144 |
+
{
|
145 |
+
$this->_forward('edit');
|
146 |
+
}
|
147 |
+
|
148 |
+
public function saveAction()
|
149 |
+
{
|
150 |
+
if ($this->getRequest()->getPost()) {
|
151 |
+
try {
|
152 |
+
$postData = $this->getRequest()->getPost();
|
153 |
+
|
154 |
+
// Update existing contract
|
155 |
+
if (array_key_exists('id', $postData)) {
|
156 |
+
$contract = Mage::getModel('payline/contract')->load($postData['id']);
|
157 |
+
|
158 |
+
$is_primary = (isset($postData['is_primary']) ? $postData['is_primary'] : 0);
|
159 |
+
$is_secondary = (isset($postData['is_secondary']) ? $postData['is_secondary'] : 0);
|
160 |
+
$is_secure = (isset($postData['is_secure']) ? $postData['is_secure'] : 0);
|
161 |
+
|
162 |
+
$count = Mage::getModel('payline/contract')->getCollection()
|
163 |
+
->addFieldToFilter('is_primary', 1)
|
164 |
+
->addFieldToFilter('id', array('neq' => $contract->getId()))
|
165 |
+
->getSize();
|
166 |
+
//at least one contract must be primary
|
167 |
+
if (!$is_primary && !$count) {
|
168 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('payline')->__('At leat one contract must be primary'));
|
169 |
+
$this->_redirect('*/*');
|
170 |
+
return;
|
171 |
+
}
|
172 |
+
|
173 |
+
//primary and secondary contracts must ne defined in only one point of sell
|
174 |
+
//because it's impossible to send to webservice contracts that are not in the same point of sell
|
175 |
+
//Mage::getResourceModel('payline/contract')->removePrimaryAndSecondaryNotIn($contract->getPointOfSell());
|
176 |
+
|
177 |
+
$contract->setIsPrimary($is_primary)
|
178 |
+
->setIsSecondary($is_secondary)
|
179 |
+
->setIsSecure($is_secure)
|
180 |
+
->save();
|
181 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('payline')->__('Contract saved successfully'));
|
182 |
+
}
|
183 |
+
} catch (Exception $e) {
|
184 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
185 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
186 |
+
return;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
$this->_redirect('*/*/');
|
191 |
+
}
|
192 |
+
|
193 |
+
public function editAction()
|
194 |
+
{
|
195 |
+
$contract = Mage::getModel('payline/contract')->load($this->getRequest()->getParam('id', false));
|
196 |
+
|
197 |
+
//checks if the item has been loaded correctly
|
198 |
+
if (!$contract->getId()) {
|
199 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('payline')->__("Required contract does not exist"));
|
200 |
+
$this->_redirect('*/*/index');
|
201 |
+
return;
|
202 |
+
}
|
203 |
+
|
204 |
+
// Register model to use later in blocks
|
205 |
+
Mage::register('current_contract', $contract);
|
206 |
+
|
207 |
+
$this->loadLayout();
|
208 |
+
$this->renderLayout();
|
209 |
+
}
|
210 |
+
|
211 |
+
public function massStatusAction()
|
212 |
+
{
|
213 |
+
$contractIds = (array) $this->getRequest()->getParam('contract');
|
214 |
+
$status = (int) $this->getRequest()->getParam('status');
|
215 |
+
$store = $this->getRequest()->getParam('store', 0);
|
216 |
+
$website = $this->getRequest()->getParam('website', 0);
|
217 |
+
|
218 |
+
Mage::getResourceModel('payline/contract_status')->updateContractStatus($contractIds, $status, $website, $store);
|
219 |
+
|
220 |
+
$this->_redirect('*/*/', array('website' => $website, 'store' => $store));
|
221 |
+
}
|
222 |
+
|
223 |
+
|
224 |
+
public function massWalletAction()
|
225 |
+
{
|
226 |
+
$contractIds = (array) $this->getRequest()->getParam('contract');
|
227 |
+
$subscribe = (int) $this->getRequest()->getParam('walletList');
|
228 |
+
$store = $this->getRequest()->getParam('store', 0);
|
229 |
+
$website = $this->getRequest()->getParam('website', 0);
|
230 |
+
|
231 |
+
Mage::getResourceModel('payline/contract')->updateContractWalletList(
|
232 |
+
$contractIds, $subscribe, $website, $store
|
233 |
+
);
|
234 |
+
|
235 |
+
$this->_redirect('*/*/', array('website' => $website, 'store' => $store));
|
236 |
+
}
|
237 |
+
|
238 |
+
|
239 |
+
public function massSecureAction()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
{
|
241 |
$contractIds = (array) $this->getRequest()->getParam('contract');
|
242 |
+
$secure = (int) $this->getRequest()->getParam('setSecure');
|
243 |
$store = $this->getRequest()->getParam('store', 0);
|
244 |
+
$website = $this->getRequest()->getParam('website', 0);
|
245 |
+
|
246 |
+
Mage::getResourceModel('payline/contract')->updateContractSecureList(
|
247 |
+
$contractIds, $secure, $website, $store
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
);
|
249 |
|
250 |
$this->_redirect('*/*/', array('website' => $website, 'store' => $store));
|
251 |
+
}
|
252 |
+
/**
|
253 |
+
* contracts grid for AJAX request
|
254 |
+
*/
|
255 |
+
public function gridAction()
|
256 |
+
{
|
257 |
+
$this->loadLayout();
|
258 |
+
$this->renderLayout();
|
259 |
+
}
|
260 |
+
|
261 |
+
}
|
|
app/code/community/Monext/Payline/controllers/Adminhtml/Payline/ManageproductcategoriesController.php
CHANGED
@@ -1,101 +1,114 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This controller manage mapping between Payline and store product categories
|
5 |
-
*/
|
6 |
-
class Monext_Payline_Adminhtml_Payline_ManageproductcategoriesController extends Mage_Adminhtml_Controller_Action
|
7 |
-
{
|
8 |
-
public function indexAction()
|
9 |
-
{
|
10 |
-
$this->_title($this->__('Manage Payline Product Categories'));
|
11 |
-
$this->loadLayout();
|
12 |
-
$this->_setActiveMenu('system');
|
13 |
-
$this->renderLayout();
|
14 |
-
}
|
15 |
-
|
16 |
-
public function assignAction()
|
17 |
-
{
|
18 |
-
Mage::getSingleton('core/session')->setData('rowCatToAssign',$this->getRequest()->getParam('id'));
|
19 |
-
$this->loadLayout()
|
20 |
-
->renderLayout();
|
21 |
-
}
|
22 |
-
|
23 |
-
public function unassignAction()
|
24 |
-
{
|
25 |
-
$rowId = $this->getRequest()->getParam('id');
|
26 |
-
$model = Mage::getModel('payline/productcategories')->load($rowId);
|
27 |
-
$data = array('payline_category_id' => -1, 'payline_category_label' => '');
|
28 |
-
$model->addData($data);
|
29 |
-
try {
|
30 |
-
$model->setId($rowId)->save();
|
31 |
-
} catch (Exception $e){
|
32 |
-
echo $e->getMessage();
|
33 |
-
}
|
34 |
-
$this->_redirect('*/*/');
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
$
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This controller manage mapping between Payline and store product categories
|
5 |
+
*/
|
6 |
+
class Monext_Payline_Adminhtml_Payline_ManageproductcategoriesController extends Mage_Adminhtml_Controller_Action
|
7 |
+
{
|
8 |
+
public function indexAction()
|
9 |
+
{
|
10 |
+
$this->_title($this->__('Manage Payline Product Categories'));
|
11 |
+
$this->loadLayout();
|
12 |
+
$this->_setActiveMenu('system');
|
13 |
+
$this->renderLayout();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function assignAction()
|
17 |
+
{
|
18 |
+
Mage::getSingleton('core/session')->setData('rowCatToAssign',$this->getRequest()->getParam('id'));
|
19 |
+
$this->loadLayout()
|
20 |
+
->renderLayout();
|
21 |
+
}
|
22 |
+
|
23 |
+
public function unassignAction()
|
24 |
+
{
|
25 |
+
$rowId = $this->getRequest()->getParam('id');
|
26 |
+
$model = Mage::getModel('payline/productcategories')->load($rowId);
|
27 |
+
$data = array('payline_category_id' => -1, 'payline_category_label' => '');
|
28 |
+
$model->addData($data);
|
29 |
+
try {
|
30 |
+
$model->setId($rowId)->save();
|
31 |
+
} catch (Exception $e){
|
32 |
+
echo $e->getMessage();
|
33 |
+
}
|
34 |
+
$this->_redirect('*/*/');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function updateAction()
|
38 |
+
{
|
39 |
+
$collection = Mage::getModel('catalog/category')->getCollection()
|
40 |
+
->addAttributeToSelect('name')
|
41 |
+
->addAttributeToSelect('is_active')
|
42 |
+
->addAttributeToFilter('level',array('gt'=>1));
|
43 |
+
|
44 |
+
$collection->getSelect()
|
45 |
+
->joinLeft(array('plncat'=>$collection->getTable('payline_product_categories')), 'plncat.store_category_id=e.entity_id')
|
46 |
+
->where('plncat.store_category_id is null');
|
47 |
+
|
48 |
+
|
49 |
+
foreach ($collection as $category) {
|
50 |
+
$pc = Mage::getModel('payline/productcategories')
|
51 |
+
->setStoreCategoryId($category->getId())
|
52 |
+
->setStoreCategoryLabel(Mage::helper('payline/category')->getCategoryFullpathName($category->getId()))
|
53 |
+
->setPaylineCategoryId(-1)
|
54 |
+
->save();
|
55 |
+
}
|
56 |
+
|
57 |
+
$this->_redirect('*/*/');
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Save status assignment to state
|
62 |
+
*/
|
63 |
+
public function assignPostAction()
|
64 |
+
{
|
65 |
+
$data = $this->getRequest()->getPost();
|
66 |
+
if ($data) {
|
67 |
+
$paylineCategoryId = $this->getRequest()->getParam('paylinecat');
|
68 |
+
$rowId = Mage::getSingleton('core/session')->getData('rowCatToAssign');
|
69 |
+
|
70 |
+
$data = array('payline_category_id' => $paylineCategoryId, 'payline_category_label' => Mage::getModel('payline/datasource_paylineproductcategories')->getLabelbyId($paylineCategoryId));
|
71 |
+
$model = Mage::getModel('payline/productcategories')->load($rowId);
|
72 |
+
$model->addData($data);
|
73 |
+
try {
|
74 |
+
$model->setId($rowId)->save();
|
75 |
+
} catch (Exception $e){
|
76 |
+
echo $e->getMessage();
|
77 |
+
}
|
78 |
+
$this->_redirect('*/*/index');
|
79 |
+
return;
|
80 |
+
}
|
81 |
+
$this->_redirect('*/*/');
|
82 |
+
}
|
83 |
+
|
84 |
+
public function resetAction()
|
85 |
+
{
|
86 |
+
$pcCol = Mage::getModel('payline/productcategories')->getCollection();
|
87 |
+
|
88 |
+
// delete current mapping between Payline and store categories
|
89 |
+
foreach ($pcCol as $pcitem) {
|
90 |
+
$pcitem->delete();
|
91 |
+
}
|
92 |
+
|
93 |
+
$categories = Mage::helper('payline/category')->getAllCategoriesWithFullpathName();
|
94 |
+
foreach ($categories as $categoryId=>$categoryPath) {
|
95 |
+
$pc = Mage::getModel('payline/productcategories')
|
96 |
+
->setStoreCategoryId($categoryId)
|
97 |
+
->setStoreCategoryLabel($categoryPath)
|
98 |
+
->setPaylineCategoryId(-1)
|
99 |
+
->save();
|
100 |
+
}
|
101 |
+
$this->_redirect('*/*');
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Order grid
|
106 |
+
*/
|
107 |
+
public function gridAction()
|
108 |
+
{
|
109 |
+
$this->loadLayout();
|
110 |
+
$this->getResponse()->setBody(
|
111 |
+
$this->getLayout()->createBlock('payline/adminhtml_manageproductcategories_grid')->toHtml()
|
112 |
+
);
|
113 |
+
}
|
114 |
+
}
|
app/code/community/Monext/Payline/controllers/CheckoutonepageController.php
CHANGED
@@ -1,173 +1,173 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This controller initialize the checkout for the oneclick payment
|
4 |
-
*/
|
5 |
-
require_once 'Mage/Checkout/controllers/OnepageController.php';
|
6 |
-
class Monext_Payline_CheckoutonepageController extends Mage_Checkout_OnepageController {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Initialize the onepage checkout by 1 click
|
10 |
-
*/
|
11 |
-
public function indexAction(){
|
12 |
-
if (!Mage::getStoreConfig('payment/PaylineWALLET/active')){
|
13 |
-
$this->_redirect('checkout/onepage');
|
14 |
-
return;
|
15 |
-
}
|
16 |
-
//INIT
|
17 |
-
$customer=Mage::getSingleton('customer/session')->getCustomer();
|
18 |
-
|
19 |
-
//Customer has wallet?
|
20 |
-
if (!(Mage::getSingleton('customer/session')->isLoggedIn())){
|
21 |
-
$this->_redirect('customer/account/login');
|
22 |
-
return;
|
23 |
-
}
|
24 |
-
|
25 |
-
if (!($walletId=$customer->getWalletId())){
|
26 |
-
$this->_redirect('checkout/onepage');
|
27 |
-
return;
|
28 |
-
}
|
29 |
-
|
30 |
-
if (!Mage::helper('checkout')->canOnepageCheckout()) {
|
31 |
-
Mage::getSingleton('checkout/session')->addError($this->__('The onepage checkout is disabled.'));
|
32 |
-
$this->_redirect('checkout/cart');
|
33 |
-
return;
|
34 |
-
}
|
35 |
-
/* @var $onepage Mage_Checkout_Model_Type_Onepage */
|
36 |
-
$onepage = Mage::getSingleton('checkout/type_onepage');
|
37 |
-
$quote=$onepage->getQuote();
|
38 |
-
if (!$quote->hasItems() || $quote->getHasError()) {
|
39 |
-
$this->_redirect('checkout/cart');
|
40 |
-
return;
|
41 |
-
}
|
42 |
-
if (!$quote->validateMinimumAmount()) {
|
43 |
-
$error = Mage::getStoreConfig('sales/minimum_order/error_message');
|
44 |
-
Mage::getSingleton('checkout/session')->addError($error);
|
45 |
-
$this->_redirect('checkout/cart');
|
46 |
-
return;
|
47 |
-
}
|
48 |
-
|
49 |
-
//Check if the wallet payment is available
|
50 |
-
/* @var $walletPaymentMethod Monext_Payline_Model_Wallet */
|
51 |
-
$walletPaymentMethod=Mage::getModel('payline/wallet');
|
52 |
-
$error='';
|
53 |
-
if(!$walletPaymentMethod->checkExpirationDate()){
|
54 |
-
$error=$this->__('The credit card of your wallet has expired.');
|
55 |
-
$error.='<a href="'.Mage::getUrl('payline/wallet/manage').'">'.
|
56 |
-
$this->__('Update your wallet information').'</a>'.
|
57 |
-
$this->__(' or process your order below.');
|
58 |
-
Mage::getSingleton('checkout/session')->addError($error);
|
59 |
-
$this->_redirect('checkout/cart');
|
60 |
-
return;
|
61 |
-
}elseif(!$walletPaymentMethod->isAvailable()){
|
62 |
-
$error=$this->__('The wallet payment method is disabled. You can process your order below.');
|
63 |
-
Mage::getSingleton('checkout/session')->addError($error);
|
64 |
-
$this->_redirect('checkout/cart');
|
65 |
-
return;
|
66 |
-
}
|
67 |
-
|
68 |
-
Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
|
69 |
-
Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_secure'=>true)));
|
70 |
-
//Init customer quote, isMultiShipping false
|
71 |
-
$onepage->initCheckout();
|
72 |
-
|
73 |
-
//Checkout enabled?
|
74 |
-
if (!Mage::helper('checkout')->canOnepageCheckout()) {
|
75 |
-
Mage::getSingleton('checkout/session')->addError($this->__('The onepage checkout is disabled.'));
|
76 |
-
$this->_redirect('checkout/cart');
|
77 |
-
return;
|
78 |
-
}
|
79 |
-
|
80 |
-
if (version_compare(Mage::getVersion(), '1.4', 'ge')){
|
81 |
-
$onepage->saveCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_CUSTOMER);
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
//Get rid of a few problems if order not completed
|
86 |
-
//$onepage->getQuote()->re//moveAllAddresses();
|
87 |
-
$shippingAddressId = $this->getRequest()->getPost('shipping_address_id', false);
|
88 |
-
$billingAddressId = $this->getRequest()->getPost('billing_address_id', false);
|
89 |
-
/* PATCH for 1clic btn on checkout/cart */
|
90 |
-
if (empty($shippingAddressId)){
|
91 |
-
if($customer->getPrimaryShippingAddress()){
|
92 |
-
$shippingAddressId = $customer->getPrimaryShippingAddress()->getId();
|
93 |
-
}else{
|
94 |
-
Mage::getSingleton('checkout/session')->addError($this->__('You must add an address to your account to be able to checkout in one clic.'));
|
95 |
-
$this->_redirect('checkout/cart');
|
96 |
-
return;
|
97 |
-
}
|
98 |
-
}
|
99 |
-
if (empty($billingAddressId)){
|
100 |
-
if ($customer->getPrimaryBillingAddress()){
|
101 |
-
$billingAddressId = $customer->getPrimaryBillingAddress()->getId();
|
102 |
-
}else{
|
103 |
-
Mage::getSingleton('checkout/session')->addError($this->__('You must add an address to your account to be able to checkout in one clic.'));
|
104 |
-
$this->_redirect('checkout/cart');
|
105 |
-
return;
|
106 |
-
}
|
107 |
-
}
|
108 |
-
/* PATCH end */
|
109 |
-
$billingAddress=Mage::getModel('customer/address')->load($billingAddressId)->getData();
|
110 |
-
$shippingAddress=Mage::getModel('customer/address')->load($shippingAddressId)->getData();
|
111 |
-
$billingAddressForCheckout=array(
|
112 |
-
'address_id' => $billingAddress['entity_id'],
|
113 |
-
);
|
114 |
-
$shippingAddressForCheckout=array(
|
115 |
-
'address_id' => $shippingAddress['entity_id'],
|
116 |
-
);
|
117 |
-
|
118 |
-
$onepage->saveBilling($billingAddressForCheckout, $billingAddressId);
|
119 |
-
|
120 |
-
$onepage->saveShipping($shippingAddressForCheckout, $shippingAddressId);
|
121 |
-
|
122 |
-
// Get available shipping rates; if one is available by default then use it, otherwise ask customer
|
123 |
-
if ($methodCode=Mage::getStoreConfig('payment/PaylineWALLET/default_shipping_method')){
|
124 |
-
//Needed to get shipping methods
|
125 |
-
$onepage->getQuote()->getShippingAddress()->collectShippingRates()->save();
|
126 |
-
$array=$onepage->saveShippingMethod($methodCode);
|
127 |
-
|
128 |
-
Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array('request'=>$this->getRequest(), 'quote'=>$quote));
|
129 |
-
}
|
130 |
-
$shippingMethod=$onepage->getQuote()->getShippingAddress()->getShippingMethod();
|
131 |
-
|
132 |
-
$data=array('method'=>'PaylineWALLET');
|
133 |
-
$array=$onepage->savePayment($data);
|
134 |
-
$this->loadLayout();
|
135 |
-
$this->_initLayoutMessages('customer/session');
|
136 |
-
$this->_getChargeProgress();
|
137 |
-
|
138 |
-
$gotoSection = 'review';
|
139 |
-
//If the shipping method is not configured, or the shipping address doesn't fit,
|
140 |
-
//the shipping method template is different : when the form is validated, the payment method will be validated as well
|
141 |
-
if (!isset($shippingMethod) || empty($shippingMethod)){
|
142 |
-
$this->getLayout()->getBlock('checkout.onepage.shipping_method')->setTemplate('payline/checkout/onepage/shipping-method.phtml');
|
143 |
-
$gotoSection = 'shipping_method';
|
144 |
-
}
|
145 |
-
|
146 |
-
if (version_compare(Mage::getVersion(), '1.8', 'ge')) {
|
147 |
-
$this->getLayout()->getBlock('checkout.onepage.shipping_method')->setTemplate('payline/checkout/onepage/shipping-method.phtml');
|
148 |
-
$this->getLayout()->getBlock('checkout.payment.methods')->setTemplate('payline/checkout/onepage/payment/methods.phtml');
|
149 |
-
Mage::register('payline-magento-version', 1.8);
|
150 |
-
}
|
151 |
-
|
152 |
-
Mage::register('payline-goto-section', $gotoSection);
|
153 |
-
$this->getLayout()->getBlock('head')->setTitle($this->__('Checkout'));
|
154 |
-
$this->renderLayout();
|
155 |
-
}
|
156 |
-
|
157 |
-
public function reviewAction()
|
158 |
-
{
|
159 |
-
$this->loadLayout('checkout_onepage_review');
|
160 |
-
$this->renderLayout();
|
161 |
-
}
|
162 |
-
|
163 |
-
protected function _getChargeProgress()
|
164 |
-
{
|
165 |
-
$steps = array('billing', 'shipping', 'shipping_method', 'payment');
|
166 |
-
$checkout = Mage::getSingleton('checkout/session');
|
167 |
-
foreach ($steps as $step) {
|
168 |
-
$checkout->setStepData($step, 'complete', true);
|
169 |
-
$checkout->setStepData($step, 'allow', true);
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This controller initialize the checkout for the oneclick payment
|
4 |
+
*/
|
5 |
+
require_once 'Mage/Checkout/controllers/OnepageController.php';
|
6 |
+
class Monext_Payline_CheckoutonepageController extends Mage_Checkout_OnepageController {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Initialize the onepage checkout by 1 click
|
10 |
+
*/
|
11 |
+
public function indexAction(){
|
12 |
+
if (!Mage::getStoreConfig('payment/PaylineWALLET/active')){
|
13 |
+
$this->_redirect('checkout/onepage');
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
//INIT
|
17 |
+
$customer=Mage::getSingleton('customer/session')->getCustomer();
|
18 |
+
|
19 |
+
//Customer has wallet?
|
20 |
+
if (!(Mage::getSingleton('customer/session')->isLoggedIn())){
|
21 |
+
$this->_redirect('customer/account/login');
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
if (!($walletId=$customer->getWalletId())){
|
26 |
+
$this->_redirect('checkout/onepage');
|
27 |
+
return;
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!Mage::helper('checkout')->canOnepageCheckout()) {
|
31 |
+
Mage::getSingleton('checkout/session')->addError($this->__('The onepage checkout is disabled.'));
|
32 |
+
$this->_redirect('checkout/cart');
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
/* @var $onepage Mage_Checkout_Model_Type_Onepage */
|
36 |
+
$onepage = Mage::getSingleton('checkout/type_onepage');
|
37 |
+
$quote=$onepage->getQuote();
|
38 |
+
if (!$quote->hasItems() || $quote->getHasError()) {
|
39 |
+
$this->_redirect('checkout/cart');
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
if (!$quote->validateMinimumAmount()) {
|
43 |
+
$error = Mage::getStoreConfig('sales/minimum_order/error_message');
|
44 |
+
Mage::getSingleton('checkout/session')->addError($error);
|
45 |
+
$this->_redirect('checkout/cart');
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
//Check if the wallet payment is available
|
50 |
+
/* @var $walletPaymentMethod Monext_Payline_Model_Wallet */
|
51 |
+
$walletPaymentMethod=Mage::getModel('payline/wallet');
|
52 |
+
$error='';
|
53 |
+
if(!$walletPaymentMethod->checkExpirationDate()){
|
54 |
+
$error=$this->__('The credit card of your wallet has expired.');
|
55 |
+
$error.='<a href="'.Mage::getUrl('payline/wallet/manage').'">'.
|
56 |
+
$this->__('Update your wallet information').'</a>'.
|
57 |
+
$this->__(' or process your order below.');
|
58 |
+
Mage::getSingleton('checkout/session')->addError($error);
|
59 |
+
$this->_redirect('checkout/cart');
|
60 |
+
return;
|
61 |
+
}elseif(!$walletPaymentMethod->isAvailable()){
|
62 |
+
$error=$this->__('The wallet payment method is disabled. You can process your order below.');
|
63 |
+
Mage::getSingleton('checkout/session')->addError($error);
|
64 |
+
$this->_redirect('checkout/cart');
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
|
69 |
+
Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_secure'=>true)));
|
70 |
+
//Init customer quote, isMultiShipping false
|
71 |
+
$onepage->initCheckout();
|
72 |
+
|
73 |
+
//Checkout enabled?
|
74 |
+
if (!Mage::helper('checkout')->canOnepageCheckout()) {
|
75 |
+
Mage::getSingleton('checkout/session')->addError($this->__('The onepage checkout is disabled.'));
|
76 |
+
$this->_redirect('checkout/cart');
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
if (version_compare(Mage::getVersion(), '1.4', 'ge')){
|
81 |
+
$onepage->saveCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_CUSTOMER);
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
//Get rid of a few problems if order not completed
|
86 |
+
//$onepage->getQuote()->re//moveAllAddresses();
|
87 |
+
$shippingAddressId = $this->getRequest()->getPost('shipping_address_id', false);
|
88 |
+
$billingAddressId = $this->getRequest()->getPost('billing_address_id', false);
|
89 |
+
/* PATCH for 1clic btn on checkout/cart */
|
90 |
+
if (empty($shippingAddressId)){
|
91 |
+
if($customer->getPrimaryShippingAddress()){
|
92 |
+
$shippingAddressId = $customer->getPrimaryShippingAddress()->getId();
|
93 |
+
}else{
|
94 |
+
Mage::getSingleton('checkout/session')->addError($this->__('You must add an address to your account to be able to checkout in one clic.'));
|
95 |
+
$this->_redirect('checkout/cart');
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
if (empty($billingAddressId)){
|
100 |
+
if ($customer->getPrimaryBillingAddress()){
|
101 |
+
$billingAddressId = $customer->getPrimaryBillingAddress()->getId();
|
102 |
+
}else{
|
103 |
+
Mage::getSingleton('checkout/session')->addError($this->__('You must add an address to your account to be able to checkout in one clic.'));
|
104 |
+
$this->_redirect('checkout/cart');
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
/* PATCH end */
|
109 |
+
$billingAddress=Mage::getModel('customer/address')->load($billingAddressId)->getData();
|
110 |
+
$shippingAddress=Mage::getModel('customer/address')->load($shippingAddressId)->getData();
|
111 |
+
$billingAddressForCheckout=array(
|
112 |
+
'address_id' => $billingAddress['entity_id'],
|
113 |
+
);
|
114 |
+
$shippingAddressForCheckout=array(
|
115 |
+
'address_id' => $shippingAddress['entity_id'],
|
116 |
+
);
|
117 |
+
|
118 |
+
$onepage->saveBilling($billingAddressForCheckout, $billingAddressId);
|
119 |
+
|
120 |
+
$onepage->saveShipping($shippingAddressForCheckout, $shippingAddressId);
|
121 |
+
|
122 |
+
// Get available shipping rates; if one is available by default then use it, otherwise ask customer
|
123 |
+
if ($methodCode=Mage::getStoreConfig('payment/PaylineWALLET/default_shipping_method')){
|
124 |
+
//Needed to get shipping methods
|
125 |
+
$onepage->getQuote()->getShippingAddress()->collectShippingRates()->save();
|
126 |
+
$array=$onepage->saveShippingMethod($methodCode);
|
127 |
+
|
128 |
+
Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array('request'=>$this->getRequest(), 'quote'=>$quote));
|
129 |
+
}
|
130 |
+
$shippingMethod=$onepage->getQuote()->getShippingAddress()->getShippingMethod();
|
131 |
+
|
132 |
+
$data=array('method'=>'PaylineWALLET');
|
133 |
+
$array=$onepage->savePayment($data);
|
134 |
+
$this->loadLayout();
|
135 |
+
$this->_initLayoutMessages('customer/session');
|
136 |
+
$this->_getChargeProgress();
|
137 |
+
|
138 |
+
$gotoSection = 'review';
|
139 |
+
//If the shipping method is not configured, or the shipping address doesn't fit,
|
140 |
+
//the shipping method template is different : when the form is validated, the payment method will be validated as well
|
141 |
+
if (!isset($shippingMethod) || empty($shippingMethod)){
|
142 |
+
$this->getLayout()->getBlock('checkout.onepage.shipping_method')->setTemplate('payline/checkout/onepage/shipping-method.phtml');
|
143 |
+
$gotoSection = 'shipping_method';
|
144 |
+
}
|
145 |
+
|
146 |
+
if (version_compare(Mage::getVersion(), '1.8', 'ge')) {
|
147 |
+
$this->getLayout()->getBlock('checkout.onepage.shipping_method')->setTemplate('payline/checkout/onepage/shipping-method.phtml');
|
148 |
+
$this->getLayout()->getBlock('checkout.payment.methods')->setTemplate('payline/checkout/onepage/payment/methods.phtml');
|
149 |
+
Mage::register('payline-magento-version', 1.8);
|
150 |
+
}
|
151 |
+
|
152 |
+
Mage::register('payline-goto-section', $gotoSection);
|
153 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__('Checkout'));
|
154 |
+
$this->renderLayout();
|
155 |
+
}
|
156 |
+
|
157 |
+
public function reviewAction()
|
158 |
+
{
|
159 |
+
$this->loadLayout('checkout_onepage_review');
|
160 |
+
$this->renderLayout();
|
161 |
+
}
|
162 |
+
|
163 |
+
protected function _getChargeProgress()
|
164 |
+
{
|
165 |
+
$steps = array('billing', 'shipping', 'shipping_method', 'payment');
|
166 |
+
$checkout = Mage::getSingleton('checkout/session');
|
167 |
+
foreach ($steps as $step) {
|
168 |
+
$checkout->setStepData($step, 'complete', true);
|
169 |
+
$checkout->setStepData($step, 'allow', true);
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
}
|
app/code/community/Monext/Payline/controllers/IndexController.php
CHANGED
@@ -1,62 +1,73 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* This controller manage all payline payment
|
5 |
-
* cptAction, directAction, nxAction & walletAction are called just after the
|
|
|
6 |
* the return/notify/cancel are the urls called by Payline
|
7 |
-
* An exception for notifyAction : it's not directly called by Payline, since it
|
|
|
|
|
8 |
* @author fague
|
9 |
*
|
10 |
*/
|
11 |
class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
12 |
{
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
protected function _getCustomerSession()
|
17 |
{
|
18 |
return Mage::getSingleton('customer/session');
|
19 |
}
|
20 |
|
21 |
/**
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
|
|
|
|
25 |
* @param string $cancelStatus
|
26 |
*/
|
27 |
-
private function cancelOrder($cancelStatus, $resCode = ''
|
28 |
-
|
|
|
29 |
Mage::helper('payline/payment')->updateStock($this->order);
|
30 |
$this->order->save();
|
31 |
Mage::helper('payline/logger')->log('[cancelOrder] - order '.$this->order->getIncrementId().' state is set to '.$cancelStatus);
|
32 |
-
|
33 |
$this->_redirectUrl($this->_getPaymentRefusedRedirectUrl());
|
34 |
}
|
35 |
|
36 |
-
/**
|
37 |
* Check if the customer is logged, and if it has a wallet
|
38 |
* If not & if there is a walletId in the result from Payline, we save it
|
39 |
*/
|
40 |
-
public function saveWallet($walletId)
|
41 |
-
|
|
|
42 |
return;
|
43 |
}
|
44 |
$customerSession = Mage::getSingleton('customer/session');
|
45 |
-
if ($customerSession->isLoggedIn()){
|
46 |
$customer = $customerSession->getCustomer();
|
47 |
-
if (
|
48 |
$customer->setWalletId($walletId);
|
49 |
$customer->save();
|
50 |
}
|
51 |
}
|
52 |
}
|
53 |
-
|
54 |
/**
|
55 |
-
*
|
56 |
* Initialise the requests param array
|
|
|
57 |
* @return array
|
58 |
*/
|
59 |
-
private function
|
60 |
{
|
61 |
$_session = Mage::getSingleton('checkout/session');
|
62 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($_session->getLastRealOrderId());
|
@@ -65,22 +76,26 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
65 |
|
66 |
/**
|
67 |
* Force this action code of some payment methods to the given action code
|
|
|
68 |
* @param $paymentMethod {string}
|
69 |
-
* @param $array {array}
|
70 |
-
*
|
|
|
|
|
71 |
*/
|
72 |
private function forcePaymentActionTo($paymentMethod, &$array, $actionCode)
|
73 |
{
|
74 |
-
switch(
|
75 |
case 'UKASH':
|
76 |
case 'MONEYCLIC':
|
77 |
case 'TICKETSURF':
|
78 |
case 'SKRILL(MONEYBOOKERS)':
|
79 |
case 'LEETCHI':
|
80 |
-
Mage::helper('payline/logger')->log('[cptAction] order '
|
81 |
$array['payment']['action'] = $actionCode;
|
82 |
break;
|
83 |
-
default:
|
|
|
84 |
}
|
85 |
}
|
86 |
|
@@ -88,151 +103,302 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
88 |
* Initialize the cpt payment request
|
89 |
*/
|
90 |
public function cptAction(){
|
91 |
-
//Check if wallet is sendable
|
92 |
-
//Must be done before call to Payline helper initialisation
|
93 |
-
$expiredWalletId=false;
|
94 |
-
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
95 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
96 |
-
if ($customer->getWalletId() && !Mage::getModel('payline/wallet')->checkExpirationDate()){
|
97 |
-
|
98 |
}
|
99 |
-
}
|
100 |
-
|
101 |
-
$array = $this->init();
|
102 |
if($this->order->getBaseGrandTotal() == 0){ // If order amount is null, exit payment process
|
103 |
Mage::helper('payline')->setOrderStatus($this->order, Mage::getStoreConfig('payment/payline_common/authorized_order_status'));
|
104 |
return true;
|
105 |
}
|
106 |
/* @var $paylineSDK PaylineSDK */
|
107 |
-
|
108 |
-
$paylineSDK = $helperPayline->initPayline(
|
109 |
-
|
110 |
-
|
111 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
112 |
-
|
113 |
-
Mage::helper('payline/logger')->log('[cptAction] order '
|
114 |
$contractCPT = Mage::getModel('payline/contract')
|
115 |
->getCollection()
|
116 |
-
->addFieldToFilter(
|
117 |
->getFirstItem();
|
118 |
-
$this->forcePaymentActionTo(
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
if ($expiredWalletId){
|
139 |
-
$helperPayline->walletId=null;
|
140 |
-
}
|
141 |
-
|
142 |
// PRIVATE DATA
|
143 |
$privateData = array();
|
144 |
$privateData['key'] = 'orderRef';
|
145 |
$privateData['value'] = substr(str_replace(array("\r","\n","\t"), array('','',''),$array['order']['ref']), 0,255);
|
146 |
$paylineSDK->setPrivate($privateData);
|
147 |
-
if(isset($customer)){
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
//ORDER DETAILS (optional)
|
161 |
$helperPayline->setOrderDetails($paylineSDK, $this->order, $sendPaylineproductCat, $pcCol);
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
180 |
// ADD CONTRACT WALLET ARRAY TO $array
|
181 |
$array['walletContracts'] = Mage::helper('payline')->buildContractNumberWalletList();
|
182 |
-
|
183 |
// EXECUTE
|
184 |
-
try{
|
185 |
$result = $paylineSDK->doWebPayment($array);
|
186 |
-
}catch(Exception $e){
|
187 |
-
|
188 |
-
Mage::helper('payline/payment')->updateStock($this->order);
|
189 |
-
$msg=Mage::helper('payline')->__('Error during payment');
|
190 |
-
Mage::getSingleton('core/session')->addError($msg);
|
191 |
-
$msgLog='Unknown PAYLINE ERROR (payline unreachable?)';
|
192 |
-
Mage::helper('payline/logger')->log('[cptAction] ' .$this->order->getIncrementId().' '. $msgLog);
|
193 |
-
$this->_redirect('checkout/onepage');
|
194 |
-
return;
|
195 |
}
|
196 |
// RESPONSE
|
197 |
-
|
198 |
-
if(isset($result) && is_array($result) && $result['result']['code'] == '00000'){
|
199 |
-
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW
|
200 |
$this->order->save();
|
201 |
-
|
202 |
$token = Mage::getModel('payline/token')
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
$token->save();
|
207 |
-
|
208 |
-
header("location:"
|
209 |
exit();
|
210 |
-
}else {//Payline error
|
211 |
Mage::helper('payline/payment')->updateStock($this->order);
|
212 |
-
$msg=Mage::helper('payline')->__('Error during payment');
|
213 |
Mage::getSingleton('core/session')->addError($msg);
|
214 |
-
if (isset($result) && is_array($result)){
|
215 |
-
$msgLog='PAYLINE ERROR : '
|
216 |
-
} elseif (isset($result) && is_string($result)){
|
217 |
-
|
218 |
-
|
219 |
-
$msgLog='Unknown PAYLINE ERROR';
|
220 |
}
|
221 |
-
|
222 |
$this->order->save();
|
223 |
-
Mage::helper('payline/logger')->log('[cptAction] '
|
224 |
$this->_redirect('checkout/onepage');
|
225 |
return;
|
226 |
}
|
227 |
}
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
/**
|
230 |
* Initialize & process a wallet direct payment request
|
231 |
*/
|
232 |
public function walletAction(){
|
233 |
-
$array = $this->
|
234 |
$paylineSDK = Mage::helper('payline')->initPayline('WALLET',$array['payment']['currency']);
|
235 |
-
|
236 |
//PAYMENT
|
237 |
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineWALLET/payline_payment_action');
|
238 |
$array['payment']['mode'] = 'CPT';
|
@@ -244,25 +410,24 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
244 |
->addFilterStatus(true,Mage::app()->getStore()->getId())
|
245 |
->addFieldToFilter('contract_type',$wallet['card']['type'])
|
246 |
->getFirstItem();
|
247 |
-
|
248 |
$array['payment']['contractNumber']= $contract->getNumber();
|
249 |
-
|
250 |
//ORDER
|
251 |
$array['order']['date'] = date("d/m/Y H:i");
|
252 |
|
253 |
-
//ORDER DETAILS (optional)
|
254 |
Mage::helper('payline')->setOrderDetails($paylineSDK, $this->order, false, null);
|
255 |
|
256 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
257 |
$walletId = $customer->getWalletId();
|
258 |
$array['walletId'] = $walletId;
|
259 |
-
$array['cardInd'] = '';
|
260 |
-
$array['walletCvx'] = null;
|
261 |
$array['buyer']['walletId'] = $array['walletId'];
|
262 |
$array['buyer']['walletCardInd'] = $array['cardInd'];
|
263 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
264 |
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
265 |
-
|
266 |
//PRIVATE DATA
|
267 |
$privateData1 = array();
|
268 |
$privateData1['key'] = 'orderRef';
|
@@ -280,7 +445,7 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
280 |
}
|
281 |
$paylineSDK->setPrivate($privateData);
|
282 |
}
|
283 |
-
|
284 |
if(!isset($_POST['PaRes']) && in_array(Mage::getStoreConfig('payment/PaylineWALLET/wallet_payment_security'), array(Monext_Payline_Helper_Data::WALLET_3DS,Monext_Payline_Helper_Data::WALLET_BOTH))){
|
285 |
// customer has to be redirected on ACC for 3DS password filling
|
286 |
$verifyEnrollmentRequest = array();
|
@@ -292,7 +457,7 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
292 |
$verifyEnrollmentRequest['payment']['contractNumber'] = $array['payment']['contractNumber'];
|
293 |
$verifyEnrollmentRequest['orderRef'] = $array['order']['ref'];
|
294 |
$verifyEnrollmentRequest['walletId'] = $array['walletId'];
|
295 |
-
$verifyEnrollmentRequest['walletCardInd'] = 1;
|
296 |
try{
|
297 |
$verifyEnrollmentResponse = $paylineSDK->verifyEnrollment($verifyEnrollmentRequest);
|
298 |
}catch(Exception $e){
|
@@ -325,7 +490,7 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
325 |
return;
|
326 |
}
|
327 |
}
|
328 |
-
|
329 |
if(isset($_POST['PaRes'])){ // back from ACS
|
330 |
$array['3DSecure']['md'] = $_POST['MD'];
|
331 |
$array['3DSecure']['pares'] = $_POST['PaRes'];
|
@@ -345,7 +510,7 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
345 |
}
|
346 |
// RESPONSE
|
347 |
if(in_array($doImmediateWalletPaymentResponse['result']['code'], array('00000','04003'))){
|
348 |
-
|
349 |
if(Mage::helper('payline/payment')->updateOrder($this->order, $doImmediateWalletPaymentResponse,$doImmediateWalletPaymentResponse['transaction']['id'], 'WALLET')){
|
350 |
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/success/";
|
351 |
if($doImmediateWalletPaymentResponse['result']['code'] == '04003') {
|
@@ -367,14 +532,14 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
367 |
$this->_redirectUrl($this->_getPaymentRefusedRedirectUrl());
|
368 |
return;
|
369 |
}
|
370 |
-
|
371 |
}else {
|
372 |
Mage::helper('payline/payment')->updateStock($this->order);
|
373 |
$msgLog='PAYLINE ERROR during doImmediateWalletPayment: '.$author_result['result']['code']. ' ' . $author_result['result']['shortMessage'] . ' ('.$author_result['result']['longMessage'].')';
|
374 |
-
|
375 |
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED,$failedOrderStatus,$msgLog,false);
|
376 |
$this->order->save();
|
377 |
-
|
378 |
$msg=Mage::helper('payline')->__('Error during payment');
|
379 |
Mage::getSingleton('core/session')->addError($msg);
|
380 |
Mage::helper('payline/logger')->log('[walletAction] ' .$this->order->getIncrementId().$msgLog);
|
@@ -382,49 +547,45 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
382 |
return;
|
383 |
}
|
384 |
}
|
385 |
-
|
386 |
/**
|
387 |
* Initialize the NX payment request
|
388 |
*/
|
389 |
public function nxAction(){
|
390 |
-
//Check if wallet is sendable
|
391 |
-
//Must be done before call to Payline helper initialisation
|
392 |
-
$expiredWalletId=false;
|
393 |
$customerSession = Mage::getSingleton('customer/session');
|
394 |
-
if ($customerSession->isLoggedIn()){
|
395 |
$customer = $customerSession->getCustomer();
|
396 |
-
if ($customer->getWalletId() && !Mage::getModel('payline/wallet')->checkExpirationDate()){
|
397 |
-
$expiredWalletId=true;
|
398 |
}
|
399 |
}
|
400 |
-
|
401 |
-
$
|
402 |
-
|
403 |
-
$paylineSDK = $helperPayline->initPayline('NX',$array['payment']['currency']);
|
404 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
Mage::helper('payline')->walletId=null;
|
409 |
}
|
410 |
-
|
411 |
$nx = Mage::getStoreConfig('payment/PaylineNX/billing_occurrences');
|
412 |
$array['payment']['mode'] = 'NX';
|
413 |
-
|
414 |
-
|
415 |
-
$array['recurring']['amount'] = round($array['payment']['amount']
|
416 |
-
$array['recurring']['firstAmount'] = $array['payment']['amount']-($array['recurring']['amount']*($nx-1));
|
417 |
$array['recurring']['billingCycle'] = Mage::getStoreConfig('payment/PaylineNX/billing_cycle');
|
418 |
$array['recurring']['billingLeft'] = $nx;
|
419 |
$array['recurring']['billingDay'] = '';
|
420 |
$array['recurring']['startDate'] = '';
|
421 |
-
|
422 |
//contrat list
|
423 |
$array['contracts'] = array($array['payment']['contractNumber']);
|
424 |
-
|
425 |
-
//second contracts
|
426 |
-
|
427 |
-
|
428 |
// PRIVATE DATA
|
429 |
$privateData = array();
|
430 |
$privateData['key'] = "orderRef";
|
@@ -442,87 +603,180 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
442 |
}
|
443 |
$paylineSDK->setPrivate($privateData);
|
444 |
}
|
445 |
-
|
446 |
//ORDER DETAILS (optional)
|
447 |
$helperPayline->setOrderDetails($paylineSDK, $this->order, false, null);
|
448 |
-
|
449 |
//WALLET
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
//If the wallet is new (registered during payment), we must save it in the private data since it's not sent back by default
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
// ADD CONTRACT WALLET ARRAY TO $array
|
467 |
$array['walletContracts'] = Mage::helper('payline')->buildContractNumberWalletList();
|
468 |
-
|
469 |
// EXECUTE
|
470 |
-
try{
|
471 |
-
$result =
|
472 |
-
}catch(Exception $e){
|
473 |
-
|
474 |
-
Mage::helper('payline/payment')->updateStock($this->order);
|
475 |
-
$msg=Mage::helper('payline')->__('Error during payment');
|
476 |
-
Mage::getSingleton('core/session')->addError($msg);
|
477 |
-
$msgLog='Unknown PAYLINE ERROR (payline unreachable?)';
|
478 |
-
Mage::helper('payline/logger')->log('[nxAction] ' .$this->order->getIncrementId().$msgLog);
|
479 |
-
$this->_redirect('checkout/onepage');
|
480 |
-
return;
|
481 |
}
|
482 |
// RESPONSE
|
483 |
-
|
484 |
-
if(isset($result) && is_array($result) && $result['result']['code'] == '00000'){
|
485 |
-
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW
|
486 |
$this->order->save();
|
487 |
-
header("location:"
|
488 |
exit();
|
489 |
-
}else {
|
490 |
Mage::helper('payline/payment')->updateStock($this->order);
|
491 |
-
if(isset($result) && is_array($result)){
|
492 |
-
$msgLog='PAYLINE ERROR : '
|
493 |
-
} elseif(isset($result) && is_string($result)){
|
494 |
-
|
495 |
-
|
496 |
-
$msgLog='Unknown PAYLINE ERROR';
|
497 |
}
|
498 |
-
|
499 |
$this->order->save();
|
500 |
-
$msg=Mage::helper('payline')->__('Error during payment');
|
501 |
-
Mage::helper('payline/logger')->log('[nxAction] '
|
502 |
Mage::getSingleton('core/session')->addError($msg);
|
503 |
$this->_redirect('checkout/onepage');
|
504 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
}
|
|
|
|
|
|
|
|
|
507 |
}
|
508 |
|
|
|
|
|
|
|
509 |
/**
|
510 |
* Action called on the customer's return/cancel form the Payline payment page OR when Payline notifies the shop
|
511 |
*/
|
512 |
public function cptReturnAction(){
|
513 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
$tokenData = $tokenModel->getFirstItem()->getData();
|
515 |
-
|
516 |
// Order is loaded from id associated to the token
|
517 |
if(sizeof($tokenData) == 0){
|
518 |
Mage::helper('payline/logger')->log('[cptReturnAction] - token '.$_GET['token'].' is unknown');
|
519 |
return;
|
520 |
}
|
521 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($tokenData['order_id']);
|
522 |
-
|
523 |
if($tokenData['status'] != 0 && !isset($_GET['force_upd'])){ // order update is already done => exit this function
|
524 |
if(isset($_GET['notificationType'])) return; // call from notify URL => no page to display
|
525 |
-
|
526 |
$acceptedCodes = array(
|
527 |
'00000', // Credit card -> Transaction approved
|
528 |
'02500', // Wallet -> Operation successfull
|
@@ -531,9 +785,9 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
531 |
'00100',
|
532 |
'03000',
|
533 |
'34230', // signature SDD
|
534 |
-
'34330' //
|
535 |
);
|
536 |
-
|
537 |
if(in_array($tokenData['result_code'], $acceptedCodes)){
|
538 |
$this->_redirect('checkout/onepage/success');
|
539 |
}else{
|
@@ -542,14 +796,14 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
542 |
}
|
543 |
return;
|
544 |
}
|
545 |
-
|
546 |
-
|
547 |
-
$webPaymentDetails = Mage::helper('payline')->initPayline('CPT')->getWebPaymentDetails(array('token' => $
|
548 |
if(isset($webPaymentDetails)){
|
549 |
if(is_array($webPaymentDetails)){
|
550 |
if(Mage::helper('payline/payment')->updateOrder($this->order, $webPaymentDetails,$webPaymentDetails['transaction']['id'], 'CPT')){ // payment OK
|
551 |
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/success/";
|
552 |
-
|
553 |
// set order status
|
554 |
if($webPaymentDetails['result']['code'] == '04003') {
|
555 |
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
@@ -558,35 +812,37 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
558 |
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
559 |
$this->order, $webPaymentDetails['payment']['action'] );
|
560 |
}
|
561 |
-
|
562 |
// update token model to flag this order as already updated and save resultCode & transactionId
|
563 |
$tokenForUpdate->setStatus(1); // OK
|
564 |
$tokenForUpdate->setTransactionId($webPaymentDetails['transaction']['id']);
|
565 |
$tokenForUpdate->setResultCode($webPaymentDetails['result']['code']);
|
566 |
-
|
567 |
// save wallet if created during this payment
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
574 |
}
|
575 |
-
|
576 |
// create invoice if needed
|
577 |
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('CPT', $this->order);
|
578 |
-
|
579 |
}else{ // payment NOT OK
|
580 |
$msgLog='PAYMENT KO : '.$webPaymentDetails['result']['code']. ' ' . $webPaymentDetails['result']['shortMessage'] . ' ('.$webPaymentDetails['result']['longMessage'].')';
|
581 |
$tokenForUpdate->setResultCode($webPaymentDetails['result']['code']);
|
582 |
-
|
583 |
$pendingCodes = array(
|
584 |
'02306', // Customer has to fill his payment data
|
585 |
'02533', // Customer not redirected to payment page AND session is active
|
586 |
'02000', // transaction in progress
|
587 |
'02005' // transaction in progress
|
588 |
);
|
589 |
-
|
590 |
if(!in_array($webPaymentDetails['result']['code'], $pendingCodes)){
|
591 |
if ($webPaymentDetails['result']['code'] == '02304' || $webPaymentDetails['result']['code'] == '02324' || $webPaymentDetails['result']['code'] == '02534') {
|
592 |
$abandonedStatus = Mage::getStoreConfig('payment/payline_common/resignation_order_status');
|
@@ -607,7 +863,7 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
607 |
}
|
608 |
$tokenForUpdate->setDateUpdate(date('Y-m-d G:i:s'));
|
609 |
$tokenForUpdate->save();
|
610 |
-
|
611 |
}elseif(is_string($webPaymentDetails)){
|
612 |
Mage::helper('payline/logger')->log('[cptReturnAction] order '.$this->order->getIncrementId().' - ERROR - '.$webPaymentDetails);
|
613 |
return;
|
@@ -634,82 +890,76 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
634 |
*/
|
635 |
public function nxNotifAction(){
|
636 |
$res = Mage::helper('payline')->initPayline('NX')->getWebPaymentDetails(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
637 |
-
if (isset($res['privateDataList']['privateData']['value'])){
|
638 |
-
$orderRef
|
639 |
-
}else{
|
640 |
-
foreach ($res['privateDataList']['privateData'] as $privateDataList){
|
641 |
-
if($privateDataList->key == 'orderRef'){
|
642 |
$orderRef = $privateDataList->value;
|
643 |
}
|
644 |
}
|
645 |
}
|
646 |
-
if (!isset($orderRef)){
|
647 |
-
$msgLog='Référence commande introuvable dans le résultat du paiement Nx';
|
648 |
-
Mage::helper('payline/logger')->log('[nxNotifAction] '
|
649 |
-
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/";
|
650 |
}
|
651 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($orderRef);
|
652 |
-
|
653 |
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
654 |
-
|
655 |
-
if(isset($res['billingRecordList']['billingRecord'])){
|
656 |
$size = sizeof($res['billingRecordList']['billingRecord']);
|
657 |
-
}else{
|
658 |
$size = 0;
|
659 |
}
|
660 |
$billingRecord = false;
|
661 |
-
for($i=0
|
662 |
-
if($res['billingRecordList']['billingRecord'][$i]->status == 1){
|
663 |
$txnId = $res['billingRecordList']['billingRecord'][$i]->transaction->id;
|
664 |
-
if(
|
665 |
$billingRecord = $res['billingRecordList']['billingRecord'][$i];
|
666 |
}
|
667 |
}
|
668 |
}
|
669 |
-
if($billingRecord && Mage::helper('payline/payment')->updateOrder($this->order, $res
|
670 |
-
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/success/";
|
671 |
-
|
672 |
-
if($res['result']['code'] == '04003') {
|
673 |
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
674 |
Mage::helper('payline')->setOrderStatus($this->order, $newOrderStatus);
|
675 |
} else if( $res['result']['code'] == '02501' ) { // credit card (CC) will expire
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
680 |
$this->order, $res['payment']['action'] );
|
681 |
-
|
682 |
-
|
683 |
-
if (isset($res['privateDataList']['privateData'][1]) && $res['privateDataList']['privateData'][1]->key=="newWalletId" && $res['privateDataList']['privateData'][1]->value!=''){
|
684 |
$this->saveWallet($res['privateDataList']['privateData'][1]->value);
|
685 |
}
|
686 |
$payment = $this->order->getPayment();
|
687 |
if ($payment->getBaseAmountPaid() != $payment->getBaseAmountOrdered()) {
|
688 |
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('NX', $this->order);
|
689 |
}
|
690 |
-
}else{
|
691 |
-
|
692 |
-
$msgLog='PAYLINE ERROR : '
|
693 |
-
} elseif(isset($res) && is_string($res)){
|
694 |
-
|
695 |
-
|
696 |
-
$msgLog='Error during order update (#'
|
697 |
}
|
698 |
-
|
699 |
-
if (is_array($res) && !($res['result']['code'] == '02306' || $res['result']['code'] == '02533')) {
|
700 |
if (is_array($res) && ($res['result']['code'] == '02304' || $res['result']['code'] == '02324' || $res['result']['code'] == '02534')) {
|
701 |
$abandonedStatus = Mage::getStoreConfig('payment/payline_common/resignation_order_status');
|
702 |
-
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED
|
703 |
} else {
|
704 |
$statusScheduleAlert = Mage::getStoreConfig('payment/PaylineNX/status_when_payline_schedule_alert');
|
705 |
if( !empty( $statusScheduleAlert ) ) { // if user conf is set
|
706 |
$failedOrderStatus = $statusScheduleAlert;
|
707 |
}
|
708 |
-
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED
|
709 |
}
|
710 |
}
|
711 |
-
|
712 |
-
Mage::helper('payline/logger')->log('[nxNotifAction] ' .$this->order->getIncrementId().$msgLog);
|
713 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is refused'));
|
714 |
$redirectUrl = $this->_getPaymentRefusedRedirectUrl();
|
715 |
}
|
@@ -723,81 +973,97 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
723 |
*/
|
724 |
public function nxTermNotifAction()
|
725 |
{
|
726 |
-
$statusScheduleAlert
|
727 |
-
$statusCCExpired
|
728 |
-
if(
|
729 |
-
if(
|
730 |
-
/*
|
731 |
-
|
732 |
-
|
|
|
|
|
733 |
$transactionParams = array();
|
734 |
-
$transactionParams['transactionId']
|
735 |
-
$transactionParams['orderRef']
|
736 |
-
$transactionParams['version']
|
737 |
-
$transactionParams['startDate']
|
738 |
-
$transactionParams['endDate']
|
739 |
-
$transactionParams['transactionHistory']= '';
|
740 |
-
$transactionParams['archiveSearch']
|
741 |
-
|
742 |
-
$res = Mage::helper('payline')->initPayline('NX')->getTransactionDetails( $transactionParams );
|
743 |
-
|
744 |
if( isset( $res )
|
745 |
&& is_array( $res )
|
746 |
&& isset( $res['result'] )
|
747 |
&& isset( $res['result']['code'] ) )
|
748 |
{
|
749 |
$mustSave = true;
|
750 |
-
switch(
|
751 |
case '00000':
|
752 |
case '02500':
|
753 |
case '04003':
|
754 |
$mustSave = false;
|
755 |
break;
|
756 |
case '02501': // payment card will expire
|
757 |
-
if(
|
758 |
-
$this->order = $this->setOrderStatus(
|
759 |
break;
|
760 |
}
|
761 |
default: // if default => error (cc expired or other errors)
|
762 |
-
if(
|
763 |
-
$this->order = $this->setOrderStatus(
|
764 |
} else {
|
765 |
$mustSave = false;
|
766 |
}
|
767 |
break;
|
768 |
}
|
769 |
-
if(
|
|
|
|
|
770 |
} // end if ( isset($res) ...
|
771 |
} // end if BILL
|
772 |
} // end if $this->isNxTermParamsOk
|
773 |
} // end if !empty( $statusScheduleAlert ) || !empty( $statusCCExpired )
|
774 |
} // end func
|
775 |
-
|
776 |
/**
|
777 |
-
* Check if $params contains all the required keys for
|
778 |
-
*
|
|
|
|
|
|
|
|
|
779 |
* @return bool true if $params ok, otherwise false
|
780 |
*/
|
781 |
private function isNxTermParamsOk($params)
|
782 |
{
|
783 |
-
if(
|
784 |
-
|
785 |
-
if(
|
786 |
-
|
787 |
-
if(
|
788 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
return true;
|
790 |
}
|
791 |
|
792 |
/**
|
793 |
-
* Set an order status.
|
794 |
-
*
|
795 |
-
*
|
796 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
797 |
*/
|
798 |
private function setOrderStatus($status, $orderRef)
|
799 |
{
|
800 |
-
if(
|
801 |
$order = $this->order;
|
802 |
} else {
|
803 |
$order = Mage::getModel('sales/order')
|
@@ -805,72 +1071,105 @@ class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
|
805 |
->addFieldToFilter('increment_id', $orderRef)
|
806 |
->getFirstItem();
|
807 |
}
|
808 |
-
Mage::helper('payline')->setOrderStatus(
|
809 |
return $order;
|
810 |
}
|
811 |
|
812 |
-
|
813 |
-
|
814 |
/**
|
815 |
* Cancel a NX payment request /order
|
816 |
*/
|
817 |
public function nxCancelAction(){
|
818 |
$res = Mage::helper('payline')->initPayline('NX')->getWebPaymentDetails(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
819 |
-
if (isset($res['privateDataList']['privateData']['value'])){
|
820 |
-
$orderRef
|
821 |
-
}else{
|
822 |
-
foreach ($res['privateDataList']['privateData'] as $privateDataList){
|
823 |
-
if($privateDataList->key == 'orderRef'){
|
824 |
$orderRef = $privateDataList->value;
|
825 |
}
|
826 |
}
|
827 |
}
|
828 |
-
if (!isset($orderRef)){
|
829 |
-
$msgLog='Couldn\'t find order increment id in nx payment cancel result';
|
830 |
-
Mage::helper('payline/logger')->log('[nxCancelAction] '
|
831 |
-
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/";
|
832 |
}
|
833 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($orderRef);
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
Mage::
|
838 |
-
|
839 |
-
|
840 |
-
//Invalid transaction or error during the process on Payline side
|
841 |
//No error display, the customer is already told on the Payline side
|
842 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is refused'));
|
843 |
-
$msg='PAYLINE ERROR : '
|
844 |
-
Mage::helper('payline/logger')->log('[nxCancelAction] '
|
845 |
-
$cancelStatus=Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
846 |
-
}else{
|
847 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is canceled'));
|
848 |
-
|
849 |
-
//Transaction cancelled by customer
|
850 |
$cancelStatus = Mage::getStoreConfig('payment/payline_common/canceled_order_status');
|
851 |
}
|
852 |
-
$this->cancelOrder($cancelStatus, $res['result']['code']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
853 |
}
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* This controller manage all payline payment
|
4 |
+
* cptAction, directAction, nxAction & walletAction are called just after the
|
5 |
+
* checkout validation
|
6 |
* the return/notify/cancel are the urls called by Payline
|
7 |
+
* An exception for notifyAction : it's not directly called by Payline, since it
|
8 |
+
* couldn't work in a local environment; it's then called by the returnAction.
|
9 |
+
*
|
10 |
* @author fague
|
11 |
*
|
12 |
*/
|
13 |
class Monext_Payline_IndexController extends Mage_Core_Controller_Front_Action
|
14 |
{
|
15 |
+
|
16 |
+
const PAYMENT_ACTION = 101;
|
17 |
+
|
18 |
+
const PAYMENT_MODE = 'CPT';
|
19 |
+
/*
|
20 |
+
* @var $order Mage_Sales_Model_Order
|
21 |
+
*/
|
22 |
+
protected $order;
|
23 |
+
|
24 |
protected function _getCustomerSession()
|
25 |
{
|
26 |
return Mage::getSingleton('customer/session');
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
+
*
|
31 |
+
*
|
32 |
+
* Set the order's status to the provided status (must be part of the
|
33 |
+
* cancelled state)
|
34 |
+
* Reinit stocks & redirect to checkout
|
35 |
* @param string $cancelStatus
|
36 |
*/
|
37 |
+
private function cancelOrder($cancelStatus, $resCode = '', $message = '')
|
38 |
+
{
|
39 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $cancelStatus, $message, false);
|
40 |
Mage::helper('payline/payment')->updateStock($this->order);
|
41 |
$this->order->save();
|
42 |
Mage::helper('payline/logger')->log('[cancelOrder] - order '.$this->order->getIncrementId().' state is set to '.$cancelStatus);
|
|
|
43 |
$this->_redirectUrl($this->_getPaymentRefusedRedirectUrl());
|
44 |
}
|
45 |
|
46 |
+
/**
|
47 |
* Check if the customer is logged, and if it has a wallet
|
48 |
* If not & if there is a walletId in the result from Payline, we save it
|
49 |
*/
|
50 |
+
public function saveWallet($walletId)
|
51 |
+
{
|
52 |
+
if (! Mage::getStoreConfig('payment/payline_common/automate_wallet_subscription')) {
|
53 |
return;
|
54 |
}
|
55 |
$customerSession = Mage::getSingleton('customer/session');
|
56 |
+
if ($customerSession->isLoggedIn()) {
|
57 |
$customer = $customerSession->getCustomer();
|
58 |
+
if (! $customer->getWalletId()) {
|
59 |
$customer->setWalletId($walletId);
|
60 |
$customer->save();
|
61 |
}
|
62 |
}
|
63 |
}
|
64 |
+
|
65 |
/**
|
|
|
66 |
* Initialise the requests param array
|
67 |
+
*
|
68 |
* @return array
|
69 |
*/
|
70 |
+
private function _initCommonArray()
|
71 |
{
|
72 |
$_session = Mage::getSingleton('checkout/session');
|
73 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($_session->getLastRealOrderId());
|
76 |
|
77 |
/**
|
78 |
* Force this action code of some payment methods to the given action code
|
79 |
+
*
|
80 |
* @param $paymentMethod {string}
|
81 |
+
* @param $array {array}
|
82 |
+
* conf array. $array is a reference, so no need to return it.
|
83 |
+
* @param $actionCode {string}
|
84 |
+
* forced action code set in $array
|
85 |
*/
|
86 |
private function forcePaymentActionTo($paymentMethod, &$array, $actionCode)
|
87 |
{
|
88 |
+
switch ($paymentMethod) {
|
89 |
case 'UKASH':
|
90 |
case 'MONEYCLIC':
|
91 |
case 'TICKETSURF':
|
92 |
case 'SKRILL(MONEYBOOKERS)':
|
93 |
case 'LEETCHI':
|
94 |
+
Mage::helper('payline/logger')->log('[cptAction] order ' . $array['order']['ref'] . ' - ' . $paymentMethod . ' selected => payment action is forced to ' . $actionCode);
|
95 |
$array['payment']['action'] = $actionCode;
|
96 |
break;
|
97 |
+
default:
|
98 |
+
break;
|
99 |
}
|
100 |
}
|
101 |
|
103 |
* Initialize the cpt payment request
|
104 |
*/
|
105 |
public function cptAction(){
|
106 |
+
// Check if wallet is sendable
|
107 |
+
// Must be done before call to Payline helper initialisation
|
108 |
+
$expiredWalletId = false;
|
109 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
110 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
111 |
+
if ($customer->getWalletId() && ! Mage::getModel('payline/wallet')->checkExpirationDate()) {
|
112 |
+
$expiredWalletId = true;
|
113 |
}
|
114 |
+
}
|
115 |
+
$array = $this->_initCommonArray();
|
|
|
116 |
if($this->order->getBaseGrandTotal() == 0){ // If order amount is null, exit payment process
|
117 |
Mage::helper('payline')->setOrderStatus($this->order, Mage::getStoreConfig('payment/payline_common/authorized_order_status'));
|
118 |
return true;
|
119 |
}
|
120 |
/* @var $paylineSDK PaylineSDK */
|
121 |
+
$helperPayline = Mage::helper('payline');
|
122 |
+
$paylineSDK = $helperPayline->initPayline(self::PAYMENT_MODE, $array['payment']['currency']);
|
123 |
+
$paymentMethod = $this->order->getPayment()->getCcType();
|
124 |
+
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineCPT/payline_payment_action');
|
125 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
126 |
+
if ($paymentMethod) {
|
127 |
+
Mage::helper('payline/logger')->log('[cptAction] order ' . $array['order']['ref'] . ' - customer selected contract ' . $paymentMethod);
|
128 |
$contractCPT = Mage::getModel('payline/contract')
|
129 |
->getCollection()
|
130 |
+
->addFieldToFilter('number', $paymentMethod)
|
131 |
->getFirstItem();
|
132 |
+
$this->forcePaymentActionTo($contractCPT->getContractType(), $array, '101');
|
133 |
+
$array['payment']['contractNumber'] = $paymentMethod;
|
134 |
+
} else {
|
135 |
+
$array['payment']['contractNumber'] = $helperPayline->contractNumber;
|
136 |
+
}
|
137 |
+
$array['contracts'] = array($array['payment']['contractNumber']); // Payment mean chosen by the customer is the only one shown on Payline payment page
|
138 |
+
$sendPaylineproductCat = false;
|
139 |
+
$pcCol = null;
|
140 |
+
if(in_array($paymentMethod,array('3XONEY','3XONEY_SF','4XONEY','4XONEY_SF','ANCV'))){ // for these payment means, Payline product categories must be sent in order details
|
141 |
+
$sendPaylineproductCat = true;
|
142 |
+
$pcCol = Mage::getModel('payline/productcategories')->getCollection();
|
143 |
+
}
|
144 |
+
|
145 |
+
$array['payment']['mode'] = self::PAYMENT_MODE;
|
146 |
+
// second contracts
|
147 |
+
$array['secondContracts'] = explode(';', $helperPayline->secondaryContractNumberList);
|
148 |
+
// If wallet isn't sendable...
|
149 |
+
if ($expiredWalletId) {
|
150 |
+
$helperPayline->walletId = null;
|
151 |
+
}
|
|
|
|
|
|
|
|
|
152 |
// PRIVATE DATA
|
153 |
$privateData = array();
|
154 |
$privateData['key'] = 'orderRef';
|
155 |
$privateData['value'] = substr(str_replace(array("\r","\n","\t"), array('','',''),$array['order']['ref']), 0,255);
|
156 |
$paylineSDK->setPrivate($privateData);
|
157 |
+
if (isset($customer)) {
|
158 |
+
$privateData['key'] = 'plnAccountAge'; // customer account age, in
|
159 |
+
// days
|
160 |
+
$privateData['value'] = round((time() - $customer->getCreatedAtTimestamp()) / (60 * 60 * 24));
|
161 |
+
$paylineSDK->setPrivate($privateData);
|
162 |
+
$privateData['key'] = 'plnLastCompleteOrderAge'; // last complete
|
163 |
+
// order age, in
|
164 |
+
// days
|
165 |
+
if (isset($array['plnLastCompleteOrderAge'])) {
|
166 |
+
$privateData['value'] = $array['plnLastCompleteOrderAge'];
|
167 |
+
} else {
|
168 |
+
$privateData['value'] = '-1';
|
169 |
+
}
|
170 |
+
$paylineSDK->setPrivate($privateData);
|
171 |
}
|
172 |
|
173 |
//ORDER DETAILS (optional)
|
174 |
$helperPayline->setOrderDetails($paylineSDK, $this->order, $sendPaylineproductCat, $pcCol);
|
175 |
+
// WALLET
|
176 |
+
if (Mage::getStoreConfig('payment/PaylineCPT/send_wallet_id')) {
|
177 |
+
if (! isset($array['buyer']['walletId'])) {
|
178 |
+
if (isset($helperPayline->walletId)) {
|
179 |
+
$array['buyer']['walletId'] = $helperPayline->walletId;
|
180 |
+
}
|
181 |
+
}
|
182 |
+
if ($helperPayline->canSubscribeWallet()) {
|
183 |
+
// If the wallet is new (registered during payment), we must
|
184 |
+
// save it in the private data since it's not sent back by
|
185 |
+
// default
|
186 |
+
if ($helperPayline->isNewWallet) {
|
187 |
+
if ($helperPayline->walletId) {
|
188 |
+
$paylineSDK->setPrivate(array('key' => 'newWalletId',
|
189 |
+
'value' => $helperPayline->walletId));
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}
|
194 |
// ADD CONTRACT WALLET ARRAY TO $array
|
195 |
$array['walletContracts'] = Mage::helper('payline')->buildContractNumberWalletList();
|
|
|
196 |
// EXECUTE
|
197 |
+
try {
|
198 |
$result = $paylineSDK->doWebPayment($array);
|
199 |
+
} catch (Exception $e) {
|
200 |
+
return $this->_logOnException('cptAction', $e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
// RESPONSE
|
203 |
+
$initStatus = Mage::getStoreConfig('payment/payline_common/init_order_status');
|
204 |
+
if (isset($result) && is_array($result) && $result['result']['code'] == '00000') {
|
205 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW, $initStatus, '', false);
|
206 |
$this->order->save();
|
207 |
+
|
208 |
$token = Mage::getModel('payline/token')
|
209 |
+
->setOrderId($this->order->getIncrementId())
|
210 |
+
->setToken($result['token'])
|
211 |
+
->setDateCreate(time());
|
212 |
$token->save();
|
213 |
+
|
214 |
+
header("location:" . $result['redirectURL']);
|
215 |
exit();
|
216 |
+
} else { // Payline error
|
217 |
Mage::helper('payline/payment')->updateStock($this->order);
|
218 |
+
$msg = Mage::helper('payline')->__('Error during payment');
|
219 |
Mage::getSingleton('core/session')->addError($msg);
|
220 |
+
if (isset($result) && is_array($result)) {
|
221 |
+
$msgLog = 'PAYLINE ERROR : ' . $result['result']['code'] . ' ' . $result['result']['shortMessage'] . ' (' . $result['result']['longMessage'] . ')';
|
222 |
+
} elseif (isset($result) && is_string($result)) {
|
223 |
+
$msgLog = 'PAYLINE ERROR : ' . $result;
|
224 |
+
} else {
|
225 |
+
$msgLog = 'Unknown PAYLINE ERROR';
|
226 |
}
|
227 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW, $initStatus, $msgLog, false);
|
228 |
$this->order->save();
|
229 |
+
Mage::helper('payline/logger')->log('[cptAction] ' . $this->order->getIncrementId() . ' ' . $msgLog);
|
230 |
$this->_redirect('checkout/onepage');
|
231 |
return;
|
232 |
}
|
233 |
}
|
234 |
+
|
235 |
+
|
236 |
+
/**
|
237 |
+
* directSecurizedAction
|
238 |
+
* Initialize & process the direct payment request
|
239 |
+
*/
|
240 |
+
public function directSecurizedAction()
|
241 |
+
{
|
242 |
+
$this->_initCommonArray();
|
243 |
+
|
244 |
+
$array = Mage::helper('payline/payment')->getDirectActionHeader();
|
245 |
+
|
246 |
+
$paylineSDK = Mage::helper('payline')->initPayline('DIRECT', $array['payment']['currency']);
|
247 |
+
|
248 |
+
$verifyEnrollmentRequest = array();
|
249 |
+
|
250 |
+
// VERSION
|
251 |
+
$verifyEnrollmentRequest['version'] = Monext_Payline_Helper_Data::VERSION;
|
252 |
+
|
253 |
+
// PAYMENT
|
254 |
+
$verifyEnrollmentRequest['payment']['amount'] = $array['payment']['amount'];
|
255 |
+
$verifyEnrollmentRequest['payment']['currency'] = $array['payment']['currency'];
|
256 |
+
$verifyEnrollmentRequest['payment']['action'] = $array['payment']['action'];
|
257 |
+
$verifyEnrollmentRequest['payment']['mode'] = $array['payment']['mode'];
|
258 |
+
$verifyEnrollmentRequest['payment']['contractNumber'] = $array['payment']['contractNumber'];
|
259 |
+
|
260 |
+
// CARD INFO
|
261 |
+
$verifyEnrollmentRequest['card']['type'] = $array['card']['type'];
|
262 |
+
$verifyEnrollmentRequest['card']['expirationDate'] = $array['card']['expirationDate'];
|
263 |
+
$verifyEnrollmentRequest['card']['token'] = $array['card']['token'];
|
264 |
+
|
265 |
+
// ORDER
|
266 |
+
$verifyEnrollmentRequest['orderRef'] = $this->order->getIncrementId();
|
267 |
+
|
268 |
+
// RESPONSE
|
269 |
+
try {
|
270 |
+
$verifyEnrollmentResponse = $paylineSDK->verifyEnrollment($verifyEnrollmentRequest);
|
271 |
+
if (!is_array($verifyEnrollmentResponse)) {
|
272 |
+
if(is_string($verifyEnrollmentResponse)) {
|
273 |
+
$msg = $verifyEnrollmentResponse;
|
274 |
+
} else {
|
275 |
+
$msg = 'Invalid result from verifyEnrollment call';
|
276 |
+
}
|
277 |
+
throw new Exception($msg);
|
278 |
+
}
|
279 |
+
|
280 |
+
if ($verifyEnrollmentResponse['result']['code'] == paylineSDK::ERR_CODE) {
|
281 |
+
$msg = 'Critical error at verifyEnrollment call (code ' . $verifyEnrollmentResponse['result']['code'] . ')';
|
282 |
+
throw new Exception($msg);
|
283 |
+
}
|
284 |
+
|
285 |
+
if ($verifyEnrollmentResponse['result']['code'] != '03000') {
|
286 |
+
$msg = 'Error at verifyEnrollment call : ' . $verifyEnrollmentResponse['result']['longMessage'] . ' (code ' . $verifyEnrollmentResponse['result']['code'] . ')';
|
287 |
+
throw new Exception($msg);
|
288 |
+
}
|
289 |
+
|
290 |
+
$secureParams = array( 'TermUrl'=>Mage::getUrl('payline/index/validateAcs'),
|
291 |
+
'PaReq'=>$verifyEnrollmentResponse['pareqFieldValue'],
|
292 |
+
'MD'=>$verifyEnrollmentResponse['mdFieldValue']
|
293 |
+
);
|
294 |
+
|
295 |
+
$url= $verifyEnrollmentResponse['actionUrl'];
|
296 |
+
|
297 |
+
if($verifyEnrollmentResponse['actionMethod']=='POST') {
|
298 |
+
|
299 |
+
$this->loadLayout();
|
300 |
+
|
301 |
+
$blockRedirect = $this->getLayout()->getBlock('payline-directsecurized');
|
302 |
+
$blockRedirect->setSecureParams($secureParams);
|
303 |
+
$blockRedirect->setSecureUrl($verifyEnrollmentResponse['actionUrl']);
|
304 |
+
|
305 |
+
$this->renderLayout();
|
306 |
+
} else {
|
307 |
+
$this->_redirectUrl(Mage::helper('core/url')->addRequestParam($url,$secureParams));
|
308 |
+
}
|
309 |
+
|
310 |
+
Mage::helper('payline/logger')->log("[directSecurizedAction] " . $this->order->getIncrementId() . " user redirected to ".$url);
|
311 |
+
return;
|
312 |
+
|
313 |
+
} catch (Exception $e) {
|
314 |
+
return $this->_logOnException('directSecurizedAction', $e);
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Initialize & process the direct payment request
|
320 |
+
*/
|
321 |
+
public function validateAcsAction()
|
322 |
+
{
|
323 |
+
|
324 |
+
$paRes = $this->getRequest()->getParam('PaRes');
|
325 |
+
if($paRes){ // back from ACS with 3D Secure authentication data
|
326 |
+
$this->_initCommonArray();
|
327 |
+
//$array = $this->_getDirectActionHeader();
|
328 |
+
$array = Mage::helper('payline/payment')->getDirectActionHeader();
|
329 |
+
try {
|
330 |
+
if(empty($array['card']['token'])) {
|
331 |
+
$msg = 'Critical error, missing card token.';
|
332 |
+
throw new Exception($msg);
|
333 |
+
}
|
334 |
+
|
335 |
+
$paylineSDK = Mage::helper('payline')->initPayline('DIRECT', $array['payment']['currency']);
|
336 |
+
|
337 |
+
$doAuthorization3DSRequest = array();
|
338 |
+
|
339 |
+
//VERSION
|
340 |
+
$doAuthorization3DSRequest['version'] = Monext_Payline_Helper_Data::VERSION;
|
341 |
+
|
342 |
+
//PAYMENT
|
343 |
+
$doAuthorization3DSRequest['payment']['amount'] = $array['payment']['amount'];
|
344 |
+
$doAuthorization3DSRequest['payment']['currency'] = $array['payment']['currency'];
|
345 |
+
$doAuthorization3DSRequest['payment']['action'] = $array['payment']['action'];
|
346 |
+
$doAuthorization3DSRequest['payment']['mode'] = self::PAYMENT_MODE;
|
347 |
+
$doAuthorization3DSRequest['payment']['contractNumber'] = $array['payment']['contractNumber'];
|
348 |
+
|
349 |
+
// CARD INFO
|
350 |
+
$doAuthorization3DSRequest['card']['type'] = $array['card']['type'];
|
351 |
+
$doAuthorization3DSRequest['card']['expirationDate'] = $array['card']['expirationDate'];
|
352 |
+
$doAuthorization3DSRequest['card']['token'] = $array['card']['token'];
|
353 |
+
$doAuthorization3DSRequest['card']['cvx'] = $array['card']['cvx'];
|
354 |
+
$doAuthorization3DSRequest['card']['cardholder'] = $array['card']['cardholder'];
|
355 |
+
|
356 |
+
//BUYER INFO
|
357 |
+
$doAuthorization3DSRequest['buyer'] = $array['buyer'];
|
358 |
+
|
359 |
+
//ORDER
|
360 |
+
$doAuthorization3DSRequest['order']['ref'] = $this->order->getIncrementId();
|
361 |
+
$doAuthorization3DSRequest['order']['amount'] = $doAuthorization3DSRequest['payment']['amount'];
|
362 |
+
$doAuthorization3DSRequest['order']['date'] = date('d/m/Y H:i');
|
363 |
+
$doAuthorization3DSRequest['order']['currency'] = $doAuthorization3DSRequest['payment']['currency'];
|
364 |
+
|
365 |
+
//AUTHENTICATION 3DSECURE
|
366 |
+
$doAuthorization3DSRequest['3DSecure']['md'] = $this->getRequest()->getParam('MD');
|
367 |
+
$doAuthorization3DSRequest['3DSecure']['pares'] = $paRes;
|
368 |
+
$doAuthorization3DSRequest['BankAccountData'] = $array['BankAccountData'];
|
369 |
+
|
370 |
+
// RESPONSE
|
371 |
+
$author_result = $paylineSDK->doAuthorization($doAuthorization3DSRequest);
|
372 |
+
} catch (Exception $e) {
|
373 |
+
return $this->_logOnException('validateAcsAction', $e);
|
374 |
+
}
|
375 |
+
|
376 |
+
|
377 |
+
|
378 |
+
$statusFinalize = Mage::helper('payline/payment')->finalizeDirectAction($author_result, $paylineSDK, $array);
|
379 |
+
|
380 |
+
if (isset($author_result) && is_array($author_result) && $author_result['result']['code'] == '00000') {
|
381 |
+
Mage::helper('payline/logger')->log("[validateAcsAction] " . $this->order->getIncrementId() . " payment validated by ACS");
|
382 |
+
}
|
383 |
+
|
384 |
+
if ($statusFinalize) {
|
385 |
+
$redirectUrl = Mage::getBaseUrl() . "checkout/onepage/success/";
|
386 |
+
Mage_Core_Controller_Varien_Action::_redirectSuccess($redirectUrl);
|
387 |
+
} else {
|
388 |
+
Mage::helper('payline/logger')->log('['.$fromAction.'] ' . $this->order->getIncrementId() . $msgLog);
|
389 |
+
$this->_redirectUrl($this->_getPaymentRefusedRedirectUrl());
|
390 |
+
return;
|
391 |
+
}
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
/**
|
396 |
* Initialize & process a wallet direct payment request
|
397 |
*/
|
398 |
public function walletAction(){
|
399 |
+
$array = $this->_initCommonArray();
|
400 |
$paylineSDK = Mage::helper('payline')->initPayline('WALLET',$array['payment']['currency']);
|
401 |
+
|
402 |
//PAYMENT
|
403 |
$array['payment']['action'] = Mage::getStoreConfig('payment/PaylineWALLET/payline_payment_action');
|
404 |
$array['payment']['mode'] = 'CPT';
|
410 |
->addFilterStatus(true,Mage::app()->getStore()->getId())
|
411 |
->addFieldToFilter('contract_type',$wallet['card']['type'])
|
412 |
->getFirstItem();
|
413 |
+
|
414 |
$array['payment']['contractNumber']= $contract->getNumber();
|
415 |
+
|
416 |
//ORDER
|
417 |
$array['order']['date'] = date("d/m/Y H:i");
|
418 |
|
419 |
+
//ORDER DETAILS (optional)
|
420 |
Mage::helper('payline')->setOrderDetails($paylineSDK, $this->order, false, null);
|
421 |
|
422 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
423 |
$walletId = $customer->getWalletId();
|
424 |
$array['walletId'] = $walletId;
|
425 |
+
$array['cardInd'] = ''; //TODO
|
|
|
426 |
$array['buyer']['walletId'] = $array['walletId'];
|
427 |
$array['buyer']['walletCardInd'] = $array['cardInd'];
|
428 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
429 |
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
430 |
+
|
431 |
//PRIVATE DATA
|
432 |
$privateData1 = array();
|
433 |
$privateData1['key'] = 'orderRef';
|
445 |
}
|
446 |
$paylineSDK->setPrivate($privateData);
|
447 |
}
|
448 |
+
|
449 |
if(!isset($_POST['PaRes']) && in_array(Mage::getStoreConfig('payment/PaylineWALLET/wallet_payment_security'), array(Monext_Payline_Helper_Data::WALLET_3DS,Monext_Payline_Helper_Data::WALLET_BOTH))){
|
450 |
// customer has to be redirected on ACC for 3DS password filling
|
451 |
$verifyEnrollmentRequest = array();
|
457 |
$verifyEnrollmentRequest['payment']['contractNumber'] = $array['payment']['contractNumber'];
|
458 |
$verifyEnrollmentRequest['orderRef'] = $array['order']['ref'];
|
459 |
$verifyEnrollmentRequest['walletId'] = $array['walletId'];
|
460 |
+
$verifyEnrollmentRequest['walletCardInd'] = 1;// TODO $array['walletCardInd'];
|
461 |
try{
|
462 |
$verifyEnrollmentResponse = $paylineSDK->verifyEnrollment($verifyEnrollmentRequest);
|
463 |
}catch(Exception $e){
|
490 |
return;
|
491 |
}
|
492 |
}
|
493 |
+
|
494 |
if(isset($_POST['PaRes'])){ // back from ACS
|
495 |
$array['3DSecure']['md'] = $_POST['MD'];
|
496 |
$array['3DSecure']['pares'] = $_POST['PaRes'];
|
510 |
}
|
511 |
// RESPONSE
|
512 |
if(in_array($doImmediateWalletPaymentResponse['result']['code'], array('00000','04003'))){
|
513 |
+
|
514 |
if(Mage::helper('payline/payment')->updateOrder($this->order, $doImmediateWalletPaymentResponse,$doImmediateWalletPaymentResponse['transaction']['id'], 'WALLET')){
|
515 |
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/success/";
|
516 |
if($doImmediateWalletPaymentResponse['result']['code'] == '04003') {
|
532 |
$this->_redirectUrl($this->_getPaymentRefusedRedirectUrl());
|
533 |
return;
|
534 |
}
|
535 |
+
|
536 |
}else {
|
537 |
Mage::helper('payline/payment')->updateStock($this->order);
|
538 |
$msgLog='PAYLINE ERROR during doImmediateWalletPayment: '.$author_result['result']['code']. ' ' . $author_result['result']['shortMessage'] . ' ('.$author_result['result']['longMessage'].')';
|
539 |
+
|
540 |
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED,$failedOrderStatus,$msgLog,false);
|
541 |
$this->order->save();
|
542 |
+
|
543 |
$msg=Mage::helper('payline')->__('Error during payment');
|
544 |
Mage::getSingleton('core/session')->addError($msg);
|
545 |
Mage::helper('payline/logger')->log('[walletAction] ' .$this->order->getIncrementId().$msgLog);
|
547 |
return;
|
548 |
}
|
549 |
}
|
550 |
+
|
551 |
/**
|
552 |
* Initialize the NX payment request
|
553 |
*/
|
554 |
public function nxAction(){
|
555 |
+
// Check if wallet is sendable
|
556 |
+
// Must be done before call to Payline helper initialisation
|
557 |
+
$expiredWalletId = false;
|
558 |
$customerSession = Mage::getSingleton('customer/session');
|
559 |
+
if ($customerSession->isLoggedIn()) {
|
560 |
$customer = $customerSession->getCustomer();
|
561 |
+
if ($customer->getWalletId() && ! Mage::getModel('payline/wallet')->checkExpirationDate()) {
|
562 |
+
$expiredWalletId = true;
|
563 |
}
|
564 |
}
|
565 |
+
$array = $this->_initCommonArray();
|
566 |
+
$helperPayline = Mage::helper('payline');
|
567 |
+
$paylineSDK = $helperPayline->initPayline('NX', $array['payment']['currency']);
|
|
|
568 |
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
569 |
+
// If wallet isn't sendable...
|
570 |
+
if ($expiredWalletId) {
|
571 |
+
Mage::helper('payline')->walletId = null;
|
|
|
572 |
}
|
|
|
573 |
$nx = Mage::getStoreConfig('payment/PaylineNX/billing_occurrences');
|
574 |
$array['payment']['mode'] = 'NX';
|
575 |
+
$array['payment']['action'] = 101;
|
576 |
+
$array['payment']['contractNumber'] = $helperPayline->contractNumber;
|
577 |
+
$array['recurring']['amount'] = round($array['payment']['amount'] / $nx);
|
578 |
+
$array['recurring']['firstAmount'] = $array['payment']['amount'] - ($array['recurring']['amount'] * ($nx - 1));
|
579 |
$array['recurring']['billingCycle'] = Mage::getStoreConfig('payment/PaylineNX/billing_cycle');
|
580 |
$array['recurring']['billingLeft'] = $nx;
|
581 |
$array['recurring']['billingDay'] = '';
|
582 |
$array['recurring']['startDate'] = '';
|
583 |
+
|
584 |
//contrat list
|
585 |
$array['contracts'] = array($array['payment']['contractNumber']);
|
586 |
+
|
587 |
+
// second contracts
|
588 |
+
$array['secondContracts'] = explode(';', $helperPayline->secondaryContractNumberList);
|
|
|
589 |
// PRIVATE DATA
|
590 |
$privateData = array();
|
591 |
$privateData['key'] = "orderRef";
|
603 |
}
|
604 |
$paylineSDK->setPrivate($privateData);
|
605 |
}
|
606 |
+
|
607 |
//ORDER DETAILS (optional)
|
608 |
$helperPayline->setOrderDetails($paylineSDK, $this->order, false, null);
|
609 |
+
|
610 |
//WALLET
|
611 |
+
if (Mage::getStoreConfig('payment/PaylineCPT/send_wallet_id')) {
|
612 |
+
if (! isset($array['buyer']['walletId'])) {
|
613 |
+
if (isset($helperPayline->walletId)) {
|
614 |
+
$array['buyer']['walletId'] = $helperPayline->walletId;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
if ($helperPayline->canSubscribeWallet()) {
|
618 |
//If the wallet is new (registered during payment), we must save it in the private data since it's not sent back by default
|
619 |
+
if ($helperPayline->isNewWallet) {
|
620 |
+
if ($helperPayline->walletId) {
|
621 |
+
$paylineSDK->setPrivate(array('key' => 'newWalletId', 'value' => $helperPayline->walletId));
|
622 |
+
}
|
623 |
+
}
|
624 |
+
}
|
625 |
+
}
|
|
|
626 |
// ADD CONTRACT WALLET ARRAY TO $array
|
627 |
$array['walletContracts'] = Mage::helper('payline')->buildContractNumberWalletList();
|
|
|
628 |
// EXECUTE
|
629 |
+
try {
|
630 |
+
$result = $paylineSDK->doWebPayment($array);
|
631 |
+
} catch (Exception $e) {
|
632 |
+
return $this->_logOnException('nxAction', $e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
}
|
634 |
// RESPONSE
|
635 |
+
$initStatus = Mage::getStoreConfig('payment/payline_common/init_order_status');
|
636 |
+
if (isset($result) && is_array($result) && $result['result']['code'] == '00000') {
|
637 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW, $initStatus, '', false);
|
638 |
$this->order->save();
|
639 |
+
header("location:" . $result['redirectURL']);
|
640 |
exit();
|
641 |
+
} else {
|
642 |
Mage::helper('payline/payment')->updateStock($this->order);
|
643 |
+
if (isset($result) && is_array($result)) {
|
644 |
+
$msgLog = 'PAYLINE ERROR : ' . $result['result']['code'] . ' ' . $result['result']['shortMessage'] . ' (' . $result['result']['longMessage'] . ')';
|
645 |
+
} elseif (isset($result) && is_string($result)) {
|
646 |
+
$msgLog = 'PAYLINE ERROR : ' . $result;
|
647 |
+
} else {
|
648 |
+
$msgLog = 'Unknown PAYLINE ERROR';
|
649 |
}
|
650 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_NEW, $initStatus, $msgLog, false);
|
651 |
$this->order->save();
|
652 |
+
$msg = Mage::helper('payline')->__('Error during payment');
|
653 |
+
Mage::helper('payline/logger')->log('[nxAction] ' . $this->order->getIncrementId() . $msgLog, Zend_Log::ERR);
|
654 |
Mage::getSingleton('core/session')->addError($msg);
|
655 |
$this->_redirect('checkout/onepage');
|
656 |
return;
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
public function cptWidgetCustomAction()
|
661 |
+
{
|
662 |
+
$result = array();
|
663 |
+
|
664 |
+
$method = $this->getRequest()->getParam('paymentmethod');
|
665 |
+
|
666 |
+
try {
|
667 |
+
if(empty($method)) {
|
668 |
+
throw new Exception('No payment method');
|
669 |
+
}
|
670 |
+
$onePage = Mage::getSingleton('checkout/type_onepage');
|
671 |
+
$quote = $onePage->getQuote();
|
672 |
+
if($quote and $quote->getId()) {
|
673 |
+
$data=array('method'=>$method);
|
674 |
+
$quote->getPayment()->importData($data);
|
675 |
+
} else {
|
676 |
+
// Incorrect order_id
|
677 |
+
throw new Exception('Incorrect quote_id');
|
678 |
+
}
|
679 |
+
} catch (Exception $e) {
|
680 |
+
Mage::helper('payline/logger')->log('[cptWidgetCustomAction] '.$e->getMessage());
|
681 |
+
$result['success'] = false;
|
682 |
+
$result['error'] = true;
|
683 |
+
$result['error_messages'] = $this->__('Unable to set Payment Method.');
|
684 |
+
}
|
685 |
+
|
686 |
+
if(!empty($result)) {
|
687 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
688 |
+
} else {
|
689 |
+
$this->getRequest()->setParam('form_key', Mage::getSingleton('core/session')->getFormKey());
|
690 |
+
$this->_forward('saveOrder', 'onepage', 'checkout');
|
691 |
+
}
|
692 |
+
}
|
693 |
+
|
694 |
+
|
695 |
+
|
696 |
+
public function cptReturnWidgetAction()
|
697 |
+
{
|
698 |
+
$paylineToken = $this->getRequest()->getParam('paylinetoken');
|
699 |
+
if(empty($paylineToken)) {
|
700 |
+
$paylineToken = $this->getRequest()->getParam('token');
|
701 |
+
}
|
702 |
+
|
703 |
+
try {
|
704 |
+
if(empty($paylineToken)) {
|
705 |
+
throw new Exception('No token');
|
706 |
+
}
|
707 |
+
|
708 |
+
$tokenModel = Mage::getModel('payline/token')->getCollection()->addFieldToFilter('token',$paylineToken);
|
709 |
+
$tokenData = $tokenModel->getFirstItem()->getData();
|
710 |
+
|
711 |
+
// Order is loaded from id associated to the token
|
712 |
+
if(sizeof($tokenData) == 0){
|
713 |
+
throw new Exception('No data for token '.$paylineToken);
|
714 |
+
}
|
715 |
+
|
716 |
+
$contractNumber = Mage::helper('payline')->getDefaultContractNumberForWidget();
|
717 |
+
if(empty($contractNumber)) {
|
718 |
+
throw new Exception('Cannot find valid contract number');
|
719 |
+
}
|
720 |
+
|
721 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($tokenData['order_id']);
|
722 |
+
if(!$order->getId()) {
|
723 |
+
$onePage = Mage::getSingleton('checkout/type_onepage');
|
724 |
+
$quote = $onePage->getQuote();
|
725 |
+
if($quote and $quote->getId() && $quote->getReservedOrderId()==$tokenData['order_id']) {
|
726 |
+
$data=array('method'=>'PaylineCPT', 'cc_type'=>$contractNumber);
|
727 |
+
$quote->getPayment()->importData($data);
|
728 |
|
729 |
+
$onePage->saveOrder();
|
730 |
+
$onePage->getQuote()->save();
|
731 |
+
|
732 |
+
$parameters = array('paylinetoken'=>$paylineToken);
|
733 |
+
$this->_forward('cptReturn',NULL,NULL,$parameters);
|
734 |
+
return $this;
|
735 |
+
} else {
|
736 |
+
// Incorrect order_id
|
737 |
+
throw new Exception('Incorrect quote_id or reserved_order_id '.$paylineToken);
|
738 |
+
}
|
739 |
+
} else {
|
740 |
+
// Order should not be created
|
741 |
+
throw new Exception('Order already exist for '.$tokenData['order_id']);
|
742 |
+
}
|
743 |
+
|
744 |
+
} catch (Exception $e) {
|
745 |
+
//TODO: If payment is done it should be canceled
|
746 |
+
Mage::helper('payline/logger')->log('[cptReturnWidgetAction] '.$e->getMessage());
|
747 |
}
|
748 |
+
|
749 |
+
Mage::getSingleton('core/session')->addError($this->__('There was an error processing your order. Please contact us or try again later.'));
|
750 |
+
$this->_redirect('checkout/cart');
|
751 |
+
return $this;
|
752 |
}
|
753 |
|
754 |
+
|
755 |
+
|
756 |
+
|
757 |
/**
|
758 |
* Action called on the customer's return/cancel form the Payline payment page OR when Payline notifies the shop
|
759 |
*/
|
760 |
public function cptReturnAction(){
|
761 |
+
|
762 |
+
$paylineToken = $this->getRequest()->getParam('paylinetoken');
|
763 |
+
if(empty($paylineToken)) {
|
764 |
+
$paylineToken = $this->getRequest()->getParam('token');
|
765 |
+
}
|
766 |
+
|
767 |
+
$tokenModel = Mage::getModel('payline/token')->getCollection()->addFieldToFilter('token',$paylineToken);
|
768 |
$tokenData = $tokenModel->getFirstItem()->getData();
|
769 |
+
|
770 |
// Order is loaded from id associated to the token
|
771 |
if(sizeof($tokenData) == 0){
|
772 |
Mage::helper('payline/logger')->log('[cptReturnAction] - token '.$_GET['token'].' is unknown');
|
773 |
return;
|
774 |
}
|
775 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($tokenData['order_id']);
|
776 |
+
|
777 |
if($tokenData['status'] != 0 && !isset($_GET['force_upd'])){ // order update is already done => exit this function
|
778 |
if(isset($_GET['notificationType'])) return; // call from notify URL => no page to display
|
779 |
+
|
780 |
$acceptedCodes = array(
|
781 |
'00000', // Credit card -> Transaction approved
|
782 |
'02500', // Wallet -> Operation successfull
|
785 |
'00100',
|
786 |
'03000',
|
787 |
'34230', // signature SDD
|
788 |
+
'34330' // prélèvement SDD
|
789 |
);
|
790 |
+
|
791 |
if(in_array($tokenData['result_code'], $acceptedCodes)){
|
792 |
$this->_redirect('checkout/onepage/success');
|
793 |
}else{
|
796 |
}
|
797 |
return;
|
798 |
}
|
799 |
+
|
800 |
+
$tokenForUpdate = Mage::getModel('payline/token')->load($tokenData['id']);
|
801 |
+
$webPaymentDetails = Mage::helper('payline')->initPayline('CPT')->getWebPaymentDetails(array('token' => $paylineToken, 'version' => Monext_Payline_Helper_Data::VERSION));
|
802 |
if(isset($webPaymentDetails)){
|
803 |
if(is_array($webPaymentDetails)){
|
804 |
if(Mage::helper('payline/payment')->updateOrder($this->order, $webPaymentDetails,$webPaymentDetails['transaction']['id'], 'CPT')){ // payment OK
|
805 |
$redirectUrl = Mage::getBaseUrl()."checkout/onepage/success/";
|
806 |
+
|
807 |
// set order status
|
808 |
if($webPaymentDetails['result']['code'] == '04003') {
|
809 |
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
812 |
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
813 |
$this->order, $webPaymentDetails['payment']['action'] );
|
814 |
}
|
815 |
+
|
816 |
// update token model to flag this order as already updated and save resultCode & transactionId
|
817 |
$tokenForUpdate->setStatus(1); // OK
|
818 |
$tokenForUpdate->setTransactionId($webPaymentDetails['transaction']['id']);
|
819 |
$tokenForUpdate->setResultCode($webPaymentDetails['result']['code']);
|
820 |
+
|
821 |
// save wallet if created during this payment
|
822 |
+
if(!empty($webPaymentDetails['privateDataList']) and !empty($webPaymentDetails['privateDataList']['privateData'])) {
|
823 |
+
foreach ($webPaymentDetails['privateDataList']['privateData'] as $privateDataList){
|
824 |
+
if($privateDataList->key == 'newWalletId'){
|
825 |
+
if(isset($webPaymentDetails['wallet']) && $webPaymentDetails['wallet']['walletId'] == $privateDataList->value){ // Customer may have unchecked the "Save this information for my next orders" checkbox on payment page. If so, wallet is not created !
|
826 |
+
$this->saveWallet($privateDataList->value);
|
827 |
+
}
|
828 |
+
}
|
829 |
+
}
|
830 |
}
|
831 |
+
|
832 |
// create invoice if needed
|
833 |
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('CPT', $this->order);
|
834 |
+
|
835 |
}else{ // payment NOT OK
|
836 |
$msgLog='PAYMENT KO : '.$webPaymentDetails['result']['code']. ' ' . $webPaymentDetails['result']['shortMessage'] . ' ('.$webPaymentDetails['result']['longMessage'].')';
|
837 |
$tokenForUpdate->setResultCode($webPaymentDetails['result']['code']);
|
838 |
+
|
839 |
$pendingCodes = array(
|
840 |
'02306', // Customer has to fill his payment data
|
841 |
'02533', // Customer not redirected to payment page AND session is active
|
842 |
'02000', // transaction in progress
|
843 |
'02005' // transaction in progress
|
844 |
);
|
845 |
+
|
846 |
if(!in_array($webPaymentDetails['result']['code'], $pendingCodes)){
|
847 |
if ($webPaymentDetails['result']['code'] == '02304' || $webPaymentDetails['result']['code'] == '02324' || $webPaymentDetails['result']['code'] == '02534') {
|
848 |
$abandonedStatus = Mage::getStoreConfig('payment/payline_common/resignation_order_status');
|
863 |
}
|
864 |
$tokenForUpdate->setDateUpdate(date('Y-m-d G:i:s'));
|
865 |
$tokenForUpdate->save();
|
866 |
+
|
867 |
}elseif(is_string($webPaymentDetails)){
|
868 |
Mage::helper('payline/logger')->log('[cptReturnAction] order '.$this->order->getIncrementId().' - ERROR - '.$webPaymentDetails);
|
869 |
return;
|
890 |
*/
|
891 |
public function nxNotifAction(){
|
892 |
$res = Mage::helper('payline')->initPayline('NX')->getWebPaymentDetails(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
893 |
+
if (isset($res['privateDataList']['privateData']['value'])) {
|
894 |
+
$orderRef = $res['privateDataList']['privateData']['value'];
|
895 |
+
} else {
|
896 |
+
foreach ($res['privateDataList']['privateData'] as $privateDataList) {
|
897 |
+
if ($privateDataList->key == 'orderRef') {
|
898 |
$orderRef = $privateDataList->value;
|
899 |
}
|
900 |
}
|
901 |
}
|
902 |
+
if (! isset($orderRef)) {
|
903 |
+
$msgLog = 'Référence commande introuvable dans le résultat du paiement Nx';
|
904 |
+
Mage::helper('payline/logger')->log('[nxNotifAction] ' . $this->order->getIncrementId() . ' ' . $msgLog);
|
905 |
+
$redirectUrl = Mage::getBaseUrl() . "checkout/onepage/";
|
906 |
}
|
907 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($orderRef);
|
|
|
908 |
$failedOrderStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
909 |
+
if (isset($res['billingRecordList']['billingRecord'])) {
|
|
|
910 |
$size = sizeof($res['billingRecordList']['billingRecord']);
|
911 |
+
} else {
|
912 |
$size = 0;
|
913 |
}
|
914 |
$billingRecord = false;
|
915 |
+
for ($i = 0; $i < $size; $i ++) {
|
916 |
+
if ($res['billingRecordList']['billingRecord'][$i]->status == 1) {
|
917 |
$txnId = $res['billingRecordList']['billingRecord'][$i]->transaction->id;
|
918 |
+
if (! $this->order->getTransaction($txnId)) {
|
919 |
$billingRecord = $res['billingRecordList']['billingRecord'][$i];
|
920 |
}
|
921 |
}
|
922 |
}
|
923 |
+
if ($billingRecord && Mage::helper('payline/payment')->updateOrder($this->order, $res, $billingRecord->transaction->id, 'NX')) {
|
924 |
+
$redirectUrl = Mage::getBaseUrl() . "checkout/onepage/success/";
|
925 |
+
if ($res['result']['code'] == '04003') {
|
|
|
926 |
$newOrderStatus = Mage::getStoreConfig('payment/payline_common/fraud_order_status');
|
927 |
Mage::helper('payline')->setOrderStatus($this->order, $newOrderStatus);
|
928 |
} else if( $res['result']['code'] == '02501' ) { // credit card (CC) will expire
|
929 |
+
$statusScheduleAlert = Mage::getStoreConfig('payment/PaylineNX/status_when_payline_schedule_alert');
|
930 |
+
Mage::helper('payline')->setOrderStatus($this->order, $statusScheduleAlert);
|
931 |
+
} else {
|
932 |
Mage::helper('payline')->setOrderStatusAccordingToPaymentMode(
|
933 |
$this->order, $res['payment']['action'] );
|
934 |
+
}
|
935 |
+
if (isset($res['privateDataList']['privateData'][1]) && $res['privateDataList']['privateData'][1]->key == "newWalletId" && $res['privateDataList']['privateData'][1]->value != '') {
|
|
|
936 |
$this->saveWallet($res['privateDataList']['privateData'][1]->value);
|
937 |
}
|
938 |
$payment = $this->order->getPayment();
|
939 |
if ($payment->getBaseAmountPaid() != $payment->getBaseAmountOrdered()) {
|
940 |
Mage::helper('payline')->automateCreateInvoiceAtShopReturn('NX', $this->order);
|
941 |
}
|
942 |
+
} else {
|
943 |
+
if (isset($res) && is_array($res)) {
|
944 |
+
$msgLog = 'PAYLINE ERROR : ' . $res['result']['code'] . ' ' . $res['result']['shortMessage'] . ' (' . $res['result']['longMessage'] . ')';
|
945 |
+
} elseif (isset($res) && is_string($res)) {
|
946 |
+
$msgLog = 'PAYLINE ERROR : ' . $res;
|
947 |
+
} else {
|
948 |
+
$msgLog = 'Error during order update (#' . $this->order->getIncrementId() . ')';
|
949 |
}
|
950 |
+
if (is_array($res) && ! ($res['result']['code'] == '02306' || $res['result']['code'] == '02533')) {
|
|
|
951 |
if (is_array($res) && ($res['result']['code'] == '02304' || $res['result']['code'] == '02324' || $res['result']['code'] == '02534')) {
|
952 |
$abandonedStatus = Mage::getStoreConfig('payment/payline_common/resignation_order_status');
|
953 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $abandonedStatus, $msgLog, false);
|
954 |
} else {
|
955 |
$statusScheduleAlert = Mage::getStoreConfig('payment/PaylineNX/status_when_payline_schedule_alert');
|
956 |
if( !empty( $statusScheduleAlert ) ) { // if user conf is set
|
957 |
$failedOrderStatus = $statusScheduleAlert;
|
958 |
}
|
959 |
+
$this->order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $failedOrderStatus, $msgLog, false);
|
960 |
}
|
961 |
}
|
962 |
+
Mage::helper('payline/logger')->log('[nxNotifAction] ' . $this->order->getIncrementId() . $msgLog);
|
|
|
963 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is refused'));
|
964 |
$redirectUrl = $this->_getPaymentRefusedRedirectUrl();
|
965 |
}
|
973 |
*/
|
974 |
public function nxTermNotifAction()
|
975 |
{
|
976 |
+
$statusScheduleAlert = Mage::getStoreConfig('payment/PaylineNX/status_when_payline_schedule_alert');
|
977 |
+
$statusCCExpired = Mage::getStoreConfig('payment/PaylineNX/status_when_credit_card_schedule_is_expired');
|
978 |
+
if (! empty($statusScheduleAlert) || ! empty($statusCCExpired)) {
|
979 |
+
if ($this->isNxTermParamsOk($_GET)) {
|
980 |
+
/*
|
981 |
+
* BILL = value required for terms notifications
|
982 |
+
* WEBTRS = value for cash web payment
|
983 |
+
*/
|
984 |
+
if ($_GET['notificationType'] == 'BILL') { //
|
985 |
$transactionParams = array();
|
986 |
+
$transactionParams['transactionId'] = $_GET['transactionId'];
|
987 |
+
$transactionParams['orderRef'] = $_GET['orderRef'];
|
988 |
+
$transactionParams['version'] = Monext_Payline_Helper_Data::VERSION;
|
989 |
+
$transactionParams['startDate'] = '';
|
990 |
+
$transactionParams['endDate'] = '';
|
991 |
+
$transactionParams['transactionHistory'] = '';
|
992 |
+
$transactionParams['archiveSearch'] = '';
|
993 |
+
$res = Mage::helper('payline')->initPayline('NX')->getTransactionDetails($transactionParams);
|
|
|
|
|
994 |
if( isset( $res )
|
995 |
&& is_array( $res )
|
996 |
&& isset( $res['result'] )
|
997 |
&& isset( $res['result']['code'] ) )
|
998 |
{
|
999 |
$mustSave = true;
|
1000 |
+
switch ($res['result']['code']) {
|
1001 |
case '00000':
|
1002 |
case '02500':
|
1003 |
case '04003':
|
1004 |
$mustSave = false;
|
1005 |
break;
|
1006 |
case '02501': // payment card will expire
|
1007 |
+
if (! empty($statusScheduleAlert)) {
|
1008 |
+
$this->order = $this->setOrderStatus($statusScheduleAlert, $_GET['orderRef']);
|
1009 |
break;
|
1010 |
}
|
1011 |
default: // if default => error (cc expired or other errors)
|
1012 |
+
if (! empty($statusCCExpired)) {
|
1013 |
+
$this->order = $this->setOrderStatus($statusCCExpired, $_GET['orderRef']);
|
1014 |
} else {
|
1015 |
$mustSave = false;
|
1016 |
}
|
1017 |
break;
|
1018 |
}
|
1019 |
+
if ($mustSave) {
|
1020 |
+
$this->order->save();
|
1021 |
+
}
|
1022 |
} // end if ( isset($res) ...
|
1023 |
} // end if BILL
|
1024 |
} // end if $this->isNxTermParamsOk
|
1025 |
} // end if !empty( $statusScheduleAlert ) || !empty( $statusCCExpired )
|
1026 |
} // end func
|
|
|
1027 |
/**
|
1028 |
+
* Check if $params contains all the required keys for
|
1029 |
+
* PaylineSDK#getTransactionDetails()
|
1030 |
+
*
|
1031 |
+
* @param $params {array}
|
1032 |
+
* array params for PaylineSDK#getTransactionDetails(), should
|
1033 |
+
* contain all keys required.
|
1034 |
* @return bool true if $params ok, otherwise false
|
1035 |
*/
|
1036 |
private function isNxTermParamsOk($params)
|
1037 |
{
|
1038 |
+
if (! isset($params['notificationType']))
|
1039 |
+
return false;
|
1040 |
+
if (! isset($params['paymentRecordId']))
|
1041 |
+
return false;
|
1042 |
+
if (! isset($params['walletId']))
|
1043 |
+
return false;
|
1044 |
+
if (! isset($params['transactionId']))
|
1045 |
+
return false;
|
1046 |
+
if (! isset($params['billingRecordDate']))
|
1047 |
+
return false;
|
1048 |
+
if (! isset($params['orderRef']))
|
1049 |
+
return false;
|
1050 |
return true;
|
1051 |
}
|
1052 |
|
1053 |
/**
|
1054 |
+
* Set an order status.
|
1055 |
+
* If !isset($this->order) process order model from $orderRef
|
1056 |
+
*
|
1057 |
+
* @param $status {string}
|
1058 |
+
* status order to assign
|
1059 |
+
* @param $orderRef {string}
|
1060 |
+
* entity_id order
|
1061 |
+
* @return Mage_Sales_Model_Order Return the order object with new status
|
1062 |
+
* set
|
1063 |
*/
|
1064 |
private function setOrderStatus($status, $orderRef)
|
1065 |
{
|
1066 |
+
if (isset($this->order)) {
|
1067 |
$order = $this->order;
|
1068 |
} else {
|
1069 |
$order = Mage::getModel('sales/order')
|
1071 |
->addFieldToFilter('increment_id', $orderRef)
|
1072 |
->getFirstItem();
|
1073 |
}
|
1074 |
+
Mage::helper('payline')->setOrderStatus($order, $status);
|
1075 |
return $order;
|
1076 |
}
|
1077 |
|
|
|
|
|
1078 |
/**
|
1079 |
* Cancel a NX payment request /order
|
1080 |
*/
|
1081 |
public function nxCancelAction(){
|
1082 |
$res = Mage::helper('payline')->initPayline('NX')->getWebPaymentDetails(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
1083 |
+
if (isset($res['privateDataList']['privateData']['value'])) {
|
1084 |
+
$orderRef = $res['privateDataList']['privateData']['value'];
|
1085 |
+
} else {
|
1086 |
+
foreach ($res['privateDataList']['privateData'] as $privateDataList) {
|
1087 |
+
if ($privateDataList->key == 'orderRef') {
|
1088 |
$orderRef = $privateDataList->value;
|
1089 |
}
|
1090 |
}
|
1091 |
}
|
1092 |
+
if (! isset($orderRef)) {
|
1093 |
+
$msgLog = 'Couldn\'t find order increment id in nx payment cancel result';
|
1094 |
+
Mage::helper('payline/logger')->log('[nxCancelAction] ' . $this->order->getIncrementId() . $msgLog);
|
1095 |
+
$redirectUrl = Mage::getBaseUrl() . "checkout/onepage/";
|
1096 |
}
|
1097 |
$this->order = Mage::getModel('sales/order')->loadByIncrementId($orderRef);
|
1098 |
+
if (is_string($res)) {
|
1099 |
+
$msg = 'PAYLINE ERROR : ' . $res;
|
1100 |
+
Mage::helper('payline/logger')->log('[nxCancelAction] ' . $this->order->getIncrementId() . ' ' . $msg);
|
1101 |
+
$cancelStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
1102 |
+
} elseif (substr($res['result']['code'], 0, 2) == '01' || substr($res['result']['code'], 0, 3) == '021') {
|
1103 |
+
// Invalid transaction or error during the process on Payline side
|
|
|
1104 |
//No error display, the customer is already told on the Payline side
|
1105 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is refused'));
|
1106 |
+
$msg = 'PAYLINE ERROR : ' . $res['result']['code'] . ' ' . $res['result']['shortMessage'] . ' (' . $res['result']['longMessage'] . ')';
|
1107 |
+
Mage::helper('payline/logger')->log('[nxCancelAction] ' . $this->order->getIncrementId() . $msg);
|
1108 |
+
$cancelStatus = Mage::getStoreConfig('payment/payline_common/failed_order_status');
|
1109 |
+
} else {
|
1110 |
Mage::getSingleton('core/session')->addError(Mage::helper('payline')->__('Your payment is canceled'));
|
1111 |
+
$msg = 'PAYLINE INFO : ' . $res['result']['code'] . ' ' . $res['result']['shortMessage'] . ' (' . $res['result']['longMessage'] . ')';
|
1112 |
+
// Transaction cancelled by customer
|
1113 |
$cancelStatus = Mage::getStoreConfig('payment/payline_common/canceled_order_status');
|
1114 |
}
|
1115 |
+
$this->cancelOrder($cancelStatus, $res['result']['code'], $msg);
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
|
1119 |
+
public function tokenReturnAction()
|
1120 |
+
{
|
1121 |
+
$params = $this->getRequest()->getParams();
|
1122 |
+
if(!empty($params) and is_array($params) and count($params)==1) {
|
1123 |
+
$html = key($params) . '=' . current($params);
|
1124 |
+
} else {
|
1125 |
+
$html = 'errorCode=Response malformed';
|
1126 |
+
}
|
1127 |
+
$this->getResponse()->setHeader('Content-type', 'text/html');
|
1128 |
+
$this->getResponse()->setBody($html);
|
1129 |
}
|
1130 |
+
|
1131 |
+
|
1132 |
+
protected function _getPaymentRefusedRedirectUrl()
|
1133 |
+
{
|
1134 |
+
$option = Mage::getStoreConfig('payment/payline_common/return_payment_refused');
|
1135 |
+
switch ($option) {
|
1136 |
+
case Monext_Payline_Model_Datasource_Return::CART_EMPTY:
|
1137 |
+
$url = Mage::getUrl('checkout/onepage');
|
1138 |
+
break;
|
1139 |
+
case Monext_Payline_Model_Datasource_Return::HISTORY_ORDERS:
|
1140 |
+
$url = Mage::getUrl('sales/order/history');
|
1141 |
+
break;
|
1142 |
+
case Monext_Payline_Model_Datasource_Return::CART_FULL:
|
1143 |
+
$url = Mage::getUrl('sales/order/reorder', array('order_id' => $this->order->getId()));
|
1144 |
+
break;
|
1145 |
+
default:
|
1146 |
+
$url = Mage::getUrl('checkout/onepage');
|
1147 |
+
}
|
1148 |
+
return $url;
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
|
1152 |
+
|
1153 |
+
protected function _logOnException($action, Exception $e) {
|
1154 |
+
Mage::getSingleton('payline/session')->clear();
|
1155 |
+
|
1156 |
+
Mage::logException($e);
|
1157 |
+
|
1158 |
+
Mage::helper('payline/payment')->updateStock($this->order);
|
1159 |
+
|
1160 |
+
$msg = Mage::helper('payline')->__('Error during payment');
|
1161 |
+
Mage::getSingleton('core/session')->addError($msg);
|
1162 |
+
|
1163 |
+
$msgLog = $e->getMessage();
|
1164 |
+
if(empty($msgLog)) {
|
1165 |
+
$msgLog = 'Unknown PAYLINE ERROR';
|
1166 |
+
}
|
1167 |
+
|
1168 |
+
Mage::helper('payline/logger')->log('[' . $action . '] ' . $this->order->getIncrementId() . ' ' . $msgLog, Zend_Log::ERR);
|
1169 |
+
|
1170 |
+
$this->_redirect('checkout/onepage');
|
1171 |
+
|
1172 |
+
return;
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
}
|
app/code/community/Monext/Payline/controllers/UnloggedwalletController.php
CHANGED
@@ -1,115 +1,115 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* On IE, seems like cookies are not sent when in an iframe
|
4 |
-
* We don't have to be logged since the customer email is transmitted in the order - we can retrieve the customer object from it
|
5 |
-
* @todo Only move the customer out of the iframe here, and do the getWallet in the WalletController
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
class Monext_Payline_UnloggedwalletController extends Mage_Core_Controller_Front_Action
|
9 |
-
{
|
10 |
-
/**
|
11 |
-
* New subscription notification
|
12 |
-
*/
|
13 |
-
public function subscribeNotifyAction(){
|
14 |
-
$res = Mage::helper('payline')->initPayline('WALLET')->getWebWallet(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
15 |
-
$redirectUrl="payline/wallet/manage";
|
16 |
-
if (!isset($res['result']) || $res['result']['code']!='02500'){
|
17 |
-
if(isset($res['result'])){
|
18 |
-
$msgLog='PAYLINE ERROR on getWebWallet: '.$res['result']['code']. ' '.$res['result']['longMessage'];
|
19 |
-
}else{
|
20 |
-
$msgLog='Unknown PAYLINE ERROR on getWebWallet';
|
21 |
-
}
|
22 |
-
$msg=Mage::helper('payline')->__('Error during subscription');
|
23 |
-
Mage::helper('payline/Logger')->log('[subscribeNotifyAction] ' .$msgLog);
|
24 |
-
Mage::getSingleton('core/session')->addError($msg);
|
25 |
-
$redirectUrl="payline/wallet/subscribe";
|
26 |
-
return $redirectUrl;
|
27 |
-
}
|
28 |
-
|
29 |
-
$customer = Mage::getModel('customer/customer');
|
30 |
-
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
31 |
-
$customer->loadByEmail($res['wallet']['email']);
|
32 |
-
$customer->setWalletId($res['wallet']['walletId']);
|
33 |
-
$customer->setWalletContract(Mage::helper('payline')->contractNumber);
|
34 |
-
$customer->save();
|
35 |
-
$msg=Mage::helper('payline')->__('Wallet subscription succeed');
|
36 |
-
Mage::getSingleton('core/session')->addSuccess($msg);
|
37 |
-
return $redirectUrl;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Return from the iframe
|
42 |
-
* Show a page in the iframe which only redirect the user to the manage wallet page (or the subscription page if error)
|
43 |
-
*/
|
44 |
-
public function subscribeReturnAction(){
|
45 |
-
$this->loadLayout();
|
46 |
-
$redirectUrl=$this->subscribeNotifyAction();
|
47 |
-
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
48 |
-
$this->renderLayout();
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Return from the iframe
|
53 |
-
* Show a page in the iframe which only redirect the user to the subscription page
|
54 |
-
*/
|
55 |
-
public function subscribeCancelAction(){
|
56 |
-
$msg=Mage::helper('payline')->__('Error during subscription');
|
57 |
-
$msgLog=$msg." (cancelAction)";
|
58 |
-
Mage::helper('payline/Logger')->log('[subscribeCancelAction] ' .$msgLog);
|
59 |
-
Mage::getSingleton('core/session')->addError($msg);
|
60 |
-
|
61 |
-
$this->loadLayout();
|
62 |
-
$redirectUrl='payline/wallet/subscribe';
|
63 |
-
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
64 |
-
$this->renderLayout();
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* New subscription notification
|
69 |
-
*/
|
70 |
-
public function updateNotifyAction(){
|
71 |
-
$customerData = Mage::getSingleton('customer/session')->getCustomer()->getData();
|
72 |
-
Mage::helper('payline')->initPayline('WALLET')->getWebWallet(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION)); // appel sans traitement pour d�sactiver la notification
|
73 |
-
$res = Mage::helper('payline')->initPayline('WALLET')->getCards(array('contractNumber' => $customerData['wallet_contract_number'], 'walletId' => $customerData['wallet_id']));
|
74 |
-
$redirectUrl="payline/wallet/manage";
|
75 |
-
if ($res['result']['code']!='02500'){
|
76 |
-
$msgLog='PAYLINE ERROR on getWebWallet after update: '.$res['result']['code']. ' '.$res['result']['longMessage'];
|
77 |
-
$msg=Mage::helper('payline')->__('Error during update');
|
78 |
-
Mage::helper('payline/Logger')->log('[updateNotifyAction] ' .$msgLog);
|
79 |
-
Mage::getSingleton('core/session')->addError($msg);
|
80 |
-
$redirectUrl="payline/wallet/update";
|
81 |
-
return $redirectUrl;
|
82 |
-
}
|
83 |
-
Mage::getSingleton('customer/session')->setWalletData(null);
|
84 |
-
$msg=Mage::helper('payline')->__('Wallet update succeed');
|
85 |
-
Mage::getSingleton('core/session')->addSuccess($msg);
|
86 |
-
return $redirectUrl;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Return from the iframe
|
91 |
-
* Show a page in the iframe which only redirect the user to the manage wallet page
|
92 |
-
*/
|
93 |
-
public function updateReturnAction(){
|
94 |
-
$this->loadLayout();
|
95 |
-
$redirectUrl=$this->updateNotifyAction();
|
96 |
-
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
97 |
-
$this->renderLayout();
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Return from the iframe
|
102 |
-
* Show a page in the iframe which only redirect the user to the manage page
|
103 |
-
*/
|
104 |
-
public function updateCancelAction(){
|
105 |
-
$msg=Mage::helper('payline')->__('Error during update');
|
106 |
-
$msgLog=$msg." (cancelAction)";
|
107 |
-
Mage::helper('payline/Logger')->log('[updateCancelAction] ' .$msgLog);
|
108 |
-
Mage::getSingleton('core/session')->addError($msg);
|
109 |
-
|
110 |
-
$this->loadLayout();
|
111 |
-
$redirectUrl='payline/wallet/manage';
|
112 |
-
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
113 |
-
$this->renderLayout();
|
114 |
-
}
|
115 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* On IE, seems like cookies are not sent when in an iframe
|
4 |
+
* We don't have to be logged since the customer email is transmitted in the order - we can retrieve the customer object from it
|
5 |
+
* @todo Only move the customer out of the iframe here, and do the getWallet in the WalletController
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class Monext_Payline_UnloggedwalletController extends Mage_Core_Controller_Front_Action
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* New subscription notification
|
12 |
+
*/
|
13 |
+
public function subscribeNotifyAction(){
|
14 |
+
$res = Mage::helper('payline')->initPayline('WALLET')->getWebWallet(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION));
|
15 |
+
$redirectUrl="payline/wallet/manage";
|
16 |
+
if (!isset($res['result']) || $res['result']['code']!='02500'){
|
17 |
+
if(isset($res['result'])){
|
18 |
+
$msgLog='PAYLINE ERROR on getWebWallet: '.$res['result']['code']. ' '.$res['result']['longMessage'];
|
19 |
+
}else{
|
20 |
+
$msgLog='Unknown PAYLINE ERROR on getWebWallet';
|
21 |
+
}
|
22 |
+
$msg=Mage::helper('payline')->__('Error during subscription');
|
23 |
+
Mage::helper('payline/Logger')->log('[subscribeNotifyAction] ' .$msgLog);
|
24 |
+
Mage::getSingleton('core/session')->addError($msg);
|
25 |
+
$redirectUrl="payline/wallet/subscribe";
|
26 |
+
return $redirectUrl;
|
27 |
+
}
|
28 |
+
|
29 |
+
$customer = Mage::getModel('customer/customer');
|
30 |
+
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
|
31 |
+
$customer->loadByEmail($res['wallet']['email']);
|
32 |
+
$customer->setWalletId($res['wallet']['walletId']);
|
33 |
+
$customer->setWalletContract(Mage::helper('payline')->contractNumber);
|
34 |
+
$customer->save();
|
35 |
+
$msg=Mage::helper('payline')->__('Wallet subscription succeed');
|
36 |
+
Mage::getSingleton('core/session')->addSuccess($msg);
|
37 |
+
return $redirectUrl;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Return from the iframe
|
42 |
+
* Show a page in the iframe which only redirect the user to the manage wallet page (or the subscription page if error)
|
43 |
+
*/
|
44 |
+
public function subscribeReturnAction(){
|
45 |
+
$this->loadLayout();
|
46 |
+
$redirectUrl=$this->subscribeNotifyAction();
|
47 |
+
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
48 |
+
$this->renderLayout();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Return from the iframe
|
53 |
+
* Show a page in the iframe which only redirect the user to the subscription page
|
54 |
+
*/
|
55 |
+
public function subscribeCancelAction(){
|
56 |
+
$msg=Mage::helper('payline')->__('Error during subscription');
|
57 |
+
$msgLog=$msg." (cancelAction)";
|
58 |
+
Mage::helper('payline/Logger')->log('[subscribeCancelAction] ' .$msgLog);
|
59 |
+
Mage::getSingleton('core/session')->addError($msg);
|
60 |
+
|
61 |
+
$this->loadLayout();
|
62 |
+
$redirectUrl='payline/wallet/subscribe';
|
63 |
+
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
64 |
+
$this->renderLayout();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* New subscription notification
|
69 |
+
*/
|
70 |
+
public function updateNotifyAction(){
|
71 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer()->getData();
|
72 |
+
Mage::helper('payline')->initPayline('WALLET')->getWebWallet(array('token' => $_GET['token'], 'version' => Monext_Payline_Helper_Data::VERSION)); // appel sans traitement pour d�sactiver la notification
|
73 |
+
$res = Mage::helper('payline')->initPayline('WALLET')->getCards(array('contractNumber' => $customerData['wallet_contract_number'], 'walletId' => $customerData['wallet_id']));
|
74 |
+
$redirectUrl="payline/wallet/manage";
|
75 |
+
if ($res['result']['code']!='02500'){
|
76 |
+
$msgLog='PAYLINE ERROR on getWebWallet after update: '.$res['result']['code']. ' '.$res['result']['longMessage'];
|
77 |
+
$msg=Mage::helper('payline')->__('Error during update');
|
78 |
+
Mage::helper('payline/Logger')->log('[updateNotifyAction] ' .$msgLog);
|
79 |
+
Mage::getSingleton('core/session')->addError($msg);
|
80 |
+
$redirectUrl="payline/wallet/update";
|
81 |
+
return $redirectUrl;
|
82 |
+
}
|
83 |
+
Mage::getSingleton('customer/session')->setWalletData(null);
|
84 |
+
$msg=Mage::helper('payline')->__('Wallet update succeed');
|
85 |
+
Mage::getSingleton('core/session')->addSuccess($msg);
|
86 |
+
return $redirectUrl;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Return from the iframe
|
91 |
+
* Show a page in the iframe which only redirect the user to the manage wallet page
|
92 |
+
*/
|
93 |
+
public function updateReturnAction(){
|
94 |
+
$this->loadLayout();
|
95 |
+
$redirectUrl=$this->updateNotifyAction();
|
96 |
+
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
97 |
+
$this->renderLayout();
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Return from the iframe
|
102 |
+
* Show a page in the iframe which only redirect the user to the manage page
|
103 |
+
*/
|
104 |
+
public function updateCancelAction(){
|
105 |
+
$msg=Mage::helper('payline')->__('Error during update');
|
106 |
+
$msgLog=$msg." (cancelAction)";
|
107 |
+
Mage::helper('payline/Logger')->log('[updateCancelAction] ' .$msgLog);
|
108 |
+
Mage::getSingleton('core/session')->addError($msg);
|
109 |
+
|
110 |
+
$this->loadLayout();
|
111 |
+
$redirectUrl='payline/wallet/manage';
|
112 |
+
$this->getLayout()->getBlock('payline-iframe-leaver')->setRedirectUrl($redirectUrl);
|
113 |
+
$this->renderLayout();
|
114 |
+
}
|
115 |
}
|
app/code/community/Monext/Payline/controllers/WalletController.php
CHANGED
@@ -1,297 +1,296 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This controller manage wallet in the customer account (subscribe, update, disable, ...)
|
5 |
-
* @author fague
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
class Monext_Payline_WalletController extends Mage_Core_Controller_Front_Action
|
9 |
-
{
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Action predispatch
|
13 |
-
*
|
14 |
-
* Check customer authentication
|
15 |
-
*/
|
16 |
-
public function preDispatch()
|
17 |
-
{
|
18 |
-
parent::preDispatch();
|
19 |
-
if (!Mage::getSingleton('customer/session')->authenticate($this)) {
|
20 |
-
$this->setFlag('', 'no-dispatch', true);
|
21 |
-
}
|
22 |
-
if (!Mage::getStoreConfig('payment/PaylineWALLET/active')) {
|
23 |
-
$this->setFlag('', 'no-dispatch', true);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Simply redirect to manageAction
|
29 |
-
*/
|
30 |
-
public function indexAction()
|
31 |
-
{
|
32 |
-
$this->_redirect('*/*/manage');
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Display user's wallet informations
|
37 |
-
*/
|
38 |
-
public function manageAction()
|
39 |
-
{
|
40 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
41 |
-
if (!($walletId = $customer->getWalletId())) {
|
42 |
-
$this->_redirect('payline/wallet/subscribe');
|
43 |
-
return;
|
44 |
-
}
|
45 |
-
|
46 |
-
$this->loadLayout();
|
47 |
-
|
48 |
-
$this->getLayout()->getBlock('head')->setTitle($this->__('Wallet management'));
|
49 |
-
|
50 |
-
$res = Mage::getModel('payline/wallet')->getWalletData();
|
51 |
-
if ($res) {
|
52 |
-
$this->getLayout()->getBlock('payline-wallet-details')->setWallet($res);
|
53 |
-
}
|
54 |
-
|
55 |
-
$this->_initLayoutMessages('customer/session');
|
56 |
-
$this->_initLayoutMessages('core/session');
|
57 |
-
$this->renderLayout();
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$paylineHelper
|
77 |
-
$paylineHelper->
|
78 |
-
$paylineHelper->
|
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 |
-
$array['
|
104 |
-
|
105 |
-
|
106 |
-
$array['
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$
|
117 |
-
|
118 |
-
Mage::
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
$
|
123 |
-
|
124 |
-
Mage::
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
Mage::
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
$
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
$this->getLayout()->getBlock('payline-wallet-subscribe-iframe')->
|
153 |
-
|
154 |
-
|
155 |
-
$this->_initLayoutMessages('
|
156 |
-
$this->
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
$paylineSDK
|
173 |
-
$
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
|
181 |
-
Mage::
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
Mage::
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
$customer->
|
199 |
-
$customer->
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
*
|
208 |
-
*
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
$
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
$paylineHelper
|
224 |
-
$paylineHelper->
|
225 |
-
|
226 |
-
|
227 |
-
$
|
228 |
-
|
229 |
-
$
|
230 |
-
|
231 |
-
'
|
232 |
-
'
|
233 |
-
'
|
234 |
-
'
|
235 |
-
'
|
236 |
-
'
|
237 |
-
'
|
238 |
-
'
|
239 |
-
'
|
240 |
-
|
241 |
-
'
|
242 |
-
'
|
243 |
-
|
244 |
-
|
245 |
-
);
|
246 |
-
$
|
247 |
-
$
|
248 |
-
$
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
$
|
260 |
-
|
261 |
-
Mage::
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
Mage::
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
Mage::
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
$this->_initLayoutMessages('
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
$this->getLayout()->getBlock('payline-wallet-update-iframe')->
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This controller manage wallet in the customer account (subscribe, update, disable, ...)
|
5 |
+
* @author fague
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class Monext_Payline_WalletController extends Mage_Core_Controller_Front_Action
|
9 |
+
{
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Action predispatch
|
13 |
+
*
|
14 |
+
* Check customer authentication
|
15 |
+
*/
|
16 |
+
public function preDispatch()
|
17 |
+
{
|
18 |
+
parent::preDispatch();
|
19 |
+
if (!Mage::getSingleton('customer/session')->authenticate($this)) {
|
20 |
+
$this->setFlag('', 'no-dispatch', true);
|
21 |
+
}
|
22 |
+
if (!Mage::getStoreConfig('payment/PaylineWALLET/active')) {
|
23 |
+
$this->setFlag('', 'no-dispatch', true);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Simply redirect to manageAction
|
29 |
+
*/
|
30 |
+
public function indexAction()
|
31 |
+
{
|
32 |
+
$this->_redirect('*/*/manage');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Display user's wallet informations
|
37 |
+
*/
|
38 |
+
public function manageAction()
|
39 |
+
{
|
40 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
41 |
+
if (!($walletId = $customer->getWalletId())) {
|
42 |
+
$this->_redirect('payline/wallet/subscribe');
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
$this->loadLayout();
|
47 |
+
|
48 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__('Wallet management'));
|
49 |
+
|
50 |
+
$res = Mage::getModel('payline/wallet')->getWalletData();
|
51 |
+
if ($res) {
|
52 |
+
$this->getLayout()->getBlock('payline-wallet-details')->setWallet($res);
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->_initLayoutMessages('customer/session');
|
56 |
+
$this->_initLayoutMessages('core/session');
|
57 |
+
$this->renderLayout();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Display wallet subscription iframe
|
62 |
+
*/
|
63 |
+
public function subscribeAction()
|
64 |
+
{
|
65 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
66 |
+
if ($customer->getWalletId()) {
|
67 |
+
$this->_redirect('payline/wallet/manage');
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
$this->loadLayout();
|
71 |
+
|
72 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__('Subscribe to wallet'));
|
73 |
+
|
74 |
+
/* @var $paylineHelper Monext_Payline_Helper_Data */
|
75 |
+
$paylineHelper = Mage::helper('payline');
|
76 |
+
$paylineHelper->notificationUrl = Mage::getUrl('payline/unloggedwallet/subscribeNotify');
|
77 |
+
$paylineHelper->returnUrl = Mage::getUrl('payline/unloggedwallet/subscribeReturn');
|
78 |
+
$paylineHelper->cancelUrl = Mage::getUrl('payline/unloggedwallet/subscribeCancel');
|
79 |
+
/* @var $paylineSDK PaylineSDK */
|
80 |
+
$paylineSDK = $paylineHelper->initPayline('WALLET');
|
81 |
+
$array = array(
|
82 |
+
'buyer' => array(
|
83 |
+
'lastName' => Mage::helper('payline')->encodeString(substr($customer->getLastname(), 0, 100)),
|
84 |
+
'firstName' => Mage::helper('payline')->encodeString(substr($customer->getFirstname(), 0, 100)),
|
85 |
+
'walletId' => Mage::getModel('payline/wallet')->generateWalletId()
|
86 |
+
),
|
87 |
+
'billingAddress' => array(),
|
88 |
+
'shippingAddress' => array()
|
89 |
+
);
|
90 |
+
|
91 |
+
$email = $customer->getEmail();
|
92 |
+
$pattern = '/\+/i';
|
93 |
+
$charPlusExist = preg_match($pattern, $email);
|
94 |
+
if (strlen($email) <= 50 && Zend_Validate::is($email, 'EmailAddress') && !$charPlusExist) {
|
95 |
+
$array['buyer']['email'] = Mage::helper('payline')->encodeString($email);
|
96 |
+
} else {
|
97 |
+
$array['buyer']['email'] = '';
|
98 |
+
}
|
99 |
+
$array['buyer']['customerId'] = Mage::helper('payline')->encodeString($email);
|
100 |
+
;
|
101 |
+
|
102 |
+
$array['contractNumber'] = $paylineHelper->contractNumber;
|
103 |
+
$array['contracts'] = explode(';', $paylineHelper->contractNumberList);
|
104 |
+
|
105 |
+
$array['updatePersonalDetails'] = (Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details') ? 1 : 0);
|
106 |
+
$array['version'] = Monext_Payline_Helper_Data::VERSION;
|
107 |
+
|
108 |
+
// ADD CONTRACT WALLET ARRAY TO $array
|
109 |
+
$array['walletContracts'] = Mage::helper('payline')->buildContractNumberWalletList();
|
110 |
+
|
111 |
+
try {
|
112 |
+
$resultCreateWebWallet = $paylineSDK->createWebWallet($array);
|
113 |
+
} catch (Exception $e) {
|
114 |
+
Mage::logException($e);
|
115 |
+
$msgLog = 'Unknown PAYLINE ERROR on createWebWallet (Payline unreachable?)';
|
116 |
+
$msg = Mage::helper('payline')->__('Error during subscription');
|
117 |
+
Mage::helper('payline/logger')->log('[subscribeAction] ' . $msgLog);
|
118 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
119 |
+
}
|
120 |
+
if (is_string($resultCreateWebWallet)) {
|
121 |
+
$msgLog = 'PAYLINE ERROR on createWebWallet: ' . $resultCreateWebWallet;
|
122 |
+
$msg = Mage::helper('payline')->__('Error during subscription');
|
123 |
+
Mage::helper('payline/logger')->log('[subscribeAction] ' . $msgLog);
|
124 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
125 |
+
$this->_redirect('customer/account');
|
126 |
+
return;
|
127 |
+
} elseif (!isset($resultCreateWebWallet['result']) || $resultCreateWebWallet['result']['code'] != '00000') {
|
128 |
+
if (isset($resultCreateWebWallet['result'])) {
|
129 |
+
$msgLog = 'PAYLINE ERROR on createWebWallet: ' . $resultCreateWebWallet['result']['code'] . ' ' . $resultCreateWebWallet['result']['longMessage'];
|
130 |
+
} else {
|
131 |
+
$msgLog = 'Unknown PAYLINE ERROR on createWebWallet';
|
132 |
+
}
|
133 |
+
$msg = Mage::helper('payline')->__('Error during subscription');
|
134 |
+
Mage::helper('payline/logger')->log('[subscribeAction] ' . $msgLog);
|
135 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
136 |
+
$this->_redirect('customer/account');
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
+
//save contract number
|
141 |
+
$customer->setWalletContractNumber($paylineHelper->contractNumber)->save();
|
142 |
+
|
143 |
+
$this->getLayout()->getBlock('payline-wallet-subscribe-cmsblock')->setBlockId(Mage::getStoreConfig('payment/PaylineWALLET/payline_register-oneclick_customeraccount'));
|
144 |
+
$urlPayline = $resultCreateWebWallet['redirectURL'];
|
145 |
+
|
146 |
+
if (Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details')) {
|
147 |
+
$iframeClass = 'iframe-subscribe-wallet iframe-with-perso-data';
|
148 |
+
} else {
|
149 |
+
$iframeClass = 'iframe-subscribe-wallet';
|
150 |
+
}
|
151 |
+
$this->getLayout()->getBlock('payline-wallet-subscribe-iframe')->setIframeClassName($iframeClass);
|
152 |
+
$this->getLayout()->getBlock('payline-wallet-subscribe-iframe')->setIframeSrc($urlPayline);
|
153 |
+
|
154 |
+
$this->_initLayoutMessages('customer/session');
|
155 |
+
$this->_initLayoutMessages('core/session');
|
156 |
+
$this->renderLayout();
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Disable customer wallet, delete customer's walletId attribute value
|
161 |
+
*/
|
162 |
+
public function disableAction()
|
163 |
+
{
|
164 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
165 |
+
|
166 |
+
if (!($walletId = $customer->getWalletId())) {
|
167 |
+
$this->_redirect('payline/wallet/subscribe');
|
168 |
+
return;
|
169 |
+
}
|
170 |
+
|
171 |
+
$paylineSDK = Mage::helper('payline')->initPayline('WALLET');
|
172 |
+
$paylineSDK->setWalletIdList($walletId);
|
173 |
+
$array = array('contractNumber' => $customer->getWalletContractNumber(), 'cardInd' => '');
|
174 |
+
try {
|
175 |
+
$res = $paylineSDK->disableWallet($array);
|
176 |
+
Mage::getSingleton('customer/session')->setWalletData(null);
|
177 |
+
} catch (Exception $e) {
|
178 |
+
$msgLog = 'Unknown PAYLINE ERROR on disableWallet (Payline unreachable?)';
|
179 |
+
$msg = Mage::helper('payline')->__('Error while disabling wallet');
|
180 |
+
Mage::helper('payline/logger')->log('[disableAction] ' . $msgLog);
|
181 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
182 |
+
}
|
183 |
+
|
184 |
+
if (!isset($res['result']) || ($res['result']['code'] != '02500' && $res['result']['code'] != '02501' && $res['result']['code'] == '02505')) {
|
185 |
+
if (isset($res['result'])) {
|
186 |
+
$msgLog = 'PAYLINE ERROR on disableWallet: ' . $res['result']['code'] . ' ' . $res['result']['longMessage'];
|
187 |
+
} else {
|
188 |
+
$msgLog = 'Unknown PAYLINE ERROR on disableWallet';
|
189 |
+
}
|
190 |
+
$msg = Mage::helper('payline')->__('Error during disableWallet');
|
191 |
+
Mage::helper('payline/logger')->log('[disableAction] ' . $msg);
|
192 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
193 |
+
$this->_redirect('customer/account');
|
194 |
+
return;
|
195 |
+
}
|
196 |
+
|
197 |
+
$customer->setWalletId();
|
198 |
+
$customer->setWalletContractNumber();
|
199 |
+
$customer->save();
|
200 |
+
Mage::getSingleton('customer/session')->addSuccess($this->__('Your wallet has been disabled.'));
|
201 |
+
$this->_redirect('customer/account');
|
202 |
+
return;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
*
|
207 |
+
* Display wallet update iframe
|
208 |
+
* Update payment card, not perso details
|
209 |
+
*/
|
210 |
+
public function updateAction()
|
211 |
+
{
|
212 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
213 |
+
if (!($walletId = $customer->getWalletId())) {
|
214 |
+
$this->_redirect('payline/wallet/subscribe');
|
215 |
+
return;
|
216 |
+
}
|
217 |
+
$this->loadLayout();
|
218 |
+
|
219 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__('Update wallet'));
|
220 |
+
|
221 |
+
/* @var $paylineHelper Monext_Payline_Helper_Data */
|
222 |
+
$paylineHelper = Mage::helper('payline');
|
223 |
+
$paylineHelper->notificationUrl = Mage::getUrl('payline/unloggedwallet/updateNotify');
|
224 |
+
$paylineHelper->returnUrl = Mage::getUrl('payline/unloggedwallet/updateReturn');
|
225 |
+
//$paylineHelper->cancelUrl = Mage::getUrl('payline/unloggedwallet/updateCancel');
|
226 |
+
$paylineHelper->cancelUrl = Mage::getUrl('payline/unloggedwallet/updateReturn');
|
227 |
+
/* @var $paylineSDK PaylineSDK */
|
228 |
+
$paylineSDK = $paylineHelper->initPayline('WALLET');
|
229 |
+
$array = array(
|
230 |
+
'walletId' => $walletId,
|
231 |
+
'contractNumber' => ($customer->getWalletContractNumber() ? $customer->getWalletContractNumber() : $paylineHelper->contractNumber),
|
232 |
+
'cardInd' => '',
|
233 |
+
'updatePersonalDetails' => (Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details') ? 1 : 0),
|
234 |
+
'updatePaymentDetails' => (Mage::getStoreConfig('payment/PaylineWALLET/update_payment_details') ? 1 : 0),
|
235 |
+
'updateOwnerDetails' => 0,
|
236 |
+
'version' => Monext_Payline_Helper_Data::VERSION,
|
237 |
+
'billingAddress' => '',
|
238 |
+
'shippingAddress' => '',
|
239 |
+
'buyer' => array(
|
240 |
+
'lastName' => Mage::helper('payline')->encodeString(substr($customer->getLastname(), 0, 100)),
|
241 |
+
'firstName' => Mage::helper('payline')->encodeString(substr($customer->getFirstname(), 0, 100)),
|
242 |
+
'walletId' => $walletId
|
243 |
+
)
|
244 |
+
);
|
245 |
+
$email = $customer->getEmail();
|
246 |
+
$pattern = '/\+/i';
|
247 |
+
$charPlusExist = preg_match($pattern, $email);
|
248 |
+
if (strlen($email) <= 50 && Zend_Validate::is($email, 'EmailAddress') && !$charPlusExist) {
|
249 |
+
$array['buyer']['email'] = Mage::helper('payline')->encodeString($email);
|
250 |
+
} else {
|
251 |
+
$array['buyer']['email'] = '';
|
252 |
+
}
|
253 |
+
$paylineSDK->setPrivate(array('customerId' => $customer->getId()));
|
254 |
+
try {
|
255 |
+
$res = $paylineSDK->updateWebWallet($array);
|
256 |
+
} catch (Exception $e) {
|
257 |
+
Mage::logException($e);
|
258 |
+
$msgLog = 'Unknown PAYLINE ERROR on updateWebWallet (Payline unreachable?)';
|
259 |
+
$msg = Mage::helper('payline')->__('Error during wallet update');
|
260 |
+
Mage::helper('payline/logger')->log('[updateAction] ' . $msgLog);
|
261 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
262 |
+
}
|
263 |
+
if (is_string($res)) {
|
264 |
+
Mage::helper('payline/logger')->log('[updateAction] ' . $res);
|
265 |
+
Mage::getSingleton('customer/session')->addError($res);
|
266 |
+
$this->_redirect('customer/account');
|
267 |
+
return;
|
268 |
+
} elseif (!isset($res['result']) || ($res['result']['code'] != '00000' && $res['result']['code'] != '02502')) {
|
269 |
+
if (isset($res['result'])) {
|
270 |
+
$msgLog = 'PAYLINE ERROR on updateWebWallet: ' . $res['result']['code'] . ' ' . $res['result']['longMessage'];
|
271 |
+
} else {
|
272 |
+
$msgLog = 'Unknown PAYLINE ERROR on updateWebWallet';
|
273 |
+
}
|
274 |
+
$msg = Mage::helper('payline')->__('Error while updating wallet');
|
275 |
+
Mage::helper('payline/logger')->log('[updateAction] ' . $msgLog);
|
276 |
+
Mage::getSingleton('customer/session')->addError($msg);
|
277 |
+
$this->_redirect('customer/account');
|
278 |
+
return;
|
279 |
+
}
|
280 |
+
$urlPayline = $res['redirectURL'];
|
281 |
+
|
282 |
+
$this->_initLayoutMessages('customer/session');
|
283 |
+
$this->_initLayoutMessages('core/session');
|
284 |
+
|
285 |
+
if (Mage::getStoreConfig('payment/PaylineWALLET/update_personal_details')) {
|
286 |
+
$iframeClass = 'iframe-update-wallet iframe-with-perso-data';
|
287 |
+
} else {
|
288 |
+
$iframeClass = 'iframe-update-wallet';
|
289 |
+
}
|
290 |
+
$this->getLayout()->getBlock('payline-wallet-update-iframe')->setIframeClassName($iframeClass);
|
291 |
+
$this->getLayout()->getBlock('payline-wallet-update-iframe')->setIframeSrc($urlPayline);
|
292 |
+
|
293 |
+
$this->renderLayout();
|
294 |
+
}
|
295 |
+
|
296 |
+
}
|
|
app/code/community/Monext/Payline/etc/adminhtml.xml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<menu>
|
4 |
+
<!-- <system>
|
5 |
+
<children>
|
6 |
+
<payline translate="title" module="payline">
|
7 |
+
<title>Manage Payline Contracts</title>
|
8 |
+
<sort_order>10</sort_order>
|
9 |
+
<action>adminhtml/payline_managecontracts/index</action>
|
10 |
+
</payline>
|
11 |
+
</children>
|
12 |
+
</system> -->
|
13 |
+
<catalog>
|
14 |
+
<children>
|
15 |
+
<payline translate="title" module="payline">
|
16 |
+
<title>Manage Payline Product Categories</title>
|
17 |
+
<sort_order>10</sort_order>
|
18 |
+
<action>adminhtml/payline_manageproductcategories/index</action>
|
19 |
+
</payline>
|
20 |
+
</children>
|
21 |
+
</catalog>
|
22 |
+
</menu>
|
23 |
+
<acl>
|
24 |
+
<resources>
|
25 |
+
<admin>
|
26 |
+
<children>
|
27 |
+
<system>
|
28 |
+
<children>
|
29 |
+
<config>
|
30 |
+
<children>
|
31 |
+
<payline translate="title" module="payline">
|
32 |
+
<title>Payline Section</title>
|
33 |
+
<children>
|
34 |
+
<payline_contract translate="title" module="payline">
|
35 |
+
<title>Manage Payline Contracts</title>
|
36 |
+
</payline_contract>
|
37 |
+
</children>
|
38 |
+
</payline>
|
39 |
+
</children>
|
40 |
+
</config>
|
41 |
+
</children>
|
42 |
+
</system>
|
43 |
+
<catalog>
|
44 |
+
<children>
|
45 |
+
<payline>
|
46 |
+
<title>Manage Payline Product Categories</title>
|
47 |
+
<sort_order>10</sort_order>
|
48 |
+
</payline>
|
49 |
+
</children>
|
50 |
+
</catalog>
|
51 |
+
</children>
|
52 |
+
</admin>
|
53 |
+
</resources>
|
54 |
+
</acl>
|
55 |
+
</config>
|
app/code/community/Monext/Payline/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Monext_Payline>
|
5 |
-
<version>1.8.
|
6 |
</Monext_Payline>
|
7 |
</modules>
|
8 |
<global>
|
@@ -143,6 +143,13 @@
|
|
143 |
</totals>
|
144 |
</order_invoice>
|
145 |
</sales>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
</global>
|
147 |
<frontend>
|
148 |
<secure_url>
|
@@ -173,6 +180,51 @@
|
|
173 |
</payline>
|
174 |
</updates>
|
175 |
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
</frontend>
|
177 |
<admin>
|
178 |
<routers>
|
@@ -202,55 +254,30 @@
|
|
202 |
</payline>
|
203 |
</updates>
|
204 |
</layout>
|
205 |
-
<
|
206 |
-
<
|
207 |
-
<
|
208 |
-
<payline
|
209 |
-
<
|
210 |
-
<
|
211 |
-
<action>adminhtml/payline_managecontracts/index</action>
|
212 |
</payline>
|
213 |
-
</
|
214 |
-
</
|
215 |
-
<
|
216 |
-
|
217 |
-
<payline
|
218 |
-
<
|
219 |
-
<
|
220 |
-
<action>adminhtml/payline_manageproductcategories/index</action>
|
221 |
</payline>
|
222 |
-
|
223 |
-
</
|
224 |
-
</
|
225 |
-
<acl>
|
226 |
-
<resources>
|
227 |
-
<admin>
|
228 |
-
<children>
|
229 |
-
<system>
|
230 |
-
<children>
|
231 |
-
<payline>
|
232 |
-
<title>Manage Payline Contracts</title>
|
233 |
-
<sort_order>10</sort_order>
|
234 |
-
</payline>
|
235 |
-
</children>
|
236 |
-
</system>
|
237 |
-
<catalog>
|
238 |
-
<children>
|
239 |
-
<payline>
|
240 |
-
<title>Manage Payline Product Categories</title>
|
241 |
-
<sort_order>10</sort_order>
|
242 |
-
</payline>
|
243 |
-
</children>
|
244 |
-
</catalog>
|
245 |
-
</children>
|
246 |
-
</admin>
|
247 |
-
</resources>
|
248 |
-
</acl>
|
249 |
</adminhtml>
|
250 |
<default>
|
251 |
<payment>
|
252 |
<payline_common>
|
253 |
<title>Common settings</title>
|
|
|
254 |
<failed_order_status>holded</failed_order_status>
|
255 |
<canceled_order_status>canceled</canceled_order_status>
|
256 |
<new_order_status>processing</new_order_status>
|
@@ -260,16 +287,19 @@
|
|
260 |
</payline_common>
|
261 |
<PaylineCPT>
|
262 |
<model>payline/cpt</model>
|
|
|
263 |
<!-- Auth+Capture, 100 is capture only -->
|
264 |
<payline_payment_action>101</payline_payment_action>
|
265 |
<send_wallet_id>1</send_wallet_id>
|
266 |
</PaylineCPT>
|
267 |
<PaylineNX>
|
268 |
<model>payline/nx</model>
|
|
|
269 |
<send_wallet_id>1</send_wallet_id>
|
270 |
</PaylineNX>
|
271 |
<PaylineDIRECT>
|
272 |
<model>payline/direct</model>
|
|
|
273 |
<!-- Auth+Capture, 100 is capture only -->
|
274 |
<payline_payment_action>101</payline_payment_action>
|
275 |
<send_wallet_id>1</send_wallet_id>
|
@@ -277,6 +307,7 @@
|
|
277 |
</PaylineDIRECT>
|
278 |
<PaylineWALLET>
|
279 |
<model>payline/wallet</model>
|
|
|
280 |
<payline_register-oneclick_customeraccount>payline_register-oneclick_customeraccount</payline_register-oneclick_customeraccount>
|
281 |
<payline_register-oneclick_catalog>payline_register-oneclick_catalog</payline_register-oneclick_catalog>
|
282 |
<update_payment_details>1</update_payment_details>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Monext_Payline>
|
5 |
+
<version>1.8.5</version>
|
6 |
</Monext_Payline>
|
7 |
</modules>
|
8 |
<global>
|
143 |
</totals>
|
144 |
</order_invoice>
|
145 |
</sales>
|
146 |
+
<fieldsets>
|
147 |
+
<sales_convert_quote_payment>
|
148 |
+
<card_token_pan>
|
149 |
+
<to_order_payment>*</to_order_payment>
|
150 |
+
</card_token_pan>
|
151 |
+
</sales_convert_quote_payment>
|
152 |
+
</fieldsets>
|
153 |
</global>
|
154 |
<frontend>
|
155 |
<secure_url>
|
180 |
</payline>
|
181 |
</updates>
|
182 |
</layout>
|
183 |
+
<events>
|
184 |
+
<controller_action_layout_load_before>
|
185 |
+
<observers>
|
186 |
+
<payline_layout_load_before>
|
187 |
+
<class>payline/observer</class>
|
188 |
+
<method>updateHandleToUnsetPaymentStep</method>
|
189 |
+
</payline_layout_load_before>
|
190 |
+
</observers>
|
191 |
+
</controller_action_layout_load_before>
|
192 |
+
<controller_action_layout_generate_blocks_after>
|
193 |
+
<observers>
|
194 |
+
<payline_layout_generate_blocks_after>
|
195 |
+
<class>payline/observer</class>
|
196 |
+
<method>updateSectionTitle</method>
|
197 |
+
</payline_layout_generate_blocks_after>
|
198 |
+
</observers>
|
199 |
+
</controller_action_layout_generate_blocks_after>
|
200 |
+
<controller_action_postdispatch_checkout_onepage_saveShippingMethod>
|
201 |
+
<observers>
|
202 |
+
<namespace_module_skip_shipping_method>
|
203 |
+
<type>singleton</type>
|
204 |
+
<class>payline/observer</class>
|
205 |
+
<method>postdispatchOnepageSaveShippingMethod</method>
|
206 |
+
</namespace_module_skip_shipping_method>
|
207 |
+
</observers>
|
208 |
+
</controller_action_postdispatch_checkout_onepage_saveShippingMethod>
|
209 |
+
<core_block_abstract_to_html_after>
|
210 |
+
<observers>
|
211 |
+
<payline_block_abstract_to_html_after>
|
212 |
+
<type>singleton</type>
|
213 |
+
<class>payline/observer</class>
|
214 |
+
<method>alterBlockHtmlAfter</method>
|
215 |
+
</payline_block_abstract_to_html_after>
|
216 |
+
</observers>
|
217 |
+
</core_block_abstract_to_html_after>
|
218 |
+
<controller_action_predispatch_checkout_onepage_index>
|
219 |
+
<observers>
|
220 |
+
<payline_predispatch_checkout_onepage_index>
|
221 |
+
<type>singleton</type>
|
222 |
+
<class>payline/observer</class>
|
223 |
+
<method>predispatchCheckoutOnepage</method>
|
224 |
+
</payline_predispatch_checkout_onepage_index>
|
225 |
+
</observers>
|
226 |
+
</controller_action_predispatch_checkout_onepage_index>
|
227 |
+
</events>
|
228 |
</frontend>
|
229 |
<admin>
|
230 |
<routers>
|
254 |
</payline>
|
255 |
</updates>
|
256 |
</layout>
|
257 |
+
<events>
|
258 |
+
<admin_system_config_changed_section_payline>
|
259 |
+
<observers>
|
260 |
+
<payline>
|
261 |
+
<class>payline/observer</class>
|
262 |
+
<method>checkForConfigChanged</method>
|
|
|
263 |
</payline>
|
264 |
+
</observers>
|
265 |
+
</admin_system_config_changed_section_payline>
|
266 |
+
<adminhtml_init_system_config>
|
267 |
+
<observers>
|
268 |
+
<payline>
|
269 |
+
<class>payline/observer</class>
|
270 |
+
<method>configNestedPayment</method>
|
|
|
271 |
</payline>
|
272 |
+
</observers>
|
273 |
+
</adminhtml_init_system_config>
|
274 |
+
</events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
</adminhtml>
|
276 |
<default>
|
277 |
<payment>
|
278 |
<payline_common>
|
279 |
<title>Common settings</title>
|
280 |
+
<payline_enabled>1</payline_enabled>
|
281 |
<failed_order_status>holded</failed_order_status>
|
282 |
<canceled_order_status>canceled</canceled_order_status>
|
283 |
<new_order_status>processing</new_order_status>
|
287 |
</payline_common>
|
288 |
<PaylineCPT>
|
289 |
<model>payline/cpt</model>
|
290 |
+
<title>Payline - Cash web paiement</title>
|
291 |
<!-- Auth+Capture, 100 is capture only -->
|
292 |
<payline_payment_action>101</payline_payment_action>
|
293 |
<send_wallet_id>1</send_wallet_id>
|
294 |
</PaylineCPT>
|
295 |
<PaylineNX>
|
296 |
<model>payline/nx</model>
|
297 |
+
<title>Payline - Nx web payment</title>
|
298 |
<send_wallet_id>1</send_wallet_id>
|
299 |
</PaylineNX>
|
300 |
<PaylineDIRECT>
|
301 |
<model>payline/direct</model>
|
302 |
+
<title>Payline - direct payment</title>
|
303 |
<!-- Auth+Capture, 100 is capture only -->
|
304 |
<payline_payment_action>101</payline_payment_action>
|
305 |
<send_wallet_id>1</send_wallet_id>
|
307 |
</PaylineDIRECT>
|
308 |
<PaylineWALLET>
|
309 |
<model>payline/wallet</model>
|
310 |
+
<title>Payline - wallet payment</title>
|
311 |
<payline_register-oneclick_customeraccount>payline_register-oneclick_customeraccount</payline_register-oneclick_customeraccount>
|
312 |
<payline_register-oneclick_catalog>payline_register-oneclick_catalog</payline_register-oneclick_catalog>
|
313 |
<update_payment_details>1</update_payment_details>
|
app/code/community/Monext/Payline/etc/system.xml
CHANGED
@@ -1,42 +1,80 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<sections>
|
4 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
<groups>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<payline_common translate="label">
|
7 |
-
<label>
|
8 |
<sort_order>200</sort_order>
|
9 |
<show_in_default>1</show_in_default>
|
10 |
<show_in_website>1</show_in_website>
|
11 |
<show_in_store>1</show_in_store>
|
12 |
-
<
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<merchant_id translate="label" module="payline">
|
|
|
15 |
<label>Merchant ID</label>
|
16 |
<frontend_type>text</frontend_type>
|
17 |
-
<
|
|
|
|
|
18 |
<show_in_default>1</show_in_default>
|
19 |
<show_in_website>1</show_in_website>
|
20 |
<show_in_store>1</show_in_store>
|
|
|
21 |
</merchant_id>
|
22 |
<access_key translate="label">
|
|
|
23 |
<label>Access key</label>
|
24 |
<frontend_type>text</frontend_type>
|
|
|
|
|
25 |
<sort_order>10</sort_order>
|
26 |
<show_in_default>1</show_in_default>
|
27 |
<show_in_website>1</show_in_website>
|
28 |
<show_in_store>1</show_in_store>
|
|
|
29 |
</access_key>
|
30 |
<environment translate="label">
|
|
|
31 |
<label>Environment</label>
|
32 |
<frontend_type>select</frontend_type>
|
33 |
-
<source_model>payline/
|
|
|
34 |
<sort_order>20</sort_order>
|
35 |
<show_in_default>1</show_in_default>
|
36 |
<show_in_website>1</show_in_website>
|
37 |
<show_in_store>1</show_in_store>
|
|
|
38 |
</environment>
|
39 |
<language translate="label">
|
|
|
40 |
<label>Language</label>
|
41 |
<frontend_type>select</frontend_type>
|
42 |
<source_model>payline/datasource_languages</source_model>
|
@@ -44,40 +82,103 @@
|
|
44 |
<show_in_default>1</show_in_default>
|
45 |
<show_in_website>1</show_in_website>
|
46 |
<show_in_store>1</show_in_store>
|
|
|
47 |
</language>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
<proxy_host translate="label">
|
|
|
49 |
<label>Proxy host</label>
|
50 |
<frontend_type>text</frontend_type>
|
51 |
<sort_order>80</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 |
</proxy_host>
|
56 |
<proxy_port translate="label">
|
|
|
57 |
<label>Proxy port</label>
|
58 |
<frontend_type>text</frontend_type>
|
59 |
<sort_order>90</sort_order>
|
60 |
<show_in_default>1</show_in_default>
|
61 |
<show_in_website>1</show_in_website>
|
62 |
<show_in_store>1</show_in_store>
|
|
|
63 |
</proxy_port>
|
64 |
<proxy_login translate="label">
|
|
|
65 |
<label>Proxy login</label>
|
66 |
<frontend_type>text</frontend_type>
|
67 |
<sort_order>100</sort_order>
|
68 |
<show_in_default>1</show_in_default>
|
69 |
<show_in_website>1</show_in_website>
|
70 |
<show_in_store>1</show_in_store>
|
|
|
71 |
</proxy_login>
|
72 |
<proxy_password translate="label">
|
|
|
73 |
<label>Proxy password</label>
|
74 |
<frontend_type>text</frontend_type>
|
75 |
<sort_order>110</sort_order>
|
76 |
<show_in_default>1</show_in_default>
|
77 |
<show_in_website>1</show_in_website>
|
78 |
<show_in_store>1</show_in_store>
|
|
|
79 |
</proxy_password>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<init_order_status translate="label">
|
|
|
81 |
<label>Initial order status</label>
|
82 |
<comment></comment>
|
83 |
<frontend_type>select</frontend_type>
|
@@ -87,7 +188,16 @@
|
|
87 |
<show_in_website>1</show_in_website>
|
88 |
<show_in_store>1</show_in_store>
|
89 |
</init_order_status>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
<authorized_order_status>
|
|
|
91 |
<label>Order status when payment is authorized</label>
|
92 |
<comment>Authorize only</comment>
|
93 |
<frontend_type>select</frontend_type>
|
@@ -98,6 +208,7 @@
|
|
98 |
<show_in_store>1</show_in_store>
|
99 |
</authorized_order_status>
|
100 |
<captured_order_status>
|
|
|
101 |
<label>Order status when payment is captured</label>
|
102 |
<comment>Authorize + capture or re-authorized + capture or capture</comment>
|
103 |
<frontend_type>select</frontend_type>
|
@@ -108,6 +219,7 @@
|
|
108 |
<show_in_store>1</show_in_store>
|
109 |
</captured_order_status>
|
110 |
<reauthorized_order_status>
|
|
|
111 |
<label>Order status when payment is re-authorized</label>
|
112 |
<comment>Re-authorize only</comment>
|
113 |
<frontend_type>select</frontend_type>
|
@@ -117,7 +229,16 @@
|
|
117 |
<show_in_website>1</show_in_website>
|
118 |
<show_in_store>1</show_in_store>
|
119 |
</reauthorized_order_status>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<canceled_order_status translate="label">
|
|
|
121 |
<label>Order status when payment canceled by customer</label>
|
122 |
<comment></comment>
|
123 |
<frontend_type>select</frontend_type>
|
@@ -128,6 +249,7 @@
|
|
128 |
<show_in_store>1</show_in_store>
|
129 |
</canceled_order_status>
|
130 |
<failed_order_status translate="label">
|
|
|
131 |
<label>Order status when payment refused by Payline</label>
|
132 |
<comment></comment>
|
133 |
<frontend_type>select</frontend_type>
|
@@ -138,6 +260,7 @@
|
|
138 |
<show_in_store>1</show_in_store>
|
139 |
</failed_order_status>
|
140 |
<resignation_order_status translate="label">
|
|
|
141 |
<label>Order status when payment abandoned by Customer</label>
|
142 |
<comment></comment>
|
143 |
<frontend_type>select</frontend_type>
|
@@ -148,6 +271,7 @@
|
|
148 |
<show_in_store>1</show_in_store>
|
149 |
</resignation_order_status>
|
150 |
<fraud_order_status translate="label">
|
|
|
151 |
<label>Order status when a fraud is suspected</label>
|
152 |
<comment></comment>
|
153 |
<frontend_type>select</frontend_type>
|
@@ -157,71 +281,94 @@
|
|
157 |
<show_in_website>1</show_in_website>
|
158 |
<show_in_store>1</show_in_store>
|
159 |
</fraud_order_status>
|
160 |
-
<automate_wallet_subscription translate="label comment">
|
161 |
-
<label>Automate wallet subscription</label>
|
162 |
-
<comment>A customer wallet will be created with the first payment using Payline</comment>
|
163 |
-
<frontend_type>select</frontend_type>
|
164 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
165 |
-
<sort_order>160</sort_order>
|
166 |
-
<show_in_default>1</show_in_default>
|
167 |
-
<show_in_website>1</show_in_website>
|
168 |
-
<show_in_store>1</show_in_store>
|
169 |
-
</automate_wallet_subscription>
|
170 |
-
<return_payment_refused translate="label comment">
|
171 |
-
<label>Return options</label>
|
172 |
-
<comment>Page to return when payment is refused</comment>
|
173 |
-
<frontend_type>select</frontend_type>
|
174 |
-
<source_model>payline/datasource_return</source_model>
|
175 |
-
<sort_order>170</sort_order>
|
176 |
-
<show_in_default>1</show_in_default>
|
177 |
-
<show_in_website>1</show_in_website>
|
178 |
-
<show_in_store>1</show_in_store>
|
179 |
-
</return_payment_refused>
|
180 |
</fields>
|
181 |
-
</
|
182 |
-
<
|
183 |
-
<label>
|
184 |
-
<sort_order>
|
185 |
<show_in_default>1</show_in_default>
|
186 |
<show_in_website>1</show_in_website>
|
187 |
<show_in_store>1</show_in_store>
|
|
|
188 |
<fields>
|
189 |
-
<
|
190 |
-
<
|
191 |
-
<
|
192 |
-
<
|
|
|
193 |
<sort_order>10</sort_order>
|
194 |
<show_in_default>1</show_in_default>
|
195 |
<show_in_website>1</show_in_website>
|
196 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
</active>
|
198 |
<title translate="label">
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
|
|
205 |
</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
<template_url translate="label comment">
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
214 |
</template_url>
|
215 |
<custom_payment_page_code translate="label comment">
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
223 |
</custom_payment_page_code>
|
224 |
<custom_payment_page_code_ua_regexp translate="comment">
|
|
|
225 |
<label></label>
|
226 |
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
227 |
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
@@ -232,6 +379,7 @@
|
|
232 |
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
233 |
</custom_payment_page_code_ua_regexp>
|
234 |
<redirect_message translate="label">
|
|
|
235 |
<label>Redirection message</label>
|
236 |
<frontend_type>textarea</frontend_type>
|
237 |
<sort_order>50</sort_order>
|
@@ -239,156 +387,199 @@
|
|
239 |
<show_in_website>1</show_in_website>
|
240 |
<show_in_store>1</show_in_store>
|
241 |
</redirect_message>
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
<
|
247 |
-
<
|
248 |
-
<
|
249 |
-
<show_in_store>1</show_in_store>
|
250 |
-
</payline_payment_action>
|
251 |
-
<capture_payment_when_i_said translate="label">
|
252 |
-
<label>Capture payment when action / status is triggered</label>
|
253 |
-
<comment></comment>
|
254 |
-
<frontend_type>select</frontend_type>
|
255 |
-
<source_model>payline/datasource_Capturepaymentoptions</source_model>
|
256 |
-
<sort_order>61</sort_order>
|
257 |
-
<show_in_default>1</show_in_default>
|
258 |
-
<show_in_website>1</show_in_website>
|
259 |
-
<show_in_store>1</show_in_store>
|
260 |
-
<!-- 100 => authorization -->
|
261 |
-
<depends>
|
262 |
-
<payline_payment_action>100</payline_payment_action>
|
263 |
-
</depends>
|
264 |
-
</capture_payment_when_i_said>
|
265 |
-
<send_wallet_id translate="label comment">
|
266 |
-
<label>Send wallet id</label>
|
267 |
-
<comment>If wallet id is provided, wallet payment will be available during web payment</comment>
|
268 |
-
<frontend_type>select</frontend_type>
|
269 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
270 |
-
<sort_order>70</sort_order>
|
271 |
-
<show_in_default>1</show_in_default>
|
272 |
-
<show_in_website>1</show_in_website>
|
273 |
-
<show_in_store>1</show_in_store>
|
274 |
-
</send_wallet_id>
|
275 |
-
<automate_invoice_creation>
|
276 |
-
<label>Automate invoice creation</label>
|
277 |
-
<frontend_type>select</frontend_type>
|
278 |
-
<source_model>payline/datasource_status_invoice</source_model>
|
279 |
-
<sort_order>80</sort_order>
|
280 |
-
<show_in_default>1</show_in_default>
|
281 |
-
<show_in_website>1</show_in_website>
|
282 |
-
<show_in_store>1</show_in_store>
|
283 |
-
</automate_invoice_creation>
|
284 |
-
<action_when_order_seven_day_old>
|
285 |
-
<label>Action when order is at least 7 days old</label>
|
286 |
-
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
287 |
-
<frontend_type>select</frontend_type>
|
288 |
-
<source_model>payline/datasource_paymentactionsreauth</source_model>
|
289 |
-
<sort_order>80</sort_order>
|
290 |
<show_in_default>1</show_in_default>
|
291 |
<show_in_website>1</show_in_website>
|
292 |
-
<
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
<show_in_default>1</show_in_default>
|
300 |
<show_in_website>1</show_in_website>
|
301 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
<fields>
|
303 |
-
<active translate="label">
|
304 |
-
<label>Enabled</label>
|
305 |
-
<frontend_type>select</frontend_type>
|
306 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
307 |
-
<sort_order>10</sort_order>
|
308 |
-
<show_in_default>1</show_in_default>
|
309 |
-
<show_in_website>1</show_in_website>
|
310 |
-
<show_in_store>1</show_in_store>
|
311 |
-
</active>
|
312 |
-
<title translate="label">
|
313 |
-
<label>Title</label>
|
314 |
-
<frontend_type>text</frontend_type>
|
315 |
-
<sort_order>20</sort_order>
|
316 |
-
<show_in_default>1</show_in_default>
|
317 |
-
<show_in_website>1</show_in_website>
|
318 |
-
<show_in_store>1</show_in_store>
|
319 |
-
</title>
|
320 |
-
<cost_type translate="label">
|
321 |
-
<label>Costs</label>
|
322 |
-
<frontend_type>select</frontend_type>
|
323 |
-
<source_model>payline/datasource_costs</source_model>
|
324 |
-
<sort_order>21</sort_order>
|
325 |
-
<show_in_default>1</show_in_default>
|
326 |
-
<show_in_website>1</show_in_website>
|
327 |
-
<show_in_store>1</show_in_store>
|
328 |
-
</cost_type>
|
329 |
-
<cost_amount translate="label">
|
330 |
-
<label>Costs amount/percentage</label>
|
331 |
-
<frontend_type>text</frontend_type>
|
332 |
-
<sort_order>22</sort_order>
|
333 |
-
<show_in_default>1</show_in_default>
|
334 |
-
<show_in_website>1</show_in_website>
|
335 |
-
<show_in_store>1</show_in_store>
|
336 |
-
</cost_amount>
|
337 |
-
<template_url translate="label comment">
|
338 |
-
<label>Template URL</label>
|
339 |
-
<comment>URL to a custom HTML template. Refer to Payline documentation</comment>
|
340 |
-
<frontend_type>text</frontend_type>
|
341 |
-
<sort_order>30</sort_order>
|
342 |
-
<show_in_default>1</show_in_default>
|
343 |
-
<show_in_website>1</show_in_website>
|
344 |
-
<show_in_store>1</show_in_store>
|
345 |
-
</template_url>
|
346 |
-
<custom_payment_page_code translate="label comment">
|
347 |
-
<label>Custom payment page code</label>
|
348 |
-
<comment>ID of a style defined in Payline administration tool.</comment>
|
349 |
-
<frontend_type>text</frontend_type>
|
350 |
-
<sort_order>40</sort_order>
|
351 |
-
<show_in_default>1</show_in_default>
|
352 |
-
<show_in_website>1</show_in_website>
|
353 |
-
<show_in_store>1</show_in_store>
|
354 |
-
</custom_payment_page_code>
|
355 |
-
<custom_payment_page_code_ua_regexp translate="comment">
|
356 |
-
<label></label>
|
357 |
-
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
358 |
-
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
359 |
-
<sort_order>41</sort_order>
|
360 |
-
<show_in_default>1</show_in_default>
|
361 |
-
<show_in_website>1</show_in_website>
|
362 |
-
<show_in_store>1</show_in_store>
|
363 |
-
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
364 |
-
</custom_payment_page_code_ua_regexp>
|
365 |
-
<redirect_message translate="label">
|
366 |
-
<label>Redirection message</label>
|
367 |
-
<frontend_type>textarea</frontend_type>
|
368 |
-
<sort_order>50</sort_order>
|
369 |
-
<show_in_default>1</show_in_default>
|
370 |
-
<show_in_website>1</show_in_website>
|
371 |
-
<show_in_store>1</show_in_store>
|
372 |
-
</redirect_message>
|
373 |
<billing_occurrences translate="label">
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
|
|
381 |
</billing_occurrences>
|
382 |
<billing_cycle translate="label">
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
|
|
390 |
</billing_cycle>
|
391 |
<send_wallet_id translate="label comment">
|
|
|
392 |
<label>Send wallet id</label>
|
393 |
<comment>If wallet id is provided, wallet payment will be available during web payment</comment>
|
394 |
<frontend_type>select</frontend_type>
|
@@ -399,6 +590,7 @@
|
|
399 |
<show_in_store>1</show_in_store>
|
400 |
</send_wallet_id>
|
401 |
<automate_invoice_creation>
|
|
|
402 |
<label>Automate invoice creation</label>
|
403 |
<frontend_type>select</frontend_type>
|
404 |
<source_model>payline/datasource_status_invoice</source_model>
|
@@ -408,6 +600,7 @@
|
|
408 |
<show_in_store>1</show_in_store>
|
409 |
</automate_invoice_creation>
|
410 |
<status_when_payline_schedule_alert>
|
|
|
411 |
<label>Order status when credit card expiration date is close</label>
|
412 |
<frontend_type>select</frontend_type>
|
413 |
<source_model>payline/datasource_statusrowempty</source_model>
|
@@ -418,6 +611,7 @@
|
|
418 |
<can_be_empty>1</can_be_empty>
|
419 |
</status_when_payline_schedule_alert>
|
420 |
<status_when_credit_card_schedule_is_expired>
|
|
|
421 |
<label>Order status when an instalment fails</label>
|
422 |
<frontend_type>select</frontend_type>
|
423 |
<source_model>payline/datasource_statusrowempty</source_model>
|
@@ -428,24 +622,34 @@
|
|
428 |
<can_be_empty>1</can_be_empty>
|
429 |
</status_when_credit_card_schedule_is_expired>
|
430 |
</fields>
|
431 |
-
</
|
432 |
-
|
|
|
|
|
433 |
<label>Payline - direct payment</label>
|
434 |
-
<sort_order>
|
435 |
<show_in_default>1</show_in_default>
|
436 |
<show_in_website>1</show_in_website>
|
437 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
<fields>
|
439 |
<active translate="label">
|
|
|
440 |
<label>Enabled</label>
|
441 |
<frontend_type>select</frontend_type>
|
442 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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>
|
447 |
</active>
|
448 |
<title translate="label">
|
|
|
449 |
<label>Title</label>
|
450 |
<frontend_type>text</frontend_type>
|
451 |
<sort_order>20</sort_order>
|
@@ -453,7 +657,18 @@
|
|
453 |
<show_in_website>1</show_in_website>
|
454 |
<show_in_store>1</show_in_store>
|
455 |
</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
<payline_payment_action translate="label">
|
|
|
457 |
<label>Payment action</label>
|
458 |
<frontend_type>select</frontend_type>
|
459 |
<source_model>payline/datasource_paymentactions</source_model>
|
@@ -463,6 +678,7 @@
|
|
463 |
<show_in_store>1</show_in_store>
|
464 |
</payline_payment_action>
|
465 |
<capture_payment_when_i_said translate="label">
|
|
|
466 |
<label>Capture payment when action / status is triggered</label>
|
467 |
<comment></comment>
|
468 |
<frontend_type>select</frontend_type>
|
@@ -477,6 +693,7 @@
|
|
477 |
</depends>
|
478 |
</capture_payment_when_i_said>
|
479 |
<automate_invoice_creation>
|
|
|
480 |
<label>Automate invoice creation</label>
|
481 |
<frontend_type>select</frontend_type>
|
482 |
<source_model>payline/datasource_status_invoice</source_model>
|
@@ -486,6 +703,7 @@
|
|
486 |
<show_in_store>1</show_in_store>
|
487 |
</automate_invoice_creation>
|
488 |
<action_when_order_seven_day_old>
|
|
|
489 |
<label>Action when order is at least 7 days old</label>
|
490 |
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
491 |
<frontend_type>select</frontend_type>
|
@@ -495,179 +713,244 @@
|
|
495 |
<show_in_website>1</show_in_website>
|
496 |
<show_in_store>1</show_in_store>
|
497 |
</action_when_order_seven_day_old>
|
498 |
-
|
499 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
<show_in_website>1</show_in_website>
|
506 |
-
<show_in_store>1</show_in_store>
|
507 |
-
<fields>
|
508 |
-
<active translate="label">
|
509 |
-
<label>Enabled</label>
|
510 |
-
<frontend_type>select</frontend_type>
|
511 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
512 |
-
<sort_order>10</sort_order>
|
513 |
-
<show_in_default>1</show_in_default>
|
514 |
-
<show_in_website>1</show_in_website>
|
515 |
-
<show_in_store>1</show_in_store>
|
516 |
-
</active>
|
517 |
-
<title translate="label">
|
518 |
-
<label>Title</label>
|
519 |
-
<frontend_type>text</frontend_type>
|
520 |
-
<sort_order>20</sort_order>
|
521 |
-
<show_in_default>1</show_in_default>
|
522 |
-
<show_in_website>1</show_in_website>
|
523 |
-
<show_in_store>1</show_in_store>
|
524 |
-
</title>
|
525 |
-
<template_url translate="label comment">
|
526 |
-
<label>Template URL</label>
|
527 |
-
<comment>URL to a custom HTML template. Refer to Payline documentation</comment>
|
528 |
-
<frontend_type>text</frontend_type>
|
529 |
-
<sort_order>30</sort_order>
|
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 |
-
</template_url>
|
534 |
-
<custom_payment_page_code translate="label comment">
|
535 |
-
<label>Custom payment page code</label>
|
536 |
-
<comment>ID of a style defined in Payline administration tool.</comment>
|
537 |
-
<frontend_type>text</frontend_type>
|
538 |
-
<sort_order>40</sort_order>
|
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 |
-
</custom_payment_page_code>
|
543 |
-
<custom_payment_page_code_ua_regexp translate="comment">
|
544 |
-
<label></label>
|
545 |
-
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
546 |
-
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
547 |
-
<sort_order>41</sort_order>
|
548 |
-
<show_in_default>1</show_in_default>
|
549 |
-
<show_in_website>1</show_in_website>
|
550 |
-
<show_in_store>1</show_in_store>
|
551 |
-
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
552 |
-
</custom_payment_page_code_ua_regexp>
|
553 |
-
<payline_register-oneclick_customeraccount translate="label">
|
554 |
-
<label>registration CMS block id in customer account</label>
|
555 |
-
<frontend_type>select</frontend_type>
|
556 |
-
<source_model>payline/datasource_cms_block</source_model>
|
557 |
-
<sort_order>50</sort_order>
|
558 |
-
<show_in_default>1</show_in_default>
|
559 |
-
<show_in_website>1</show_in_website>
|
560 |
-
<show_in_store>1</show_in_store>
|
561 |
-
</payline_register-oneclick_customeraccount>
|
562 |
-
<payline_register-oneclick_catalog translate="label">
|
563 |
-
<label>registration CMS block id in catalog</label>
|
564 |
-
<frontend_type>select</frontend_type>
|
565 |
-
<source_model>payline/datasource_cms_block</source_model>
|
566 |
-
<sort_order>60</sort_order>
|
567 |
-
<show_in_default>1</show_in_default>
|
568 |
-
<show_in_website>1</show_in_website>
|
569 |
-
<show_in_store>1</show_in_store>
|
570 |
-
</payline_register-oneclick_catalog>
|
571 |
-
<payline_payment_action translate="label">
|
572 |
-
<label>Payment action</label>
|
573 |
-
<frontend_type>select</frontend_type>
|
574 |
-
<source_model>payline/datasource_paymentactions</source_model>
|
575 |
-
<sort_order>70</sort_order>
|
576 |
-
<show_in_default>1</show_in_default>
|
577 |
-
<show_in_website>1</show_in_website>
|
578 |
-
<show_in_store>1</show_in_store>
|
579 |
-
</payline_payment_action>
|
580 |
-
<capture_payment_when_i_said translate="label">
|
581 |
-
<label>Capture payment when action / status is triggered</label>
|
582 |
-
<comment></comment>
|
583 |
-
<frontend_type>select</frontend_type>
|
584 |
-
<source_model>payline/datasource_Capturepaymentoptions</source_model>
|
585 |
-
<sort_order>71</sort_order>
|
586 |
-
<show_in_default>1</show_in_default>
|
587 |
-
<show_in_website>1</show_in_website>
|
588 |
-
<show_in_store>1</show_in_store>
|
589 |
-
<!-- 100 => authorization -->
|
590 |
-
<depends>
|
591 |
-
<payline_payment_action>100</payline_payment_action>
|
592 |
-
</depends>
|
593 |
-
</capture_payment_when_i_said>
|
594 |
-
<action_when_order_seven_day_old>
|
595 |
-
<label>Action when order is at least 7 days old</label>
|
596 |
-
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
597 |
-
<frontend_type>select</frontend_type>
|
598 |
-
<source_model>payline/datasource_paymentactionsreauth</source_model>
|
599 |
-
<sort_order>72</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 |
-
</action_when_order_seven_day_old>
|
604 |
-
<wallet_payment_security>
|
605 |
-
<label>Security</label>
|
606 |
-
<comment>Choose whether customer has to fill out his CVV, his 3DS password, both or none</comment>
|
607 |
-
<frontend_type>select</frontend_type>
|
608 |
-
<source_model>payline/datasource_walletsecurity</source_model>
|
609 |
-
<sort_order>73</sort_order>
|
610 |
-
<show_in_default>1</show_in_default>
|
611 |
-
<show_in_website>1</show_in_website>
|
612 |
-
<show_in_store>1</show_in_store>
|
613 |
-
</wallet_payment_security>
|
614 |
-
<update_personal_details translate="label">
|
615 |
-
<label>Allow user to update his personal details</label>
|
616 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
617 |
-
<frontend_type>select</frontend_type>
|
618 |
-
<sort_order>80</sort_order>
|
619 |
-
<show_in_default>1</show_in_default>
|
620 |
-
<show_in_website>1</show_in_website>
|
621 |
-
<show_in_store>1</show_in_store>
|
622 |
-
</update_personal_details>
|
623 |
-
<update_payment_details translate="label">
|
624 |
-
<label>Allow user to update his payment details</label>
|
625 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
626 |
-
<frontend_type>select</frontend_type>
|
627 |
-
<sort_order>90</sort_order>
|
628 |
-
<show_in_default>1</show_in_default>
|
629 |
-
<show_in_website>1</show_in_website>
|
630 |
-
<show_in_store>1</show_in_store>
|
631 |
-
</update_payment_details>
|
632 |
-
<enable_one_clic translate="label">
|
633 |
-
<label>Enable One Clic function</label>
|
634 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
635 |
-
<frontend_type>select</frontend_type>
|
636 |
-
<sort_order>100</sort_order>
|
637 |
-
<show_in_default>1</show_in_default>
|
638 |
-
<show_in_website>1</show_in_website>
|
639 |
-
<show_in_store>1</show_in_store>
|
640 |
-
</enable_one_clic>
|
641 |
-
<one_clic_block_title translate="label">
|
642 |
-
<label>One Clic bloc title</label>
|
643 |
-
<frontend_type>text</frontend_type>
|
644 |
-
<sort_order>110</sort_order>
|
645 |
-
<show_in_default>1</show_in_default>
|
646 |
-
<show_in_website>1</show_in_website>
|
647 |
-
<show_in_store>1</show_in_store>
|
648 |
-
</one_clic_block_title>
|
649 |
-
<default_shipping_method translate="label comment">
|
650 |
-
<label>Default shipping method</label>
|
651 |
-
<comment>Shipping method to use with one click checkout. Flatrate, freeshipping and Tablerates are available</comment>
|
652 |
-
<source_model>payline/datasource_shippingmethods</source_model>
|
653 |
-
<frontend_type>select</frontend_type>
|
654 |
-
<sort_order>120</sort_order>
|
655 |
-
<show_in_default>1</show_in_default>
|
656 |
-
<show_in_website>1</show_in_website>
|
657 |
-
<show_in_store>1</show_in_store>
|
658 |
-
</default_shipping_method>
|
659 |
-
<automate_invoice_creation>
|
660 |
-
<label>Automate invoice creation</label>
|
661 |
-
<frontend_type>select</frontend_type>
|
662 |
-
<source_model>payline/datasource_status_invoice</source_model>
|
663 |
-
<sort_order>130</sort_order>
|
664 |
-
<show_in_default>1</show_in_default>
|
665 |
-
<show_in_website>1</show_in_website>
|
666 |
-
<show_in_store>1</show_in_store>
|
667 |
-
</automate_invoice_creation>
|
668 |
-
</fields>
|
669 |
-
</PaylineWALLET>
|
670 |
-
</groups>
|
671 |
-
</payment>
|
672 |
-
</sections>
|
673 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<sections>
|
4 |
+
<payline translate="label" module="payline">
|
5 |
+
<class>separator-top</class>
|
6 |
+
<label>Payline</label>
|
7 |
+
<tab>sales</tab>
|
8 |
+
<frontend_type>text</frontend_type>
|
9 |
+
<sort_order>380</sort_order>
|
10 |
+
<show_in_default>1</show_in_default>
|
11 |
+
<show_in_website>1</show_in_website>
|
12 |
+
<show_in_store>1</show_in_store>
|
13 |
<groups>
|
14 |
+
<payline_welcome translate="label" module="payline">
|
15 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_welcome</frontend_model>
|
16 |
+
<sort_order>199</sort_order>
|
17 |
+
<show_in_default>1</show_in_default>
|
18 |
+
<show_in_website>1</show_in_website>
|
19 |
+
<show_in_store>1</show_in_store>
|
20 |
+
</payline_welcome>
|
21 |
<payline_common translate="label">
|
22 |
+
<label>Common settings</label>
|
23 |
<sort_order>200</sort_order>
|
24 |
<show_in_default>1</show_in_default>
|
25 |
<show_in_website>1</show_in_website>
|
26 |
<show_in_store>1</show_in_store>
|
27 |
+
<expanded>1</expanded>
|
28 |
+
<fields>
|
29 |
+
<payline_enabled translate="label" module="payline">
|
30 |
+
<config_path>payment/payline_common/payline_enabled</config_path>
|
31 |
+
<label>Enabled</label>
|
32 |
+
<frontend_type>select</frontend_type>
|
33 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
34 |
+
<backend_model>payline/adminhtml_system_config_backend_enabled</backend_model>
|
35 |
+
<sort_order>1</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>1</show_in_website>
|
38 |
+
<show_in_store>1</show_in_store>
|
39 |
+
</payline_enabled>
|
40 |
<merchant_id translate="label" module="payline">
|
41 |
+
<config_path>payment/payline_common/merchant_id</config_path>
|
42 |
<label>Merchant ID</label>
|
43 |
<frontend_type>text</frontend_type>
|
44 |
+
<backend_model>payline/adminhtml_system_config_backend_common</backend_model>
|
45 |
+
<frontend_class>required-entry</frontend_class>
|
46 |
+
<sort_order>5</sort_order>
|
47 |
<show_in_default>1</show_in_default>
|
48 |
<show_in_website>1</show_in_website>
|
49 |
<show_in_store>1</show_in_store>
|
50 |
+
<depends><payline_enabled>1</payline_enabled></depends>
|
51 |
</merchant_id>
|
52 |
<access_key translate="label">
|
53 |
+
<config_path>payment/payline_common/access_key</config_path>
|
54 |
<label>Access key</label>
|
55 |
<frontend_type>text</frontend_type>
|
56 |
+
<backend_model>payline/adminhtml_system_config_backend_common</backend_model>
|
57 |
+
<frontend_class>required-entry</frontend_class>
|
58 |
<sort_order>10</sort_order>
|
59 |
<show_in_default>1</show_in_default>
|
60 |
<show_in_website>1</show_in_website>
|
61 |
<show_in_store>1</show_in_store>
|
62 |
+
<depends><payline_enabled>1</payline_enabled></depends>
|
63 |
</access_key>
|
64 |
<environment translate="label">
|
65 |
+
<config_path>payment/payline_common/environment</config_path>
|
66 |
<label>Environment</label>
|
67 |
<frontend_type>select</frontend_type>
|
68 |
+
<source_model>payline/adminhtml_system_config_source_environment</source_model>
|
69 |
+
<backend_model>payline/adminhtml_system_config_backend_common</backend_model>
|
70 |
<sort_order>20</sort_order>
|
71 |
<show_in_default>1</show_in_default>
|
72 |
<show_in_website>1</show_in_website>
|
73 |
<show_in_store>1</show_in_store>
|
74 |
+
<depends><payline_enabled>1</payline_enabled></depends>
|
75 |
</environment>
|
76 |
<language translate="label">
|
77 |
+
<config_path>payment/payline_common/language</config_path>
|
78 |
<label>Language</label>
|
79 |
<frontend_type>select</frontend_type>
|
80 |
<source_model>payline/datasource_languages</source_model>
|
82 |
<show_in_default>1</show_in_default>
|
83 |
<show_in_website>1</show_in_website>
|
84 |
<show_in_store>1</show_in_store>
|
85 |
+
<depends><payline_enabled>1</payline_enabled></depends>
|
86 |
</language>
|
87 |
+
<proxy_enabled translate="label">
|
88 |
+
<config_path>payment/payline_common/proxy_enabled</config_path>
|
89 |
+
<label>Proxy enabled</label>
|
90 |
+
<frontend_type>select</frontend_type>
|
91 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
92 |
+
<sort_order>75</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
<depends><payline_enabled>1</payline_enabled></depends>
|
97 |
+
</proxy_enabled>
|
98 |
<proxy_host translate="label">
|
99 |
+
<config_path>payment/payline_common/proxy_host</config_path>
|
100 |
<label>Proxy host</label>
|
101 |
<frontend_type>text</frontend_type>
|
102 |
<sort_order>80</sort_order>
|
103 |
<show_in_default>1</show_in_default>
|
104 |
<show_in_website>1</show_in_website>
|
105 |
<show_in_store>1</show_in_store>
|
106 |
+
<depends><proxy_enabled>1</proxy_enabled></depends>
|
107 |
</proxy_host>
|
108 |
<proxy_port translate="label">
|
109 |
+
<config_path>payment/payline_common/proxy_port</config_path>
|
110 |
<label>Proxy port</label>
|
111 |
<frontend_type>text</frontend_type>
|
112 |
<sort_order>90</sort_order>
|
113 |
<show_in_default>1</show_in_default>
|
114 |
<show_in_website>1</show_in_website>
|
115 |
<show_in_store>1</show_in_store>
|
116 |
+
<depends><proxy_enabled>1</proxy_enabled></depends>
|
117 |
</proxy_port>
|
118 |
<proxy_login translate="label">
|
119 |
+
<config_path>payment/payline_common/proxy_login</config_path>
|
120 |
<label>Proxy login</label>
|
121 |
<frontend_type>text</frontend_type>
|
122 |
<sort_order>100</sort_order>
|
123 |
<show_in_default>1</show_in_default>
|
124 |
<show_in_website>1</show_in_website>
|
125 |
<show_in_store>1</show_in_store>
|
126 |
+
<depends><proxy_enabled>1</proxy_enabled></depends>
|
127 |
</proxy_login>
|
128 |
<proxy_password translate="label">
|
129 |
+
<config_path>payment/payline_common/proxy_password</config_path>
|
130 |
<label>Proxy password</label>
|
131 |
<frontend_type>text</frontend_type>
|
132 |
<sort_order>110</sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
<show_in_store>1</show_in_store>
|
136 |
+
<depends><proxy_enabled>1</proxy_enabled></depends>
|
137 |
</proxy_password>
|
138 |
+
</fields>
|
139 |
+
</payline_common>
|
140 |
+
|
141 |
+
|
142 |
+
<payline_payments translate="label" module="payline">
|
143 |
+
<label>Payment solutions</label>
|
144 |
+
<sort_order>201</sort_order>
|
145 |
+
<show_in_default>1</show_in_default>
|
146 |
+
<show_in_website>1</show_in_website>
|
147 |
+
<show_in_store>1</show_in_store>
|
148 |
+
<frontend_class>complex</frontend_class>
|
149 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_group</frontend_model>
|
150 |
+
<!--
|
151 |
+
<frontend_model>paypal/adminhtml_system_config_fieldset_group</frontend_model>
|
152 |
+
<comment>Process payments using your own internet merchant account.</comment>
|
153 |
+
<help_url>https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/payment_gateway</help_url>
|
154 |
+
-->
|
155 |
+
<fields/>
|
156 |
+
</payline_payments>
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
<payline_workflows>
|
162 |
+
<label>Worklows</label>
|
163 |
+
<sort_order>202</sort_order>
|
164 |
+
<show_in_default>1</show_in_default>
|
165 |
+
<show_in_website>1</show_in_website>
|
166 |
+
<show_in_store>1</show_in_store>
|
167 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_group</frontend_model>
|
168 |
+
<fields>
|
169 |
+
<return_payment_refused translate="label comment">
|
170 |
+
<config_path>payment/payline_common/return_payment_refused</config_path>
|
171 |
+
<label>Return options</label>
|
172 |
+
<comment>Page to return when payment is refused</comment>
|
173 |
+
<frontend_type>select</frontend_type>
|
174 |
+
<source_model>payline/datasource_return</source_model>
|
175 |
+
<sort_order>110</sort_order>
|
176 |
+
<show_in_default>1</show_in_default>
|
177 |
+
<show_in_website>1</show_in_website>
|
178 |
+
<show_in_store>1</show_in_store>
|
179 |
+
</return_payment_refused>
|
180 |
<init_order_status translate="label">
|
181 |
+
<config_path>payment/payline_common/init_order_status</config_path>
|
182 |
<label>Initial order status</label>
|
183 |
<comment></comment>
|
184 |
<frontend_type>select</frontend_type>
|
188 |
<show_in_website>1</show_in_website>
|
189 |
<show_in_store>1</show_in_store>
|
190 |
</init_order_status>
|
191 |
+
<heading_payment_author translate="label">
|
192 |
+
<label>Status for an authorized payment</label>
|
193 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
194 |
+
<sort_order>125</sort_order>
|
195 |
+
<show_in_default>1</show_in_default>
|
196 |
+
<show_in_website>1</show_in_website>
|
197 |
+
<show_in_store>1</show_in_store>
|
198 |
+
</heading_payment_author>
|
199 |
<authorized_order_status>
|
200 |
+
<config_path>payment/payline_common/authorized_order_status</config_path>
|
201 |
<label>Order status when payment is authorized</label>
|
202 |
<comment>Authorize only</comment>
|
203 |
<frontend_type>select</frontend_type>
|
208 |
<show_in_store>1</show_in_store>
|
209 |
</authorized_order_status>
|
210 |
<captured_order_status>
|
211 |
+
<config_path>payment/payline_common/captured_order_status</config_path>
|
212 |
<label>Order status when payment is captured</label>
|
213 |
<comment>Authorize + capture or re-authorized + capture or capture</comment>
|
214 |
<frontend_type>select</frontend_type>
|
219 |
<show_in_store>1</show_in_store>
|
220 |
</captured_order_status>
|
221 |
<reauthorized_order_status>
|
222 |
+
<config_path>payment/payline_common/reauthorized_order_status</config_path>
|
223 |
<label>Order status when payment is re-authorized</label>
|
224 |
<comment>Re-authorize only</comment>
|
225 |
<frontend_type>select</frontend_type>
|
229 |
<show_in_website>1</show_in_website>
|
230 |
<show_in_store>1</show_in_store>
|
231 |
</reauthorized_order_status>
|
232 |
+
<heading_payment_fault translate="label">
|
233 |
+
<label>Status for a payment error</label>
|
234 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
235 |
+
<sort_order>135</sort_order>
|
236 |
+
<show_in_default>1</show_in_default>
|
237 |
+
<show_in_website>1</show_in_website>
|
238 |
+
<show_in_store>1</show_in_store>
|
239 |
+
</heading_payment_fault>
|
240 |
<canceled_order_status translate="label">
|
241 |
+
<config_path>payment/payline_common/canceled_order_status</config_path>
|
242 |
<label>Order status when payment canceled by customer</label>
|
243 |
<comment></comment>
|
244 |
<frontend_type>select</frontend_type>
|
249 |
<show_in_store>1</show_in_store>
|
250 |
</canceled_order_status>
|
251 |
<failed_order_status translate="label">
|
252 |
+
<config_path>payment/payline_common/failed_order_status</config_path>
|
253 |
<label>Order status when payment refused by Payline</label>
|
254 |
<comment></comment>
|
255 |
<frontend_type>select</frontend_type>
|
260 |
<show_in_store>1</show_in_store>
|
261 |
</failed_order_status>
|
262 |
<resignation_order_status translate="label">
|
263 |
+
<config_path>payment/payline_common/resignation_order_status</config_path>
|
264 |
<label>Order status when payment abandoned by Customer</label>
|
265 |
<comment></comment>
|
266 |
<frontend_type>select</frontend_type>
|
271 |
<show_in_store>1</show_in_store>
|
272 |
</resignation_order_status>
|
273 |
<fraud_order_status translate="label">
|
274 |
+
<config_path>payment/payline_common/fraud_order_status</config_path>
|
275 |
<label>Order status when a fraud is suspected</label>
|
276 |
<comment></comment>
|
277 |
<frontend_type>select</frontend_type>
|
281 |
<show_in_website>1</show_in_website>
|
282 |
<show_in_store>1</show_in_store>
|
283 |
</fraud_order_status>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
</fields>
|
285 |
+
</payline_workflows>
|
286 |
+
<payline_contract translate="label">
|
287 |
+
<label>Payment methods</label>
|
288 |
+
<sort_order>207</sort_order>
|
289 |
<show_in_default>1</show_in_default>
|
290 |
<show_in_website>1</show_in_website>
|
291 |
<show_in_store>1</show_in_store>
|
292 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_group</frontend_model>
|
293 |
<fields>
|
294 |
+
<contract translate="label">
|
295 |
+
<config_path>payment/payline_contract/contract</config_path>
|
296 |
+
<label>Contracts</label>
|
297 |
+
<frontend_model>payline/adminhtml_system_config_form_field_contracts</frontend_model>
|
298 |
+
<backend_model>payline/adminhtml_system_config_backend_contract</backend_model>
|
299 |
<sort_order>10</sort_order>
|
300 |
<show_in_default>1</show_in_default>
|
301 |
<show_in_website>1</show_in_website>
|
302 |
<show_in_store>1</show_in_store>
|
303 |
+
</contract>
|
304 |
+
</fields>
|
305 |
+
</payline_contract>
|
306 |
+
|
307 |
+
<payline_payments_availables>
|
308 |
+
<PaylineCPT type="group" translate="label">
|
309 |
+
<label>Payline - Cash web paiement</label>
|
310 |
+
<sort_order>203</sort_order>
|
311 |
+
<show_in_default>1</show_in_default>
|
312 |
+
<show_in_website>1</show_in_website>
|
313 |
+
<show_in_store>1</show_in_store>
|
314 |
+
<group>payline_payments</group>
|
315 |
+
<include>1</include>
|
316 |
+
<activity_path>payment/PaylineCPT/active</activity_path>
|
317 |
+
<frontend_type>text</frontend_type>
|
318 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_payment</frontend_model>
|
319 |
+
<comment>Select payments in your shopping cart. Payline will process your card payments through the Payline Gateway.</comment>
|
320 |
+
<fields>
|
321 |
+
<active translate="label">
|
322 |
+
<config_path>payment/PaylineCPT/active</config_path>
|
323 |
+
<label>Enabled</label>
|
324 |
+
<frontend_type>select</frontend_type>
|
325 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
326 |
+
<sort_order>10</sort_order>
|
327 |
+
<show_in_default>1</show_in_default>
|
328 |
+
<show_in_website>1</show_in_website>
|
329 |
+
<show_in_store>1</show_in_store>
|
330 |
</active>
|
331 |
<title translate="label">
|
332 |
+
<config_path>payment/PaylineCPT/title</config_path>
|
333 |
+
<label>Title</label>
|
334 |
+
<frontend_type>text</frontend_type>
|
335 |
+
<sort_order>20</sort_order>
|
336 |
+
<show_in_default>1</show_in_default>
|
337 |
+
<show_in_website>1</show_in_website>
|
338 |
+
<show_in_store>1</show_in_store>
|
339 |
</title>
|
340 |
+
<data_template translate="label comment">
|
341 |
+
<config_path>payment/PaylineCPT/data_template</config_path>
|
342 |
+
<label>User Experience</label>
|
343 |
+
<frontend_type>select</frontend_type>
|
344 |
+
<source_model>payline/datasource_datatemplate</source_model>
|
345 |
+
<sort_order>25</sort_order>
|
346 |
+
<show_in_default>1</show_in_default>
|
347 |
+
<show_in_website>1</show_in_website>
|
348 |
+
<show_in_store>1</show_in_store>
|
349 |
+
</data_template>
|
350 |
<template_url translate="label comment">
|
351 |
+
<config_path>payment/PaylineCPT/template_url</config_path>
|
352 |
+
<label>Template URL</label>
|
353 |
+
<comment>URL to a custom HTML template. Refer to Payline documentation</comment>
|
354 |
+
<frontend_type>text</frontend_type>
|
355 |
+
<sort_order>30</sort_order>
|
356 |
+
<show_in_default>1</show_in_default>
|
357 |
+
<show_in_website>1</show_in_website>
|
358 |
+
<show_in_store>1</show_in_store>
|
359 |
</template_url>
|
360 |
<custom_payment_page_code translate="label comment">
|
361 |
+
<config_path>payment/PaylineCPT/custom_payment_page_code</config_path>
|
362 |
+
<label>Custom payment page code</label>
|
363 |
+
<comment>ID of a style defined in Payline administration tool.</comment>
|
364 |
+
<frontend_type>text</frontend_type>
|
365 |
+
<sort_order>40</sort_order>
|
366 |
+
<show_in_default>1</show_in_default>
|
367 |
+
<show_in_website>1</show_in_website>
|
368 |
+
<show_in_store>1</show_in_store>
|
369 |
</custom_payment_page_code>
|
370 |
<custom_payment_page_code_ua_regexp translate="comment">
|
371 |
+
<config_path>payment/PaylineCPT/custom_payment_page_code_ua_regexp</config_path>
|
372 |
<label></label>
|
373 |
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
374 |
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
379 |
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
380 |
</custom_payment_page_code_ua_regexp>
|
381 |
<redirect_message translate="label">
|
382 |
+
<config_path>payment/PaylineCPT/redirect_message</config_path>
|
383 |
<label>Redirection message</label>
|
384 |
<frontend_type>textarea</frontend_type>
|
385 |
<sort_order>50</sort_order>
|
387 |
<show_in_website>1</show_in_website>
|
388 |
<show_in_store>1</show_in_store>
|
389 |
</redirect_message>
|
390 |
+
|
391 |
+
|
392 |
+
|
393 |
+
<advanced_settings_CPT type="group" translate="label">
|
394 |
+
<label>Advanced settings</label>
|
395 |
+
<!-- <frontend_class>config-advanced</frontend_class> -->
|
396 |
+
<frontend_type>text</frontend_type>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
<show_in_default>1</show_in_default>
|
398 |
<show_in_website>1</show_in_website>
|
399 |
+
<sort_order>90</sort_order>
|
400 |
+
<fields>
|
401 |
+
<action_when_order_seven_day_old>
|
402 |
+
<config_path>payment/PaylineCPT/action_when_order_seven_day_old</config_path>
|
403 |
+
<label>Action when order is at least 7 days old</label>
|
404 |
+
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
405 |
+
<frontend_type>select</frontend_type>
|
406 |
+
<source_model>payline/datasource_paymentactionsreauth</source_model>
|
407 |
+
<sort_order>80</sort_order>
|
408 |
+
<show_in_default>1</show_in_default>
|
409 |
+
<show_in_website>1</show_in_website>
|
410 |
+
<show_in_store>1</show_in_store>
|
411 |
+
</action_when_order_seven_day_old>
|
412 |
+
<payline_payment_action translate="label">
|
413 |
+
<config_path>payment/PaylineCPT/payline_payment_action</config_path>
|
414 |
+
<label>Payment action</label>
|
415 |
+
<frontend_type>select</frontend_type>
|
416 |
+
<source_model>payline/datasource_paymentactions</source_model>
|
417 |
+
<sort_order>60</sort_order>
|
418 |
+
<show_in_default>1</show_in_default>
|
419 |
+
<show_in_website>1</show_in_website>
|
420 |
+
<show_in_store>1</show_in_store>
|
421 |
+
</payline_payment_action>
|
422 |
+
<capture_payment_when_i_said translate="label">
|
423 |
+
<config_path>payment/PaylineCPT/capture_payment_when_i_said</config_path>
|
424 |
+
<label>Capture payment when action / status is triggered</label>
|
425 |
+
<comment></comment>
|
426 |
+
<frontend_type>select</frontend_type>
|
427 |
+
<source_model>payline/datasource_Capturepaymentoptions</source_model>
|
428 |
+
<sort_order>61</sort_order>
|
429 |
+
<show_in_default>1</show_in_default>
|
430 |
+
<show_in_website>1</show_in_website>
|
431 |
+
<show_in_store>1</show_in_store>
|
432 |
+
<!-- 100 => authorization -->
|
433 |
+
<depends>
|
434 |
+
<payline_payment_action>100</payline_payment_action>
|
435 |
+
</depends>
|
436 |
+
</capture_payment_when_i_said>
|
437 |
+
<send_wallet_id translate="label comment">
|
438 |
+
<config_path>payment/PaylineCPT/send_wallet_id</config_path>
|
439 |
+
<label>Send wallet id</label>
|
440 |
+
<comment>If wallet id is provided, wallet payment will be available during web payment</comment>
|
441 |
+
<frontend_type>select</frontend_type>
|
442 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
443 |
+
<sort_order>70</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>
|
447 |
+
</send_wallet_id>
|
448 |
+
<automate_invoice_creation>
|
449 |
+
<config_path>payment/PaylineCPT/automate_invoice_creation</config_path>
|
450 |
+
<label>Automate invoice creation</label>
|
451 |
+
<frontend_type>select</frontend_type>
|
452 |
+
<source_model>payline/datasource_status_invoice</source_model>
|
453 |
+
<sort_order>80</sort_order>
|
454 |
+
<show_in_default>1</show_in_default>
|
455 |
+
<show_in_website>1</show_in_website>
|
456 |
+
<show_in_store>1</show_in_store>
|
457 |
+
</automate_invoice_creation>
|
458 |
+
</fields>
|
459 |
+
</advanced_settings_CPT>
|
460 |
+
</fields>
|
461 |
+
</PaylineCPT>
|
462 |
+
<PaylineNX type="group" translate="label">
|
463 |
+
<label>Payline - Nx web payment</label>
|
464 |
+
<sort_order>204</sort_order>
|
465 |
+
<show_in_default>1</show_in_default>
|
466 |
+
<show_in_website>1</show_in_website>
|
467 |
+
<show_in_store>1</show_in_store>
|
468 |
+
<group>payline_payments</group>
|
469 |
+
<include>1</include>
|
470 |
+
<activity_path>payment/PaylineNX/active</activity_path>
|
471 |
+
<frontend_type>text</frontend_type>
|
472 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_payment</frontend_model>
|
473 |
+
<comment>Customer will select card payments and schedule through the Payline Gateway.</comment>
|
474 |
+
<fields>
|
475 |
+
<active translate="label">
|
476 |
+
<config_path>payment/PaylineNX/active</config_path>
|
477 |
+
<label>Enabled</label>
|
478 |
+
<frontend_type>select</frontend_type>
|
479 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
480 |
+
<sort_order>10</sort_order>
|
481 |
+
<show_in_default>1</show_in_default>
|
482 |
+
<show_in_website>1</show_in_website>
|
483 |
+
<show_in_store>1</show_in_store>
|
484 |
+
</active>
|
485 |
+
<title translate="label">
|
486 |
+
<config_path>payment/PaylineNX/title</config_path>
|
487 |
+
<label>Title</label>
|
488 |
+
<frontend_type>text</frontend_type>
|
489 |
+
<sort_order>20</sort_order>
|
490 |
+
<show_in_default>1</show_in_default>
|
491 |
+
<show_in_website>1</show_in_website>
|
492 |
+
<show_in_store>1</show_in_store>
|
493 |
+
</title>
|
494 |
+
<cost_type translate="label">
|
495 |
+
<config_path>payment/PaylineNX/cost_type</config_path>
|
496 |
+
<label>Costs</label>
|
497 |
+
<frontend_type>select</frontend_type>
|
498 |
+
<source_model>payline/datasource_costs</source_model>
|
499 |
+
<sort_order>21</sort_order>
|
500 |
+
<show_in_default>1</show_in_default>
|
501 |
+
<show_in_website>1</show_in_website>
|
502 |
+
<show_in_store>1</show_in_store>
|
503 |
+
</cost_type>
|
504 |
+
<cost_amount translate="label">
|
505 |
+
<config_path>payment/PaylineNX/cost_amount</config_path>
|
506 |
+
<label>Costs amount/percentage</label>
|
507 |
+
<frontend_type>text</frontend_type>
|
508 |
+
<sort_order>22</sort_order>
|
509 |
+
<show_in_default>1</show_in_default>
|
510 |
+
<show_in_website>1</show_in_website>
|
511 |
+
<show_in_store>1</show_in_store>
|
512 |
+
</cost_amount>
|
513 |
+
<template_url translate="label comment">
|
514 |
+
<config_path>payment/PaylineNX/template_url</config_path>
|
515 |
+
<label>Template URL</label>
|
516 |
+
<comment>URL to a custom HTML template. Refer to Payline documentation</comment>
|
517 |
+
<frontend_type>text</frontend_type>
|
518 |
+
<sort_order>30</sort_order>
|
519 |
+
<show_in_default>1</show_in_default>
|
520 |
+
<show_in_website>1</show_in_website>
|
521 |
+
<show_in_store>1</show_in_store>
|
522 |
+
</template_url>
|
523 |
+
<custom_payment_page_code translate="label comment">
|
524 |
+
<config_path>payment/PaylineNX/custom_payment_page_code</config_path>
|
525 |
+
<label>Custom payment page code</label>
|
526 |
+
<comment>ID of a style defined in Payline administration tool.</comment>
|
527 |
+
<frontend_type>text</frontend_type>
|
528 |
+
<sort_order>40</sort_order>
|
529 |
+
<show_in_default>1</show_in_default>
|
530 |
+
<show_in_website>1</show_in_website>
|
531 |
+
<show_in_store>1</show_in_store>
|
532 |
+
</custom_payment_page_code>
|
533 |
+
<custom_payment_page_code_ua_regexp translate="comment">
|
534 |
+
<config_path>payment/PaylineNX/custom_payment_page_code_ua_regexp</config_path>
|
535 |
+
<label></label>
|
536 |
+
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
537 |
+
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
538 |
+
<sort_order>41</sort_order>
|
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 |
+
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
543 |
+
</custom_payment_page_code_ua_regexp>
|
544 |
+
<redirect_message translate="label">
|
545 |
+
<config_path>payment/PaylineNX/redirect_message</config_path>
|
546 |
+
<label>Redirection message</label>
|
547 |
+
<frontend_type>textarea</frontend_type>
|
548 |
+
<sort_order>50</sort_order>
|
549 |
+
<show_in_default>1</show_in_default>
|
550 |
+
<show_in_website>1</show_in_website>
|
551 |
+
<show_in_store>1</show_in_store>
|
552 |
+
</redirect_message>
|
553 |
+
<advanced_settings_NX type="group" translate="label">
|
554 |
+
<label>Advanced settings</label>
|
555 |
+
<!-- <frontend_class>config-advanced</frontend_class> -->
|
556 |
+
<frontend_type>text</frontend_type>
|
557 |
+
<show_in_default>1</show_in_default>
|
558 |
+
<show_in_website>1</show_in_website>
|
559 |
+
<sort_order>60</sort_order>
|
560 |
<fields>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
<billing_occurrences translate="label">
|
562 |
+
<config_path>payment/PaylineNX/billing_occurrences</config_path>
|
563 |
+
<label>Billing occurences</label>
|
564 |
+
<frontend_type>select</frontend_type>
|
565 |
+
<source_model>payline/datasource_billingoccurrences</source_model>
|
566 |
+
<sort_order>60</sort_order>
|
567 |
+
<show_in_default>1</show_in_default>
|
568 |
+
<show_in_website>1</show_in_website>
|
569 |
+
<show_in_store>1</show_in_store>
|
570 |
</billing_occurrences>
|
571 |
<billing_cycle translate="label">
|
572 |
+
<config_path>payment/PaylineNX/billing_cycle</config_path>
|
573 |
+
<label>Billing cycle</label>
|
574 |
+
<frontend_type>select</frontend_type>
|
575 |
+
<source_model>payline/datasource_billingcycles</source_model>
|
576 |
+
<sort_order>70</sort_order>
|
577 |
+
<show_in_default>1</show_in_default>
|
578 |
+
<show_in_website>1</show_in_website>
|
579 |
+
<show_in_store>1</show_in_store>
|
580 |
</billing_cycle>
|
581 |
<send_wallet_id translate="label comment">
|
582 |
+
<config_path>payment/PaylineNX/send_wallet_id</config_path>
|
583 |
<label>Send wallet id</label>
|
584 |
<comment>If wallet id is provided, wallet payment will be available during web payment</comment>
|
585 |
<frontend_type>select</frontend_type>
|
590 |
<show_in_store>1</show_in_store>
|
591 |
</send_wallet_id>
|
592 |
<automate_invoice_creation>
|
593 |
+
<config_path>payment/PaylineNX/automate_invoice_creation</config_path>
|
594 |
<label>Automate invoice creation</label>
|
595 |
<frontend_type>select</frontend_type>
|
596 |
<source_model>payline/datasource_status_invoice</source_model>
|
600 |
<show_in_store>1</show_in_store>
|
601 |
</automate_invoice_creation>
|
602 |
<status_when_payline_schedule_alert>
|
603 |
+
<config_path>payment/PaylineNX/status_when_payline_schedule_alert</config_path>
|
604 |
<label>Order status when credit card expiration date is close</label>
|
605 |
<frontend_type>select</frontend_type>
|
606 |
<source_model>payline/datasource_statusrowempty</source_model>
|
611 |
<can_be_empty>1</can_be_empty>
|
612 |
</status_when_payline_schedule_alert>
|
613 |
<status_when_credit_card_schedule_is_expired>
|
614 |
+
<config_path>payment/PaylineNX/status_when_credit_card_schedule_is_expired</config_path>
|
615 |
<label>Order status when an instalment fails</label>
|
616 |
<frontend_type>select</frontend_type>
|
617 |
<source_model>payline/datasource_statusrowempty</source_model>
|
622 |
<can_be_empty>1</can_be_empty>
|
623 |
</status_when_credit_card_schedule_is_expired>
|
624 |
</fields>
|
625 |
+
</advanced_settings_NX>
|
626 |
+
</fields>
|
627 |
+
</PaylineNX>
|
628 |
+
<PaylineDIRECT type="group" translate="label">
|
629 |
<label>Payline - direct payment</label>
|
630 |
+
<sort_order>205</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 |
+
<group>payline_payments</group>
|
635 |
+
<include>1</include>
|
636 |
+
<activity_path>payment/PaylineDIRECT/active</activity_path>
|
637 |
+
<frontend_type>text</frontend_type>
|
638 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_payment</frontend_model>
|
639 |
+
<comment>Accept payments with a PCI-compliant checkout that keeps customers on your site.</comment>
|
640 |
<fields>
|
641 |
<active translate="label">
|
642 |
+
<config_path>payment/PaylineDIRECT/active</config_path>
|
643 |
<label>Enabled</label>
|
644 |
<frontend_type>select</frontend_type>
|
645 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
646 |
+
<sort_order>1</sort_order>
|
647 |
<show_in_default>1</show_in_default>
|
648 |
<show_in_website>1</show_in_website>
|
649 |
<show_in_store>1</show_in_store>
|
650 |
</active>
|
651 |
<title translate="label">
|
652 |
+
<config_path>payment/PaylineDIRECT/title</config_path>
|
653 |
<label>Title</label>
|
654 |
<frontend_type>text</frontend_type>
|
655 |
<sort_order>20</sort_order>
|
657 |
<show_in_website>1</show_in_website>
|
658 |
<show_in_store>1</show_in_store>
|
659 |
</title>
|
660 |
+
<web2token_key translate="label">
|
661 |
+
<config_path>payment/PaylineDIRECT/web2token_key</config_path>
|
662 |
+
<label>Key web2token</label>
|
663 |
+
<frontend_type>text</frontend_type>
|
664 |
+
<sort_order>25</sort_order>
|
665 |
+
<show_in_default>1</show_in_default>
|
666 |
+
<show_in_website>1</show_in_website>
|
667 |
+
<show_in_store>1</show_in_store>
|
668 |
+
<comment>This key available in your Payline admin panel (Configuration/Key Management) secure card information collect.</comment>
|
669 |
+
</web2token_key>
|
670 |
<payline_payment_action translate="label">
|
671 |
+
<config_path>payment/PaylineDIRECT/payline_payment_action</config_path>
|
672 |
<label>Payment action</label>
|
673 |
<frontend_type>select</frontend_type>
|
674 |
<source_model>payline/datasource_paymentactions</source_model>
|
678 |
<show_in_store>1</show_in_store>
|
679 |
</payline_payment_action>
|
680 |
<capture_payment_when_i_said translate="label">
|
681 |
+
<config_path>payment/PaylineDIRECT/capture_payment_when_i_said</config_path>
|
682 |
<label>Capture payment when action / status is triggered</label>
|
683 |
<comment></comment>
|
684 |
<frontend_type>select</frontend_type>
|
693 |
</depends>
|
694 |
</capture_payment_when_i_said>
|
695 |
<automate_invoice_creation>
|
696 |
+
<config_path>payment/PaylineDIRECT/automate_invoice_creation</config_path>
|
697 |
<label>Automate invoice creation</label>
|
698 |
<frontend_type>select</frontend_type>
|
699 |
<source_model>payline/datasource_status_invoice</source_model>
|
703 |
<show_in_store>1</show_in_store>
|
704 |
</automate_invoice_creation>
|
705 |
<action_when_order_seven_day_old>
|
706 |
+
<config_path>payment/PaylineDIRECT/action_when_order_seven_day_old</config_path>
|
707 |
<label>Action when order is at least 7 days old</label>
|
708 |
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
709 |
<frontend_type>select</frontend_type>
|
713 |
<show_in_website>1</show_in_website>
|
714 |
<show_in_store>1</show_in_store>
|
715 |
</action_when_order_seven_day_old>
|
716 |
+
</fields>
|
717 |
+
</PaylineDIRECT>
|
718 |
+
|
719 |
+
<PaylineWALLET type="group" translate="label">
|
720 |
+
<label>Payline - wallet payment</label>
|
721 |
+
<sort_order>206</sort_order>
|
722 |
+
<show_in_default>1</show_in_default>
|
723 |
+
<show_in_website>1</show_in_website>
|
724 |
+
<show_in_store>1</show_in_store>
|
725 |
+
<group>payline_payments</group>
|
726 |
+
<include>1</include>
|
727 |
+
<activity_path>payment/PaylineWALLET/active</activity_path>
|
728 |
+
<frontend_type>text</frontend_type>
|
729 |
+
<frontend_model>payline/adminhtml_system_config_fieldset_payment</frontend_model>
|
730 |
+
<comment>Allow customer to use a virtual wallet to store payments.</comment>
|
731 |
+
<fields>
|
732 |
+
<active translate="label">
|
733 |
+
<config_path>payment/PaylineWALLET/active</config_path>
|
734 |
+
<label>Enabled</label>
|
735 |
+
<frontend_type>select</frontend_type>
|
736 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
737 |
+
<sort_order>10</sort_order>
|
738 |
+
<show_in_default>1</show_in_default>
|
739 |
+
<show_in_website>1</show_in_website>
|
740 |
+
<show_in_store>1</show_in_store>
|
741 |
+
</active>
|
742 |
+
<title translate="label">
|
743 |
+
<config_path>payment/PaylineWALLET/title</config_path>
|
744 |
+
<label>Title</label>
|
745 |
+
<frontend_type>text</frontend_type>
|
746 |
+
<sort_order>20</sort_order>
|
747 |
+
<show_in_default>1</show_in_default>
|
748 |
+
<show_in_website>1</show_in_website>
|
749 |
+
<show_in_store>1</show_in_store>
|
750 |
+
</title>
|
751 |
+
<automate_wallet_subscription translate="label comment">
|
752 |
+
<config_path>payment/payline_common/automate_wallet_subscription</config_path>
|
753 |
+
<label>Automate wallet subscription</label>
|
754 |
+
<comment>A customer wallet will be created with the first payment using Payline</comment>
|
755 |
+
<frontend_type>select</frontend_type>
|
756 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
757 |
+
<sort_order>25</sort_order>
|
758 |
+
<show_in_default>1</show_in_default>
|
759 |
+
<show_in_website>1</show_in_website>
|
760 |
+
<show_in_store>1</show_in_store>
|
761 |
+
</automate_wallet_subscription>
|
762 |
+
<template_url translate="label comment">
|
763 |
+
<config_path>payment/PaylineWALLET/template_url</config_path>
|
764 |
+
<label>Template URL</label>
|
765 |
+
<comment>URL to a custom HTML template. Refer to Payline documentation</comment>
|
766 |
+
<frontend_type>text</frontend_type>
|
767 |
+
<sort_order>30</sort_order>
|
768 |
+
<show_in_default>1</show_in_default>
|
769 |
+
<show_in_website>1</show_in_website>
|
770 |
+
<show_in_store>1</show_in_store>
|
771 |
+
</template_url>
|
772 |
+
<custom_payment_page_code translate="label comment">
|
773 |
+
<config_path>payment/PaylineWALLET/custom_payment_page_code</config_path>
|
774 |
+
<label>Custom payment page code</label>
|
775 |
+
<comment>ID of a style defined in Payline administration tool.</comment>
|
776 |
+
<frontend_type>text</frontend_type>
|
777 |
+
<sort_order>40</sort_order>
|
778 |
+
<show_in_default>1</show_in_default>
|
779 |
+
<show_in_website>1</show_in_website>
|
780 |
+
<show_in_store>1</show_in_store>
|
781 |
+
</custom_payment_page_code>
|
782 |
+
<custom_payment_page_code_ua_regexp translate="comment">
|
783 |
+
<config_path>payment/PaylineWALLET/custom_payment_page_code_ua_regexp</config_path>
|
784 |
+
<label></label>
|
785 |
+
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
|
786 |
+
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
|
787 |
+
<sort_order>50</sort_order>
|
788 |
+
<show_in_default>1</show_in_default>
|
789 |
+
<show_in_website>1</show_in_website>
|
790 |
+
<show_in_store>1</show_in_store>
|
791 |
+
<comment>Match expressions in the same order as displayed in the configuration.</comment>
|
792 |
+
</custom_payment_page_code_ua_regexp>
|
793 |
+
|
794 |
+
<update_personal_details translate="label">
|
795 |
+
<config_path>payment/PaylineWALLET/update_personal_details</config_path>
|
796 |
+
<label>Allow user to update his personal details</label>
|
797 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
798 |
+
<frontend_type>select</frontend_type>
|
799 |
+
<sort_order>60</sort_order>
|
800 |
+
<show_in_default>1</show_in_default>
|
801 |
+
<show_in_website>1</show_in_website>
|
802 |
+
<show_in_store>1</show_in_store>
|
803 |
+
</update_personal_details>
|
804 |
+
<update_payment_details translate="label">
|
805 |
+
<config_path>payment/PaylineWALLET/update_payment_details</config_path>
|
806 |
+
<label>Allow user to update his payment details</label>
|
807 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
808 |
+
<frontend_type>select</frontend_type>
|
809 |
+
<sort_order>70</sort_order>
|
810 |
+
<show_in_default>1</show_in_default>
|
811 |
+
<show_in_website>1</show_in_website>
|
812 |
+
<show_in_store>1</show_in_store>
|
813 |
+
</update_payment_details>
|
814 |
+
|
815 |
+
<heading_one_clic translate="label">
|
816 |
+
<label>One Click</label>
|
817 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
818 |
+
<sort_order>80</sort_order>
|
819 |
+
<show_in_default>1</show_in_default>
|
820 |
+
<show_in_website>1</show_in_website>
|
821 |
+
<show_in_store>1</show_in_store>
|
822 |
+
</heading_one_clic>
|
823 |
+
|
824 |
+
<enable_one_clic translate="label">
|
825 |
+
<config_path>payment/PaylineWALLET/enable_one_clic</config_path>
|
826 |
+
<label>Enable One Clic function</label>
|
827 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
828 |
+
<frontend_type>select</frontend_type>
|
829 |
+
<sort_order>90</sort_order>
|
830 |
+
<show_in_default>1</show_in_default>
|
831 |
+
<show_in_website>1</show_in_website>
|
832 |
+
<show_in_store>1</show_in_store>
|
833 |
+
</enable_one_clic>
|
834 |
+
<one_clic_block_title translate="label">
|
835 |
+
<config_path>payment/PaylineWALLET/one_clic_block_title</config_path>
|
836 |
+
<label>One Clic bloc title</label>
|
837 |
+
<frontend_type>text</frontend_type>
|
838 |
+
<sort_order>100</sort_order>
|
839 |
+
<show_in_default>1</show_in_default>
|
840 |
+
<show_in_website>1</show_in_website>
|
841 |
+
<show_in_store>1</show_in_store>
|
842 |
+
</one_clic_block_title>
|
843 |
+
|
844 |
+
<payline_register-oneclick_customeraccount translate="label">
|
845 |
+
<config_path>payment/PaylineWALLET/payline_register-oneclick_customeraccount</config_path>
|
846 |
+
<label>registration CMS block id in customer account</label>
|
847 |
+
<frontend_type>select</frontend_type>
|
848 |
+
<source_model>payline/datasource_cms_block</source_model>
|
849 |
+
<sort_order>110</sort_order>
|
850 |
+
<show_in_default>1</show_in_default>
|
851 |
+
<show_in_website>1</show_in_website>
|
852 |
+
<show_in_store>1</show_in_store>
|
853 |
+
</payline_register-oneclick_customeraccount>
|
854 |
+
<payline_register-oneclick_catalog translate="label">
|
855 |
+
<config_path>payment/PaylineWALLET/payline_register-oneclick_catalog</config_path>
|
856 |
+
<label>registration CMS block id in catalog</label>
|
857 |
+
<frontend_type>select</frontend_type>
|
858 |
+
<source_model>payline/datasource_cms_block</source_model>
|
859 |
+
<sort_order>120</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 |
+
</payline_register-oneclick_catalog>
|
864 |
+
|
865 |
+
|
866 |
+
|
867 |
+
|
868 |
+
<advanced_settings_WALLET type="group" translate="label">
|
869 |
+
<label>Advanced settings</label>
|
870 |
+
<!-- <frontend_class>config-advanced</frontend_class> -->
|
871 |
+
<frontend_type>text</frontend_type>
|
872 |
+
<show_in_default>1</show_in_default>
|
873 |
+
<show_in_website>1</show_in_website>
|
874 |
+
<sort_order>130</sort_order>
|
875 |
+
<fields>
|
876 |
+
|
877 |
+
<payline_payment_action translate="label">
|
878 |
+
<config_path>payment/PaylineWALLET/payline_payment_action</config_path>
|
879 |
+
<label>Payment action</label>
|
880 |
+
<frontend_type>select</frontend_type>
|
881 |
+
<source_model>payline/datasource_paymentactions</source_model>
|
882 |
+
<sort_order>10</sort_order>
|
883 |
+
<show_in_default>1</show_in_default>
|
884 |
+
<show_in_website>1</show_in_website>
|
885 |
+
<show_in_store>1</show_in_store>
|
886 |
+
</payline_payment_action>
|
887 |
+
<capture_payment_when_i_said translate="label">
|
888 |
+
<config_path>payment/PaylineWALLET/capture_payment_when_i_said</config_path>
|
889 |
+
<label>Capture payment when action / status is triggered</label>
|
890 |
+
<comment></comment>
|
891 |
+
<frontend_type>select</frontend_type>
|
892 |
+
<source_model>payline/datasource_Capturepaymentoptions</source_model>
|
893 |
+
<sort_order>20</sort_order>
|
894 |
+
<show_in_default>1</show_in_default>
|
895 |
+
<show_in_website>1</show_in_website>
|
896 |
+
<show_in_store>1</show_in_store>
|
897 |
+
<!-- 100 => authorization -->
|
898 |
+
<depends>
|
899 |
+
<payline_payment_action>100</payline_payment_action>
|
900 |
+
</depends>
|
901 |
+
</capture_payment_when_i_said>
|
902 |
+
<action_when_order_seven_day_old>
|
903 |
+
<config_path>payment/PaylineWALLET/action_when_order_seven_day_old</config_path>
|
904 |
+
<label>Action when order is at least 7 days old</label>
|
905 |
+
<comment>Order action when trying to capture and order is at least 7 seven days old</comment>
|
906 |
+
<frontend_type>select</frontend_type>
|
907 |
+
<source_model>payline/datasource_paymentactionsreauth</source_model>
|
908 |
+
<sort_order>30</sort_order>
|
909 |
+
<show_in_default>1</show_in_default>
|
910 |
+
<show_in_website>1</show_in_website>
|
911 |
+
<show_in_store>1</show_in_store>
|
912 |
+
</action_when_order_seven_day_old>
|
913 |
+
<wallet_payment_security>
|
914 |
+
<config_path>payment/PaylineWALLET/wallet_payment_security</config_path>
|
915 |
+
<label>Security</label>
|
916 |
+
<comment>Choose whether customer has to fill out his CVV, his 3DS password, both or none</comment>
|
917 |
+
<frontend_type>select</frontend_type>
|
918 |
+
<source_model>payline/datasource_walletsecurity</source_model>
|
919 |
+
<sort_order>73</sort_order>
|
920 |
+
<show_in_default>1</show_in_default>
|
921 |
+
<show_in_website>1</show_in_website>
|
922 |
+
<show_in_store>1</show_in_store>
|
923 |
+
</wallet_payment_security>
|
924 |
+
<default_shipping_method translate="label comment">
|
925 |
+
<config_path>payment/PaylineWALLET/default_shipping_method</config_path>
|
926 |
+
<label>Default shipping method</label>
|
927 |
+
<comment>Shipping method to use with one click checkout. Flatrate, freeshipping and Tablerates are available</comment>
|
928 |
+
<source_model>payline/datasource_shippingmethods</source_model>
|
929 |
+
<frontend_type>select</frontend_type>
|
930 |
+
<sort_order>40</sort_order>
|
931 |
+
<show_in_default>1</show_in_default>
|
932 |
+
<show_in_website>1</show_in_website>
|
933 |
+
<show_in_store>1</show_in_store>
|
934 |
+
</default_shipping_method>
|
935 |
+
<automate_invoice_creation>
|
936 |
+
<config_path>payment/PaylineWALLET/automate_invoice_creation</config_path>
|
937 |
+
<label>Automate invoice creation</label>
|
938 |
+
<frontend_type>select</frontend_type>
|
939 |
+
<source_model>payline/datasource_status_invoice</source_model>
|
940 |
+
<sort_order>50</sort_order>
|
941 |
+
<show_in_default>1</show_in_default>
|
942 |
+
<show_in_website>1</show_in_website>
|
943 |
+
<show_in_store>1</show_in_store>
|
944 |
+
</automate_invoice_creation>
|
945 |
+
</fields>
|
946 |
+
</advanced_settings_WALLET>
|
947 |
+
|
948 |
+
</fields>
|
949 |
+
</PaylineWALLET>
|
950 |
+
</payline_payments_availables>
|
951 |
|
952 |
+
|
953 |
+
</groups>
|
954 |
+
</payline>
|
955 |
+
</sections>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
</config>
|
app/code/community/Monext/Payline/lib/PaylineByMonext.wsdl
CHANGED
@@ -1,169 +1,169 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<definitions name="PaylinebyMonext" targetNamespace="urn:PaylinebyMonext"
|
3 |
-
xmlns:typens="urn:PaylinebyMonext" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4 |
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
5 |
-
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
6 |
-
<types>
|
7 |
-
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:PaylinebyMonext">
|
8 |
-
<complexType name="paymentMean">
|
9 |
-
<annotation>
|
10 |
-
<documentation>This element contains infos aboout a payment mean</documentation>
|
11 |
-
</annotation>
|
12 |
-
<sequence>
|
13 |
-
<element name="code" type="xsd:string"/>
|
14 |
-
<element name="logoUrl" type="xsd:string"/>
|
15 |
-
</sequence>
|
16 |
-
</complexType>
|
17 |
-
<complexType name="getPaymentMeansResponse">
|
18 |
-
<annotation>
|
19 |
-
<documentation>This element is the response from getPaymentMeans service</documentation>
|
20 |
-
</annotation>
|
21 |
-
<sequence>
|
22 |
-
<element name="result" nillable="false" type="xsd:string"/>
|
23 |
-
<element name="listPaymentMean" nillable="false">
|
24 |
-
<complexType>
|
25 |
-
<sequence>
|
26 |
-
<element maxOccurs="unbounded" minOccurs="0" name="paymentMean" type="typens:paymentMean"/>
|
27 |
-
</sequence>
|
28 |
-
</complexType>
|
29 |
-
</element>
|
30 |
-
</sequence>
|
31 |
-
</complexType>
|
32 |
-
<complexType name="pointOfSale">
|
33 |
-
<annotation>
|
34 |
-
<documentation>
|
35 |
-
This element contains all information about point of sale
|
36 |
-
</documentation>
|
37 |
-
</annotation>
|
38 |
-
<sequence>
|
39 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
40 |
-
<element name="webmasterEmail" nillable="true" type="xsd:string"/>
|
41 |
-
<element name="webstoreURL" nillable="true" type="xsd:string"/>
|
42 |
-
<element name="contracts">
|
43 |
-
<annotation>
|
44 |
-
<documentation>list of contract</documentation>
|
45 |
-
</annotation>
|
46 |
-
<complexType>
|
47 |
-
<sequence>
|
48 |
-
<element maxOccurs="unbounded" minOccurs="0" name="contract" type="typens:contract"/>
|
49 |
-
</sequence>
|
50 |
-
</complexType>
|
51 |
-
</element>
|
52 |
-
<element name="customPaymentPageCodeList">
|
53 |
-
<annotation>
|
54 |
-
<documentation>list of custom payment page code</documentation>
|
55 |
-
</annotation>
|
56 |
-
<complexType>
|
57 |
-
<sequence>
|
58 |
-
<element maxOccurs="unbounded" minOccurs="0" name="customPaymentPageCode" type="typens:customPaymentPageCode"/>
|
59 |
-
</sequence>
|
60 |
-
</complexType>
|
61 |
-
</element>
|
62 |
-
</sequence>
|
63 |
-
</complexType>
|
64 |
-
<complexType name="customPaymentPageCode">
|
65 |
-
<annotation>
|
66 |
-
<documentation>
|
67 |
-
This element contains all information about customPaymentPageCode
|
68 |
-
</documentation>
|
69 |
-
</annotation>
|
70 |
-
<sequence>
|
71 |
-
<element name="code" nillable="true" type="xsd:string"/>
|
72 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
73 |
-
<element name="type" nillable="true" type="xsd:string"/>
|
74 |
-
</sequence>
|
75 |
-
</complexType>
|
76 |
-
<complexType name="contract">
|
77 |
-
<annotation>
|
78 |
-
<documentation>
|
79 |
-
This element contains all information about contract
|
80 |
-
</documentation>
|
81 |
-
</annotation>
|
82 |
-
<sequence>
|
83 |
-
<element name="cardType" nillable="true" type="xsd:string"/>
|
84 |
-
<element minOccurs="0" name="label" nillable="true" type="xsd:string"/>
|
85 |
-
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
86 |
-
<element maxOccurs="1" minOccurs="0" name="enrolment3DS" type="xsd:string"/>
|
87 |
-
</sequence>
|
88 |
-
</complexType>
|
89 |
-
<complexType name="insertMerchantSettingsRequest">
|
90 |
-
<annotation>
|
91 |
-
<documentation>
|
92 |
-
This element contains request parameters for service insertMerchantSettings
|
93 |
-
</documentation>
|
94 |
-
</annotation>
|
95 |
-
<sequence>
|
96 |
-
<element name="cryptedMerchantID" nillable="true" type="xsd:string"/>
|
97 |
-
<element name="environment" nillable="true" type="xsd:string"/>
|
98 |
-
<element name="listPointOfSale" nillable="false">
|
99 |
-
<complexType>
|
100 |
-
<sequence>
|
101 |
-
<element maxOccurs="unbounded" minOccurs="0" name="pointOfSale" type="typens:pointOfSale"/>
|
102 |
-
</sequence>
|
103 |
-
</complexType>
|
104 |
-
</element>
|
105 |
-
</sequence>
|
106 |
-
</complexType>
|
107 |
-
<complexType name="insertMerchantSettingsResponse">
|
108 |
-
<annotation>
|
109 |
-
<documentation>
|
110 |
-
This element contains response from service insertMerchantSettings
|
111 |
-
</documentation>
|
112 |
-
</annotation>
|
113 |
-
<sequence>
|
114 |
-
<element name="code" nillable="true" type="xsd:string"/>
|
115 |
-
<element name="message" nillable="true" type="xsd:string"/>
|
116 |
-
<element name="returnUrl" nillable="true" type="xsd:string"/>
|
117 |
-
</sequence>
|
118 |
-
</complexType>
|
119 |
-
</xsd:schema>
|
120 |
-
</types>
|
121 |
-
<message name="getPaymentMeansRequest">
|
122 |
-
</message>
|
123 |
-
<message name="getPaymentMeansResponse">
|
124 |
-
<part name="return" type="typens:getPaymentMeansResponse" />
|
125 |
-
</message>
|
126 |
-
<message name="insertMerchantSettingsRequest">
|
127 |
-
<part name="request" type="typens:insertMerchantSettingsRequest" />
|
128 |
-
</message>
|
129 |
-
<message name="insertMerchantSettingsResponse">
|
130 |
-
<part name="return" type="typens:insertMerchantSettingsResponse" />
|
131 |
-
</message>
|
132 |
-
<portType name="PaylinebyMonextPort">
|
133 |
-
<operation name="getPaymentMeans">
|
134 |
-
<input message="typens:getPaymentMeansRequest" />
|
135 |
-
<output message="typens:getPaymentMeansResponse" />
|
136 |
-
</operation>
|
137 |
-
<operation name="insertMerchantSettings">
|
138 |
-
<input message="typens:insertMerchantSettingsRequest" />
|
139 |
-
<output message="typens:insertMerchantSettingsResponse" />
|
140 |
-
</operation>
|
141 |
-
</portType>
|
142 |
-
<binding name="PaylinebyMonextBinding" type="typens:PaylinebyMonextPort">
|
143 |
-
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
144 |
-
<operation name="getPaymentMeans">
|
145 |
-
<soap:operation soapAction="PaylinebyMonextAction" />
|
146 |
-
<input name="getPaymentMeansRequest">
|
147 |
-
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
148 |
-
</input>
|
149 |
-
<output name="getPaymentMeansResponse">
|
150 |
-
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
151 |
-
</output>
|
152 |
-
</operation>
|
153 |
-
<operation name="insertMerchantSettings">
|
154 |
-
<soap:operation soapAction="PaylinebyMonextAction" />
|
155 |
-
<input name="insertMerchantSettingsRequest">
|
156 |
-
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
157 |
-
</input>
|
158 |
-
<output name="insertMerchantSettingsResponse">
|
159 |
-
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
160 |
-
</output>
|
161 |
-
</operation>
|
162 |
-
</binding>
|
163 |
-
<service name="PaylinebyMonextService">
|
164 |
-
<documentation>general information about Payline by Monext</documentation>
|
165 |
-
<port name="PaylinebyMonextPort" binding="typens:PaylinebyMonextBinding">
|
166 |
-
<soap:address location="http://demo.payline.com/~product/PaylinebyMonextEndpoint.php" />
|
167 |
-
</port>
|
168 |
-
</service>
|
169 |
</definitions>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<definitions name="PaylinebyMonext" targetNamespace="urn:PaylinebyMonext"
|
3 |
+
xmlns:typens="urn:PaylinebyMonext" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4 |
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
5 |
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
6 |
+
<types>
|
7 |
+
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:PaylinebyMonext">
|
8 |
+
<complexType name="paymentMean">
|
9 |
+
<annotation>
|
10 |
+
<documentation>This element contains infos aboout a payment mean</documentation>
|
11 |
+
</annotation>
|
12 |
+
<sequence>
|
13 |
+
<element name="code" type="xsd:string"/>
|
14 |
+
<element name="logoUrl" type="xsd:string"/>
|
15 |
+
</sequence>
|
16 |
+
</complexType>
|
17 |
+
<complexType name="getPaymentMeansResponse">
|
18 |
+
<annotation>
|
19 |
+
<documentation>This element is the response from getPaymentMeans service</documentation>
|
20 |
+
</annotation>
|
21 |
+
<sequence>
|
22 |
+
<element name="result" nillable="false" type="xsd:string"/>
|
23 |
+
<element name="listPaymentMean" nillable="false">
|
24 |
+
<complexType>
|
25 |
+
<sequence>
|
26 |
+
<element maxOccurs="unbounded" minOccurs="0" name="paymentMean" type="typens:paymentMean"/>
|
27 |
+
</sequence>
|
28 |
+
</complexType>
|
29 |
+
</element>
|
30 |
+
</sequence>
|
31 |
+
</complexType>
|
32 |
+
<complexType name="pointOfSale">
|
33 |
+
<annotation>
|
34 |
+
<documentation>
|
35 |
+
This element contains all information about point of sale
|
36 |
+
</documentation>
|
37 |
+
</annotation>
|
38 |
+
<sequence>
|
39 |
+
<element name="label" nillable="true" type="xsd:string"/>
|
40 |
+
<element name="webmasterEmail" nillable="true" type="xsd:string"/>
|
41 |
+
<element name="webstoreURL" nillable="true" type="xsd:string"/>
|
42 |
+
<element name="contracts">
|
43 |
+
<annotation>
|
44 |
+
<documentation>list of contract</documentation>
|
45 |
+
</annotation>
|
46 |
+
<complexType>
|
47 |
+
<sequence>
|
48 |
+
<element maxOccurs="unbounded" minOccurs="0" name="contract" type="typens:contract"/>
|
49 |
+
</sequence>
|
50 |
+
</complexType>
|
51 |
+
</element>
|
52 |
+
<element name="customPaymentPageCodeList">
|
53 |
+
<annotation>
|
54 |
+
<documentation>list of custom payment page code</documentation>
|
55 |
+
</annotation>
|
56 |
+
<complexType>
|
57 |
+
<sequence>
|
58 |
+
<element maxOccurs="unbounded" minOccurs="0" name="customPaymentPageCode" type="typens:customPaymentPageCode"/>
|
59 |
+
</sequence>
|
60 |
+
</complexType>
|
61 |
+
</element>
|
62 |
+
</sequence>
|
63 |
+
</complexType>
|
64 |
+
<complexType name="customPaymentPageCode">
|
65 |
+
<annotation>
|
66 |
+
<documentation>
|
67 |
+
This element contains all information about customPaymentPageCode
|
68 |
+
</documentation>
|
69 |
+
</annotation>
|
70 |
+
<sequence>
|
71 |
+
<element name="code" nillable="true" type="xsd:string"/>
|
72 |
+
<element name="label" nillable="true" type="xsd:string"/>
|
73 |
+
<element name="type" nillable="true" type="xsd:string"/>
|
74 |
+
</sequence>
|
75 |
+
</complexType>
|
76 |
+
<complexType name="contract">
|
77 |
+
<annotation>
|
78 |
+
<documentation>
|
79 |
+
This element contains all information about contract
|
80 |
+
</documentation>
|
81 |
+
</annotation>
|
82 |
+
<sequence>
|
83 |
+
<element name="cardType" nillable="true" type="xsd:string"/>
|
84 |
+
<element minOccurs="0" name="label" nillable="true" type="xsd:string"/>
|
85 |
+
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
86 |
+
<element maxOccurs="1" minOccurs="0" name="enrolment3DS" type="xsd:string"/>
|
87 |
+
</sequence>
|
88 |
+
</complexType>
|
89 |
+
<complexType name="insertMerchantSettingsRequest">
|
90 |
+
<annotation>
|
91 |
+
<documentation>
|
92 |
+
This element contains request parameters for service insertMerchantSettings
|
93 |
+
</documentation>
|
94 |
+
</annotation>
|
95 |
+
<sequence>
|
96 |
+
<element name="cryptedMerchantID" nillable="true" type="xsd:string"/>
|
97 |
+
<element name="environment" nillable="true" type="xsd:string"/>
|
98 |
+
<element name="listPointOfSale" nillable="false">
|
99 |
+
<complexType>
|
100 |
+
<sequence>
|
101 |
+
<element maxOccurs="unbounded" minOccurs="0" name="pointOfSale" type="typens:pointOfSale"/>
|
102 |
+
</sequence>
|
103 |
+
</complexType>
|
104 |
+
</element>
|
105 |
+
</sequence>
|
106 |
+
</complexType>
|
107 |
+
<complexType name="insertMerchantSettingsResponse">
|
108 |
+
<annotation>
|
109 |
+
<documentation>
|
110 |
+
This element contains response from service insertMerchantSettings
|
111 |
+
</documentation>
|
112 |
+
</annotation>
|
113 |
+
<sequence>
|
114 |
+
<element name="code" nillable="true" type="xsd:string"/>
|
115 |
+
<element name="message" nillable="true" type="xsd:string"/>
|
116 |
+
<element name="returnUrl" nillable="true" type="xsd:string"/>
|
117 |
+
</sequence>
|
118 |
+
</complexType>
|
119 |
+
</xsd:schema>
|
120 |
+
</types>
|
121 |
+
<message name="getPaymentMeansRequest">
|
122 |
+
</message>
|
123 |
+
<message name="getPaymentMeansResponse">
|
124 |
+
<part name="return" type="typens:getPaymentMeansResponse" />
|
125 |
+
</message>
|
126 |
+
<message name="insertMerchantSettingsRequest">
|
127 |
+
<part name="request" type="typens:insertMerchantSettingsRequest" />
|
128 |
+
</message>
|
129 |
+
<message name="insertMerchantSettingsResponse">
|
130 |
+
<part name="return" type="typens:insertMerchantSettingsResponse" />
|
131 |
+
</message>
|
132 |
+
<portType name="PaylinebyMonextPort">
|
133 |
+
<operation name="getPaymentMeans">
|
134 |
+
<input message="typens:getPaymentMeansRequest" />
|
135 |
+
<output message="typens:getPaymentMeansResponse" />
|
136 |
+
</operation>
|
137 |
+
<operation name="insertMerchantSettings">
|
138 |
+
<input message="typens:insertMerchantSettingsRequest" />
|
139 |
+
<output message="typens:insertMerchantSettingsResponse" />
|
140 |
+
</operation>
|
141 |
+
</portType>
|
142 |
+
<binding name="PaylinebyMonextBinding" type="typens:PaylinebyMonextPort">
|
143 |
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
144 |
+
<operation name="getPaymentMeans">
|
145 |
+
<soap:operation soapAction="PaylinebyMonextAction" />
|
146 |
+
<input name="getPaymentMeansRequest">
|
147 |
+
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
148 |
+
</input>
|
149 |
+
<output name="getPaymentMeansResponse">
|
150 |
+
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
151 |
+
</output>
|
152 |
+
</operation>
|
153 |
+
<operation name="insertMerchantSettings">
|
154 |
+
<soap:operation soapAction="PaylinebyMonextAction" />
|
155 |
+
<input name="insertMerchantSettingsRequest">
|
156 |
+
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
157 |
+
</input>
|
158 |
+
<output name="insertMerchantSettingsResponse">
|
159 |
+
<soap:body use="encoded" namespace="urn:PaylinebyMonext" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
160 |
+
</output>
|
161 |
+
</operation>
|
162 |
+
</binding>
|
163 |
+
<service name="PaylinebyMonextService">
|
164 |
+
<documentation>general information about Payline by Monext</documentation>
|
165 |
+
<port name="PaylinebyMonextPort" binding="typens:PaylinebyMonextBinding">
|
166 |
+
<soap:address location="http://demo.payline.com/~product/PaylinebyMonextEndpoint.php" />
|
167 |
+
</port>
|
168 |
+
</service>
|
169 |
</definitions>
|
app/code/community/Monext/Payline/lib/paylineSDK.php
CHANGED
@@ -1,2215 +1,2053 @@
|
|
1 |
-
<?php
|
2 |
-
//
|
3 |
-
// OBJECTS DEFINITIONS
|
4 |
-
//
|
5 |
-
|
6 |
-
class paylineUtil{
|
7 |
-
|
8 |
-
/**
|
9 |
-
* make an array from a payline server response object.
|
10 |
-
* @params : $response : Objet response from payline
|
11 |
-
* @return : Object convert in an array
|
12 |
-
**/
|
13 |
-
static function responseToArray($response){
|
14 |
-
|
15 |
-
$array = array();
|
16 |
-
foreach($response as $k=>$v){
|
17 |
-
if (is_object($v)) {
|
18 |
-
$array[$k] = paylineUtil::responseToArray($v);
|
19 |
-
}
|
20 |
-
else { $array[$k] = $v;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
return $array;
|
24 |
-
|
25 |
-
return $response;
|
26 |
-
}
|
27 |
-
|
28 |
-
static function responseToArrayForGetCards($response){
|
29 |
-
|
30 |
-
$array = array();
|
31 |
-
foreach($response as $k=>$v){
|
32 |
-
|
33 |
-
if (is_object($v) && ($k != 'cards' ) ) {
|
34 |
-
$array[$k] = paylineUtil::responseToArrayForGetCards($v);
|
35 |
-
}
|
36 |
-
else {
|
37 |
-
if($k == 'cards' && count($v) == 1 ){
|
38 |
-
$array[$k][0] = $v;
|
39 |
-
}else{
|
40 |
-
$array[$k] = $v;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
44 |
-
return $array;
|
45 |
-
|
46 |
-
return $response;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
//
|
51 |
-
// PL_PAYMENT OBJECT DEFINITION
|
52 |
-
//
|
53 |
-
class pl_payment{
|
54 |
-
|
55 |
-
// ATTRIBUTES LISTING
|
56 |
-
public $amount;
|
57 |
-
public $currency;
|
58 |
-
public $action;
|
59 |
-
public $mode;
|
60 |
-
public $method;
|
61 |
-
public $contractNumber;
|
62 |
-
public $differedActionDate;
|
63 |
-
}
|
64 |
-
|
65 |
-
//
|
66 |
-
// PL_ORDER OBJECT DEFINITION
|
67 |
-
//
|
68 |
-
class pl_order{
|
69 |
-
|
70 |
-
// ATTRIBUTES LISTING
|
71 |
-
public $ref;
|
72 |
-
public $origin;
|
73 |
-
public $country;
|
74 |
-
public $taxes;
|
75 |
-
public $amount;
|
76 |
-
public $currency;
|
77 |
-
public $date;
|
78 |
-
public $quantity;
|
79 |
-
public $comment;
|
80 |
-
public $details;
|
81 |
-
public $deliveryTime;
|
82 |
-
public $deliveryMode;
|
83 |
-
public $deliveryExpectedDate;
|
84 |
-
public $deliveryExpectedDelay;
|
85 |
-
|
86 |
-
function __construct() {
|
87 |
-
$this->date = date('d/m/Y H:i', time());
|
88 |
-
$this->details = array();
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
//
|
93 |
-
// PL_PRIVATEDATA OBJECT DEFINITION
|
94 |
-
//
|
95 |
-
class pl_privateData{
|
96 |
-
|
97 |
-
// ATTRIBUTES LISTING
|
98 |
-
public $key ;
|
99 |
-
public $value;
|
100 |
-
}
|
101 |
-
|
102 |
-
//
|
103 |
-
// PL_AUTHORIZATION OBJECT DEFINITION
|
104 |
-
//
|
105 |
-
class pl_authorization{
|
106 |
-
|
107 |
-
// ATTRIBUTES LISTING
|
108 |
-
public $number;
|
109 |
-
public $date;
|
110 |
-
}
|
111 |
-
|
112 |
-
//
|
113 |
-
// PL_ADDRESS OBJECT DEFINITION
|
114 |
-
//
|
115 |
-
class pl_address{
|
116 |
-
|
117 |
-
// ATTRIBUTES LISTING
|
118 |
-
public $title;
|
119 |
-
public $firstName;
|
120 |
-
public $lastName;
|
121 |
-
public $name;
|
122 |
-
public $street1;
|
123 |
-
public $street2;
|
124 |
-
public $cityName;
|
125 |
-
public $zipCode;
|
126 |
-
public $country;
|
127 |
-
public $county;
|
128 |
-
public $state;
|
129 |
-
public $phoneType;
|
130 |
-
public $phone;
|
131 |
-
}
|
132 |
-
|
133 |
-
//
|
134 |
-
// PL_OWNERADDRESS OBJECT DEFINITION
|
135 |
-
//
|
136 |
-
class pl_ownerAddress{
|
137 |
-
|
138 |
-
// ATTRIBUTES LISTING
|
139 |
-
public $street;
|
140 |
-
public $cityName;
|
141 |
-
public $zipCode;
|
142 |
-
public $country;
|
143 |
-
public $phone;
|
144 |
-
}
|
145 |
-
|
146 |
-
//
|
147 |
-
// PL_BUYER OBJECT DEFINITION
|
148 |
-
//
|
149 |
-
class pl_buyer{
|
150 |
-
|
151 |
-
// ATTRIBUTES LISTING
|
152 |
-
public $title;
|
153 |
-
public $lastName;
|
154 |
-
public $firstName;
|
155 |
-
public $email;
|
156 |
-
public $customerId;
|
157 |
-
public $walletId;
|
158 |
-
public $walletDisplayed;
|
159 |
-
public $walletSecured;
|
160 |
-
public $walletCardInd;
|
161 |
-
public $shippingAdress;
|
162 |
-
public $billingAddress;
|
163 |
-
public $accountCreateDate;
|
164 |
-
public $accountAverageAmount;
|
165 |
-
public $accountOrderCount;
|
166 |
-
public $ip;
|
167 |
-
public $mobilePhone;
|
168 |
-
public $legalStatus;
|
169 |
-
public $legalDocument;
|
170 |
-
public $birthDate;
|
171 |
-
public $fingerprintID;
|
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 |
-
public $
|
197 |
-
public $
|
198 |
-
public $
|
199 |
-
public $
|
200 |
-
public $
|
201 |
-
public $
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
//
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
//
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
public $
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
public $
|
292 |
-
public $
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
//
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
public $
|
307 |
-
public $
|
308 |
-
public $
|
309 |
-
public $
|
310 |
-
public $
|
311 |
-
public $
|
312 |
-
public $
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
//
|
320 |
-
//
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
public $
|
327 |
-
public $
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
//
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
public $
|
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 |
-
function __construct() {
|
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 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
const
|
453 |
-
|
454 |
-
//
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
//
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
const
|
471 |
-
const
|
472 |
-
|
473 |
-
|
474 |
-
const
|
475 |
-
const
|
476 |
-
|
477 |
-
|
478 |
-
const
|
479 |
-
const
|
480 |
-
const
|
481 |
-
|
482 |
-
|
483 |
-
const
|
484 |
-
const
|
485 |
-
const
|
486 |
-
const
|
487 |
-
|
488 |
-
const
|
489 |
-
|
490 |
-
//
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
const
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
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 |
-
$this->
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
$this->
|
552 |
-
$this->
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
$this->
|
557 |
-
$this->header_soap =
|
558 |
-
$this->
|
559 |
-
$this->
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
$
|
573 |
-
$
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
*
|
585 |
-
* @
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
return new SoapVar($
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
protected function
|
627 |
-
$address = new
|
628 |
-
if($array && is_array($array)){
|
629 |
-
foreach($array as $k=>$v){
|
630 |
-
if(array_key_exists($k, $address)&&(strlen($v)))$address->$k = $v;
|
631 |
-
}
|
632 |
-
}
|
633 |
-
return new SoapVar($address, SOAP_ENC_OBJECT, paylineSDK::
|
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 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
*
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
$
|
1099 |
-
$
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
$
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
$
|
1160 |
-
$
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
$
|
1170 |
-
|
1171 |
-
|
1172 |
-
$
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
$
|
1178 |
-
$
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
$
|
1183 |
-
$
|
1184 |
-
$
|
1185 |
-
break;
|
1186 |
-
case '
|
1187 |
-
$reqTrace .= '(
|
1188 |
-
$WSresponse = $client->
|
1189 |
-
$response = paylineUtil::responseToArray($WSresponse);
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
$
|
1194 |
-
$
|
1195 |
-
$
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
$
|
1202 |
-
|
1203 |
-
|
1204 |
-
$
|
1205 |
-
|
1206 |
-
|
1207 |
-
$
|
1208 |
-
|
1209 |
-
|
1210 |
-
$
|
1211 |
-
|
1212 |
-
|
1213 |
-
$
|
1214 |
-
|
1215 |
-
|
1216 |
-
$
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
$
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
$
|
1239 |
-
$
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
$
|
1244 |
-
$
|
1245 |
-
$
|
1246 |
-
break;
|
1247 |
-
case '
|
1248 |
-
$reqTrace .= '(contract
|
1249 |
-
$WSresponse = $client->
|
1250 |
-
$response = paylineUtil::
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
$
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
$
|
1262 |
-
$
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
$
|
1269 |
-
$
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
$
|
1275 |
-
$
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
$
|
1280 |
-
$
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
$
|
1285 |
-
$
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
break;
|
1291 |
-
case '
|
1292 |
-
$
|
1293 |
-
$
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
$
|
1302 |
-
$
|
1303 |
-
$response
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
$
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
$
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
$
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
break;
|
1326 |
-
case '
|
1327 |
-
$reqTrace .= '(
|
1328 |
-
$WSresponse = $client->
|
1329 |
-
$response = paylineUtil::responseToArray($WSresponse);
|
1330 |
-
if(
|
1331 |
-
$resTrace = ' -
|
1332 |
-
}
|
1333 |
-
break;
|
1334 |
-
case '
|
1335 |
-
$reqTrace .= '(contract = '.$array['contractNumber'].' -
|
1336 |
-
$WSresponse = $client->
|
1337 |
-
$response = paylineUtil::responseToArray($WSresponse);
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
$
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
$WSRequest
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
'
|
1413 |
-
'
|
1414 |
-
|
1415 |
-
);
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
if(!isset($array['
|
1429 |
-
if(!isset($array['
|
1430 |
-
$
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
'
|
1437 |
-
'
|
1438 |
-
'
|
1439 |
-
'
|
1440 |
-
'
|
1441 |
-
'privateDataList' =>
|
1442 |
-
'
|
1443 |
-
'
|
1444 |
-
);
|
1445 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
public function
|
1449 |
-
$WSRequest = array (
|
1450 |
-
'
|
1451 |
-
'
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
);
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
'
|
1479 |
-
'
|
1480 |
-
'
|
1481 |
-
'
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
);
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
'
|
1502 |
-
'
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
'
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
'
|
1538 |
-
'
|
1539 |
-
'
|
1540 |
-
'
|
1541 |
-
'
|
1542 |
-
|
1543 |
-
);
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
'
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
'
|
1563 |
-
'
|
1564 |
-
'
|
1565 |
-
'
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
);
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
$
|
1588 |
-
|
1589 |
-
|
1590 |
-
);
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
if(!isset($array['
|
1596 |
-
|
1597 |
-
$WSRequest = array (
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
$WSRequest
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
$
|
1688 |
-
|
1689 |
-
|
1690 |
-
'
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
$
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
$
|
1741 |
-
$
|
1742 |
-
$
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
$
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
$
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
}
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
$this->
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
$
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
$
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
$
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
$
|
1924 |
-
if($
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
$
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
$
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
'
|
1989 |
-
'
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
);
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
$WSRequest = array (
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
'
|
2015 |
-
'
|
2016 |
-
'
|
2017 |
-
'
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
if(!isset($array['
|
2037 |
-
if(!isset($array['
|
2038 |
-
$
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
'
|
2044 |
-
'
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getWallet');
|
2055 |
-
}
|
2056 |
-
|
2057 |
-
public function getWebPaymentDetails($array){
|
2058 |
-
return $this->webServiceRequest($array,$array,paylineSDK::WEB_API,'getWebPaymentDetails');
|
2059 |
-
}
|
2060 |
-
|
2061 |
-
public function getWebWallet($array){
|
2062 |
-
return $this->webServiceRequest($array,$array,paylineSDK::WEB_API,'getWebWallet');
|
2063 |
-
}
|
2064 |
-
|
2065 |
-
public function manageWebWallet($array){
|
2066 |
-
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
2067 |
-
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
2068 |
-
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
2069 |
-
if(!isset($array['buyer']))$array['buyer'] = null;
|
2070 |
-
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
2071 |
-
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
2072 |
-
if(!isset($array['owner']))$array['owner'] = null;
|
2073 |
-
if(!isset($array['ownerAddress']))$array['ownerAddress'] = null;
|
2074 |
-
if(!isset($array['contracts'])||!strlen($array['contracts'][0]))$array['contracts'] = '';
|
2075 |
-
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
2076 |
-
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
2077 |
-
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
2078 |
-
$WSRequest = array (
|
2079 |
-
'contractNumber' => $array['contractNumber'],
|
2080 |
-
'selectedContractList' => $this->contracts($array['contracts']),
|
2081 |
-
'updatePersonalDetails' => $array['updatePersonalDetails'],
|
2082 |
-
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
2083 |
-
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
2084 |
-
'languageCode' => $array['languageCode'],
|
2085 |
-
'customPaymentPageCode' => $array['customPaymentPageCode'],
|
2086 |
-
'securityMode' => $array['securityMode'],
|
2087 |
-
'returnURL' => $this->returnURL,
|
2088 |
-
'cancelURL' => $this->cancelURL,
|
2089 |
-
'notificationURL' => $this->notificationURL,
|
2090 |
-
'privateDataList' => $this->privates,
|
2091 |
-
'customPaymentTemplateURL' => $array['customPaymentTemplateURL'],
|
2092 |
-
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
2093 |
-
);
|
2094 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'manageWebWallet');
|
2095 |
-
}
|
2096 |
-
|
2097 |
-
public function transactionsSearch($array){
|
2098 |
-
$WSRequest = array (
|
2099 |
-
'transactionId' => $array['transactionId'],
|
2100 |
-
'orderRef' => $array['orderRef'],
|
2101 |
-
'startDate' => $array['startDate'],
|
2102 |
-
'endDate' => $array['endDate'],
|
2103 |
-
'contractNumber' => $array['contractNumber'],
|
2104 |
-
'authorizationNumber' => $array['authorizationNumber'],
|
2105 |
-
'returnCode' => $array['returnCode'],
|
2106 |
-
'paymentMean' => $array['paymentMean'],
|
2107 |
-
'transactionType' => $array['transactionType'],
|
2108 |
-
'name' => $array['name'],
|
2109 |
-
'firstName' => $array['firstName'],
|
2110 |
-
'email' => $array['email'],
|
2111 |
-
'cardNumber' => $array['cardNumber'],
|
2112 |
-
'currency' => $array['currency'],
|
2113 |
-
'minAmount' => $array['minAmount'],
|
2114 |
-
'maxAmount' => $array['maxAmount'],
|
2115 |
-
'walletId' => $array['walletId'],
|
2116 |
-
'sequenceNumber' => $array['sequenceNumber'],
|
2117 |
-
'token' => $array['token']
|
2118 |
-
);
|
2119 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::EXTENDED_API,'transactionsSearch');
|
2120 |
-
}
|
2121 |
-
|
2122 |
-
public function unBlock($array){
|
2123 |
-
$WSRequest = array (
|
2124 |
-
'transactionID' => $array['transactionID'],
|
2125 |
-
'transactionDate' => $array['transactionDate']
|
2126 |
-
);
|
2127 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'unBlock');
|
2128 |
-
}
|
2129 |
-
|
2130 |
-
public function updateWallet($array){
|
2131 |
-
$WSRequest = array (
|
2132 |
-
'contractNumber' => $array['contractNumber'],
|
2133 |
-
'cardInd' => $array['cardInd'],
|
2134 |
-
'wallet' => $this->wallet($array['wallet'],$array['address'],$array['card']),
|
2135 |
-
'buyer' => $this->buyer($array['buyer'], $array['shippingAddress'],$array['billingAddress']),
|
2136 |
-
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
2137 |
-
'privateDataList' => $this->privates,
|
2138 |
-
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure']),
|
2139 |
-
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
2140 |
-
);
|
2141 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'updateWallet');
|
2142 |
-
}
|
2143 |
-
|
2144 |
-
public function updateWebWallet($array){
|
2145 |
-
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
2146 |
-
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
2147 |
-
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
2148 |
-
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
2149 |
-
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
2150 |
-
if(isset($array['languageCode'])&& strlen($array['languageCode'])) $this->languageCode = $array['languageCode'];
|
2151 |
-
if(isset($array['securityMode'])&& strlen($array['securityMode'])) $this->securityMode = $array['securityMode'];
|
2152 |
-
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
2153 |
-
$WSRequest = array (
|
2154 |
-
'contractNumber' => $array['contractNumber'],
|
2155 |
-
'cardInd' => $array['cardInd'],
|
2156 |
-
'walletId' => $array['walletId'],
|
2157 |
-
'updatePersonalDetails' => $array['updatePersonalDetails'],
|
2158 |
-
'updateOwnerDetails' => $array['updateOwnerDetails'],
|
2159 |
-
'updatePaymentDetails' => $array['updatePaymentDetails'],
|
2160 |
-
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
2161 |
-
'languageCode' => $this->languageCode,
|
2162 |
-
'customPaymentPageCode' => $this->customPaymentPageCode,
|
2163 |
-
'securityMode' => $this->securityMode,
|
2164 |
-
'returnURL' => $this->returnURL,
|
2165 |
-
'cancelURL' => $this->cancelURL,
|
2166 |
-
'notificationURL' => $this->notificationURL,
|
2167 |
-
'privateDataList' => $this->privates,
|
2168 |
-
'customPaymentTemplateURL' => $this->customPaymentTemplateURL,
|
2169 |
-
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
2170 |
-
);
|
2171 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'updateWebWallet');
|
2172 |
-
}
|
2173 |
-
|
2174 |
-
public function verifyAuthentication($array){
|
2175 |
-
$WSRequest = array (
|
2176 |
-
'contractNumber' => $array['contractNumber'],
|
2177 |
-
'pares' => $array['pares'],
|
2178 |
-
'md' => $array['md'],
|
2179 |
-
'card' => $this->card($array['card'])
|
2180 |
-
);
|
2181 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'verifyAuthentication');
|
2182 |
-
}
|
2183 |
-
|
2184 |
-
public function verifyEnrollment($array){
|
2185 |
-
if(!isset($array['orderRef']))$array['orderRef'] = null;
|
2186 |
-
if(!isset($array['userAgent']))$array['userAgent'] = null;
|
2187 |
-
if(!isset($array['mdFieldValue']))$array['mdFieldValue'] = null;
|
2188 |
-
if(!isset($array['walletId']))$array['walletId'] = null;
|
2189 |
-
if(!isset($array['walletCardInd']))$array['walletCardInd'] = null;
|
2190 |
-
if(!isset($array['card']))$array['card'] = null;
|
2191 |
-
$WSRequest = array (
|
2192 |
-
'payment' => $this->payment($array['payment']),
|
2193 |
-
'card' => $this->card($array['card']),
|
2194 |
-
'orderRef' => $array['orderRef'],
|
2195 |
-
'userAgent' => $array['userAgent'],
|
2196 |
-
'mdFieldValue' => $array['mdFieldValue'],
|
2197 |
-
'walletId' => $array['walletId'],
|
2198 |
-
'walletCardInd' => $array['walletCardInd']
|
2199 |
-
);
|
2200 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'verifyEnrollment');
|
2201 |
-
}
|
2202 |
-
|
2203 |
-
public function doBankTransfer($array){
|
2204 |
-
if(!isset($array['comment']))$array['comment'] = null;
|
2205 |
-
if(!isset($array['transactionID']))$array['transactionID'] = null;
|
2206 |
-
$WSRequest = array(
|
2207 |
-
'payment' => $this->payment($array['payment']),
|
2208 |
-
'creditor' => $this->creditor($array['creditor']),
|
2209 |
-
'comment' => $array['comment'],
|
2210 |
-
'transactionID' => $array['transactionID'],
|
2211 |
-
'orderID' => $array['orderID']
|
2212 |
-
);
|
2213 |
-
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doBankTransfer');
|
2214 |
-
}
|
2215 |
-
}
|
1 |
+
<?php
|
2 |
+
//
|
3 |
+
// OBJECTS DEFINITIONS
|
4 |
+
//
|
5 |
+
|
6 |
+
class paylineUtil{
|
7 |
+
|
8 |
+
/**
|
9 |
+
* make an array from a payline server response object.
|
10 |
+
* @params : $response : Objet response from payline
|
11 |
+
* @return : Object convert in an array
|
12 |
+
**/
|
13 |
+
static function responseToArray($response){
|
14 |
+
|
15 |
+
$array = array();
|
16 |
+
foreach($response as $k=>$v){
|
17 |
+
if (is_object($v)) {
|
18 |
+
$array[$k] = paylineUtil::responseToArray($v);
|
19 |
+
}
|
20 |
+
else { $array[$k] = $v;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
return $array;
|
24 |
+
|
25 |
+
return $response;
|
26 |
+
}
|
27 |
+
|
28 |
+
static function responseToArrayForGetCards($response){
|
29 |
+
|
30 |
+
$array = array();
|
31 |
+
foreach($response as $k=>$v){
|
32 |
+
|
33 |
+
if (is_object($v) && ($k != 'cards' ) ) {
|
34 |
+
$array[$k] = paylineUtil::responseToArrayForGetCards($v);
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
if($k == 'cards' && count($v) == 1 ){
|
38 |
+
$array[$k][0] = $v;
|
39 |
+
}else{
|
40 |
+
$array[$k] = $v;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return $array;
|
45 |
+
|
46 |
+
return $response;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
//
|
51 |
+
// PL_PAYMENT OBJECT DEFINITION
|
52 |
+
//
|
53 |
+
class pl_payment{
|
54 |
+
|
55 |
+
// ATTRIBUTES LISTING
|
56 |
+
public $amount;
|
57 |
+
public $currency;
|
58 |
+
public $action;
|
59 |
+
public $mode;
|
60 |
+
public $method;
|
61 |
+
public $contractNumber;
|
62 |
+
public $differedActionDate;
|
63 |
+
}
|
64 |
+
|
65 |
+
//
|
66 |
+
// PL_ORDER OBJECT DEFINITION
|
67 |
+
//
|
68 |
+
class pl_order{
|
69 |
+
|
70 |
+
// ATTRIBUTES LISTING
|
71 |
+
public $ref;
|
72 |
+
public $origin;
|
73 |
+
public $country;
|
74 |
+
public $taxes;
|
75 |
+
public $amount;
|
76 |
+
public $currency;
|
77 |
+
public $date;
|
78 |
+
public $quantity;
|
79 |
+
public $comment;
|
80 |
+
public $details;
|
81 |
+
public $deliveryTime;
|
82 |
+
public $deliveryMode;
|
83 |
+
public $deliveryExpectedDate;
|
84 |
+
public $deliveryExpectedDelay;
|
85 |
+
|
86 |
+
function __construct() {
|
87 |
+
$this->date = date('d/m/Y H:i', time());
|
88 |
+
$this->details = array();
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
//
|
93 |
+
// PL_PRIVATEDATA OBJECT DEFINITION
|
94 |
+
//
|
95 |
+
class pl_privateData{
|
96 |
+
|
97 |
+
// ATTRIBUTES LISTING
|
98 |
+
public $key ;
|
99 |
+
public $value;
|
100 |
+
}
|
101 |
+
|
102 |
+
//
|
103 |
+
// PL_AUTHORIZATION OBJECT DEFINITION
|
104 |
+
//
|
105 |
+
class pl_authorization{
|
106 |
+
|
107 |
+
// ATTRIBUTES LISTING
|
108 |
+
public $number;
|
109 |
+
public $date;
|
110 |
+
}
|
111 |
+
|
112 |
+
//
|
113 |
+
// PL_ADDRESS OBJECT DEFINITION
|
114 |
+
//
|
115 |
+
class pl_address{
|
116 |
+
|
117 |
+
// ATTRIBUTES LISTING
|
118 |
+
public $title;
|
119 |
+
public $firstName;
|
120 |
+
public $lastName;
|
121 |
+
public $name;
|
122 |
+
public $street1;
|
123 |
+
public $street2;
|
124 |
+
public $cityName;
|
125 |
+
public $zipCode;
|
126 |
+
public $country;
|
127 |
+
public $county;
|
128 |
+
public $state;
|
129 |
+
public $phoneType;
|
130 |
+
public $phone;
|
131 |
+
}
|
132 |
+
|
133 |
+
//
|
134 |
+
// PL_OWNERADDRESS OBJECT DEFINITION
|
135 |
+
//
|
136 |
+
class pl_ownerAddress{
|
137 |
+
|
138 |
+
// ATTRIBUTES LISTING
|
139 |
+
public $street;
|
140 |
+
public $cityName;
|
141 |
+
public $zipCode;
|
142 |
+
public $country;
|
143 |
+
public $phone;
|
144 |
+
}
|
145 |
+
|
146 |
+
//
|
147 |
+
// PL_BUYER OBJECT DEFINITION
|
148 |
+
//
|
149 |
+
class pl_buyer{
|
150 |
+
|
151 |
+
// ATTRIBUTES LISTING
|
152 |
+
public $title;
|
153 |
+
public $lastName;
|
154 |
+
public $firstName;
|
155 |
+
public $email;
|
156 |
+
public $customerId;
|
157 |
+
public $walletId;
|
158 |
+
public $walletDisplayed;
|
159 |
+
public $walletSecured;
|
160 |
+
public $walletCardInd;
|
161 |
+
public $shippingAdress;
|
162 |
+
public $billingAddress;
|
163 |
+
public $accountCreateDate;
|
164 |
+
public $accountAverageAmount;
|
165 |
+
public $accountOrderCount;
|
166 |
+
public $ip;
|
167 |
+
public $mobilePhone;
|
168 |
+
public $legalStatus;
|
169 |
+
public $legalDocument;
|
170 |
+
public $birthDate;
|
171 |
+
public $fingerprintID;
|
172 |
+
|
173 |
+
function __construct() {
|
174 |
+
$this->accountCreateDate = date('d/m/y', time());
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
//
|
179 |
+
// PL_OWNER OBJECT DEFINITION
|
180 |
+
//
|
181 |
+
class pl_owner{
|
182 |
+
|
183 |
+
// ATTRIBUTES LISTING
|
184 |
+
public $lastName;
|
185 |
+
public $firstName;
|
186 |
+
public $billingAddress;
|
187 |
+
public $issueCardDate;
|
188 |
+
}
|
189 |
+
|
190 |
+
//
|
191 |
+
// PL_ORDERDETAIL OBJECT DEFINITION
|
192 |
+
//
|
193 |
+
class pl_orderDetail{
|
194 |
+
|
195 |
+
// ATTRIBUTES LISTING
|
196 |
+
public $ref;
|
197 |
+
public $price;
|
198 |
+
public $quantity;
|
199 |
+
public $comment;
|
200 |
+
public $category;
|
201 |
+
public $subcategory1;
|
202 |
+
public $subcategory2;
|
203 |
+
public $brand;
|
204 |
+
public $additionalData;
|
205 |
+
public $taxRate;
|
206 |
+
}
|
207 |
+
|
208 |
+
//
|
209 |
+
// PL_CARD OBJECT DEFINITION
|
210 |
+
//
|
211 |
+
class pl_card{
|
212 |
+
|
213 |
+
// ATTRIBUTES LISTING
|
214 |
+
public $number;
|
215 |
+
public $type;
|
216 |
+
public $expirationDate;
|
217 |
+
public $cvx;
|
218 |
+
public $ownerBirthdayDate;
|
219 |
+
public $password;
|
220 |
+
public $cardPresent;
|
221 |
+
public $cardholder;
|
222 |
+
public $token;
|
223 |
+
|
224 |
+
function __construct($type) {
|
225 |
+
$this->accountCreateDate = date('d/m/y', time());
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
//
|
231 |
+
// PL_TRANSACTION OBJECT DEFINITION
|
232 |
+
//
|
233 |
+
class pl_transaction{
|
234 |
+
|
235 |
+
// ATTRIBUTES LISTING
|
236 |
+
public $id;
|
237 |
+
public $isPossibleFraud;
|
238 |
+
public $isDuplicated;
|
239 |
+
public $date;
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
//
|
244 |
+
// PL_RESULT OBJECT DEFINITION
|
245 |
+
//
|
246 |
+
class pl_result{
|
247 |
+
|
248 |
+
// ATTRIBUTES LISTING
|
249 |
+
public $code;
|
250 |
+
public $shortMessage;
|
251 |
+
public $longMessage;
|
252 |
+
}
|
253 |
+
|
254 |
+
//
|
255 |
+
// PL_CAPTURE OBJECT DEFINITION
|
256 |
+
//
|
257 |
+
class pl_capture{
|
258 |
+
|
259 |
+
// ATTRIBUTES LISTING
|
260 |
+
public $transactionID;
|
261 |
+
public $payment;
|
262 |
+
public $sequenceNumber;
|
263 |
+
|
264 |
+
function __construct() {
|
265 |
+
$this->payment = new pl_payment();
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
//
|
270 |
+
// PL_REFUND OBJECT DEFINITION
|
271 |
+
//
|
272 |
+
class pl_refund extends pl_capture {
|
273 |
+
function __construct() {
|
274 |
+
parent::__construct();
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
//
|
279 |
+
// PL_WALLET OBJECT DEFINITION
|
280 |
+
//
|
281 |
+
class pl_wallet{
|
282 |
+
|
283 |
+
// ATTRIBUTES LISTING
|
284 |
+
public $walletId;
|
285 |
+
public $lastName;
|
286 |
+
public $firstName;
|
287 |
+
public $email;
|
288 |
+
public $shippingAddress;
|
289 |
+
public $card;
|
290 |
+
public $comment;
|
291 |
+
public $default;
|
292 |
+
public $cardStatus;
|
293 |
+
|
294 |
+
function __construct() {
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
//
|
299 |
+
// PL_RECURRING OBJECT DEFINITION
|
300 |
+
//
|
301 |
+
class pl_recurring{
|
302 |
+
|
303 |
+
// ATTRIBUTES LISTING
|
304 |
+
public $firstAmount;
|
305 |
+
public $amount;
|
306 |
+
public $billingCycle;
|
307 |
+
public $billingLeft;
|
308 |
+
public $billingDay;
|
309 |
+
public $startDate;
|
310 |
+
public $endDate;
|
311 |
+
public $newAmount;
|
312 |
+
public $amountModificationDate;
|
313 |
+
|
314 |
+
function __construct() {
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
//
|
319 |
+
// PL_BILLINGRECORD OBJECT DEFINITION
|
320 |
+
//
|
321 |
+
class pl_billingRecord{
|
322 |
+
|
323 |
+
// ATTRIBUTES LISTING
|
324 |
+
public $date;
|
325 |
+
public $amount;
|
326 |
+
public $status;
|
327 |
+
public $executionDate;
|
328 |
+
|
329 |
+
function __construct() {
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
//
|
334 |
+
// PL_AUTHENTIFICATION 3D SECURE
|
335 |
+
//
|
336 |
+
class pl_authentication3DSecure{
|
337 |
+
|
338 |
+
// ATTRIBUTES LISTING
|
339 |
+
public $md ;
|
340 |
+
public $pares ;
|
341 |
+
public $xid ;
|
342 |
+
public $eci ;
|
343 |
+
public $cavv ;
|
344 |
+
public $cavvAlgorithm ;
|
345 |
+
public $vadsResult ;
|
346 |
+
public $typeSecurisation;
|
347 |
+
|
348 |
+
function __construct() {
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
//
|
353 |
+
// PL_BANKACCOUNTDATA
|
354 |
+
//
|
355 |
+
class pl_bankAccountData{
|
356 |
+
|
357 |
+
|
358 |
+
// ATTRIBUTES LISTING
|
359 |
+
public $countryCode ;
|
360 |
+
public $bankCode ;
|
361 |
+
public $accountNumber ;
|
362 |
+
public $key ;
|
363 |
+
|
364 |
+
|
365 |
+
function __construct() {
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
//
|
370 |
+
// PL_CHEQUE
|
371 |
+
//
|
372 |
+
class pl_cheque{
|
373 |
+
|
374 |
+
// ATTRIBUTES LISTING
|
375 |
+
public $number ;
|
376 |
+
|
377 |
+
function __construct() {
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
final class paylineLog {
|
382 |
+
private $filename;
|
383 |
+
private $path;
|
384 |
+
|
385 |
+
public function __construct($filename, $path=null) {
|
386 |
+
$this->filename = $filename;
|
387 |
+
if($path == null){
|
388 |
+
$tmp = explode(DIRECTORY_SEPARATOR ,dirname(__FILE__));
|
389 |
+
|
390 |
+
// up one level from the current directory
|
391 |
+
for($i=0,$s = sizeof($tmp)-1; $i<$s; $i++){
|
392 |
+
$this->path .= $tmp[$i].DIRECTORY_SEPARATOR;
|
393 |
+
}
|
394 |
+
$this->path .= 'logs'.DIRECTORY_SEPARATOR;
|
395 |
+
}else{
|
396 |
+
$this->path = $path;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
public function write($message) {
|
401 |
+
$file = $this->path.$this->filename;
|
402 |
+
$handle = fopen($file, 'a+');
|
403 |
+
fwrite($handle, date('Y-m-d G:i:s') . ' - ' . $message . "\n");
|
404 |
+
fclose($handle);
|
405 |
+
}
|
406 |
+
}
|
407 |
+
|
408 |
+
//
|
409 |
+
// PAYLINESDK CLASS
|
410 |
+
//
|
411 |
+
class paylineSDK{
|
412 |
+
|
413 |
+
// kit version
|
414 |
+
const KIT_VERSION = 'module Magento 1.8.4';
|
415 |
+
|
416 |
+
// trace log
|
417 |
+
var $logger;
|
418 |
+
var $flagLog; // 0 : pas de log / 1 : log par défaut / 2 : chemin personnalisé (pathLog)
|
419 |
+
var $pathLog;
|
420 |
+
|
421 |
+
// environement flags
|
422 |
+
const ENV_DEV = "DEV";
|
423 |
+
const ENV_HOMO = "HOMO";
|
424 |
+
const ENV_PROD = "PROD";
|
425 |
+
|
426 |
+
// SOAP URL's
|
427 |
+
const PAYLINE_NAMESPACE = 'http://obj.ws.payline.experian.com';
|
428 |
+
const WSDL = 'v4.44.wsdl';
|
429 |
+
const DEV_ENDPOINT = 'https://ws.dev.payline.com/V4/services/';
|
430 |
+
const HOMO_ENDPOINT = 'https://homologation.payline.com/V4/services/';
|
431 |
+
const PROD_ENDPOINT = 'https://services.payline.com/V4/services/';
|
432 |
+
|
433 |
+
// getToken servlet URL
|
434 |
+
const DEV_GET_TOKEN_SERVLET = "https://webpayment.dev.payline.com/webpayment/getToken";
|
435 |
+
const HOMO_GET_TOKEN_SERVLET = "https://homologation-webpayment.payline.com/webpayment/getToken";
|
436 |
+
const PROD_GET_TOKEN_SERVLET = "https://webpayment.payline.com/webpayment/getToken";
|
437 |
+
|
438 |
+
// Widget JavaScript
|
439 |
+
const HOMO_WDGT_JS = "https://homologation-payment.payline.com/scripts/widget-min.js";
|
440 |
+
const PROD_WDGT_JS = "https://payment.payline.com/scripts/widget-min.js";
|
441 |
+
const DEV_WDGT_JS = "https://webpayment.dev.payline.com/payline-widget/scripts/widget-min.js";
|
442 |
+
|
443 |
+
// Widget css
|
444 |
+
const DEV_WDGT_CSS = "https://webpayment.dev.payline.com/payline-widget/styles/widget-min.css";
|
445 |
+
const HOMO_WDGT_CSS = "https://homologation-payment.payline.com/styles/widget-min.css";
|
446 |
+
const PROD_WDGT_CSS = "https://payment.payline.com/styles/widget-min.css";
|
447 |
+
|
448 |
+
|
449 |
+
// Administration center
|
450 |
+
const DEV_CA = 'https://admin.dev.payline.aixlan.local:9363';
|
451 |
+
const HOMO_CA = 'https://homologation-admin.payline.com';
|
452 |
+
const PROD_CA = 'https://admin.payline.com';
|
453 |
+
|
454 |
+
// APIs
|
455 |
+
const DIRECT_API = 'DirectPaymentAPI';
|
456 |
+
const EXTENDED_API = 'ExtendedAPI';
|
457 |
+
const WEB_API = 'WebPaymentAPI';
|
458 |
+
|
459 |
+
// current endpoint
|
460 |
+
private $webServicesEndpoint;
|
461 |
+
|
462 |
+
// current url to get token
|
463 |
+
private $servletTokenUrl;
|
464 |
+
|
465 |
+
private $widgetJavascriptUrl;
|
466 |
+
private $widgetCssUrl;
|
467 |
+
|
468 |
+
// SOAP ACTIONS CONSTANTS
|
469 |
+
const soap_result = 'result';
|
470 |
+
const soap_authorization = 'authorization';
|
471 |
+
const soap_card = 'card';
|
472 |
+
const soap_order = 'order';
|
473 |
+
const soap_orderDetail = 'orderDetail';
|
474 |
+
const soap_payment = 'payment';
|
475 |
+
const soap_transaction = 'transaction';
|
476 |
+
const soap_privateData = 'privateData';
|
477 |
+
const soap_buyer = 'buyer';
|
478 |
+
const soap_owner = 'owner';
|
479 |
+
const soap_address = 'address';
|
480 |
+
const soap_ownerAddress = 'addressOwner';
|
481 |
+
const soap_capture = 'capture';
|
482 |
+
const soap_refund = 'refund';
|
483 |
+
const soap_refund_auth = 'refundAuthorization';
|
484 |
+
const soap_authentication3DSecure = 'authentication3DSecure';
|
485 |
+
const soap_bankAccountData = 'bankAccountData';
|
486 |
+
const soap_cheque = 'cheque';
|
487 |
+
|
488 |
+
const ERR_CODE = 'XXXXX';
|
489 |
+
|
490 |
+
// ARRAY
|
491 |
+
public $header_soap;
|
492 |
+
public $items;
|
493 |
+
public $privates;
|
494 |
+
|
495 |
+
// OPTIONS
|
496 |
+
public $cancelURL;
|
497 |
+
public $securityMode;
|
498 |
+
public $notificationURL;
|
499 |
+
public $returnURL;
|
500 |
+
public $customPaymentTemplateURL;
|
501 |
+
public $customPaymentPageCode;
|
502 |
+
public $languageCode;
|
503 |
+
|
504 |
+
// WALLET
|
505 |
+
public $walletIdList;
|
506 |
+
|
507 |
+
// custom logo path
|
508 |
+
const DEFAULT_LOGO_DIR = 'customLogos';
|
509 |
+
var $customLogoPath = '';
|
510 |
+
|
511 |
+
// getMerchantSettings Array
|
512 |
+
private $posData;
|
513 |
+
private $paymentMeansLogos;
|
514 |
+
|
515 |
+
/**
|
516 |
+
* contructor of PAYLINESDK CLASS
|
517 |
+
**/
|
518 |
+
function __construct($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment, $pathLog = null) {
|
519 |
+
if(is_null($pathLog)){
|
520 |
+
$this->flagLog = 1;
|
521 |
+
}elseif (strlen($pathLog) == 0){
|
522 |
+
$this->flagLog = 0;
|
523 |
+
}else{
|
524 |
+
$this->flagLog = 2;
|
525 |
+
$this->pathLog = $pathLog;
|
526 |
+
}
|
527 |
+
|
528 |
+
$this->writeTrace('----------------------------------------------------------');
|
529 |
+
$this->writeTrace('paylineSDK::__construct('.$this->hideChars($merchant_id,6,1).', '.$this->hideChars($access_key,1,3).", $proxy_host, $proxy_port, $proxy_login, ".$this->hideChars($proxy_password,1,1).", $environment)");
|
530 |
+
$this->header_soap = array();
|
531 |
+
$this->header_soap['login'] = $merchant_id;
|
532 |
+
$this->header_soap['password'] = $access_key;
|
533 |
+
if($proxy_host != ''){
|
534 |
+
$this->header_soap['proxy_host'] = $proxy_host;
|
535 |
+
$this->header_soap['proxy_port'] = $proxy_port;
|
536 |
+
$this->header_soap['proxy_login'] = $proxy_login;
|
537 |
+
$this->header_soap['proxy_password'] = $proxy_password;
|
538 |
+
}
|
539 |
+
|
540 |
+
if(strcmp($environment,paylineSDK::ENV_DEV)==0){
|
541 |
+
$this->webServicesEndpoint = paylineSDK::DEV_ENDPOINT;
|
542 |
+
$this->widgetJavascriptUrl = paylineSDK::DEV_WDGT_JS;
|
543 |
+
$this->widgetCssUrl = paylineSDK::DEV_WDGT_CSS;
|
544 |
+
}elseif(strcmp($environment,paylineSDK::ENV_PROD)==0){
|
545 |
+
$this->webServicesEndpoint = paylineSDK::PROD_ENDPOINT;
|
546 |
+
$this->servletTokenUrl = paylineSDK::PROD_GET_TOKEN_SERVLET;
|
547 |
+
$this->widgetJavascriptUrl = paylineSDK::PROD_WDGT_JS;
|
548 |
+
$this->widgetCssUrl = paylineSDK::PROD_WDGT_CSS;
|
549 |
+
}elseif(strcmp($environment,paylineSDK::ENV_HOMO)==0){
|
550 |
+
$this->webServicesEndpoint = paylineSDK::HOMO_ENDPOINT;
|
551 |
+
$this->servletTokenUrl = paylineSDK::HOMO_GET_TOKEN_SERVLET;
|
552 |
+
$this->widgetJavascriptUrl = paylineSDK::HOMO_WDGT_JS;
|
553 |
+
$this->widgetCssUrl = paylineSDK::HOMO_WDGT_CSS;
|
554 |
+
}
|
555 |
+
|
556 |
+
$this->header_soap['style'] = SOAP_DOCUMENT;
|
557 |
+
$this->header_soap['use'] = SOAP_LITERAL;
|
558 |
+
$this->items = array();
|
559 |
+
$this->privates = array();
|
560 |
+
$this->walletIdList = array();
|
561 |
+
|
562 |
+
ini_set('user_agent', "PHP\r\nversion: ".paylineSDK::KIT_VERSION);
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* function payment
|
567 |
+
* @params : $array : array. the array keys are listed in pl_payment CLASS.
|
568 |
+
* @return : SoapVar : object
|
569 |
+
* @description : build pl_payment instance from $array and make SoapVar object for payment.
|
570 |
+
**/
|
571 |
+
protected function payment($array) {
|
572 |
+
$payment = new pl_payment();
|
573 |
+
if($array && is_array($array)){
|
574 |
+
foreach($array as $k=>$v){
|
575 |
+
if(array_key_exists($k, $payment)&&(strlen($v))){
|
576 |
+
$payment->$k = $v;
|
577 |
+
}
|
578 |
+
}
|
579 |
+
}
|
580 |
+
return new SoapVar($payment, SOAP_ENC_OBJECT, paylineSDK::soap_payment, paylineSDK::PAYLINE_NAMESPACE);
|
581 |
+
}
|
582 |
+
|
583 |
+
/**
|
584 |
+
* function order
|
585 |
+
* @params : $array : array. the array keys are listed in pl_order CLASS.
|
586 |
+
* @return : SoapVar : object
|
587 |
+
* @description : build pl_order instance from $array and make SoapVar object for order.
|
588 |
+
**/
|
589 |
+
protected function order($array) {
|
590 |
+
$order = new pl_order();
|
591 |
+
if($array && is_array($array)){
|
592 |
+
foreach($array as $k=>$v){
|
593 |
+
if(array_key_exists($k, $order)&&(strlen($v))){
|
594 |
+
$order->$k = $v;
|
595 |
+
}
|
596 |
+
}
|
597 |
+
}
|
598 |
+
$allDetails = array();
|
599 |
+
// insert orderDetails
|
600 |
+
$order->details = $this->items;
|
601 |
+
return new SoapVar($order, SOAP_ENC_OBJECT, paylineSDK::soap_order, paylineSDK::PAYLINE_NAMESPACE);
|
602 |
+
}
|
603 |
+
|
604 |
+
/**
|
605 |
+
* function address
|
606 |
+
* @params : $address : array. the array keys are listed in pl_address CLASS.
|
607 |
+
* @return : SoapVar : object
|
608 |
+
* @description : build pl_address instance from $array and make SoapVar object for address.
|
609 |
+
**/
|
610 |
+
protected function address($array) {
|
611 |
+
$address = new pl_address();
|
612 |
+
if($array && is_array($array)){
|
613 |
+
foreach($array as $k=>$v){
|
614 |
+
if(array_key_exists($k, $address)&&(strlen($v)))$address->$k = $v;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
return new SoapVar($address, SOAP_ENC_OBJECT, paylineSDK::soap_address, paylineSDK::PAYLINE_NAMESPACE);
|
618 |
+
}
|
619 |
+
|
620 |
+
/**
|
621 |
+
* function ownerAddress
|
622 |
+
* @params : $address : array. the array keys are listed in pl_address CLASS.
|
623 |
+
* @return : SoapVar : object
|
624 |
+
* @description : build pl_ownerAddress instance from $array and make SoapVar object for address.
|
625 |
+
**/
|
626 |
+
protected function ownerAddress($array) {
|
627 |
+
$address = new pl_ownerAddress();
|
628 |
+
if($array && is_array($array)){
|
629 |
+
foreach($array as $k=>$v){
|
630 |
+
if(array_key_exists($k, $address)&&(strlen($v)))$address->$k = $v;
|
631 |
+
}
|
632 |
+
}
|
633 |
+
return new SoapVar($address, SOAP_ENC_OBJECT, paylineSDK::soap_ownerAddress, paylineSDK::PAYLINE_NAMESPACE);
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* function buyer
|
638 |
+
* @params : $array : array. the array keys are listed in pl_buyer CLASS.
|
639 |
+
* @params : $shippingAdress : array. the array keys are listed in pl_address CLASS.
|
640 |
+
* @params : $billingAddress : array. the array keys are listed in pl_address CLASS.
|
641 |
+
* @return : SoapVar : object
|
642 |
+
* @description : build pl_buyer instance from $array and $address and make SoapVar object for buyer.
|
643 |
+
**/
|
644 |
+
protected function buyer($array,$shippingAdress,$billingAddress) {
|
645 |
+
$buyer = new pl_buyer();
|
646 |
+
if($array && is_array($array)){
|
647 |
+
foreach($array as $k=>$v){
|
648 |
+
if(array_key_exists($k, $buyer)&&(strlen($v)))$buyer->$k = $v;
|
649 |
+
}
|
650 |
+
}
|
651 |
+
$buyer->shippingAdress = $this->address($shippingAdress);
|
652 |
+
$buyer->billingAddress = $this->address($billingAddress);
|
653 |
+
return new SoapVar($buyer, SOAP_ENC_OBJECT, paylineSDK::soap_buyer, paylineSDK::PAYLINE_NAMESPACE);
|
654 |
+
}
|
655 |
+
|
656 |
+
/**
|
657 |
+
* function owner
|
658 |
+
* @params : $array : array. the array keys are listed in pl_buyer CLASS.
|
659 |
+
* @params : $shippingAdress : array. the array keys are listed in pl_address CLASS.
|
660 |
+
* @params : $billingAddress : array. the array keys are listed in pl_address CLASS.
|
661 |
+
* @return : SoapVar : object
|
662 |
+
* @description : build pl_buyer instance from $array and $address and make SoapVar object for buyer.
|
663 |
+
**/
|
664 |
+
protected function owner($array,$Address) {
|
665 |
+
if($array != null){
|
666 |
+
$owner = new pl_owner();
|
667 |
+
if($array && is_array($array)){
|
668 |
+
foreach($array as $k=>$v){
|
669 |
+
if(array_key_exists($k, $owner)&&(strlen($v)))$owner->$k = $v;
|
670 |
+
}
|
671 |
+
}
|
672 |
+
$owner->billingAddress = $this->ownerAddress($Address);
|
673 |
+
return new SoapVar($owner, SOAP_ENC_OBJECT, paylineSDK::soap_owner, paylineSDK::PAYLINE_NAMESPACE);
|
674 |
+
}else{
|
675 |
+
return null;
|
676 |
+
}
|
677 |
+
}
|
678 |
+
|
679 |
+
/**
|
680 |
+
* function contracts
|
681 |
+
* @params : $contracts : array. array of contracts
|
682 |
+
* @return : $contracts : array. the same as params if exist, or an array with default contract defined in
|
683 |
+
* configuration
|
684 |
+
* @description : Add datas to contract array
|
685 |
+
**/
|
686 |
+
protected function contracts($contracts) {
|
687 |
+
if($contracts && is_array($contracts)){
|
688 |
+
return $contracts;
|
689 |
+
}
|
690 |
+
return null;
|
691 |
+
}
|
692 |
+
|
693 |
+
/**
|
694 |
+
* function secondContracts
|
695 |
+
* @params : $secondContracts : array. array of contracts
|
696 |
+
* @return : $secondContracts : array. the same as params if exist, null otherwise
|
697 |
+
* @description : Add datas to contract array
|
698 |
+
**/
|
699 |
+
protected function secondContracts($secondContracts) {
|
700 |
+
if($secondContracts && is_array($secondContracts)){
|
701 |
+
return $secondContracts;
|
702 |
+
}
|
703 |
+
return null;
|
704 |
+
}
|
705 |
+
|
706 |
+
/**
|
707 |
+
* function authentification 3Dsecure
|
708 |
+
* @params : $array : array. the array keys are listed in pl_card CLASS.
|
709 |
+
* @return : SoapVar : object
|
710 |
+
* @description : build pl_authentication3DSecure instance from $array and make SoapVar object for authentication3DSecure.
|
711 |
+
**/
|
712 |
+
protected function authentication3DSecure($array) {
|
713 |
+
$authentication3DSecure = new pl_authentication3DSecure($array);
|
714 |
+
if($array && is_array($array)){
|
715 |
+
foreach($array as $k=>$v){
|
716 |
+
if(array_key_exists($k, $authentication3DSecure)&&(strlen($v))){
|
717 |
+
$authentication3DSecure->$k = $v;
|
718 |
+
}
|
719 |
+
}
|
720 |
+
}
|
721 |
+
return new SoapVar($authentication3DSecure, SOAP_ENC_OBJECT, paylineSDK::soap_authentication3DSecure, paylineSDK::PAYLINE_NAMESPACE);
|
722 |
+
}
|
723 |
+
|
724 |
+
/**
|
725 |
+
* function authorization
|
726 |
+
* @params : $array : array. the array keys are listed in pl_card CLASS.
|
727 |
+
* @return : SoapVar : object
|
728 |
+
* @description : build pl_authentication3DSecure instance from $array and make SoapVar object for authentication3DSecure.
|
729 |
+
**/
|
730 |
+
protected function authorization($array) {
|
731 |
+
$authorization = new pl_authorization($array);
|
732 |
+
if($array && is_array($array)){
|
733 |
+
foreach($array as $k=>$v){
|
734 |
+
if(array_key_exists($k, $authorization)&&(strlen($v))){
|
735 |
+
$authorization->$k = $v;
|
736 |
+
}
|
737 |
+
}
|
738 |
+
}
|
739 |
+
return new SoapVar($authorization, SOAP_ENC_OBJECT, paylineSDK::soap_authorization, paylineSDK::PAYLINE_NAMESPACE);
|
740 |
+
}
|
741 |
+
|
742 |
+
/**
|
743 |
+
* function card
|
744 |
+
* @params : $array : array. the array keys are listed in pl_card CLASS.
|
745 |
+
* @return : SoapVar : object
|
746 |
+
* @description : build pl_card instance from $array and make SoapVar object for card.
|
747 |
+
**/
|
748 |
+
protected function card($array) {
|
749 |
+
$card = new pl_card($array['type']);
|
750 |
+
if($array && is_array($array)){
|
751 |
+
foreach($array as $k=>$v){
|
752 |
+
if(array_key_exists($k, $card)&&(strlen($v))){
|
753 |
+
$card->$k = $v;
|
754 |
+
}
|
755 |
+
}
|
756 |
+
}
|
757 |
+
return new SoapVar($card, SOAP_ENC_OBJECT, paylineSDK::soap_card, paylineSDK::PAYLINE_NAMESPACE);
|
758 |
+
}
|
759 |
+
|
760 |
+
|
761 |
+
|
762 |
+
/**
|
763 |
+
* function bankAccountData
|
764 |
+
* @params : $array : array. the array keys are listed in pl_bankAccountData CLASS.
|
765 |
+
* @return : SoapVar : object
|
766 |
+
* @description : build pl_bankAccountData instance from $array and make SoapVar object for bankAccountData.
|
767 |
+
**/
|
768 |
+
protected function bankAccountData($array) {
|
769 |
+
$bankAccountData = new pl_bankAccountData($array);
|
770 |
+
if($array && is_array($array)){
|
771 |
+
foreach($array as $k=>$v){
|
772 |
+
if(array_key_exists($k, $bankAccountData)&&(strlen($v))){
|
773 |
+
$bankAccountData->$k = $v;
|
774 |
+
}
|
775 |
+
}
|
776 |
+
}
|
777 |
+
return new SoapVar($bankAccountData, SOAP_ENC_OBJECT, paylineSDK::soap_bankAccountData, paylineSDK::PAYLINE_NAMESPACE);
|
778 |
+
}
|
779 |
+
|
780 |
+
/**
|
781 |
+
* function cheque
|
782 |
+
* @params : $array : array. the array keys are listed in pl_cheque CLASS.
|
783 |
+
* @return : SoapVar : object
|
784 |
+
* @description : build pl_authentication3DSecure instance from $array and make SoapVar object for cheque.
|
785 |
+
**/
|
786 |
+
protected function cheque($array) {
|
787 |
+
$cheque = new pl_cheque($array);
|
788 |
+
if($array && is_array($array)){
|
789 |
+
foreach($array as $k=>$v){
|
790 |
+
if(array_key_exists($k, $cheque)&&(strlen($v))){
|
791 |
+
$cheque->$k = $v;
|
792 |
+
}
|
793 |
+
}
|
794 |
+
}
|
795 |
+
return new SoapVar($cheque, SOAP_ENC_OBJECT, paylineSDK::soap_cheque, paylineSDK::PAYLINE_NAMESPACE);
|
796 |
+
}
|
797 |
+
|
798 |
+
/****************************************************/
|
799 |
+
// WALLET //
|
800 |
+
/****************************************************/
|
801 |
+
|
802 |
+
/**
|
803 |
+
* function wallet
|
804 |
+
* @params : array : array. the array keys are listed in pl_wallet CLASS.
|
805 |
+
* @params : address : array. the array keys are listed in pl_address CLASS.
|
806 |
+
* @params : card : array. the array keys are listed in pl_card CLASS.
|
807 |
+
* @return : wallet: pl_wallet Object.
|
808 |
+
* @description : build a wallet object.
|
809 |
+
**/
|
810 |
+
protected function wallet($array,$address,$card) {
|
811 |
+
$wallet = new pl_wallet();
|
812 |
+
if($array && is_array($array)){
|
813 |
+
foreach($array as $k=>$v){
|
814 |
+
if(array_key_exists($k, $wallet)&&(strlen($v)))$wallet->$k = $v;
|
815 |
+
}
|
816 |
+
}
|
817 |
+
|
818 |
+
$wallet->shippingAddress = $this->address($address);
|
819 |
+
$wallet->card = $this->card($card);
|
820 |
+
|
821 |
+
return $wallet;
|
822 |
+
}
|
823 |
+
|
824 |
+
/**
|
825 |
+
* function recurring
|
826 |
+
* @params : array : array. the array keys are listed in pl_recurring CLASS.
|
827 |
+
* @return : recurring object.
|
828 |
+
* @description : build a recurring object.
|
829 |
+
**/
|
830 |
+
protected function recurring($array) {
|
831 |
+
if($array){
|
832 |
+
$recurring = new pl_recurring();
|
833 |
+
if($array && is_array($array)){
|
834 |
+
foreach($array as $k=>$v){
|
835 |
+
if(array_key_exists($k, $recurring)&&(strlen($v)))$recurring->$k = $v;
|
836 |
+
}
|
837 |
+
}
|
838 |
+
return $recurring;
|
839 |
+
}
|
840 |
+
else return null;
|
841 |
+
}
|
842 |
+
|
843 |
+
/**
|
844 |
+
* function billingRecord
|
845 |
+
* @params : array : array. the array keys are listed in pl_billingRecord CLASS.
|
846 |
+
* @return : billingRecord object.
|
847 |
+
* @description : build a billingRecord object.
|
848 |
+
**/
|
849 |
+
protected function billingRecord($array) {
|
850 |
+
if($array){
|
851 |
+
$billingRecord = new pl_billingRecord();
|
852 |
+
if($array && is_array($array)){
|
853 |
+
foreach($array as $k=>$v){
|
854 |
+
if(array_key_exists($k, $billingRecord)&&(strlen($v)))$billingRecord->$k = $v;
|
855 |
+
}
|
856 |
+
}
|
857 |
+
return $billingRecord;
|
858 |
+
}
|
859 |
+
else return null;
|
860 |
+
}
|
861 |
+
|
862 |
+
/**
|
863 |
+
* function setItem
|
864 |
+
* @params : $item : array. the array keys are listed in PL_ORDERDETAIL CLASS.
|
865 |
+
* @description : Make $item SoapVar object and insert in items array
|
866 |
+
**/
|
867 |
+
public function setItem($item) {
|
868 |
+
$orderDetail = new pl_orderDetail();
|
869 |
+
if($item && is_array($item)){
|
870 |
+
foreach($item as $k=>$v){
|
871 |
+
if(array_key_exists($k, $orderDetail)&&(strlen($v)))$orderDetail->$k = $v;
|
872 |
+
}
|
873 |
+
}
|
874 |
+
$this->items[] = new SoapVar($orderDetail, SOAP_ENC_OBJECT, paylineSDK::soap_orderDetail, paylineSDK::PAYLINE_NAMESPACE);
|
875 |
+
}
|
876 |
+
|
877 |
+
/**
|
878 |
+
* function setPrivate
|
879 |
+
* @params : $private : array. the array keys are listed in PRIVATE CLASS.
|
880 |
+
* @description : Make $setPrivate SoapVar object and insert in privates array
|
881 |
+
**/
|
882 |
+
public function setPrivate($array) {
|
883 |
+
$private = new pl_privateData();
|
884 |
+
if($array && is_array($array)){
|
885 |
+
foreach($array as $k=>$v){
|
886 |
+
if(array_key_exists($k, $private)&&(strlen($v)))$private->$k = $v;
|
887 |
+
}
|
888 |
+
}
|
889 |
+
$this->privates[] = new SoapVar($private, SOAP_ENC_OBJECT, paylineSDK::soap_privateData, paylineSDK::PAYLINE_NAMESPACE);
|
890 |
+
}
|
891 |
+
|
892 |
+
/**
|
893 |
+
* function setWalletIdList
|
894 |
+
* @params : sting : string if wallet id separated by ';'.
|
895 |
+
* @return :
|
896 |
+
* @description : make an array of wallet id .
|
897 |
+
**/
|
898 |
+
public function setWalletIdList($walletIdList) {
|
899 |
+
if ($walletIdList) $this->walletIdList = explode(";", $walletIdList);
|
900 |
+
if(empty($walletIdList))$this->walletIdList = array(0) ;
|
901 |
+
}
|
902 |
+
|
903 |
+
/**
|
904 |
+
* Hide characters in a string
|
905 |
+
* @param String $inString : the string to hide
|
906 |
+
* @param int $n1 : number of characters shown at the begining of the string
|
907 |
+
* @param int $n2 : number of characters shown at end begining of the string
|
908 |
+
*/
|
909 |
+
private function hideChars($inString, $n1, $n2){
|
910 |
+
$inStringLength = strlen($inString);
|
911 |
+
if($inStringLength < ($n1+$n2)){
|
912 |
+
return $inString;
|
913 |
+
}
|
914 |
+
$outString = substr($inString,0,$n1);
|
915 |
+
$outString .= substr("********************",0,$inStringLength-($n1+$n2));
|
916 |
+
$outString .= substr($inString,-($n2));
|
917 |
+
return $outString;
|
918 |
+
}
|
919 |
+
|
920 |
+
/**
|
921 |
+
* @method writeTrace
|
922 |
+
* @desc write a trace in Payline log file
|
923 |
+
* @param $trace : the string to add in the log file
|
924 |
+
*/
|
925 |
+
public function writeTrace($trace){
|
926 |
+
if($this->flagLog == 0){
|
927 |
+
return;
|
928 |
+
}else{
|
929 |
+
if(!isset($this->logger)){
|
930 |
+
if($this->flagLog == 1){ // log dans le répertoire par défaut
|
931 |
+
$this->logger = new paylineLog(date('Y-m-d',time()).'.log');
|
932 |
+
}
|
933 |
+
if($this->flagLog == 2){ // log dans un répertoire spécifié
|
934 |
+
$this->logger = new paylineLog(date('Y-m-d',time()).'.log',$this->pathLog);
|
935 |
+
}
|
936 |
+
}
|
937 |
+
$this->logger->write($trace);
|
938 |
+
}
|
939 |
+
}
|
940 |
+
|
941 |
+
/**
|
942 |
+
* Custom base64 url encoding. Replace unsafe url chars
|
943 |
+
*
|
944 |
+
* @param string $input
|
945 |
+
* @return string
|
946 |
+
*/
|
947 |
+
public function base64_url_encode($input)
|
948 |
+
{
|
949 |
+
return strtr(base64_encode($input), '+/=', '-_,');
|
950 |
+
}
|
951 |
+
|
952 |
+
/**
|
953 |
+
* Custom base64 url decode. Replace custom url safe values with normal
|
954 |
+
* base64 characters before decoding.
|
955 |
+
*
|
956 |
+
* @param string $input
|
957 |
+
* @return string
|
958 |
+
*/
|
959 |
+
public function base64_url_decode($input)
|
960 |
+
{
|
961 |
+
return base64_decode(strtr($input, '-_,', '+/='));
|
962 |
+
}
|
963 |
+
|
964 |
+
// MCRYPT_RIJNDAEL_128 : AES compliant
|
965 |
+
public function getEncrypt($message, $accessKey){
|
966 |
+
$block = mcrypt_get_block_size('rijndael_128', 'ecb');
|
967 |
+
$pad = $block - (strlen($message) % $block);
|
968 |
+
$message .= str_repeat(chr($pad), $pad);
|
969 |
+
return $this->base64_url_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $accessKey, $message, MCRYPT_MODE_ECB));
|
970 |
+
}
|
971 |
+
|
972 |
+
public function getDecrypt($message, $accessKey){
|
973 |
+
$message = $this->base64_url_decode($message);
|
974 |
+
$message = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $accessKey, $message, MCRYPT_MODE_ECB);
|
975 |
+
$block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
|
976 |
+
$pad = ord($message[($len = strlen($message)) - 1]);
|
977 |
+
$len = strlen($message);
|
978 |
+
$pad = ord($message[$len-1]);
|
979 |
+
$return = substr($message, 0, strlen($message) - $pad);
|
980 |
+
$this->writeTrace("getDecrypt($message, $accessKey) = $return");
|
981 |
+
return $return;
|
982 |
+
}
|
983 |
+
|
984 |
+
public function gzdecode($data,&$filename='',&$error='',$maxlength=null)
|
985 |
+
{
|
986 |
+
$this->writeTrace("gzdecode($data,$filename,$error,$maxlength)");
|
987 |
+
$len = strlen($data);
|
988 |
+
if ($len < 18 || strcmp(substr($data,0,2),"\x1f\x8b")) {
|
989 |
+
$error = "Not in GZIP format.";
|
990 |
+
return null; // Not GZIP format (See RFC 1952)
|
991 |
+
}
|
992 |
+
$method = ord(substr($data,2,1)); // Compression method
|
993 |
+
$flags = ord(substr($data,3,1)); // Flags
|
994 |
+
if ($flags & 31 != $flags) {
|
995 |
+
$error = "Reserved bits not allowed.";
|
996 |
+
return null;
|
997 |
+
}
|
998 |
+
// NOTE: $mtime may be negative (PHP integer limitations)
|
999 |
+
$mtime = unpack("V", substr($data,4,4));
|
1000 |
+
$mtime = $mtime[1];
|
1001 |
+
$xfl = substr($data,8,1);
|
1002 |
+
$os = substr($data,8,1);
|
1003 |
+
$headerlen = 10;
|
1004 |
+
$extralen = 0;
|
1005 |
+
$extra = "";
|
1006 |
+
if ($flags & 4) {
|
1007 |
+
// 2-byte length prefixed EXTRA data in header
|
1008 |
+
if ($len - $headerlen - 2 < 8) {
|
1009 |
+
return false; // invalid
|
1010 |
+
}
|
1011 |
+
$extralen = unpack("v",substr($data,8,2));
|
1012 |
+
$extralen = $extralen[1];
|
1013 |
+
if ($len - $headerlen - 2 - $extralen < 8) {
|
1014 |
+
return false; // invalid
|
1015 |
+
}
|
1016 |
+
$extra = substr($data,10,$extralen);
|
1017 |
+
$headerlen += 2 + $extralen;
|
1018 |
+
}
|
1019 |
+
$filenamelen = 0;
|
1020 |
+
$filename = "";
|
1021 |
+
if ($flags & 8) {
|
1022 |
+
// C-style string
|
1023 |
+
if ($len - $headerlen - 1 < 8) {
|
1024 |
+
return false; // invalid
|
1025 |
+
}
|
1026 |
+
$filenamelen = strpos(substr($data,$headerlen),chr(0));
|
1027 |
+
if ($filenamelen === false || $len - $headerlen - $filenamelen - 1 < 8) {
|
1028 |
+
return false; // invalid
|
1029 |
+
}
|
1030 |
+
$filename = substr($data,$headerlen,$filenamelen);
|
1031 |
+
$headerlen += $filenamelen + 1;
|
1032 |
+
}
|
1033 |
+
$commentlen = 0;
|
1034 |
+
$comment = "";
|
1035 |
+
if ($flags & 16) {
|
1036 |
+
// C-style string COMMENT data in header
|
1037 |
+
if ($len - $headerlen - 1 < 8) {
|
1038 |
+
return false; // invalid
|
1039 |
+
}
|
1040 |
+
$commentlen = strpos(substr($data,$headerlen),chr(0));
|
1041 |
+
if ($commentlen === false || $len - $headerlen - $commentlen - 1 < 8) {
|
1042 |
+
return false; // Invalid header format
|
1043 |
+
}
|
1044 |
+
$comment = substr($data,$headerlen,$commentlen);
|
1045 |
+
$headerlen += $commentlen + 1;
|
1046 |
+
}
|
1047 |
+
$headercrc = "";
|
1048 |
+
if ($flags & 2) {
|
1049 |
+
// 2-bytes (lowest order) of CRC32 on header present
|
1050 |
+
if ($len - $headerlen - 2 < 8) {
|
1051 |
+
return false; // invalid
|
1052 |
+
}
|
1053 |
+
$calccrc = crc32(substr($data,0,$headerlen)) & 0xffff;
|
1054 |
+
$headercrc = unpack("v", substr($data,$headerlen,2));
|
1055 |
+
$headercrc = $headercrc[1];
|
1056 |
+
if ($headercrc != $calccrc) {
|
1057 |
+
$error = "Header checksum failed.";
|
1058 |
+
return false; // Bad header CRC
|
1059 |
+
}
|
1060 |
+
$headerlen += 2;
|
1061 |
+
}
|
1062 |
+
// GZIP FOOTER
|
1063 |
+
$datacrc = unpack("V",substr($data,-8,4));
|
1064 |
+
$datacrc = sprintf('%u',$datacrc[1] & 0xFFFFFFFF);
|
1065 |
+
$isize = unpack("V",substr($data,-4));
|
1066 |
+
$isize = $isize[1];
|
1067 |
+
// decompression:
|
1068 |
+
$bodylen = $len-$headerlen-8;
|
1069 |
+
if ($bodylen < 1) {
|
1070 |
+
// IMPLEMENTATION BUG!
|
1071 |
+
return null;
|
1072 |
+
}
|
1073 |
+
$body = substr($data,$headerlen,$bodylen);
|
1074 |
+
$data = "";
|
1075 |
+
if ($bodylen > 0) {
|
1076 |
+
switch ($method) {
|
1077 |
+
case 8:
|
1078 |
+
// Currently the only supported compression method:
|
1079 |
+
$data = gzinflate($body,$maxlength);
|
1080 |
+
break;
|
1081 |
+
default:
|
1082 |
+
$error = "Unknown compression method.";
|
1083 |
+
return false;
|
1084 |
+
}
|
1085 |
+
} // zero-byte body content is allowed
|
1086 |
+
// Verifiy CRC32
|
1087 |
+
$crc = sprintf("%u",crc32($data));
|
1088 |
+
$crcOK = $crc == $datacrc;
|
1089 |
+
$lenOK = $isize == strlen($data);
|
1090 |
+
if (!$lenOK || !$crcOK) {
|
1091 |
+
$error = ( $lenOK ? '' : 'Length check FAILED. ') . ( $crcOK ? '' : 'Checksum FAILED.');
|
1092 |
+
return false;
|
1093 |
+
}
|
1094 |
+
return $data;
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
private function webServiceRequest($array,$WSRequest,$PaylineAPI,$Method){
|
1098 |
+
$reqTrace = "Request : $PaylineAPI.$Method";
|
1099 |
+
$resTrace = '';
|
1100 |
+
try{
|
1101 |
+
$client = new SoapClient(dirname(__FILE__).'/'.paylineSDK::WSDL, $this->header_soap);
|
1102 |
+
$client->__setLocation ($this->webServicesEndpoint.$PaylineAPI);
|
1103 |
+
|
1104 |
+
if(isset($array['version'])&& strlen($array['version']))
|
1105 |
+
$WSRequest['version'] = $array['version'];
|
1106 |
+
else
|
1107 |
+
$WSRequest['version'] = '';
|
1108 |
+
if(isset($array['media'])&& strlen($array['media']))
|
1109 |
+
$WSRequest['media'] = $array['media'];
|
1110 |
+
else
|
1111 |
+
$WSRequest['media'] = '';
|
1112 |
+
|
1113 |
+
switch($Method){
|
1114 |
+
case 'createMerchant':
|
1115 |
+
$WSresponse = $client->createMerchant($WSRequest);
|
1116 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1117 |
+
break;
|
1118 |
+
case 'createWallet':
|
1119 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - walletId = '.$array['wallet']['walletId'].' - card = '.$this->hideChars($array['card']['number'],4,4).')';
|
1120 |
+
$WSresponse = $client->createWallet($WSRequest);
|
1121 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1122 |
+
break;
|
1123 |
+
case 'createWebWallet':
|
1124 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - walletId = '.$array['buyer']['walletId'].')';
|
1125 |
+
$WSresponse = $client->createWebWallet($WSRequest);
|
1126 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1127 |
+
if($response['result']['code'] == '00000'){
|
1128 |
+
$resTrace = ' - token = '.$response['token'];
|
1129 |
+
}
|
1130 |
+
break;
|
1131 |
+
case 'updatePaymentRecord':
|
1132 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - paymentRecordId = '.$array['paymentRecordId'].')';
|
1133 |
+
$WSresponse = $client->updatePaymentRecord($WSRequest);
|
1134 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1135 |
+
break;
|
1136 |
+
case 'getBillingRecord':
|
1137 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - paymentRecordId = '.$array['paymentRecordId'].' - billingRecordId = '.$array['billingRecordId'].')';
|
1138 |
+
$WSresponse = $client->getBillingRecord($WSRequest);
|
1139 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1140 |
+
break;
|
1141 |
+
case 'updateBillingRecord':
|
1142 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - paymentRecordId = '.$array['paymentRecordId'].' - billingRecordId = '.$array['billingRecordId'].')';
|
1143 |
+
$WSresponse = $client->updateBillingRecord($WSRequest);
|
1144 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1145 |
+
break;
|
1146 |
+
case 'disablePaymentRecord':
|
1147 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - paymentRecordId = '.$array['paymentRecordId'].')';
|
1148 |
+
$WSresponse = $client->disablePaymentRecord($WSRequest);
|
1149 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1150 |
+
break;
|
1151 |
+
case 'disableWallet':
|
1152 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - walletIdList = '.implode(';', $this->walletIdList).')';
|
1153 |
+
$WSresponse = $client->disableWallet($WSRequest);
|
1154 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1155 |
+
break;
|
1156 |
+
case 'doAuthorization':
|
1157 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - amount = '.$array['payment']['amount'].')';
|
1158 |
+
$WSresponse = $client->doAuthorization($WSRequest);
|
1159 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1160 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1161 |
+
break;
|
1162 |
+
case 'doCapture':
|
1163 |
+
$reqTrace .= '(transactionID = '.$array['transactionID'].' - amount = '.$array['payment']['amount'].')';
|
1164 |
+
$WSresponse = $client->doCapture($WSRequest);
|
1165 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1166 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1167 |
+
break;
|
1168 |
+
case 'doCredit':
|
1169 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - order.ref = '.$array['order']['ref'].' - card = '.$this->hideChars($array['card']['number'],4,4).')';
|
1170 |
+
$WSresponse = $client->doCredit($WSRequest);
|
1171 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1172 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1173 |
+
break;
|
1174 |
+
case 'doDebit':
|
1175 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - order.ref = '.$array['order']['ref'].' - card = '.$this->hideChars($array['card']['number'],4,4).')';
|
1176 |
+
$WSresponse = $client->doDebit($WSRequest);
|
1177 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1178 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1179 |
+
break;
|
1180 |
+
case 'doImmediateWalletPayment':
|
1181 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - walletId = '.$array['walletId'].' - order.ref = '.$array['order']['ref'].')';
|
1182 |
+
$WSresponse = $client->doImmediateWalletPayment($WSRequest);
|
1183 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1184 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1185 |
+
break;
|
1186 |
+
case 'doReAuthorization':
|
1187 |
+
$reqTrace .= '(transactionID = '.$array['transactionID'].' - amount = '.$array['payment']['amount'].')';
|
1188 |
+
$WSresponse = $client->doReAuthorization($WSRequest);
|
1189 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1190 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1191 |
+
break;
|
1192 |
+
case 'doRecurrentWalletPayment':
|
1193 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - walletId = '.$array['walletId'].' - order.ref = '.$array['order']['ref'].')';
|
1194 |
+
$WSresponse = $client->doRecurrentWalletPayment($WSRequest);
|
1195 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1196 |
+
if($response['result']['code'] == '02500'){
|
1197 |
+
$resTrace = ' - paymentRecordId = '.$response['paymentRecordId'];
|
1198 |
+
}
|
1199 |
+
break;
|
1200 |
+
case 'doRefund':
|
1201 |
+
$reqTrace .= '(transactionID = '.$array['transactionID'].' - amount = '.$array['payment']['amount'].')';
|
1202 |
+
$WSresponse = $client->doRefund($WSRequest);
|
1203 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1204 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1205 |
+
break;
|
1206 |
+
case 'doReset':
|
1207 |
+
$reqTrace .= '(transactionID = '.$array['transactionID'].')';
|
1208 |
+
$WSresponse = $client->doReset($WSRequest);
|
1209 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1210 |
+
$resTrace = ' - transactionID = '.$response['transaction']['id'];
|
1211 |
+
break;
|
1212 |
+
case 'doScheduledWalletPayment':
|
1213 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - walletId = '.$array['walletId'].' - order.ref = '.$array['order']['ref'].')';
|
1214 |
+
$WSresponse = $client->doScheduledWalletPayment($WSRequest);
|
1215 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1216 |
+
if($response['result']['code'] == '02500'){
|
1217 |
+
$resTrace = ' - paymentRecordId = '.$response['paymentRecordId'];
|
1218 |
+
}
|
1219 |
+
break;
|
1220 |
+
case 'doScoringCheque':
|
1221 |
+
$WSresponse = $client->doScoringCheque($WSRequest);
|
1222 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1223 |
+
break;
|
1224 |
+
case 'doWebPayment':
|
1225 |
+
$reqTrace .= '(order.ref = '.$array['order']['ref'].')';
|
1226 |
+
$WSresponse = $client->doWebPayment($WSRequest);
|
1227 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1228 |
+
if($response['result']['code'] == '00000'){
|
1229 |
+
$resTrace = ' - token = '.$response['token'];
|
1230 |
+
}
|
1231 |
+
break;
|
1232 |
+
case 'enableWallet':
|
1233 |
+
$reqTrace .= '(walletId = '.$array['walletId'].')';
|
1234 |
+
$WSresponse = $client->enableWallet($WSRequest);
|
1235 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1236 |
+
break;
|
1237 |
+
case 'getAlertDetails':
|
1238 |
+
$reqTrace .= '(alertId = '.$array['AlertId'].' - transactionId = '.$array['TransactionId'].')';
|
1239 |
+
$WSresponse = $client->getAlertDetails($WSRequest);
|
1240 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1241 |
+
break;
|
1242 |
+
case 'getBalance':
|
1243 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - cardID = '.$this->hideChars($array['cardID'],4,4).')';
|
1244 |
+
$WSresponse = $client->getBalance($WSRequest);
|
1245 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1246 |
+
break;
|
1247 |
+
case 'getCards':
|
1248 |
+
$reqTrace .= '(contract - '.$array['contractNumber'].' - walletId = '.$array['walletId'].' - cardInd = '.$array['cardInd'].')';
|
1249 |
+
$WSresponse = $client->getCards($WSRequest);
|
1250 |
+
$response = paylineUtil::responseToArrayForGetCards($WSresponse);
|
1251 |
+
break;
|
1252 |
+
case 'getEncryptionKey':
|
1253 |
+
$WSresponse = $client->getEncryptionKey($WSRequest);
|
1254 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1255 |
+
break;
|
1256 |
+
case 'getMerchantSettings':
|
1257 |
+
$WSresponse = $client->getMerchantSettings($WSRequest);
|
1258 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1259 |
+
break;
|
1260 |
+
case 'getPaymentRecord':
|
1261 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - paymentRecordId = '.$array['paymentRecordId'].')';
|
1262 |
+
$WSresponse = $client->getPaymentRecord($WSRequest);
|
1263 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1264 |
+
break;
|
1265 |
+
case 'getToken':
|
1266 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - cardNumber = '.$this->hideChars($array['cardNumber'],4,4).')';
|
1267 |
+
$WSresponse = $client->getToken($WSRequest);
|
1268 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1269 |
+
if($response['result']['code'] == '02500'){
|
1270 |
+
$resTrace = ' - token = '.$response['token'];
|
1271 |
+
}
|
1272 |
+
break;
|
1273 |
+
case 'getTransactionDetails':
|
1274 |
+
$reqTrace = '(transactionId = '.$array['transactionId'].')';
|
1275 |
+
$WSresponse = $client->getTransactionDetails($WSRequest);
|
1276 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1277 |
+
break;
|
1278 |
+
case 'getWallet':
|
1279 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - walletId = '.$array['walletId'].' - cardInd = '.$array['cardInd'].')';
|
1280 |
+
$WSresponse = $client->getWallet($WSRequest);
|
1281 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1282 |
+
break;
|
1283 |
+
case 'getWebPaymentDetails':
|
1284 |
+
$reqTrace .= '(token = '.$array['token'].')';
|
1285 |
+
$WSresponse = $client->getWebPaymentDetails($WSRequest);
|
1286 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1287 |
+
if(isset($response['transaction']['id'])){
|
1288 |
+
$resTrace = ' - transactionId = '.$response['transaction']['id'];
|
1289 |
+
}
|
1290 |
+
break;
|
1291 |
+
case 'getWebWallet':
|
1292 |
+
$reqTrace .= '(token = '.$array['token'].')';
|
1293 |
+
$WSresponse = $client->getWebWallet($WSRequest);
|
1294 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1295 |
+
if(isset($response['wallet']['card'])){
|
1296 |
+
$resTrace = ' - card = '.$this->hideChars($response['wallet']['card']['number'],4,4);
|
1297 |
+
}
|
1298 |
+
break;
|
1299 |
+
case 'manageWebWallet' :
|
1300 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - walletId = '.$array['buyer']['walletId'].')';
|
1301 |
+
$WSresponse = $client->manageWebWallet($WSRequest);
|
1302 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1303 |
+
if($response['result']['code'] == '00000'){
|
1304 |
+
$resTrace = ' - token = '.$response['token'];
|
1305 |
+
}
|
1306 |
+
break;
|
1307 |
+
case 'transactionsSearch':
|
1308 |
+
$reqTrace .= '(';
|
1309 |
+
foreach ($array as $key => $value) {
|
1310 |
+
$reqTrace .= $value != '' ? "$key = $value - " : '';
|
1311 |
+
}
|
1312 |
+
$reqTrace .= ')';
|
1313 |
+
$WSresponse = $client->transactionsSearch($WSRequest);
|
1314 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1315 |
+
break;
|
1316 |
+
case 'unBlock':
|
1317 |
+
$reqTrace .= '(transactionID = '.$array['transactionID'].')';
|
1318 |
+
$WSresponse = $client->unBlock($WSRequest);
|
1319 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1320 |
+
break;
|
1321 |
+
case 'updateWallet':
|
1322 |
+
$reqTrace .= '(walletId = '.$array['wallet']['walletId'].')';
|
1323 |
+
$WSresponse = $client->updateWallet($WSRequest);
|
1324 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1325 |
+
break;
|
1326 |
+
case 'updateWebWallet':
|
1327 |
+
$reqTrace .= '(walletId = '.$array['walletId'].')';
|
1328 |
+
$WSresponse = $client->updateWebWallet($WSRequest);
|
1329 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1330 |
+
if($response['result']['code'] == '00000'){
|
1331 |
+
$resTrace = ' - token = '.$response['token'];
|
1332 |
+
}
|
1333 |
+
break;
|
1334 |
+
case 'verifyAuthentication':
|
1335 |
+
$reqTrace .= '(contract = '.$array['contractNumber'].' - card = '.$this->hideChars($array['card']['number'],4,4).')';
|
1336 |
+
$WSresponse = $client->verifyAuthentication($WSRequest);
|
1337 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1338 |
+
break;
|
1339 |
+
case 'verifyEnrollment':
|
1340 |
+
if(!empty($array['card']['number']) and !empty($array['payment']['contractNumber'])) {
|
1341 |
+
$reqTrace .= '(contract = '.$array['payment']['contractNumber'].' - card = '.$this->hideChars($array['card']['number'],4,4).')';
|
1342 |
+
}
|
1343 |
+
$WSresponse = $client->verifyEnrollment($WSRequest);
|
1344 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1345 |
+
break;
|
1346 |
+
|
1347 |
+
}
|
1348 |
+
$this->writeTrace($reqTrace);
|
1349 |
+
$this->writeTrace('Response : code = '.$response['result']['code'].$resTrace);
|
1350 |
+
return $response;
|
1351 |
+
}catch ( Exception $e ) {
|
1352 |
+
$this->writeTrace($reqTrace);
|
1353 |
+
$this->writeTrace("Exception : ".$e->getMessage());
|
1354 |
+
$ERROR = array();
|
1355 |
+
$ERROR['result']['code'] = paylineSDK::ERR_CODE;
|
1356 |
+
$ERROR['result']['longMessage'] = $e->getMessage();
|
1357 |
+
$ERROR['result']['shortMessage'] = $e->getMessage();
|
1358 |
+
return $ERROR;
|
1359 |
+
}
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
public function createWallet($array){
|
1363 |
+
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
1364 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1365 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1366 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1367 |
+
if(!isset($array['owner']))$array['owner'] = null;
|
1368 |
+
if(!isset($array['ownerAddress']))$array['ownerAddress'] = null;
|
1369 |
+
$WSRequest = array (
|
1370 |
+
'contractNumber' => $array['contractNumber'],
|
1371 |
+
'wallet' => $this->wallet($array['wallet'],$array['address'],$array['card']),
|
1372 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1373 |
+
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
1374 |
+
'privateDataList' => $this->privates,
|
1375 |
+
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure']),
|
1376 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
1377 |
+
);
|
1378 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'createWallet');
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
public function createWebWallet($array){
|
1382 |
+
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
1383 |
+
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
1384 |
+
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
1385 |
+
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
1386 |
+
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
1387 |
+
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
1388 |
+
if(isset($array['languageCode'])&& strlen($array['languageCode'])) $this->languageCode = $array['languageCode'];
|
1389 |
+
if(isset($array['securityMode'])&& strlen($array['securityMode'])) $this->securityMode = $array['securityMode'];
|
1390 |
+
if(!isset($array['contracts'])||!strlen($array['contracts'][0]))$array['contracts'] = '';
|
1391 |
+
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
1392 |
+
$WSRequest = array (
|
1393 |
+
'contractNumber' => $array['contractNumber'],
|
1394 |
+
'selectedContractList' => $this->contracts($array['contracts']),
|
1395 |
+
'updatePersonalDetails' => $array['updatePersonalDetails'],
|
1396 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1397 |
+
'languageCode' => $this->languageCode,
|
1398 |
+
'customPaymentPageCode' => $this->customPaymentPageCode,
|
1399 |
+
'securityMode' => $this->securityMode,
|
1400 |
+
'returnURL' => $this->returnURL,
|
1401 |
+
'cancelURL' => $this->cancelURL,
|
1402 |
+
'notificationURL' => $this->notificationURL,
|
1403 |
+
'privateDataList' => $this->privates,
|
1404 |
+
'customPaymentTemplateURL' => $this->customPaymentTemplateURL,
|
1405 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
1406 |
+
);
|
1407 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'createWebWallet');
|
1408 |
+
}
|
1409 |
+
|
1410 |
+
public function disablePaymentRecord($array){
|
1411 |
+
$WSRequest = array (
|
1412 |
+
'contractNumber' => $array['contractNumber'],
|
1413 |
+
'paymentRecordId' => $array['paymentRecordId']
|
1414 |
+
);
|
1415 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'disablePaymentRecord');
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
public function disableWallet($array){
|
1419 |
+
$WSRequest = array (
|
1420 |
+
'contractNumber' => $array['contractNumber'],
|
1421 |
+
'walletIdList' => $this->walletIdList,
|
1422 |
+
'cardInd' => $array['cardInd']
|
1423 |
+
);
|
1424 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'disableWallet');
|
1425 |
+
}
|
1426 |
+
|
1427 |
+
public function doAuthorization($array){
|
1428 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1429 |
+
if(!isset($array['owner']))$array['owner'] = null;
|
1430 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1431 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1432 |
+
if(!isset($array['ownerAddress']))$array['ownerAddress'] = null;
|
1433 |
+
if(!isset($array['3DSecure']))$array['3DSecure'] = null;
|
1434 |
+
if(!isset($array['bankAccountData']))$array['bankAccountData'] = null;
|
1435 |
+
$WSRequest = array (
|
1436 |
+
'payment' => $this->payment($array['payment']),
|
1437 |
+
'card' => $this->card($array['card']),
|
1438 |
+
'order' => $this->order($array['order']),
|
1439 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1440 |
+
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
1441 |
+
'privateDataList' => $this->privates,
|
1442 |
+
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure']),
|
1443 |
+
'bankAccountData' => $this->bankAccountData($array['bankAccountData'])
|
1444 |
+
);
|
1445 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doAuthorization');
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
public function doCapture($array){
|
1449 |
+
$WSRequest = array (
|
1450 |
+
'transactionID' =>$array['transactionID'],
|
1451 |
+
'payment' => $this->payment($array['payment']),
|
1452 |
+
'privateDataList' => $this->privates,
|
1453 |
+
'sequenceNumber'=>$array['sequenceNumber']
|
1454 |
+
);
|
1455 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doCapture');
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
public function doCredit($array){
|
1459 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1460 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1461 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1462 |
+
$WSRequest = array (
|
1463 |
+
'payment' => $this->payment($array['payment']),
|
1464 |
+
'card' => $this->card($array['card']),
|
1465 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1466 |
+
'privateDataList' => $this->privates,
|
1467 |
+
'order' => $this->order($array['order']),
|
1468 |
+
'comment' =>$array['comment']
|
1469 |
+
);
|
1470 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doCredit');
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
public function doDebit($array){
|
1474 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1475 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1476 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1477 |
+
$WSRequest = array (
|
1478 |
+
'payment' => $this->payment($array['payment']),
|
1479 |
+
'card' => $this->card($array['card']),
|
1480 |
+
'order' => $this->order($array['order']),
|
1481 |
+
'privateDataList' => $this->privates,
|
1482 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1483 |
+
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure']),
|
1484 |
+
'authorization' =>$this->authorization($array['authorization'])
|
1485 |
+
);
|
1486 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doDebit');
|
1487 |
+
}
|
1488 |
+
|
1489 |
+
public function doImmediateWalletPayment($array){
|
1490 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1491 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1492 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1493 |
+
if(!isset($array['3DSecure']))$array['3DSecure'] = null;
|
1494 |
+
$WSRequest = array (
|
1495 |
+
'payment' => $this->payment($array['payment']),
|
1496 |
+
'order' => $this->order($array['order']),
|
1497 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1498 |
+
'walletId' => $array['walletId'],
|
1499 |
+
'cardInd' => $array['cardInd'],
|
1500 |
+
'cvx' => $array['walletCvx'],
|
1501 |
+
'privateDataList' => $this->privates,
|
1502 |
+
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure'])
|
1503 |
+
);
|
1504 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doImmediateWalletPayment');
|
1505 |
+
}
|
1506 |
+
|
1507 |
+
public function doReAuthorization($array){
|
1508 |
+
$WSRequest = array (
|
1509 |
+
'transactionID' => $array['transactionID'],
|
1510 |
+
'payment' => $this->payment($array['payment']),
|
1511 |
+
'order' => $this->order($array['order']),
|
1512 |
+
'privateDataList' => $this->privates
|
1513 |
+
);
|
1514 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doReAuthorization');
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
public function doRecurrentWalletPayment($array){
|
1518 |
+
if(!isset($array['orderRef']))$array['orderRef'] = null;
|
1519 |
+
if(!isset($array['orderDate']))$array['orderDate'] = null;
|
1520 |
+
if(!isset($array['scheduledDate']))$array['scheduledDate'] = null;
|
1521 |
+
$WSRequest = array (
|
1522 |
+
'payment' => $this->payment($array['payment']),
|
1523 |
+
'orderRef' => $array['orderRef'],
|
1524 |
+
'orderDate' => $array['orderDate'],
|
1525 |
+
'scheduledDate' => $array['scheduledDate'],
|
1526 |
+
'walletId' => $array['walletId'],
|
1527 |
+
'cardInd' => $array['cardInd'],
|
1528 |
+
'recurring' => $this->recurring($array['recurring']),
|
1529 |
+
'privateDataList' => $this->privates,
|
1530 |
+
'order' => $this->order($array['order'])
|
1531 |
+
);
|
1532 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doRecurrentWalletPayment');
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
public function doRefund($array){
|
1536 |
+
$WSRequest = array (
|
1537 |
+
'transactionID' =>$array['transactionID'],
|
1538 |
+
'payment' =>$this->payment($array['payment']),
|
1539 |
+
'comment' =>$array['comment'],
|
1540 |
+
'privateDataList' => $this->privates,
|
1541 |
+
'sequenceNumber'=>$array['sequenceNumber']
|
1542 |
+
);
|
1543 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doRefund');
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
public function doReset($array){
|
1547 |
+
$WSRequest = array (
|
1548 |
+
'transactionID' => $array['transactionID'],
|
1549 |
+
'comment' => $array['comment']
|
1550 |
+
);
|
1551 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doReset');
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
public function doScheduledWalletPayment($array){
|
1555 |
+
if(!isset($array['orderRef']))$array['orderRef'] = null;
|
1556 |
+
if(!isset($array['orderDate']))$array['orderDate'] = null;
|
1557 |
+
$WSRequest = array (
|
1558 |
+
'payment' => $this->payment($array['payment']),
|
1559 |
+
'orderRef' => $array['orderRef'],
|
1560 |
+
'orderDate' => $array['orderDate'],
|
1561 |
+
'scheduledDate' => $array['scheduledDate'],
|
1562 |
+
'walletId' => $array['walletId'],
|
1563 |
+
'cardInd' => $array['cardInd'],
|
1564 |
+
'order' => $this->order($array['order']),
|
1565 |
+
'privateDataList' => $this->privates
|
1566 |
+
);
|
1567 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doScheduledWalletPayment');
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
public function doScoringCheque($array){
|
1571 |
+
$WSRequest = array (
|
1572 |
+
'payment' => $this->payment($array['payment']),
|
1573 |
+
'cheque' => $this->cheque($array['cheque']),
|
1574 |
+
'order' => $this->order($array['order']),
|
1575 |
+
'privateDataList' => $this->privates
|
1576 |
+
);
|
1577 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'doScoringCheque');
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
public function doWebPayment($array){
|
1581 |
+
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
1582 |
+
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
1583 |
+
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
1584 |
+
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
1585 |
+
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
1586 |
+
if(isset($array['languageCode'])&& strlen($array['languageCode'])) $this->languageCode = $array['languageCode'];
|
1587 |
+
if(isset($array['securityMode'])&& strlen($array['securityMode'])) $this->securityMode = $array['securityMode'];
|
1588 |
+
if(!isset($array['payment']))$array['payment'] = null;
|
1589 |
+
if(!isset($array['contracts'])||!strlen($array['contracts'][0]))$array['contracts'] = '';
|
1590 |
+
if(!isset($array['secondContracts'])||!strlen($array['secondContracts'][0]))$array['secondContracts'] = '';
|
1591 |
+
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
1592 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1593 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1594 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1595 |
+
if(!isset($array['recurring']))$array['recurring'] = null;
|
1596 |
+
|
1597 |
+
$WSRequest = array (
|
1598 |
+
'payment' => $this->payment($array['payment']),
|
1599 |
+
'returnURL' => $this->returnURL,
|
1600 |
+
'cancelURL' => $this->cancelURL,
|
1601 |
+
'order' => $this->order($array['order']),
|
1602 |
+
'notificationURL' => $this->notificationURL,
|
1603 |
+
'customPaymentTemplateURL' => $this->customPaymentTemplateURL,
|
1604 |
+
'selectedContractList' => $this->contracts($array['contracts']),
|
1605 |
+
'secondSelectedContractList' => $this->secondContracts($array['secondContracts']),
|
1606 |
+
'privateDataList' => $this->privates,
|
1607 |
+
'languageCode' => $this->languageCode,
|
1608 |
+
'customPaymentPageCode' => $this->customPaymentPageCode,
|
1609 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1610 |
+
'securityMode' => $this->securityMode,
|
1611 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
1612 |
+
);
|
1613 |
+
|
1614 |
+
|
1615 |
+
if(isset($array['payment']['mode'])){
|
1616 |
+
if(($array['payment']['mode'] == "REC") || ($array['payment']['mode'] == "NX")) {
|
1617 |
+
$WSRequest['recurring'] = $this->recurring($array['recurring']);
|
1618 |
+
}
|
1619 |
+
}
|
1620 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'doWebPayment');
|
1621 |
+
}
|
1622 |
+
|
1623 |
+
public function enableWallet($array){
|
1624 |
+
$WSRequest = array (
|
1625 |
+
'contractNumber' => $array['contractNumber'],
|
1626 |
+
'walletId' => $array['walletId'],
|
1627 |
+
'cardInd' => $array['cardInd']
|
1628 |
+
);
|
1629 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'enableWallet');
|
1630 |
+
}
|
1631 |
+
|
1632 |
+
public function getServletTokenUrl(){
|
1633 |
+
return $this->servletTokenUrl;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
public function getWidgetJavascriptUrl(){
|
1637 |
+
return $this->widgetJavascriptUrl;
|
1638 |
+
}
|
1639 |
+
|
1640 |
+
public function getWidgetCssUrl(){
|
1641 |
+
return $this->widgetCssUrl;
|
1642 |
+
}
|
1643 |
+
|
1644 |
+
public function getAlertDetails($array){
|
1645 |
+
$WSRequest = array(
|
1646 |
+
'AlertId' => $array['AlertId'],
|
1647 |
+
'TransactionId' => $array['TransactionId']
|
1648 |
+
);
|
1649 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::EXTENDED_API,'getAlertDetails');
|
1650 |
+
}
|
1651 |
+
|
1652 |
+
public function getBalance($array){
|
1653 |
+
$WSRequest = array(
|
1654 |
+
'contractNumber' => $array['contractNumber'],
|
1655 |
+
'cardID' => $array['cardID']
|
1656 |
+
);
|
1657 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getBalance');
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
public function getCards($array){
|
1661 |
+
$WSRequest = array (
|
1662 |
+
'contractNumber' => $array['contractNumber'],
|
1663 |
+
'walletId' => $array['walletId'],
|
1664 |
+
'cardInd' => $array['cardInd']
|
1665 |
+
);
|
1666 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getCards');
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
public function getEncryptionKey($array){
|
1670 |
+
$WSRequest = array();
|
1671 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getEncryptionKey');
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
public function getMerchantSettings($array){
|
1675 |
+
$WSRequest = array();
|
1676 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getMerchantSettings');
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
private function getPaymentMeans(){
|
1680 |
+
$this->writeTrace('getPaymentMeans');
|
1681 |
+
try{
|
1682 |
+
$client = new SoapClient(dirname(__FILE__).'/PaylineByMonext.wsdl', $this->header_soap);
|
1683 |
+
$WSresponse = $client->getPaymentMeans();
|
1684 |
+
$response = paylineUtil::responseToArray($WSresponse);
|
1685 |
+
$this->writeTrace($response['result']);
|
1686 |
+
return $response;
|
1687 |
+
}catch ( Exception $e ) {
|
1688 |
+
$this->writeTrace("Exception : ".$e->getMessage());
|
1689 |
+
$ERROR = array();
|
1690 |
+
$ERROR['result']['code'] = paylineSDK::ERR_CODE;
|
1691 |
+
$ERROR['result']['longMessage'] = $e->getMessage();
|
1692 |
+
$ERROR['result']['shortMessage'] = $e->getMessage();
|
1693 |
+
return $ERROR;
|
1694 |
+
}
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
private function addPOSFromObject($oPointOfSell,$pos){
|
1698 |
+
if(isset($oPointOfSell->contracts->contract)){
|
1699 |
+
$this->posData[$pos] = array();
|
1700 |
+
$this->posData[$pos]['label'] = $oPointOfSell->label;
|
1701 |
+
$this->posData[$pos]['contracts'] = array();
|
1702 |
+
if(sizeof($oPointOfSell->contracts->contract) > 1){
|
1703 |
+
// more than 1 active contract in this point of sell
|
1704 |
+
$ctr = 0;
|
1705 |
+
foreach ($oPointOfSell->contracts->contract as $contract){
|
1706 |
+
$this->posData[$pos]['contracts'][$ctr] = array();
|
1707 |
+
$this->posData[$pos]['contracts'][$ctr]['cardType'] = $contract->cardType;
|
1708 |
+
$this->posData[$pos]['contracts'][$ctr]['label'] = $contract->label;
|
1709 |
+
$this->posData[$pos]['contracts'][$ctr]['contractNumber'] = $contract->contractNumber;
|
1710 |
+
$this->posData[$pos]['contracts'][$ctr]['logo'] = $this->paymentMeansLogos[$this->posData[$pos]['contracts'][$ctr]['cardType']]; // default logo
|
1711 |
+
if($contract->logoEnable){
|
1712 |
+
$this->posData[$pos]['contracts'][$ctr]['logo'] = $this->downloadCustomLogo($contract->normalLogo, $contract->normalLogoMime, $contract->contractNumber, $oPointOfSell->label);
|
1713 |
+
}
|
1714 |
+
$ctr++;
|
1715 |
+
}
|
1716 |
+
}else{ // only 1 active contract in this point of sell
|
1717 |
+
$this->posData[$pos]['contracts'][0] = array();
|
1718 |
+
$this->posData[$pos]['contracts'][0]['cardType'] = $oPointOfSell->contracts->contract->cardType;
|
1719 |
+
$this->posData[$pos]['contracts'][0]['label'] = $oPointOfSell->contracts->contract->label;
|
1720 |
+
$this->posData[$pos]['contracts'][0]['contractNumber'] = $oPointOfSell->contracts->contract->contractNumber;
|
1721 |
+
$this->posData[$pos]['contracts'][0]['logo'] = $this->paymentMeansLogos[$this->posData[$pos]['contracts'][0]['cardType']]; // default logo
|
1722 |
+
if($oPointOfSell->contracts->contract->logoEnable){
|
1723 |
+
$this->posData[$pos]['contracts'][0]['logo'] = $this->downloadCustomLogo($oPointOfSell->contracts->contract->normalLogo, $oPointOfSell->contracts->contract->normalLogoMime, $oPointOfSell->contracts->contract->contractNumber, $oPointOfSell->label);
|
1724 |
+
}
|
1725 |
+
}
|
1726 |
+
}else{ // no contract in this point of sell
|
1727 |
+
return false;
|
1728 |
+
}
|
1729 |
+
|
1730 |
+
return true;
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
private function addPOSFromArray($aPointOfSell,$pos){
|
1734 |
+
if(isset($aPointOfSell['contracts']['contract'])){
|
1735 |
+
$this->posData[$pos] = array();
|
1736 |
+
$this->posData[$pos]['label'] = $aPointOfSell['label'];
|
1737 |
+
$this->posData[$pos]['contracts'] = array();
|
1738 |
+
if(isset($aPointOfSell['contracts']['contract']['label'])){
|
1739 |
+
// only 1 active contract in this point of sell
|
1740 |
+
$this->posData[$pos]['contracts'][0] = array();
|
1741 |
+
$this->posData[$pos]['contracts'][0]['cardType'] = $aPointOfSell['contracts']['contract']['cardType'];
|
1742 |
+
$this->posData[$pos]['contracts'][0]['label'] = $aPointOfSell['contracts']['contract']['label'];
|
1743 |
+
$this->posData[$pos]['contracts'][0]['contractNumber'] = $aPointOfSell['contracts']['contract']['contractNumber'];
|
1744 |
+
$this->posData[$pos]['contracts'][0]['logo'] = $this->paymentMeansLogos[$this->posData[$pos]['contracts'][0]['cardType']]; // default logo
|
1745 |
+
if($aPointOfSell['contracts']['contract']['logoEnable']){
|
1746 |
+
$this->posData[$pos]['contracts'][0]['logo'] = $this->downloadCustomLogo($aPointOfSell['contracts']['contract']['normalLogo'], $aPointOfSell['contracts']['contract']['normalLogoMime'], $aPointOfSell['contracts']['contract']['contractNumber'], $aPointOfSell['label']);
|
1747 |
+
}
|
1748 |
+
}else{ // more than 1 active contract in this point of sell
|
1749 |
+
$ctr = 0;
|
1750 |
+
foreach ($aPointOfSell['contracts']['contract'] as $contract){
|
1751 |
+
$this->posData[$pos]['contracts'][$ctr] = array();
|
1752 |
+
$this->posData[$pos]['contracts'][$ctr]['cardType'] = $contract->cardType;
|
1753 |
+
$this->posData[$pos]['contracts'][$ctr]['label'] = $contract->label;
|
1754 |
+
$this->posData[$pos]['contracts'][$ctr]['contractNumber'] = $contract->contractNumber;
|
1755 |
+
$this->posData[$pos]['contracts'][$ctr]['logo'] = $this->paymentMeansLogos[$this->posData[$pos]['contracts'][$ctr]['cardType']]; // default logo
|
1756 |
+
if($contract->logoEnable){
|
1757 |
+
$this->posData[$pos]['contracts'][$ctr]['logo'] = $this->downloadCustomLogo($contract->normalLogo, $contract->normalLogoMime, $contract->contractNumber, $aPointOfSell['label']);
|
1758 |
+
}
|
1759 |
+
$ctr++;
|
1760 |
+
}
|
1761 |
+
}
|
1762 |
+
}else{ // no contract in this point of sell
|
1763 |
+
return false;
|
1764 |
+
}
|
1765 |
+
return true;
|
1766 |
+
}
|
1767 |
+
|
1768 |
+
private function absoluteURL($path) {
|
1769 |
+
$dir = str_replace('\\', '/', dirname($path));
|
1770 |
+
return $_SERVER['HTTP_ORIGIN'].'/'.substr($dir, strlen($_SERVER['DOCUMENT_ROOT'])).'/';
|
1771 |
+
}
|
1772 |
+
|
1773 |
+
private function downloadCustomLogo($base64String,$mimeType,$contractNumber,$posLabel){
|
1774 |
+
$mime = explode('/', $mimeType);
|
1775 |
+
if($this->customLogoPath != null){
|
1776 |
+
if(!file_exists($this->customLogoPath)){
|
1777 |
+
mkdir($this->customLogoPath);
|
1778 |
+
}
|
1779 |
+
$posDir = $this->customLogoPath.$posLabel.DIRECTORY_SEPARATOR;
|
1780 |
+
}else{
|
1781 |
+
$merchantDir = dirname(__DIR__).DIRECTORY_SEPARATOR.paylineSDK::DEFAULT_LOGO_DIR.DIRECTORY_SEPARATOR.$this->header_soap['login'].DIRECTORY_SEPARATOR;
|
1782 |
+
if(!file_exists($merchantDir)){
|
1783 |
+
mkdir($merchantDir);
|
1784 |
+
}
|
1785 |
+
$posDir = $merchantDir.$posLabel.DIRECTORY_SEPARATOR;
|
1786 |
+
}
|
1787 |
+
if(!file_exists($posDir)){
|
1788 |
+
mkdir($posDir);
|
1789 |
+
}
|
1790 |
+
$output_file = $posDir.$contractNumber.'.'.$mime[1];
|
1791 |
+
|
1792 |
+
try{
|
1793 |
+
if(file_put_contents($output_file,$base64String)){
|
1794 |
+
return $this->absoluteURL($output_file).$contractNumber.'.'.$mime[1];
|
1795 |
+
}else{
|
1796 |
+
$this->writeTrace("Error : downloadCustomLogo for contract $contractNumber under $posDir failed");
|
1797 |
+
return paylineSDK::ERR_CODE;
|
1798 |
+
}
|
1799 |
+
}catch (Exception $e){
|
1800 |
+
$this->writeTrace("Exception : downloadCustomLogo for contract $contractNumber of pos $posLabel - ".$e->getMessage());
|
1801 |
+
return paylineSDK::ERR_CODE;
|
1802 |
+
}
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
public function getMerchantSettingsToArray($array){
|
1806 |
+
/*
|
1807 |
+
* Association between Payment mean types and logos URL
|
1808 |
+
*/
|
1809 |
+
$getPaymentMeansResponse = $this->getPaymentMeans();
|
1810 |
+
if($getPaymentMeansResponse['result']['code'] != paylineSDK::ERR_CODE){
|
1811 |
+
$this->paymentMeansLogos = array();
|
1812 |
+
for($i=0 ; $i<sizeof($getPaymentMeansResponse['listPaymentMean']['paymentMean']) ; $i++){
|
1813 |
+
$this->paymentMeansLogos[$getPaymentMeansResponse['listPaymentMean']['paymentMean'][$i]->code] = $getPaymentMeansResponse['listPaymentMean']['paymentMean'][$i]->logoUrl;
|
1814 |
+
}
|
1815 |
+
}
|
1816 |
+
|
1817 |
+
if(isset($array['logoPath'])){
|
1818 |
+
$this->customLogoPath = $array['logoPath'];
|
1819 |
+
}
|
1820 |
+
$getMerchantSettingsRes = $this->getMerchantSettings($array);
|
1821 |
+
if(isset($getMerchantSettingsRes['listPointOfSell']['pointOfSell']['label'])){
|
1822 |
+
// only 1 active point of sell
|
1823 |
+
$aPointOfSell = $getMerchantSettingsRes['listPointOfSell']['pointOfSell'];
|
1824 |
+
$this->addPOSFromArray($aPointOfSell, 0);
|
1825 |
+
}else{ // more than 1 active point of sell
|
1826 |
+
$index = 0;
|
1827 |
+
foreach ($getMerchantSettingsRes['listPointOfSell']['pointOfSell'] as $oPointOfSell){
|
1828 |
+
if($this->addPOSFromObject($oPointOfSell, $index)){
|
1829 |
+
$index++; // no incrementation if pos was not added
|
1830 |
+
}
|
1831 |
+
}
|
1832 |
+
}
|
1833 |
+
$res = array('result' => $getMerchantSettingsRes['result'],'POS' => $this->posData);
|
1834 |
+
return $res;
|
1835 |
+
}
|
1836 |
+
|
1837 |
+
public function getPaymentRecord($array){
|
1838 |
+
$WSRequest = array (
|
1839 |
+
'contractNumber' => $array['contractNumber'],
|
1840 |
+
'paymentRecordId' => $array['paymentRecordId']
|
1841 |
+
);
|
1842 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getPaymentRecord');
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
public function updatePaymentRecord($array){
|
1846 |
+
$WSRequest = array (
|
1847 |
+
'contractNumber' => $array['contractNumber'],
|
1848 |
+
'paymentRecordId' => $array['paymentRecordId'],
|
1849 |
+
'recurring' => $this->recurring($array['recurring']),
|
1850 |
+
);
|
1851 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'updatePaymentRecord');
|
1852 |
+
}
|
1853 |
+
|
1854 |
+
public function getBillingRecord($array){
|
1855 |
+
$WSRequest = array (
|
1856 |
+
'contractNumber' => $array['contractNumber'],
|
1857 |
+
'paymentRecordId' => $array['paymentRecordId'],
|
1858 |
+
'billingRecordId' => $array['billingRecordId']
|
1859 |
+
);
|
1860 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getBillingRecord');
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
public function updateBillingRecord($array){
|
1864 |
+
$WSRequest = array (
|
1865 |
+
'contractNumber' => $array['contractNumber'],
|
1866 |
+
'paymentRecordId' => $array['paymentRecordId'],
|
1867 |
+
'billingRecordId' => $array['billingRecordId'],
|
1868 |
+
'billingRecordForUpdate' => $this->billingRecord($array['billingRecordForUpdate'])
|
1869 |
+
);
|
1870 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'updateBillingRecord');
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
public function getToken($array){
|
1874 |
+
$WSRequest = array (
|
1875 |
+
'cardNumber' => $array['cardNumber'],
|
1876 |
+
'expirationDate' => $array['expirationDate'],
|
1877 |
+
'contractNumber' => $array['contractNumber']
|
1878 |
+
);
|
1879 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getToken');
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
public function getTransactionDetails($array){
|
1883 |
+
if(!isset($array['transactionId']))$array['transactionId'] = null;
|
1884 |
+
if(!isset($array['orderRef']))$array['orderRef'] = null;
|
1885 |
+
if(!isset($array['startDate']))$array['startDate'] = null;
|
1886 |
+
if(!isset($array['endDate']))$array['endDate'] = null;
|
1887 |
+
if(!isset($array['transactionHistory']))$array['transactionHistory'] = null;
|
1888 |
+
if(!isset($array['archiveSearch']))$array['archiveSearch'] = null;
|
1889 |
+
$WSRequest = array (
|
1890 |
+
'transactionId' => $array['transactionId'],
|
1891 |
+
'orderRef' => $array['orderRef'],
|
1892 |
+
'startDate' => $array['startDate'],
|
1893 |
+
'endDate' => $array['endDate'],
|
1894 |
+
'transactionHistory' => $array['transactionHistory'],
|
1895 |
+
'archiveSearch' => $array['archiveSearch']
|
1896 |
+
);
|
1897 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::EXTENDED_API,'getTransactionDetails');
|
1898 |
+
}
|
1899 |
+
public function getWallet($array){
|
1900 |
+
$WSRequest = array (
|
1901 |
+
'contractNumber' => $array['contractNumber'],
|
1902 |
+
'walletId' => $array['walletId'],
|
1903 |
+
'cardInd' => $array['cardInd']
|
1904 |
+
);
|
1905 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'getWallet');
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
public function getWebPaymentDetails($array){
|
1909 |
+
return $this->webServiceRequest($array,$array,paylineSDK::WEB_API,'getWebPaymentDetails');
|
1910 |
+
}
|
1911 |
+
|
1912 |
+
public function getWebWallet($array){
|
1913 |
+
return $this->webServiceRequest($array,$array,paylineSDK::WEB_API,'getWebWallet');
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
public function manageWebWallet($array){
|
1917 |
+
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
1918 |
+
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
1919 |
+
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
1920 |
+
if(!isset($array['buyer']))$array['buyer'] = null;
|
1921 |
+
if(!isset($array['billingAddress']))$array['billingAddress'] = null;
|
1922 |
+
if(!isset($array['shippingAddress']))$array['shippingAddress'] = null;
|
1923 |
+
if(!isset($array['owner']))$array['owner'] = null;
|
1924 |
+
if(!isset($array['ownerAddress']))$array['ownerAddress'] = null;
|
1925 |
+
if(!isset($array['contracts'])||!strlen($array['contracts'][0]))$array['contracts'] = '';
|
1926 |
+
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
1927 |
+
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
1928 |
+
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
1929 |
+
$WSRequest = array (
|
1930 |
+
'contractNumber' => $array['contractNumber'],
|
1931 |
+
'selectedContractList' => $this->contracts($array['contracts']),
|
1932 |
+
'updatePersonalDetails' => $array['updatePersonalDetails'],
|
1933 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
1934 |
+
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
1935 |
+
'languageCode' => $array['languageCode'],
|
1936 |
+
'customPaymentPageCode' => $array['customPaymentPageCode'],
|
1937 |
+
'securityMode' => $array['securityMode'],
|
1938 |
+
'returnURL' => $this->returnURL,
|
1939 |
+
'cancelURL' => $this->cancelURL,
|
1940 |
+
'notificationURL' => $this->notificationURL,
|
1941 |
+
'privateDataList' => $this->privates,
|
1942 |
+
'customPaymentTemplateURL' => $array['customPaymentTemplateURL'],
|
1943 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
1944 |
+
);
|
1945 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'manageWebWallet');
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
public function transactionsSearch($array){
|
1949 |
+
$WSRequest = array (
|
1950 |
+
'transactionId' => $array['transactionId'],
|
1951 |
+
'orderRef' => $array['orderRef'],
|
1952 |
+
'startDate' => $array['startDate'],
|
1953 |
+
'endDate' => $array['endDate'],
|
1954 |
+
'contractNumber' => $array['contractNumber'],
|
1955 |
+
'authorizationNumber' => $array['authorizationNumber'],
|
1956 |
+
'returnCode' => $array['returnCode'],
|
1957 |
+
'paymentMean' => $array['paymentMean'],
|
1958 |
+
'transactionType' => $array['transactionType'],
|
1959 |
+
'name' => $array['name'],
|
1960 |
+
'firstName' => $array['firstName'],
|
1961 |
+
'email' => $array['email'],
|
1962 |
+
'cardNumber' => $array['cardNumber'],
|
1963 |
+
'currency' => $array['currency'],
|
1964 |
+
'minAmount' => $array['minAmount'],
|
1965 |
+
'maxAmount' => $array['maxAmount'],
|
1966 |
+
'walletId' => $array['walletId'],
|
1967 |
+
'sequenceNumber' => $array['sequenceNumber'],
|
1968 |
+
'token' => $array['token']
|
1969 |
+
);
|
1970 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::EXTENDED_API,'transactionsSearch');
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
public function unBlock($array){
|
1974 |
+
$WSRequest = array (
|
1975 |
+
'transactionID' => $array['transactionID'],
|
1976 |
+
'transactionDate' => $array['transactionDate']
|
1977 |
+
);
|
1978 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'unBlock');
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
public function updateWallet($array){
|
1982 |
+
$WSRequest = array (
|
1983 |
+
'contractNumber' => $array['contractNumber'],
|
1984 |
+
'cardInd' => $array['cardInd'],
|
1985 |
+
'wallet' => $this->wallet($array['wallet'],$array['address'],$array['card']),
|
1986 |
+
'buyer' => $this->buyer($array['buyer'], $array['shippingAddress'],$array['billingAddress']),
|
1987 |
+
'owner' => $this->owner($array['owner'],$array['ownerAddress']),
|
1988 |
+
'privateDataList' => $this->privates,
|
1989 |
+
'authentication3DSecure' =>$this->authentication3DSecure($array['3DSecure']),
|
1990 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
1991 |
+
);
|
1992 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'updateWallet');
|
1993 |
+
}
|
1994 |
+
|
1995 |
+
public function updateWebWallet($array){
|
1996 |
+
if(isset($array['cancelURL'])&& strlen($array['cancelURL'])) $this->cancelURL = $array['cancelURL'];
|
1997 |
+
if(isset($array['notificationURL']) && strlen($array['notificationURL'])) $this->notificationURL = $array['notificationURL'];
|
1998 |
+
if(isset($array['returnURL'])&& strlen($array['returnURL'])) $this->returnURL = $array['returnURL'];
|
1999 |
+
if(isset($array['customPaymentTemplateURL'])&& strlen($array['customPaymentTemplateURL'])) $this->customPaymentTemplateURL = $array['customPaymentTemplateURL'];
|
2000 |
+
if(isset($array['customPaymentPageCode'])&& strlen($array['customPaymentPageCode'])) $this->customPaymentPageCode = $array['customPaymentPageCode'];
|
2001 |
+
if(isset($array['languageCode'])&& strlen($array['languageCode'])) $this->languageCode = $array['languageCode'];
|
2002 |
+
if(isset($array['securityMode'])&& strlen($array['securityMode'])) $this->securityMode = $array['securityMode'];
|
2003 |
+
if(!isset($array['walletContracts'])||!strlen($array['walletContracts'][0]))$array['walletContracts'] = '';
|
2004 |
+
$WSRequest = array (
|
2005 |
+
'contractNumber' => $array['contractNumber'],
|
2006 |
+
'cardInd' => $array['cardInd'],
|
2007 |
+
'walletId' => $array['walletId'],
|
2008 |
+
'updatePersonalDetails' => $array['updatePersonalDetails'],
|
2009 |
+
'updateOwnerDetails' => $array['updateOwnerDetails'],
|
2010 |
+
'updatePaymentDetails' => $array['updatePaymentDetails'],
|
2011 |
+
'buyer' => $this->buyer($array['buyer'],$array['shippingAddress'],$array['billingAddress']),
|
2012 |
+
'languageCode' => $this->languageCode,
|
2013 |
+
'customPaymentPageCode' => $this->customPaymentPageCode,
|
2014 |
+
'securityMode' => $this->securityMode,
|
2015 |
+
'returnURL' => $this->returnURL,
|
2016 |
+
'cancelURL' => $this->cancelURL,
|
2017 |
+
'notificationURL' => $this->notificationURL,
|
2018 |
+
'privateDataList' => $this->privates,
|
2019 |
+
'customPaymentTemplateURL' => $this->customPaymentTemplateURL,
|
2020 |
+
'contractNumberWalletList' => $this->secondContracts($array['walletContracts'])
|
2021 |
+
);
|
2022 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::WEB_API,'updateWebWallet');
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
public function verifyAuthentication($array){
|
2026 |
+
$WSRequest = array (
|
2027 |
+
'contractNumber' => $array['contractNumber'],
|
2028 |
+
'pares' => $array['pares'],
|
2029 |
+
'md' => $array['md'],
|
2030 |
+
'card' => $this->card($array['card'])
|
2031 |
+
);
|
2032 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'verifyAuthentication');
|
2033 |
+
}
|
2034 |
+
|
2035 |
+
public function verifyEnrollment($array){
|
2036 |
+
if(!isset($array['orderRef']))$array['orderRef'] = null;
|
2037 |
+
if(!isset($array['userAgent']))$array['userAgent'] = null;
|
2038 |
+
if(!isset($array['mdFieldValue']))$array['mdFieldValue'] = null;
|
2039 |
+
if(!isset($array['walletId']))$array['walletId'] = null;
|
2040 |
+
if(!isset($array['walletCardInd']))$array['walletCardInd'] = null;
|
2041 |
+
if(!isset($array['card']))$array['card'] = null;
|
2042 |
+
$WSRequest = array (
|
2043 |
+
'payment' => $this->payment($array['payment']),
|
2044 |
+
'card' => $this->card($array['card']),
|
2045 |
+
'orderRef' => $array['orderRef'],
|
2046 |
+
'userAgent' => $array['userAgent'],
|
2047 |
+
'mdFieldValue' => $array['mdFieldValue'],
|
2048 |
+
'walletId' => $array['walletId'],
|
2049 |
+
'walletCardInd' => $array['walletCardInd']
|
2050 |
+
);
|
2051 |
+
return $this->webServiceRequest($array,$WSRequest,paylineSDK::DIRECT_API,'verifyEnrollment');
|
2052 |
+
}
|
2053 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Monext/Payline/lib/v4.44.1.wsdl
DELETED
@@ -1,3523 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<wsdl:definitions targetNamespace="http://impl.ws.payline.experian.com" xmlns:impl="http://impl.ws.payline.experian.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:intf="http://impl.ws.payline.experian.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns1="http://obj.ws.payline.experian.com">
|
3 |
-
<wsdl:types>
|
4 |
-
<schema elementFormDefault="qualified" targetNamespace="http://impl.ws.payline.experian.com" xmlns="http://www.w3.org/2001/XMLSchema">
|
5 |
-
<import namespace="http://obj.ws.payline.experian.com"/>
|
6 |
-
<element name="doWebPaymentRequest">
|
7 |
-
<complexType>
|
8 |
-
<annotation>
|
9 |
-
<documentation>
|
10 |
-
This element is the request for the
|
11 |
-
doWebPayment
|
12 |
-
method
|
13 |
-
</documentation>
|
14 |
-
</annotation>
|
15 |
-
<sequence>
|
16 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
17 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
18 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
19 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
20 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
21 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
22 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
23 |
-
<element name="secondSelectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
24 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
25 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
26 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
27 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
28 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
29 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
30 |
-
<element name="recurring" nillable="true" type="tns1:recurring"/>
|
31 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
32 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
33 |
-
</sequence>
|
34 |
-
</complexType>
|
35 |
-
</element>
|
36 |
-
<element name="doWebPaymentResponse">
|
37 |
-
<complexType>
|
38 |
-
<annotation>
|
39 |
-
<documentation>
|
40 |
-
This element is the reponse from the
|
41 |
-
doWebPayment
|
42 |
-
method
|
43 |
-
</documentation>
|
44 |
-
</annotation>
|
45 |
-
<sequence>
|
46 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
47 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
48 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
49 |
-
<element minOccurs="0" name="stepCode" nillable="true" type="xsd:string"/>
|
50 |
-
<element minOccurs="0" name="reqCode" nillable="true" type="xsd:string"/>
|
51 |
-
<element minOccurs="0" name="method" nillable="true" type="xsd:string"/>
|
52 |
-
</sequence>
|
53 |
-
</complexType>
|
54 |
-
</element>
|
55 |
-
<element name="getWebPaymentDetailsRequest">
|
56 |
-
<complexType>
|
57 |
-
<annotation>
|
58 |
-
<documentation>
|
59 |
-
This element is the reponse from the
|
60 |
-
getWebPayment
|
61 |
-
method
|
62 |
-
</documentation>
|
63 |
-
</annotation>
|
64 |
-
<sequence>
|
65 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
66 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
67 |
-
</sequence>
|
68 |
-
</complexType>
|
69 |
-
</element>
|
70 |
-
<element name="getWebPaymentDetailsResponse">
|
71 |
-
<complexType>
|
72 |
-
<annotation>
|
73 |
-
<documentation>
|
74 |
-
This element is the reponse from the
|
75 |
-
doWebPayment
|
76 |
-
method
|
77 |
-
</documentation>
|
78 |
-
</annotation>
|
79 |
-
<sequence>
|
80 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
81 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
82 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
83 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
84 |
-
<element minOccurs="0" name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
85 |
-
<element minOccurs="0" name="paymentRecordId" nillable="true" type="xsd:string"/>
|
86 |
-
<element minOccurs="0" name="billingRecordList" nillable="true" type="tns1:billingRecordList"/>
|
87 |
-
<element minOccurs="0" name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
88 |
-
<element name="card" type="tns1:cardOut"/>
|
89 |
-
<element minOccurs="0" name="extendedCard" type="tns1:extendedCardType"/>
|
90 |
-
<element name="order" type="tns1:order"/>
|
91 |
-
<element minOccurs="0" name="paymentAdditionalList" nillable="true" type="tns1:paymentAdditionalList"/>
|
92 |
-
<element minOccurs="0" name="media" nillable="true" type="xsd:string"/>
|
93 |
-
<element minOccurs="0" name="numberOfAttempt" nillable="true" type="xsd:string"/>
|
94 |
-
<element minOccurs="0" name="wallet" nillable="true" type="tns1:wallet"/>
|
95 |
-
<element minOccurs="0" name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
96 |
-
<element minOccurs="0" name="contractNumber" nillable="false" type="xsd:string"/>
|
97 |
-
<element name="bankAccountData" nillable="true" type="tns1:bankAccountData"/>
|
98 |
-
</sequence>
|
99 |
-
</complexType>
|
100 |
-
</element>
|
101 |
-
<element name="doAuthorizationRequest">
|
102 |
-
<complexType>
|
103 |
-
<annotation>
|
104 |
-
<documentation>
|
105 |
-
This element is the request for the
|
106 |
-
doAuthorization
|
107 |
-
method
|
108 |
-
</documentation>
|
109 |
-
</annotation>
|
110 |
-
<sequence>
|
111 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
112 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
113 |
-
<element name="bankAccountData" nillable="false" type="tns1:bankAccountData"/>
|
114 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
115 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
116 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
117 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
118 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
119 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
120 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
121 |
-
</sequence>
|
122 |
-
</complexType>
|
123 |
-
</element>
|
124 |
-
<element name="doAuthorizationResponse">
|
125 |
-
<complexType>
|
126 |
-
<annotation>
|
127 |
-
<documentation>
|
128 |
-
This element is the reponse from the
|
129 |
-
doAuthorization method
|
130 |
-
</documentation>
|
131 |
-
</annotation>
|
132 |
-
<sequence>
|
133 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
134 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
135 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
136 |
-
<element name="card" type="tns1:cardOut"/>
|
137 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
138 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
139 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
140 |
-
</sequence>
|
141 |
-
</complexType>
|
142 |
-
</element>
|
143 |
-
<element name="doCaptureRequest">
|
144 |
-
<complexType>
|
145 |
-
<annotation>
|
146 |
-
<documentation>
|
147 |
-
This element is the request for the
|
148 |
-
doCapture method
|
149 |
-
</documentation>
|
150 |
-
</annotation>
|
151 |
-
<sequence>
|
152 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
153 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
154 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
155 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
156 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
157 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
158 |
-
</sequence>
|
159 |
-
</complexType>
|
160 |
-
</element>
|
161 |
-
<element name="doCaptureResponse">
|
162 |
-
<complexType>
|
163 |
-
<annotation>
|
164 |
-
<documentation>
|
165 |
-
This element is the reponse from the
|
166 |
-
doCapture
|
167 |
-
method
|
168 |
-
</documentation>
|
169 |
-
</annotation>
|
170 |
-
<sequence>
|
171 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
172 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
173 |
-
<element name="reAuthorization" nillable="true" type="xsd:string"/>
|
174 |
-
</sequence>
|
175 |
-
</complexType>
|
176 |
-
</element>
|
177 |
-
<element name="doDebitRequest">
|
178 |
-
<complexType>
|
179 |
-
<sequence>
|
180 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
181 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
182 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
183 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
184 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
185 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
186 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
187 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
188 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
189 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
190 |
-
</sequence>
|
191 |
-
</complexType>
|
192 |
-
</element>
|
193 |
-
<element name="doDebitResponse">
|
194 |
-
<complexType>
|
195 |
-
<sequence>
|
196 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
197 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
198 |
-
<element name="card" type="tns1:cardOut"/>
|
199 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
200 |
-
</sequence>
|
201 |
-
</complexType>
|
202 |
-
</element>
|
203 |
-
<element name="doRefundRequest">
|
204 |
-
<complexType>
|
205 |
-
<annotation>
|
206 |
-
<documentation>
|
207 |
-
This element is the request for the doRefund
|
208 |
-
method
|
209 |
-
</documentation>
|
210 |
-
</annotation>
|
211 |
-
<sequence>
|
212 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
213 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
214 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
215 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
216 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
217 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
218 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
219 |
-
</sequence>
|
220 |
-
</complexType>
|
221 |
-
</element>
|
222 |
-
<element name="doRefundResponse">
|
223 |
-
<complexType>
|
224 |
-
<annotation>
|
225 |
-
<documentation>
|
226 |
-
This element is the reponse from the
|
227 |
-
doRefund method
|
228 |
-
</documentation>
|
229 |
-
</annotation>
|
230 |
-
<sequence>
|
231 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
232 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
233 |
-
</sequence>
|
234 |
-
</complexType>
|
235 |
-
</element>
|
236 |
-
<element name="doResetRequest">
|
237 |
-
<complexType>
|
238 |
-
<annotation>
|
239 |
-
<documentation>
|
240 |
-
This element is the request for the doReset
|
241 |
-
method
|
242 |
-
</documentation>
|
243 |
-
</annotation>
|
244 |
-
<sequence>
|
245 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
246 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
247 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
248 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
249 |
-
</sequence>
|
250 |
-
</complexType>
|
251 |
-
</element>
|
252 |
-
<element name="doResetResponse">
|
253 |
-
<complexType>
|
254 |
-
<annotation>
|
255 |
-
<documentation>
|
256 |
-
This element is the reponse from the doReset
|
257 |
-
method
|
258 |
-
</documentation>
|
259 |
-
</annotation>
|
260 |
-
<sequence>
|
261 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
262 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
263 |
-
</sequence>
|
264 |
-
</complexType>
|
265 |
-
</element>
|
266 |
-
<element name="doCreditRequest">
|
267 |
-
<complexType>
|
268 |
-
<annotation>
|
269 |
-
<documentation>
|
270 |
-
This element is the request for the doCredit
|
271 |
-
method
|
272 |
-
</documentation>
|
273 |
-
</annotation>
|
274 |
-
<sequence>
|
275 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
276 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
277 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
278 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
279 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
280 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
281 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
282 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
283 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
284 |
-
</sequence>
|
285 |
-
</complexType>
|
286 |
-
</element>
|
287 |
-
<element name="doCreditResponse">
|
288 |
-
<complexType>
|
289 |
-
<annotation>
|
290 |
-
<documentation>
|
291 |
-
This element is the reponse from the
|
292 |
-
doCredit method
|
293 |
-
</documentation>
|
294 |
-
</annotation>
|
295 |
-
<sequence>
|
296 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
297 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
298 |
-
<element name="card" type="tns1:cardOut"/>
|
299 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
300 |
-
</sequence>
|
301 |
-
</complexType>
|
302 |
-
</element>
|
303 |
-
<element name="createWalletRequest">
|
304 |
-
<complexType>
|
305 |
-
<annotation>
|
306 |
-
<documentation>
|
307 |
-
This element is the request for the
|
308 |
-
createWallet
|
309 |
-
method
|
310 |
-
</documentation>
|
311 |
-
</annotation>
|
312 |
-
<sequence>
|
313 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
314 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
315 |
-
<element name="wallet" nillable="false" type="tns1:wallet"/>
|
316 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
317 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
318 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
319 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
320 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
321 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
322 |
-
</sequence>
|
323 |
-
</complexType>
|
324 |
-
</element>
|
325 |
-
<element name="createWalletResponse">
|
326 |
-
<complexType>
|
327 |
-
<annotation>
|
328 |
-
<documentation>
|
329 |
-
This element is the reponse from the
|
330 |
-
createWallet
|
331 |
-
method
|
332 |
-
</documentation>
|
333 |
-
</annotation>
|
334 |
-
<sequence>
|
335 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
336 |
-
<element name="card" type="tns1:cardOut"/>
|
337 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
338 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
339 |
-
<element name="fraudResultDetails" nillable="true" type="tns1:fraudResultDetails"/>
|
340 |
-
</sequence>
|
341 |
-
</complexType>
|
342 |
-
</element>
|
343 |
-
<element name="updateWalletRequest">
|
344 |
-
<complexType>
|
345 |
-
<annotation>
|
346 |
-
<documentation>
|
347 |
-
This element is the request for the
|
348 |
-
updateWallet
|
349 |
-
method
|
350 |
-
</documentation>
|
351 |
-
</annotation>
|
352 |
-
<sequence>
|
353 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
354 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
355 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
356 |
-
<element name="wallet" nillable="false" type="tns1:wallet"/>
|
357 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
358 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
359 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
360 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
361 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
362 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
363 |
-
</sequence>
|
364 |
-
</complexType>
|
365 |
-
</element>
|
366 |
-
<element name="updateWalletResponse">
|
367 |
-
<complexType>
|
368 |
-
<annotation>
|
369 |
-
<documentation>
|
370 |
-
This element is the reponse from the
|
371 |
-
updateWallet
|
372 |
-
method
|
373 |
-
</documentation>
|
374 |
-
</annotation>
|
375 |
-
<sequence>
|
376 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
377 |
-
<element name="card" type="tns1:cardOut"/>
|
378 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
379 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
380 |
-
</sequence>
|
381 |
-
</complexType>
|
382 |
-
</element>
|
383 |
-
<element name="getWalletRequest">
|
384 |
-
<complexType>
|
385 |
-
<annotation>
|
386 |
-
<documentation>
|
387 |
-
This element is the request for the
|
388 |
-
getWallet method
|
389 |
-
</documentation>
|
390 |
-
</annotation>
|
391 |
-
<sequence>
|
392 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
393 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
394 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
395 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
396 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
397 |
-
</sequence>
|
398 |
-
</complexType>
|
399 |
-
</element>
|
400 |
-
<element name="getWalletResponse">
|
401 |
-
<complexType>
|
402 |
-
<annotation>
|
403 |
-
<documentation>
|
404 |
-
This element is the reponse from the
|
405 |
-
getWallet
|
406 |
-
method
|
407 |
-
</documentation>
|
408 |
-
</annotation>
|
409 |
-
<sequence>
|
410 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
411 |
-
<element name="wallet" nillable="true" type="tns1:wallet"/>
|
412 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
413 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
414 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
415 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
416 |
-
<element name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
417 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
418 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
419 |
-
</sequence>
|
420 |
-
</complexType>
|
421 |
-
</element>
|
422 |
-
<element name="getCardsRequest">
|
423 |
-
<complexType>
|
424 |
-
<annotation>
|
425 |
-
<documentation>
|
426 |
-
This element is the request for the
|
427 |
-
getCards method
|
428 |
-
</documentation>
|
429 |
-
</annotation>
|
430 |
-
<sequence>
|
431 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
432 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
433 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
434 |
-
</sequence>
|
435 |
-
</complexType>
|
436 |
-
</element>
|
437 |
-
<element name="getCardsResponse">
|
438 |
-
<complexType>
|
439 |
-
<annotation>
|
440 |
-
<documentation>
|
441 |
-
This element is the reponse from the
|
442 |
-
getCards method
|
443 |
-
</documentation>
|
444 |
-
</annotation>
|
445 |
-
<sequence>
|
446 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
447 |
-
<element name="cardsList" nillable="true" type="tns1:cardsList"/>
|
448 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
449 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
450 |
-
</sequence>
|
451 |
-
</complexType>
|
452 |
-
</element>
|
453 |
-
<element name="disableWalletRequest">
|
454 |
-
<complexType>
|
455 |
-
<annotation>
|
456 |
-
<documentation>
|
457 |
-
This element is the request for the
|
458 |
-
disableWallet
|
459 |
-
method
|
460 |
-
</documentation>
|
461 |
-
</annotation>
|
462 |
-
<sequence>
|
463 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
464 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
465 |
-
<element name="walletIdList" nillable="false" type="tns1:walletIdList"/>
|
466 |
-
</sequence>
|
467 |
-
</complexType>
|
468 |
-
</element>
|
469 |
-
<element name="disableWalletResponse">
|
470 |
-
<complexType>
|
471 |
-
<annotation>
|
472 |
-
<documentation>
|
473 |
-
This element is the reponse from the
|
474 |
-
disableWallet
|
475 |
-
method
|
476 |
-
</documentation>
|
477 |
-
</annotation>
|
478 |
-
<sequence>
|
479 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
480 |
-
<element name="walletIdList" nillable="false" type="tns1:walletIdList"/>
|
481 |
-
</sequence>
|
482 |
-
</complexType>
|
483 |
-
</element>
|
484 |
-
<element name="enableWalletRequest">
|
485 |
-
<complexType>
|
486 |
-
<annotation>
|
487 |
-
<documentation>
|
488 |
-
This element is the request for the
|
489 |
-
enableWallet
|
490 |
-
method
|
491 |
-
</documentation>
|
492 |
-
</annotation>
|
493 |
-
<sequence>
|
494 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
495 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
496 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
497 |
-
</sequence>
|
498 |
-
</complexType>
|
499 |
-
</element>
|
500 |
-
<element name="enableWalletResponse">
|
501 |
-
<complexType>
|
502 |
-
<annotation>
|
503 |
-
<documentation>
|
504 |
-
This element is the reponse from the
|
505 |
-
enableWallet
|
506 |
-
method
|
507 |
-
</documentation>
|
508 |
-
</annotation>
|
509 |
-
<sequence>
|
510 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
511 |
-
</sequence>
|
512 |
-
</complexType>
|
513 |
-
</element>
|
514 |
-
<element name="doImmediateWalletPaymentRequest">
|
515 |
-
<complexType>
|
516 |
-
<annotation>
|
517 |
-
<documentation>
|
518 |
-
This element is the request for the
|
519 |
-
doImmediateWalletPayment method
|
520 |
-
</documentation>
|
521 |
-
</annotation>
|
522 |
-
<sequence>
|
523 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
524 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
525 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
526 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
527 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
528 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
529 |
-
<element name="cvx" nillable="true" type="xsd:string"/>
|
530 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
531 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
532 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
533 |
-
</sequence>
|
534 |
-
</complexType>
|
535 |
-
</element>
|
536 |
-
<element name="doImmediateWalletPaymentResponse">
|
537 |
-
<complexType>
|
538 |
-
<annotation>
|
539 |
-
<documentation>
|
540 |
-
This element is the reponse from the
|
541 |
-
doImmediateWalletPayment method
|
542 |
-
</documentation>
|
543 |
-
</annotation>
|
544 |
-
<sequence>
|
545 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
546 |
-
<element name="transaction" nillable="true" type="tns1:transaction"/>
|
547 |
-
<element name="authorization" nillable="true" type="tns1:authorization"/>
|
548 |
-
</sequence>
|
549 |
-
</complexType>
|
550 |
-
</element>
|
551 |
-
<element name="doScheduledWalletPaymentRequest">
|
552 |
-
<complexType>
|
553 |
-
<annotation>
|
554 |
-
<documentation>
|
555 |
-
This element is the request for the
|
556 |
-
doScheduledWalletPayment method
|
557 |
-
</documentation>
|
558 |
-
</annotation>
|
559 |
-
<sequence>
|
560 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
561 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
562 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
563 |
-
<element name="orderDate" nillable="true" type="xsd:string"/>
|
564 |
-
<element name="scheduledDate" nillable="false" type="xsd:string"/>
|
565 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
566 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
567 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
568 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
569 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
570 |
-
</sequence>
|
571 |
-
</complexType>
|
572 |
-
</element>
|
573 |
-
<element name="doScheduledWalletPaymentResponse">
|
574 |
-
<complexType>
|
575 |
-
<annotation>
|
576 |
-
<documentation>
|
577 |
-
This element is the reponse from the
|
578 |
-
doScheduledWalletPayment method
|
579 |
-
</documentation>
|
580 |
-
</annotation>
|
581 |
-
<sequence>
|
582 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
583 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
584 |
-
</sequence>
|
585 |
-
</complexType>
|
586 |
-
</element>
|
587 |
-
<element name="doRecurrentWalletPaymentRequest">
|
588 |
-
<complexType>
|
589 |
-
<annotation>
|
590 |
-
<documentation>
|
591 |
-
This element is the request for the
|
592 |
-
doRecurrentWalletPayment method
|
593 |
-
</documentation>
|
594 |
-
</annotation>
|
595 |
-
<sequence>
|
596 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
597 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
598 |
-
<element name="orderRef" nillable="false" type="xsd:string"/>
|
599 |
-
<element name="orderDate" nillable="false" type="xsd:string"/>
|
600 |
-
<element name="scheduledDate" nillable="false" type="xsd:string"/>
|
601 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
602 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
603 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
604 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
605 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
606 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
607 |
-
</sequence>
|
608 |
-
</complexType>
|
609 |
-
</element>
|
610 |
-
<element name="doRecurrentWalletPaymentResponse">
|
611 |
-
<complexType>
|
612 |
-
<annotation>
|
613 |
-
<documentation>
|
614 |
-
This element is the reponse from the
|
615 |
-
doRecurrentWalletPayment method
|
616 |
-
</documentation>
|
617 |
-
</annotation>
|
618 |
-
<sequence>
|
619 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
620 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
621 |
-
<element name="billingRecordList" nillable="false" type="tns1:billingRecordList"/>
|
622 |
-
</sequence>
|
623 |
-
</complexType>
|
624 |
-
</element>
|
625 |
-
<element name="getPaymentRecordRequest">
|
626 |
-
<complexType>
|
627 |
-
<annotation>
|
628 |
-
<documentation>
|
629 |
-
This element is the request for the
|
630 |
-
getPaymentRecord method
|
631 |
-
</documentation>
|
632 |
-
</annotation>
|
633 |
-
<sequence>
|
634 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
635 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
636 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
637 |
-
</sequence>
|
638 |
-
</complexType>
|
639 |
-
</element>
|
640 |
-
<element name="getPaymentRecordResponse">
|
641 |
-
<complexType>
|
642 |
-
<annotation>
|
643 |
-
<documentation>
|
644 |
-
This element is the reponse from the
|
645 |
-
getPaymentRecord method
|
646 |
-
</documentation>
|
647 |
-
</annotation>
|
648 |
-
<sequence>
|
649 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
650 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
651 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
652 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
653 |
-
<element name="billingRecordList" nillable="false" type="tns1:billingRecordList"/>
|
654 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
655 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
656 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
657 |
-
</sequence>
|
658 |
-
</complexType>
|
659 |
-
</element>
|
660 |
-
<element name="disablePaymentRecordRequest">
|
661 |
-
<complexType>
|
662 |
-
<annotation>
|
663 |
-
<documentation>
|
664 |
-
This element is the request for the
|
665 |
-
disablePaymentRecord method
|
666 |
-
</documentation>
|
667 |
-
</annotation>
|
668 |
-
<sequence>
|
669 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
670 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
671 |
-
</sequence>
|
672 |
-
</complexType>
|
673 |
-
</element>
|
674 |
-
<element name="disablePaymentRecordResponse">
|
675 |
-
<complexType>
|
676 |
-
<annotation>
|
677 |
-
<documentation>
|
678 |
-
This element is the reponse from the
|
679 |
-
disablePaymentRecord method
|
680 |
-
</documentation>
|
681 |
-
</annotation>
|
682 |
-
<sequence>
|
683 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
684 |
-
</sequence>
|
685 |
-
</complexType>
|
686 |
-
</element>
|
687 |
-
<element name="manageWebWalletRequest">
|
688 |
-
<complexType>
|
689 |
-
<annotation>
|
690 |
-
<documentation>
|
691 |
-
This element is the request for the
|
692 |
-
manageWebWallet
|
693 |
-
method
|
694 |
-
</documentation>
|
695 |
-
</annotation>
|
696 |
-
<sequence>
|
697 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
698 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
699 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
700 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
701 |
-
<element name="buyer" nillable="false" type="tns1:buyer"/>
|
702 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
703 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
704 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
705 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
706 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
707 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
708 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
709 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
710 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
711 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
712 |
-
</sequence>
|
713 |
-
</complexType>
|
714 |
-
</element>
|
715 |
-
<element name="manageWebWalletResponse">
|
716 |
-
<complexType>
|
717 |
-
<annotation>
|
718 |
-
<documentation>
|
719 |
-
This element is the reponse from the
|
720 |
-
manageWebWallet method
|
721 |
-
</documentation>
|
722 |
-
</annotation>
|
723 |
-
<sequence>
|
724 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
725 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
726 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
727 |
-
</sequence>
|
728 |
-
</complexType>
|
729 |
-
</element>
|
730 |
-
<element name="createWebWalletRequest">
|
731 |
-
<complexType>
|
732 |
-
<annotation>
|
733 |
-
<documentation>
|
734 |
-
This element is the request for the
|
735 |
-
createWebWallet
|
736 |
-
method
|
737 |
-
</documentation>
|
738 |
-
</annotation>
|
739 |
-
<sequence>
|
740 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
741 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
742 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
743 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
744 |
-
<element name="buyer" nillable="false" type="tns1:buyer"/>
|
745 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
746 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
747 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
748 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
749 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
750 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
751 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
752 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
753 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
754 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
755 |
-
</sequence>
|
756 |
-
</complexType>
|
757 |
-
</element>
|
758 |
-
<element name="createWebWalletResponse">
|
759 |
-
<complexType>
|
760 |
-
<annotation>
|
761 |
-
<documentation>
|
762 |
-
This element is the reponse from the
|
763 |
-
createWebWallet method
|
764 |
-
</documentation>
|
765 |
-
</annotation>
|
766 |
-
<sequence>
|
767 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
768 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
769 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
770 |
-
</sequence>
|
771 |
-
</complexType>
|
772 |
-
</element>
|
773 |
-
<element name="updateWebWalletRequest">
|
774 |
-
<complexType>
|
775 |
-
<annotation>
|
776 |
-
<documentation>
|
777 |
-
This element is the request for the
|
778 |
-
updateWebWallet
|
779 |
-
method
|
780 |
-
</documentation>
|
781 |
-
</annotation>
|
782 |
-
<sequence>
|
783 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
784 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
785 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
786 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
787 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
788 |
-
<element name="updateOwnerDetails" nillable="true" type="xsd:string"/>
|
789 |
-
<element name="updatePaymentDetails" nillable="true" type="xsd:string"/>
|
790 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
791 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
792 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
793 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
794 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
795 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
796 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
797 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
798 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
799 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
800 |
-
</sequence>
|
801 |
-
</complexType>
|
802 |
-
</element>
|
803 |
-
<element name="updateWebWalletResponse">
|
804 |
-
<complexType>
|
805 |
-
<annotation>
|
806 |
-
<documentation>
|
807 |
-
This element is the reponse from the
|
808 |
-
updateWebWallet method
|
809 |
-
</documentation>
|
810 |
-
</annotation>
|
811 |
-
<sequence>
|
812 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
813 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
814 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
815 |
-
</sequence>
|
816 |
-
</complexType>
|
817 |
-
</element>
|
818 |
-
<element name="getWebWalletRequest">
|
819 |
-
<complexType>
|
820 |
-
<annotation>
|
821 |
-
<documentation>
|
822 |
-
This element is the request for the
|
823 |
-
getWebWallet
|
824 |
-
method
|
825 |
-
</documentation>
|
826 |
-
</annotation>
|
827 |
-
<sequence>
|
828 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
829 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
830 |
-
</sequence>
|
831 |
-
</complexType>
|
832 |
-
</element>
|
833 |
-
<element name="getWebWalletResponse">
|
834 |
-
<complexType>
|
835 |
-
<annotation>
|
836 |
-
<documentation>
|
837 |
-
This element is the reponse from the
|
838 |
-
getWebWallet
|
839 |
-
method
|
840 |
-
</documentation>
|
841 |
-
</annotation>
|
842 |
-
<sequence>
|
843 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
844 |
-
<element name="wallet" nillable="true" type="tns1:wallet"/>
|
845 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
846 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
847 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
848 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
849 |
-
<element name="numberOfAttempt" nillable="true" type="xsd:string"/>
|
850 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
851 |
-
</sequence>
|
852 |
-
</complexType>
|
853 |
-
</element>
|
854 |
-
<element name="getTransactionDetailsRequest">
|
855 |
-
<complexType>
|
856 |
-
<annotation>
|
857 |
-
<documentation>
|
858 |
-
This element is the request for the
|
859 |
-
getTransactionDetails method
|
860 |
-
</documentation>
|
861 |
-
</annotation>
|
862 |
-
<sequence>
|
863 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
864 |
-
<element name="transactionId" nillable="true" type="xsd:string"/>
|
865 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
866 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
867 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
868 |
-
<element name="transactionHistory" nillable="true" type="xsd:string"/>
|
869 |
-
<element name="archiveSearch" nillable="true" type="xsd:string"/>
|
870 |
-
</sequence>
|
871 |
-
</complexType>
|
872 |
-
</element>
|
873 |
-
<element name="getTransactionDetailsResponse">
|
874 |
-
<complexType>
|
875 |
-
<annotation>
|
876 |
-
<documentation>
|
877 |
-
This element is the response for the
|
878 |
-
getTransactionDetails method
|
879 |
-
</documentation>
|
880 |
-
</annotation>
|
881 |
-
<sequence>
|
882 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
883 |
-
<element name="transaction" nillable="true" type="tns1:transaction"/>
|
884 |
-
<element name="payment" nillable="true" type="tns1:payment"/>
|
885 |
-
<element name="authorization" nillable="true" type="tns1:authorization"/>
|
886 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
887 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
888 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
889 |
-
<element name="card" type="tns1:cardOut"/>
|
890 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
891 |
-
<element name="associatedTransactionsList" nillable="true" type="tns1:associatedTransactionsList"/>
|
892 |
-
<element name="statusHistoryList" nillable="true" type="tns1:statusHistoryList"/>
|
893 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
894 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
895 |
-
<element minOccurs="0" name="paymentAdditionalList" nillable="true" type="tns1:paymentAdditionalList"/>
|
896 |
-
<element name="bankAccountData" nillable="true" type="tns1:bankAccountData"/>
|
897 |
-
</sequence>
|
898 |
-
</complexType>
|
899 |
-
</element>
|
900 |
-
<element name="transactionsSearchRequest">
|
901 |
-
<complexType>
|
902 |
-
<annotation>
|
903 |
-
<documentation>
|
904 |
-
This element is the request for the
|
905 |
-
transactionsSearch method
|
906 |
-
</documentation>
|
907 |
-
</annotation>
|
908 |
-
<sequence>
|
909 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
910 |
-
<element name="transactionId" nillable="true" type="xsd:string"/>
|
911 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
912 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
913 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
914 |
-
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
915 |
-
<element name="authorizationNumber" nillable="true" type="xsd:string"/>
|
916 |
-
<element name="returnCode" nillable="true" type="xsd:string"/>
|
917 |
-
<element name="paymentMean" nillable="true" type="xsd:string"/>
|
918 |
-
<element name="transactionType" nillable="true" type="xsd:string"/>
|
919 |
-
<element name="name" nillable="true" type="xsd:string"/>
|
920 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
921 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
922 |
-
<element name="cardNumber" nillable="true" type="xsd:string"/>
|
923 |
-
<element name="currency" nillable="true" type="xsd:string"/>
|
924 |
-
<element name="minAmount" nillable="true" type="xsd:string"/>
|
925 |
-
<element name="maxAmount" nillable="true" type="xsd:string"/>
|
926 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
927 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
928 |
-
<element name="token" nillable="true" type="xsd:string"/>
|
929 |
-
</sequence>
|
930 |
-
</complexType>
|
931 |
-
</element>
|
932 |
-
<element name="transactionsSearchResponse">
|
933 |
-
<complexType>
|
934 |
-
<annotation>
|
935 |
-
<documentation>
|
936 |
-
This element is the response for the
|
937 |
-
transactionsSearch method
|
938 |
-
</documentation>
|
939 |
-
</annotation>
|
940 |
-
<sequence>
|
941 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
942 |
-
<element name="transactionList" nillable="true" type="tns1:transactionList"/>
|
943 |
-
</sequence>
|
944 |
-
</complexType>
|
945 |
-
</element>
|
946 |
-
<element name="verifyEnrollmentRequest">
|
947 |
-
<complexType>
|
948 |
-
<annotation>
|
949 |
-
<documentation>
|
950 |
-
This element is the request for the
|
951 |
-
verifyEnrollment method
|
952 |
-
</documentation>
|
953 |
-
</annotation>
|
954 |
-
<sequence>
|
955 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
956 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
957 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
958 |
-
<element name="orderRef" nillable="false" type="xsd:string"/>
|
959 |
-
<element name="mdFieldValue" nillable="true" type="xsd:string"/>
|
960 |
-
<element name="userAgent" nillable="true" type="xsd:string"/>
|
961 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
962 |
-
<element name="walletCardInd" nillable="true" type="xsd:string"/>
|
963 |
-
</sequence>
|
964 |
-
</complexType>
|
965 |
-
</element>
|
966 |
-
<element name="verifyEnrollmentResponse">
|
967 |
-
<complexType>
|
968 |
-
<annotation>
|
969 |
-
<documentation>
|
970 |
-
This element is the reponse from the
|
971 |
-
verifyEnrollment method
|
972 |
-
</documentation>
|
973 |
-
</annotation>
|
974 |
-
<sequence>
|
975 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
976 |
-
<element name="actionUrl" nillable="true" type="xsd:string"/>
|
977 |
-
<element name="actionMethod" nillable="true" type="xsd:string"/>
|
978 |
-
<element name="pareqFieldName" nillable="true" type="xsd:string"/>
|
979 |
-
<element name="pareqFieldValue" nillable="true" type="xsd:string"/>
|
980 |
-
<element name="termUrlName" nillable="true" type="xsd:string"/>
|
981 |
-
<element name="termUrlValue" nillable="true" type="xsd:string"/>
|
982 |
-
<element name="mdFieldName" nillable="true" type="xsd:string"/>
|
983 |
-
<element name="mdFieldValue" nillable="true" type="xsd:string"/>
|
984 |
-
<element name="mpiResult" nillable="true" type="xsd:string"/>
|
985 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
986 |
-
</sequence>
|
987 |
-
</complexType>
|
988 |
-
</element>
|
989 |
-
<element name="verifyAuthenticationRequest">
|
990 |
-
<complexType>
|
991 |
-
<annotation>
|
992 |
-
<documentation>
|
993 |
-
This element is the request for the
|
994 |
-
doAuthentication method
|
995 |
-
</documentation>
|
996 |
-
</annotation>
|
997 |
-
<sequence>
|
998 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
999 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1000 |
-
<element name="pares" nillable="false" type="xsd:string"/>
|
1001 |
-
<element name="md" nillable="true" type="xsd:string"/>
|
1002 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1003 |
-
</sequence>
|
1004 |
-
</complexType>
|
1005 |
-
</element>
|
1006 |
-
<element name="verifyAuthenticationResponse">
|
1007 |
-
<complexType>
|
1008 |
-
<annotation>
|
1009 |
-
<documentation>
|
1010 |
-
This element is the reponse from the
|
1011 |
-
doAuthentication method
|
1012 |
-
</documentation>
|
1013 |
-
</annotation>
|
1014 |
-
<sequence>
|
1015 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1016 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
1017 |
-
<element name="mpiResult" nillable="true" type="xsd:string"/>
|
1018 |
-
</sequence>
|
1019 |
-
</complexType>
|
1020 |
-
</element>
|
1021 |
-
<element name="createMerchantRequest">
|
1022 |
-
<complexType>
|
1023 |
-
<annotation>
|
1024 |
-
<documentation>
|
1025 |
-
This element is the request for the
|
1026 |
-
createMerchant
|
1027 |
-
method
|
1028 |
-
</documentation>
|
1029 |
-
</annotation>
|
1030 |
-
<sequence>
|
1031 |
-
<element name="corporateName" nillable="true" type="xsd:string"/>
|
1032 |
-
<element name="publicName" nillable="true" type="xsd:string"/>
|
1033 |
-
<element name="currency">
|
1034 |
-
<annotation>
|
1035 |
-
<documentation>currency in ISO 4217 numeric format
|
1036 |
-
</documentation>
|
1037 |
-
</annotation>
|
1038 |
-
<simpleType>
|
1039 |
-
<restriction base="xsd:string">
|
1040 |
-
<length value="3"/>
|
1041 |
-
</restriction>
|
1042 |
-
</simpleType>
|
1043 |
-
</element>
|
1044 |
-
<element name="nationalID" nillable="true">
|
1045 |
-
<annotation>
|
1046 |
-
<documentation>unique national merchant ID</documentation>
|
1047 |
-
</annotation>
|
1048 |
-
<complexType>
|
1049 |
-
<choice>
|
1050 |
-
<element name="SIRET">
|
1051 |
-
<annotation>
|
1052 |
-
<documentation>Systeme d identification du Repertoire des
|
1053 |
-
ENtreprises
|
1054 |
-
</documentation>
|
1055 |
-
</annotation>
|
1056 |
-
<simpleType>
|
1057 |
-
<restriction base="xsd:string">
|
1058 |
-
<length value="14"/>
|
1059 |
-
</restriction>
|
1060 |
-
</simpleType>
|
1061 |
-
</element>
|
1062 |
-
<element name="other" type="xsd:string">
|
1063 |
-
<annotation>
|
1064 |
-
<documentation>to use if country is not France
|
1065 |
-
</documentation>
|
1066 |
-
</annotation>
|
1067 |
-
</element>
|
1068 |
-
</choice>
|
1069 |
-
</complexType>
|
1070 |
-
</element>
|
1071 |
-
<element name="distributor" nillable="true" type="xsd:string">
|
1072 |
-
<annotation>
|
1073 |
-
<documentation>Payline Distributor ID</documentation>
|
1074 |
-
</annotation>
|
1075 |
-
</element>
|
1076 |
-
<element name="merchantAddress" nillable="true" type="tns1:addressInterlocutor"/>
|
1077 |
-
<element name="businessInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
1078 |
-
<element name="technicalInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
1079 |
-
<element name="subscription" nillable="true" type="tns1:subscription"/>
|
1080 |
-
<element name="poss" nillable="true">
|
1081 |
-
<annotation>
|
1082 |
-
<documentation>list of point of sell</documentation>
|
1083 |
-
</annotation>
|
1084 |
-
<complexType>
|
1085 |
-
<sequence>
|
1086 |
-
<element maxOccurs="unbounded" minOccurs="0" name="pos" nillable="true" type="tns1:pointOfSell"/>
|
1087 |
-
</sequence>
|
1088 |
-
</complexType>
|
1089 |
-
</element>
|
1090 |
-
<element name="partner" nillable="true" type="xsd:string">
|
1091 |
-
<annotation>
|
1092 |
-
<documentation>Billing partner. 1:monext, 2:cetib, 3:payline.com
|
1093 |
-
</documentation>
|
1094 |
-
</annotation>
|
1095 |
-
</element>
|
1096 |
-
</sequence>
|
1097 |
-
</complexType>
|
1098 |
-
</element>
|
1099 |
-
<element name="createMerchantResponse">
|
1100 |
-
<complexType>
|
1101 |
-
<annotation>
|
1102 |
-
<documentation>
|
1103 |
-
This element is the reponse from the
|
1104 |
-
createMerchant
|
1105 |
-
method
|
1106 |
-
</documentation>
|
1107 |
-
</annotation>
|
1108 |
-
<sequence>
|
1109 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1110 |
-
<element name="connectionData" nillable="false" type="tns1:connectionData"/>
|
1111 |
-
</sequence>
|
1112 |
-
</complexType>
|
1113 |
-
</element>
|
1114 |
-
<element name="doScoringChequeRequest">
|
1115 |
-
<complexType>
|
1116 |
-
<annotation>
|
1117 |
-
<documentation>
|
1118 |
-
This element is the request for the
|
1119 |
-
doScoringCheque
|
1120 |
-
method
|
1121 |
-
</documentation>
|
1122 |
-
</annotation>
|
1123 |
-
<sequence>
|
1124 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1125 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1126 |
-
<element name="cheque" nillable="false" type="tns1:cheque"/>
|
1127 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
1128 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1129 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
1130 |
-
</sequence>
|
1131 |
-
</complexType>
|
1132 |
-
</element>
|
1133 |
-
<element name="doScoringChequeResponse">
|
1134 |
-
<complexType>
|
1135 |
-
<annotation>
|
1136 |
-
<documentation>
|
1137 |
-
This element is the reponse from the
|
1138 |
-
doScoringCheque method
|
1139 |
-
</documentation>
|
1140 |
-
</annotation>
|
1141 |
-
<sequence>
|
1142 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1143 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
1144 |
-
<element name="scoringCheque" nillable="false" type="tns1:scoringCheque"/>
|
1145 |
-
</sequence>
|
1146 |
-
</complexType>
|
1147 |
-
</element>
|
1148 |
-
<element name="getEncryptionKeyRequest">
|
1149 |
-
<complexType>
|
1150 |
-
<annotation>
|
1151 |
-
<documentation>
|
1152 |
-
This element is the request for the
|
1153 |
-
getEncryptionKeyRequest method
|
1154 |
-
</documentation>
|
1155 |
-
</annotation>
|
1156 |
-
</complexType>
|
1157 |
-
</element>
|
1158 |
-
<element name="getEncryptionKeyResponse">
|
1159 |
-
<complexType>
|
1160 |
-
<annotation>
|
1161 |
-
<documentation>
|
1162 |
-
This element is the reponse from the
|
1163 |
-
getEncryptionKeyResponse method
|
1164 |
-
</documentation>
|
1165 |
-
</annotation>
|
1166 |
-
<sequence>
|
1167 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1168 |
-
<element name="key" nillable="false" type="tns1:key"/>
|
1169 |
-
</sequence>
|
1170 |
-
</complexType>
|
1171 |
-
</element>
|
1172 |
-
<element name="doReAuthorizationRequest">
|
1173 |
-
<complexType>
|
1174 |
-
<annotation>
|
1175 |
-
<documentation>
|
1176 |
-
This element is the request for the
|
1177 |
-
doReAuthorization method
|
1178 |
-
</documentation>
|
1179 |
-
</annotation>
|
1180 |
-
<sequence>
|
1181 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1182 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1183 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1184 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1185 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1186 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
1187 |
-
</sequence>
|
1188 |
-
</complexType>
|
1189 |
-
</element>
|
1190 |
-
<element name="doReAuthorizationResponse">
|
1191 |
-
<complexType>
|
1192 |
-
<annotation>
|
1193 |
-
<documentation>
|
1194 |
-
This element is the reponse from the
|
1195 |
-
doReAuthorization method
|
1196 |
-
</documentation>
|
1197 |
-
</annotation>
|
1198 |
-
<sequence>
|
1199 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1200 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
1201 |
-
<element name="card" type="tns1:cardOut"/>
|
1202 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
1203 |
-
</sequence>
|
1204 |
-
</complexType>
|
1205 |
-
</element>
|
1206 |
-
<element name="getMerchantSettingsRequest">
|
1207 |
-
<complexType>
|
1208 |
-
<annotation>
|
1209 |
-
<documentation>
|
1210 |
-
This element is the request for the
|
1211 |
-
getMerchantSettings method
|
1212 |
-
</documentation>
|
1213 |
-
</annotation>
|
1214 |
-
<sequence>
|
1215 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1216 |
-
</sequence>
|
1217 |
-
</complexType>
|
1218 |
-
</element>
|
1219 |
-
<element name="getMerchantSettingsResponse">
|
1220 |
-
<complexType>
|
1221 |
-
<annotation>
|
1222 |
-
<documentation>
|
1223 |
-
This element is the response from the
|
1224 |
-
getMerchantSettings method
|
1225 |
-
</documentation>
|
1226 |
-
</annotation>
|
1227 |
-
<sequence>
|
1228 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1229 |
-
<element name="listPointOfSell" nillable="false">
|
1230 |
-
<complexType>
|
1231 |
-
<sequence>
|
1232 |
-
<element maxOccurs="unbounded" minOccurs="0" name="pointOfSell" type="tns1:pointOfSell"/>
|
1233 |
-
</sequence>
|
1234 |
-
</complexType>
|
1235 |
-
</element>
|
1236 |
-
</sequence>
|
1237 |
-
</complexType>
|
1238 |
-
</element>
|
1239 |
-
<element name="getBalanceRequest">
|
1240 |
-
<complexType>
|
1241 |
-
<annotation>
|
1242 |
-
<documentation>
|
1243 |
-
This element is the request for the
|
1244 |
-
getBalance
|
1245 |
-
method
|
1246 |
-
</documentation>
|
1247 |
-
</annotation>
|
1248 |
-
<sequence>
|
1249 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1250 |
-
<element name="cardID" nillable="false" type="xsd:string"/>
|
1251 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1252 |
-
</sequence>
|
1253 |
-
</complexType>
|
1254 |
-
</element>
|
1255 |
-
<element name="getBalanceResponse">
|
1256 |
-
<complexType>
|
1257 |
-
<annotation>
|
1258 |
-
<documentation>
|
1259 |
-
This element is the reponse from the
|
1260 |
-
getBalance
|
1261 |
-
method
|
1262 |
-
</documentation>
|
1263 |
-
</annotation>
|
1264 |
-
<sequence>
|
1265 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1266 |
-
<element name="balance" nillable="false">
|
1267 |
-
<complexType>
|
1268 |
-
<sequence>
|
1269 |
-
<element maxOccurs="1" minOccurs="0" name="amount" type="xsd:string"/>
|
1270 |
-
<element maxOccurs="1" minOccurs="0" name="currency" type="xsd:string"/>
|
1271 |
-
</sequence>
|
1272 |
-
</complexType>
|
1273 |
-
</element>
|
1274 |
-
<element name="crdproduct" nillable="false" type="xsd:string"/>
|
1275 |
-
<element name="crdprogram" nillable="false" type="xsd:string"/>
|
1276 |
-
<element name="crddesign" nillable="false" type="xsd:string"/>
|
1277 |
-
</sequence>
|
1278 |
-
</complexType>
|
1279 |
-
</element>
|
1280 |
-
<element name="getAlertDetailsRequest">
|
1281 |
-
<complexType>
|
1282 |
-
<sequence>
|
1283 |
-
<element maxOccurs="1" minOccurs="1" name="AlertId" nillable="false" type="xsd:string">
|
1284 |
-
</element>
|
1285 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionId" nillable="false" type="xsd:string">
|
1286 |
-
</element>
|
1287 |
-
</sequence>
|
1288 |
-
</complexType>
|
1289 |
-
</element>
|
1290 |
-
<element name="getAlertDetailsResponse">
|
1291 |
-
<complexType>
|
1292 |
-
<sequence>
|
1293 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1294 |
-
<element maxOccurs="1" minOccurs="1" name="AlertId" nillable="false" type="xsd:string">
|
1295 |
-
</element>
|
1296 |
-
<element maxOccurs="1" minOccurs="0" name="ExplanationCode" nillable="true" type="xsd:string">
|
1297 |
-
</element>
|
1298 |
-
<element maxOccurs="1" minOccurs="0" name="ExplanationLabel" nillable="true" type="xsd:string">
|
1299 |
-
</element>
|
1300 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionStatus" nillable="false" type="xsd:string">
|
1301 |
-
</element>
|
1302 |
-
<element maxOccurs="1" minOccurs="1" name="MerchantLabel" nillable="false" type="xsd:string">
|
1303 |
-
</element>
|
1304 |
-
<element maxOccurs="1" minOccurs="1" name="PosLabel" nillable="false" type="xsd:string">
|
1305 |
-
</element>
|
1306 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionId" nillable="false" type="xsd:string">
|
1307 |
-
</element>
|
1308 |
-
<element maxOccurs="1" minOccurs="1" name="SecurityLevel" nillable="false" type="xsd:string">
|
1309 |
-
</element>
|
1310 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionDate" nillable="false" type="xsd:string">
|
1311 |
-
</element>
|
1312 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionAmount" nillable="false" type="xsd:string">
|
1313 |
-
</element>
|
1314 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionCurrency" nillable="false" type="xsd:string">
|
1315 |
-
</element>
|
1316 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentType" nillable="false" type="xsd:string">
|
1317 |
-
</element>
|
1318 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentData" nillable="false" type="xsd:string">
|
1319 |
-
</element>
|
1320 |
-
<element maxOccurs="1" minOccurs="0" name="HolderName" nillable="true" type="xsd:string">
|
1321 |
-
</element>
|
1322 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceData" nillable="false" type="xsd:string">
|
1323 |
-
</element>
|
1324 |
-
<element maxOccurs="1" minOccurs="0" name="CustomerId" nillable="true" type="xsd:string">
|
1325 |
-
</element>
|
1326 |
-
<element maxOccurs="1" minOccurs="0" name="BuyerFirstName" nillable="true" type="xsd:string">
|
1327 |
-
</element>
|
1328 |
-
<element maxOccurs="1" minOccurs="0" name="BuyerLastName" nillable="true" type="xsd:string">
|
1329 |
-
</element>
|
1330 |
-
<element maxOccurs="1" minOccurs="1" name="CustomerTransHist" nillable="false" type="tns1:CustomerTransHist">
|
1331 |
-
</element>
|
1332 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentMeansTransHist" nillable="false" type="tns1:PaymentMeansTransHist">
|
1333 |
-
</element>
|
1334 |
-
<element maxOccurs="1" minOccurs="1" name="AlertsTransHist" nillable="false" type="tns1:AlertsTransHist">
|
1335 |
-
</element>
|
1336 |
-
</sequence>
|
1337 |
-
</complexType>
|
1338 |
-
</element>
|
1339 |
-
<element name="getTokenRequest">
|
1340 |
-
<complexType>
|
1341 |
-
<sequence>
|
1342 |
-
<element name="cardNumber" nillable="false" type="xsd:string"/>
|
1343 |
-
<element name="expirationDate" nillable="true" type="xsd:string"/>
|
1344 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1345 |
-
</sequence>
|
1346 |
-
</complexType>
|
1347 |
-
</element>
|
1348 |
-
<element name="getTokenResponse">
|
1349 |
-
<complexType>
|
1350 |
-
<sequence>
|
1351 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1352 |
-
<element maxOccurs="1" minOccurs="1" name="token" nillable="false" type="xsd:string"/>
|
1353 |
-
<element maxOccurs="1" minOccurs="1" name="maskedCardNumber" nillable="false" type="xsd:string"/>
|
1354 |
-
<element maxOccurs="1" minOccurs="1" name="expirationDate" nillable="false" type="xsd:string"/>
|
1355 |
-
<element maxOccurs="1" minOccurs="1" name="virtualCard" nillable="false" type="xsd:string"/>
|
1356 |
-
<element maxOccurs="1" minOccurs="1" name="cardType" nillable="false" type="xsd:string"/>
|
1357 |
-
<element maxOccurs="1" minOccurs="1" name="cardProduct" nillable="false" type="xsd:string"/>
|
1358 |
-
<element maxOccurs="1" minOccurs="1" name="acceptanceNetwork" nillable="false" type="xsd:string"/>
|
1359 |
-
<element maxOccurs="1" minOccurs="1" name="bank" nillable="false" type="xsd:string"/>
|
1360 |
-
</sequence>
|
1361 |
-
</complexType>
|
1362 |
-
</element>
|
1363 |
-
<element name="unBlockRequest">
|
1364 |
-
<complexType>
|
1365 |
-
<sequence>
|
1366 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1367 |
-
<element name="transactionDate" nillable="true" type="xsd:string"/>
|
1368 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1369 |
-
</sequence>
|
1370 |
-
</complexType>
|
1371 |
-
</element>
|
1372 |
-
<element name="unBlockResponse">
|
1373 |
-
<complexType>
|
1374 |
-
<sequence>
|
1375 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1376 |
-
</sequence>
|
1377 |
-
</complexType>
|
1378 |
-
</element>
|
1379 |
-
|
1380 |
-
<element name="updatePaymentRecordRequest">
|
1381 |
-
<complexType>
|
1382 |
-
<sequence>
|
1383 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1384 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1385 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1386 |
-
<element name="recurring" nillable="false" type="tns1:recurringForUpdate"/>
|
1387 |
-
</sequence>
|
1388 |
-
</complexType>
|
1389 |
-
</element>
|
1390 |
-
<element name="updatePaymentRecordResponse">
|
1391 |
-
<complexType>
|
1392 |
-
<sequence>
|
1393 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1394 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1395 |
-
<element name="isDisabled" nillable="false" type="xsd:string"/>
|
1396 |
-
<element name="disableDate" nillable="false" type="xsd:string"/>
|
1397 |
-
<element name="privateDataList" nillable="false" type="tns1:privateDataList"/>
|
1398 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
1399 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1400 |
-
</sequence>
|
1401 |
-
</complexType>
|
1402 |
-
</element>
|
1403 |
-
|
1404 |
-
<element name="getBillingRecordRequest">
|
1405 |
-
<complexType>
|
1406 |
-
<sequence>
|
1407 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1408 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1409 |
-
<element name="billingRecordId" nillable="false" type="xsd:string"/>
|
1410 |
-
</sequence>
|
1411 |
-
</complexType>
|
1412 |
-
</element>
|
1413 |
-
<element name="getBillingRecordResponse">
|
1414 |
-
<complexType>
|
1415 |
-
<sequence>
|
1416 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1417 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1418 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1419 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1420 |
-
<element name="billingRecord" nillable="false" type="tns1:billingRecord"/>
|
1421 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1422 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1423 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1424 |
-
</sequence>
|
1425 |
-
</complexType>
|
1426 |
-
</element>
|
1427 |
-
|
1428 |
-
<element name="updateBillingRecordRequest">
|
1429 |
-
<complexType>
|
1430 |
-
<sequence>
|
1431 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1432 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1433 |
-
<element name="billingRecordId" nillable="false" type="xsd:string"/>
|
1434 |
-
<element name="billingRecordForUpdate" nillable="false" type="tns1:billingRecordForUpdate"/>
|
1435 |
-
</sequence>
|
1436 |
-
</complexType>
|
1437 |
-
</element>
|
1438 |
-
|
1439 |
-
<element name="updateBillingRecordResponse">
|
1440 |
-
<complexType>
|
1441 |
-
<sequence>
|
1442 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1443 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1444 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1445 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1446 |
-
<element name="billingRecord" nillable="false" type="tns1:billingRecord"/>
|
1447 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1448 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1449 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1450 |
-
</sequence>
|
1451 |
-
</complexType>
|
1452 |
-
</element>
|
1453 |
-
|
1454 |
-
<element name="doBankTransferRequest">
|
1455 |
-
<complexType>
|
1456 |
-
<annotation>
|
1457 |
-
<documentation>
|
1458 |
-
This element is the request for the doBankTransfer
|
1459 |
-
method
|
1460 |
-
</documentation>
|
1461 |
-
</annotation>
|
1462 |
-
<sequence>
|
1463 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1464 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1465 |
-
<element name="creditor" nillable="false" type="tns1:creditor"/>
|
1466 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
1467 |
-
<element name="transactionID" nillable="true" type="xsd:string"/>
|
1468 |
-
<element name="orderID" nillable="false" type="xsd:string"/>
|
1469 |
-
</sequence>
|
1470 |
-
</complexType>
|
1471 |
-
</element>
|
1472 |
-
<element name="doBankTransferResponse">
|
1473 |
-
<complexType>
|
1474 |
-
<annotation>
|
1475 |
-
<documentation>
|
1476 |
-
This element is the reponse from the
|
1477 |
-
doBankTransfer method
|
1478 |
-
</documentation>
|
1479 |
-
</annotation>
|
1480 |
-
<sequence>
|
1481 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1482 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
1483 |
-
</sequence>
|
1484 |
-
</complexType>
|
1485 |
-
</element>
|
1486 |
-
|
1487 |
-
|
1488 |
-
</schema>
|
1489 |
-
<schema elementFormDefault="qualified" targetNamespace="http://obj.ws.payline.experian.com" xmlns="http://www.w3.org/2001/XMLSchema">
|
1490 |
-
<complexType name="result">
|
1491 |
-
<annotation>
|
1492 |
-
<documentation>
|
1493 |
-
This element contains information about the
|
1494 |
-
process
|
1495 |
-
</documentation>
|
1496 |
-
</annotation>
|
1497 |
-
<sequence>
|
1498 |
-
<element name="code" nillable="false" type="xsd:string"/>
|
1499 |
-
<element minOccurs="0" name="shortMessage" nillable="true" type="xsd:string"/>
|
1500 |
-
<element minOccurs="0" name="longMessage" nillable="true" type="xsd:string"/>
|
1501 |
-
</sequence>
|
1502 |
-
</complexType>
|
1503 |
-
<complexType name="cardOut">
|
1504 |
-
<sequence>
|
1505 |
-
<element minOccurs="0" name="number" nillable="true" type="xsd:string"/>
|
1506 |
-
<element minOccurs="0" name="type" nillable="true" type="xsd:string"/>
|
1507 |
-
<element minOccurs="0" name="expirationDate" nillable="true" type="xsd:string"/>
|
1508 |
-
<element minOccurs="0" name="cardholder" nillable="true" type="xsd:string"/>
|
1509 |
-
<element minOccurs="0" name="token" nillable="true" type="xsd:string"/>
|
1510 |
-
</sequence>
|
1511 |
-
</complexType>
|
1512 |
-
|
1513 |
-
<complexType name="extendedCardType">
|
1514 |
-
<sequence>
|
1515 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1516 |
-
<element minOccurs="0" name="isCvd" nillable="true" type="xsd:string"/>
|
1517 |
-
<element minOccurs="0" name="bank" nillable="true" type="xsd:string"/>
|
1518 |
-
<element minOccurs="0" name="type" nillable="true" type="xsd:string"/>
|
1519 |
-
<element minOccurs="0" name="network" nillable="true" type="xsd:string"/>
|
1520 |
-
<element minOccurs="0" name="product" nillable="true" type="xsd:string"/>
|
1521 |
-
</sequence>
|
1522 |
-
</complexType>
|
1523 |
-
<complexType name="order">
|
1524 |
-
<annotation>
|
1525 |
-
<documentation>
|
1526 |
-
This element contains information about the
|
1527 |
-
order
|
1528 |
-
</documentation>
|
1529 |
-
</annotation>
|
1530 |
-
<sequence>
|
1531 |
-
<element name="ref" nillable="false" type="xsd:string"/>
|
1532 |
-
<element minOccurs="0" name="origin" nillable="true" type="xsd:string"/>
|
1533 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1534 |
-
<element minOccurs="0" name="taxes" nillable="true" type="xsd:string"/>
|
1535 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1536 |
-
<element name="currency" nillable="false" type="xsd:string"/>
|
1537 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1538 |
-
<element minOccurs="0" name="details" nillable="true" type="tns1:details"/>
|
1539 |
-
<element minOccurs="0" name="deliveryTime" nillable="true" type="xsd:string"/>
|
1540 |
-
<element minOccurs="0" name="deliveryMode" nillable="true" type="xsd:string"/>
|
1541 |
-
<element minOccurs="0" name="deliveryExpectedDate" nillable="true" type="xsd:string"/>
|
1542 |
-
<element minOccurs="0" name="deliveryExpectedDelay" nillable="true" type="xsd:string"/>
|
1543 |
-
</sequence>
|
1544 |
-
</complexType>
|
1545 |
-
<complexType name="key">
|
1546 |
-
<annotation>
|
1547 |
-
<documentation>
|
1548 |
-
This element contains information about the
|
1549 |
-
encryptionKey
|
1550 |
-
</documentation>
|
1551 |
-
</annotation>
|
1552 |
-
<sequence>
|
1553 |
-
<element name="keyId" nillable="false" type="xsd:integer"/>
|
1554 |
-
<element name="modulus" nillable="false" type="xsd:string"/>
|
1555 |
-
<element name="publicExponent" nillable="false" type="xsd:string"/>
|
1556 |
-
<element name="expirationDate" nillable="false" type="xsd:string"/>
|
1557 |
-
</sequence>
|
1558 |
-
</complexType>
|
1559 |
-
<complexType name="details">
|
1560 |
-
<annotation>
|
1561 |
-
<documentation>
|
1562 |
-
This element contains an array of orderDetail
|
1563 |
-
</documentation>
|
1564 |
-
</annotation>
|
1565 |
-
<sequence>
|
1566 |
-
<element maxOccurs="100" minOccurs="0" name="details" type="tns1:orderDetail"/>
|
1567 |
-
</sequence>
|
1568 |
-
</complexType>
|
1569 |
-
|
1570 |
-
<complexType name="orderDetail">
|
1571 |
-
<annotation>
|
1572 |
-
<documentation>
|
1573 |
-
This element contains information about the
|
1574 |
-
order
|
1575 |
-
product
|
1576 |
-
</documentation>
|
1577 |
-
</annotation>
|
1578 |
-
<sequence>
|
1579 |
-
<element minOccurs="0" name="ref" nillable="true" type="xsd:string"/>
|
1580 |
-
<element minOccurs="0" name="price" nillable="true" type="xsd:string"/>
|
1581 |
-
<element minOccurs="0" name="quantity" nillable="true" type="xsd:string"/>
|
1582 |
-
<element minOccurs="0" name="comment" nillable="true" type="xsd:string"/>
|
1583 |
-
<element minOccurs="0" name="category" nillable="true" type="xsd:string"/>
|
1584 |
-
<element minOccurs="0" name="brand" nillable="true" type="xsd:string"/>
|
1585 |
-
<element minOccurs="0" name="subcategory1" nillable="true" type="xsd:string"/>
|
1586 |
-
<element minOccurs="0" name="subcategory2" nillable="true" type="xsd:string"/>
|
1587 |
-
<element minOccurs="0" name="additionalData" nillable="true" type="xsd:string"/>
|
1588 |
-
<element minOccurs="0" name="taxRate" nillable="true" type="xsd:string"/>
|
1589 |
-
</sequence>
|
1590 |
-
</complexType>
|
1591 |
-
<complexType name="privateData">
|
1592 |
-
<annotation>
|
1593 |
-
<documentation>
|
1594 |
-
This element contains information about the
|
1595 |
-
merchant
|
1596 |
-
private data
|
1597 |
-
</documentation>
|
1598 |
-
</annotation>
|
1599 |
-
<sequence>
|
1600 |
-
<element name="key" nillable="false" type="xsd:string"/>
|
1601 |
-
<element name="value" nillable="false" type="xsd:string"/>
|
1602 |
-
</sequence>
|
1603 |
-
</complexType>
|
1604 |
-
<complexType name="transaction">
|
1605 |
-
<annotation>
|
1606 |
-
<documentation>
|
1607 |
-
This element contains information about the
|
1608 |
-
transaction
|
1609 |
-
</documentation>
|
1610 |
-
</annotation>
|
1611 |
-
<sequence>
|
1612 |
-
<element name="id" nillable="false" type="xsd:string"/>
|
1613 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1614 |
-
<element minOccurs="0" name="isDuplicated" nillable="true" type="xsd:string"/>
|
1615 |
-
<element name="isPossibleFraud" nillable="true" type="xsd:string"/>
|
1616 |
-
<element minOccurs="0" name="fraudResult" nillable="true" type="xsd:string"/>
|
1617 |
-
<element minOccurs="0" name="fraudResultDetails" nillable="true" type="tns1:fraudResultDetails"/>
|
1618 |
-
<element minOccurs="0" name="explanation" nillable="true" type="xsd:string"/>
|
1619 |
-
<element minOccurs="0" name="threeDSecure" nillable="true" type="xsd:string"/>
|
1620 |
-
<element minOccurs="0" name="score" nillable="true" type="xsd:string"/>
|
1621 |
-
<element minOccurs="0" name="externalWalletType" nillable="true" type="xsd:string"/>
|
1622 |
-
<element minOccurs="0" name="externalWalletContractNumber" nillable="true" type="xsd:string"/>
|
1623 |
-
|
1624 |
-
</sequence>
|
1625 |
-
</complexType>
|
1626 |
-
<complexType name="fraudResultDetails">
|
1627 |
-
<annotation>
|
1628 |
-
<documentation>
|
1629 |
-
This element contains information about the
|
1630 |
-
fraud
|
1631 |
-
result details
|
1632 |
-
</documentation>
|
1633 |
-
</annotation>
|
1634 |
-
<sequence>
|
1635 |
-
<element name="code" nillable="false" type="xsd:string"/>
|
1636 |
-
<element name="shortMessage" nillable="false" type="xsd:string"/>
|
1637 |
-
<element name="longMessage" nillable="false" type="xsd:string"/>
|
1638 |
-
</sequence>
|
1639 |
-
</complexType>
|
1640 |
-
<complexType name="payment">
|
1641 |
-
<annotation>
|
1642 |
-
<documentation>
|
1643 |
-
This element contains information about the
|
1644 |
-
payment
|
1645 |
-
</documentation>
|
1646 |
-
</annotation>
|
1647 |
-
<sequence>
|
1648 |
-
<element name="amount" nillable="true" type="xsd:string"/>
|
1649 |
-
<element name="currency" nillable="false" type="xsd:string"/>
|
1650 |
-
<element name="action" nillable="false" type="xsd:string"/>
|
1651 |
-
<element name="mode" nillable="false" type="xsd:string"/>
|
1652 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1653 |
-
<element minOccurs="0" name="differedActionDate" nillable="true" type="xsd:string"/>
|
1654 |
-
<element minOccurs="0" name="method" nillable="true" type="xsd:string"/>
|
1655 |
-
</sequence>
|
1656 |
-
</complexType>
|
1657 |
-
<complexType name="authorization">
|
1658 |
-
<annotation>
|
1659 |
-
<documentation>
|
1660 |
-
This element contains information about the
|
1661 |
-
authorization
|
1662 |
-
</documentation>
|
1663 |
-
</annotation>
|
1664 |
-
<sequence>
|
1665 |
-
<element name="number" nillable="false" type="xsd:string"/>
|
1666 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1667 |
-
</sequence>
|
1668 |
-
</complexType>
|
1669 |
-
<complexType name="card">
|
1670 |
-
<annotation>
|
1671 |
-
<documentation>
|
1672 |
-
This element contains information about the card
|
1673 |
-
</documentation>
|
1674 |
-
</annotation>
|
1675 |
-
<sequence>
|
1676 |
-
<element minOccurs="0" name="encryptionKeyId" nillable="true" type="xsd:string"/>
|
1677 |
-
<element minOccurs="0" name="encryptedData" nillable="true" type="xsd:string"/>
|
1678 |
-
<element minOccurs="0" name="number" nillable="true" type="xsd:string"/>
|
1679 |
-
<element name="type" nillable="false" type="xsd:string"/>
|
1680 |
-
<element minOccurs="0" name="expirationDate" nillable="true" type="xsd:string"/>
|
1681 |
-
<element minOccurs="0" name="cvx" nillable="true" type="xsd:string"/>
|
1682 |
-
<element minOccurs="0" name="ownerBirthdayDate" nillable="true" type="xsd:string"/>
|
1683 |
-
<element minOccurs="0" name="password" nillable="true" type="xsd:string"/>
|
1684 |
-
<element minOccurs="0" name="cardPresent" nillable="true" type="xsd:string"/>
|
1685 |
-
<element minOccurs="0" name="cardholder" nillable="true" type="xsd:string"/>
|
1686 |
-
<element minOccurs="0" name="token" nillable="true" type="xsd:string"/>
|
1687 |
-
</sequence>
|
1688 |
-
</complexType>
|
1689 |
-
<complexType name="buyer">
|
1690 |
-
<annotation>
|
1691 |
-
<documentation>
|
1692 |
-
This element contains information about the
|
1693 |
-
buyer
|
1694 |
-
</documentation>
|
1695 |
-
</annotation>
|
1696 |
-
<sequence>
|
1697 |
-
<element name="title" nillable="true" type="xsd:string"/>
|
1698 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1699 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1700 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
1701 |
-
<element name="shippingAdress" nillable="true" type="tns1:address"/>
|
1702 |
-
<element name="billingAddress" nillable="true" type="tns1:address"/>
|
1703 |
-
<element name="accountCreateDate" nillable="true" type="xsd:string"/>
|
1704 |
-
<element name="accountAverageAmount" nillable="true" type="xsd:string"/>
|
1705 |
-
<element name="accountOrderCount" nillable="true" type="xsd:string"/>
|
1706 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
1707 |
-
<element name="walletDisplayed" nillable="true" type="xsd:string"/>
|
1708 |
-
<element name="walletSecured" nillable="true" type="xsd:string"/>
|
1709 |
-
<element name="walletCardInd" nillable="true" type="xsd:string"/>
|
1710 |
-
<element name="ip" nillable="true" type="xsd:string"/>
|
1711 |
-
<element name="mobilePhone" nillable="true" type="xsd:string"/>
|
1712 |
-
<element name="customerId" nillable="true" type="xsd:string"/>
|
1713 |
-
<element name="legalStatus" nillable="true" type="xsd:string"/>
|
1714 |
-
<element name="legalDocument" nillable="true" type="xsd:string"/>
|
1715 |
-
<element name="birthDate" nillable="true" type="xsd:string"/>
|
1716 |
-
<element name="fingerprintID" nillable="true" type="xsd:string"/>
|
1717 |
-
</sequence>
|
1718 |
-
</complexType>
|
1719 |
-
<complexType name="owner">
|
1720 |
-
<annotation>
|
1721 |
-
<documentation>
|
1722 |
-
This element contains information about the
|
1723 |
-
owner
|
1724 |
-
</documentation>
|
1725 |
-
</annotation>
|
1726 |
-
<sequence>
|
1727 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1728 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1729 |
-
<element name="billingAddress" nillable="true" type="tns1:addressOwner"/>
|
1730 |
-
<element name="issueCardDate" nillable="true" type="xsd:string"/>
|
1731 |
-
</sequence>
|
1732 |
-
</complexType>
|
1733 |
-
<complexType name="address">
|
1734 |
-
<annotation>
|
1735 |
-
<documentation>
|
1736 |
-
This element contains information about the
|
1737 |
-
address
|
1738 |
-
</documentation>
|
1739 |
-
</annotation>
|
1740 |
-
<sequence>
|
1741 |
-
<element minOccurs="0" name="title" nillable="true" type="xsd:string"/>
|
1742 |
-
<element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
|
1743 |
-
<element minOccurs="0" name="firstName" nillable="true" type="xsd:string"/>
|
1744 |
-
<element minOccurs="0" name="lastName" nillable="true" type="xsd:string"/>
|
1745 |
-
<element minOccurs="0" name="street1" nillable="true" type="xsd:string"/>
|
1746 |
-
<element minOccurs="0" name="street2" nillable="true" type="xsd:string"/>
|
1747 |
-
<element minOccurs="0" name="cityName" nillable="true" type="xsd:string"/>
|
1748 |
-
<element minOccurs="0" name="zipCode" nillable="true" type="xsd:string"/>
|
1749 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1750 |
-
<element minOccurs="0" name="phone" nillable="true" type="xsd:string"/>
|
1751 |
-
<element minOccurs="0" name="state" nillable="true" type="xsd:string"/>
|
1752 |
-
<element minOccurs="0" name="county" nillable="true" type="xsd:string"/>
|
1753 |
-
<element minOccurs="0" name="phoneType" nillable="true" type="xsd:string"/>
|
1754 |
-
</sequence>
|
1755 |
-
</complexType>
|
1756 |
-
<complexType name="addressOwner">
|
1757 |
-
<annotation>
|
1758 |
-
<documentation>
|
1759 |
-
This element contains information about the
|
1760 |
-
address
|
1761 |
-
</documentation>
|
1762 |
-
</annotation>
|
1763 |
-
<sequence>
|
1764 |
-
<element name="street" nillable="true" type="xsd:string"/>
|
1765 |
-
<element name="cityName" nillable="true" type="xsd:string"/>
|
1766 |
-
<element name="zipCode" nillable="true" type="xsd:string"/>
|
1767 |
-
<element name="country" nillable="true" type="xsd:string"/>
|
1768 |
-
<element name="phone" nillable="true" type="xsd:string"/>
|
1769 |
-
</sequence>
|
1770 |
-
</complexType>
|
1771 |
-
<complexType name="capture">
|
1772 |
-
<annotation>
|
1773 |
-
<documentation>
|
1774 |
-
This element contains information about the
|
1775 |
-
capture
|
1776 |
-
</documentation>
|
1777 |
-
</annotation>
|
1778 |
-
<sequence>
|
1779 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1780 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1781 |
-
</sequence>
|
1782 |
-
</complexType>
|
1783 |
-
<complexType name="refund">
|
1784 |
-
<annotation>
|
1785 |
-
<documentation>
|
1786 |
-
This element contains information about the
|
1787 |
-
refund
|
1788 |
-
</documentation>
|
1789 |
-
</annotation>
|
1790 |
-
<sequence>
|
1791 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1792 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1793 |
-
</sequence>
|
1794 |
-
</complexType>
|
1795 |
-
<complexType name="selectedContractList">
|
1796 |
-
<annotation>
|
1797 |
-
<documentation>
|
1798 |
-
This element contains the list of selected card
|
1799 |
-
</documentation>
|
1800 |
-
</annotation>
|
1801 |
-
<sequence>
|
1802 |
-
<element maxOccurs="25" minOccurs="1" name="selectedContract" type="xsd:string"/>
|
1803 |
-
</sequence>
|
1804 |
-
</complexType>
|
1805 |
-
<complexType name="privateDataList">
|
1806 |
-
<annotation>
|
1807 |
-
<documentation>
|
1808 |
-
An array of private data
|
1809 |
-
</documentation>
|
1810 |
-
</annotation>
|
1811 |
-
<sequence>
|
1812 |
-
<element maxOccurs="100" minOccurs="0" name="privateData" type="tns1:privateData"/>
|
1813 |
-
</sequence>
|
1814 |
-
</complexType>
|
1815 |
-
<complexType name="contractNumberWalletList">
|
1816 |
-
<annotation>
|
1817 |
-
<documentation>
|
1818 |
-
An array of contract number of a wallet
|
1819 |
-
</documentation>
|
1820 |
-
</annotation>
|
1821 |
-
<sequence>
|
1822 |
-
<element maxOccurs="10" minOccurs="0" name="contractNumberWallet" type="xsd:string"/>
|
1823 |
-
</sequence>
|
1824 |
-
</complexType>
|
1825 |
-
<complexType name="cardsList">
|
1826 |
-
<annotation>
|
1827 |
-
<documentation>
|
1828 |
-
An array of cards
|
1829 |
-
</documentation>
|
1830 |
-
</annotation>
|
1831 |
-
<sequence>
|
1832 |
-
<element maxOccurs="99" minOccurs="0" name="cards" type="tns1:cards"/>
|
1833 |
-
</sequence>
|
1834 |
-
</complexType>
|
1835 |
-
<complexType name="captureAuthorizationList">
|
1836 |
-
<annotation>
|
1837 |
-
<documentation>
|
1838 |
-
An array of authorization to capture
|
1839 |
-
</documentation>
|
1840 |
-
</annotation>
|
1841 |
-
<sequence>
|
1842 |
-
<element maxOccurs="5000" minOccurs="1" name="capture" type="tns1:capture"/>
|
1843 |
-
</sequence>
|
1844 |
-
</complexType>
|
1845 |
-
<complexType name="refundAuthorizationList">
|
1846 |
-
<annotation>
|
1847 |
-
<documentation>
|
1848 |
-
An array of authorization to refund
|
1849 |
-
</documentation>
|
1850 |
-
</annotation>
|
1851 |
-
<sequence>
|
1852 |
-
<element maxOccurs="5000" minOccurs="1" name="refund" type="tns1:refund"/>
|
1853 |
-
</sequence>
|
1854 |
-
</complexType>
|
1855 |
-
<complexType name="resetAuthorizationList">
|
1856 |
-
<annotation>
|
1857 |
-
<documentation>
|
1858 |
-
An array of authorization to reset
|
1859 |
-
</documentation>
|
1860 |
-
</annotation>
|
1861 |
-
<sequence>
|
1862 |
-
<element maxOccurs="5000" minOccurs="1" name="transactionID" type="xsd:string"/>
|
1863 |
-
</sequence>
|
1864 |
-
</complexType>
|
1865 |
-
<complexType name="recurring">
|
1866 |
-
<annotation>
|
1867 |
-
<documentation>
|
1868 |
-
This element contains element for recurring
|
1869 |
-
operation
|
1870 |
-
</documentation>
|
1871 |
-
</annotation>
|
1872 |
-
<sequence>
|
1873 |
-
<element name="firstAmount" nillable="true" type="xsd:string"/>
|
1874 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1875 |
-
<element name="billingCycle" nillable="false" type="xsd:string"/>
|
1876 |
-
<element name="billingLeft" nillable="false" type="xsd:string"/>
|
1877 |
-
<element name="billingDay" nillable="true" type="xsd:string"/>
|
1878 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
1879 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
1880 |
-
<element name="newAmount" nillable="true" type="xsd:string"/>
|
1881 |
-
<element name="amountModificationDate" nillable="true" type="xsd:string"/>
|
1882 |
-
</sequence>
|
1883 |
-
</complexType>
|
1884 |
-
<complexType name="recurringForUpdate">
|
1885 |
-
<annotation>
|
1886 |
-
<documentation>
|
1887 |
-
This element contains element for update a recurring
|
1888 |
-
operation
|
1889 |
-
</documentation>
|
1890 |
-
</annotation>
|
1891 |
-
<sequence>
|
1892 |
-
<element name="billingLeft" nillable="true" type="xsd:string"/>
|
1893 |
-
<element name="billingDay" nillable="true" type="xsd:string"/>
|
1894 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
1895 |
-
<element name="newAmount" nillable="true" type="xsd:string"/>
|
1896 |
-
<element name="amountModificationDate" nillable="true" type="xsd:string"/>
|
1897 |
-
</sequence>
|
1898 |
-
</complexType>
|
1899 |
-
<complexType name="billingRecord">
|
1900 |
-
<annotation>
|
1901 |
-
<documentation>
|
1902 |
-
This element contains element for a billing
|
1903 |
-
record
|
1904 |
-
</documentation>
|
1905 |
-
</annotation>
|
1906 |
-
<sequence>
|
1907 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1908 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1909 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
1910 |
-
<element minOccurs="0" name="result" nillable="true" type="tns1:result"/>
|
1911 |
-
<element minOccurs="0" name="transaction" nillable="true" type="tns1:transaction"/>
|
1912 |
-
<element minOccurs="0" name="authorization" nillable="true" type="tns1:authorization"/>
|
1913 |
-
<element minOccurs="0" name="nbTry" nillable="true" type="xsd:string"/>
|
1914 |
-
<element minOccurs="0" name="rank" nillable="true" type="xsd:string"/>
|
1915 |
-
</sequence>
|
1916 |
-
</complexType>
|
1917 |
-
<complexType name="billingRecordList">
|
1918 |
-
<annotation>
|
1919 |
-
<documentation>
|
1920 |
-
An array of billing record
|
1921 |
-
</documentation>
|
1922 |
-
</annotation>
|
1923 |
-
<sequence>
|
1924 |
-
<element maxOccurs="100" minOccurs="0" name="billingRecord" type="tns1:billingRecord"/>
|
1925 |
-
</sequence>
|
1926 |
-
</complexType>
|
1927 |
-
|
1928 |
-
<complexType name="billingRecordForUpdate">
|
1929 |
-
<annotation>
|
1930 |
-
<documentation>
|
1931 |
-
This element contains element for update a recurring
|
1932 |
-
operation
|
1933 |
-
</documentation>
|
1934 |
-
</annotation>
|
1935 |
-
<sequence>
|
1936 |
-
<element name="date" nillable="true" type="xsd:string"/>
|
1937 |
-
<element name="amount" nillable="true" type="xsd:string"/>
|
1938 |
-
<element name="status" nillable="true" type="xsd:string"/>
|
1939 |
-
<element name="executionDate" nillable="true" type="xsd:string"/>
|
1940 |
-
</sequence>
|
1941 |
-
</complexType>
|
1942 |
-
|
1943 |
-
<complexType name="wallet">
|
1944 |
-
<annotation>
|
1945 |
-
<documentation>
|
1946 |
-
This element contains element for a wallet
|
1947 |
-
</documentation>
|
1948 |
-
</annotation>
|
1949 |
-
<sequence>
|
1950 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1951 |
-
<element minOccurs="0" name="lastName" nillable="true" type="xsd:string"/>
|
1952 |
-
<element minOccurs="0" name="firstName" nillable="true" type="xsd:string"/>
|
1953 |
-
<element minOccurs="0" name="email" nillable="true" type="xsd:string"/>
|
1954 |
-
<element minOccurs="0" name="shippingAddress" nillable="true" type="tns1:address"/>
|
1955 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1956 |
-
<element minOccurs="0" name="comment" nillable="true" type="xsd:string"/>
|
1957 |
-
<element minOccurs="0" name="default" nillable="true" type="xsd:string"/>
|
1958 |
-
<element minOccurs="0" name="cardStatus" nillable="true" type="xsd:string"/>
|
1959 |
-
</sequence>
|
1960 |
-
</complexType>
|
1961 |
-
<complexType name="cards">
|
1962 |
-
<annotation>
|
1963 |
-
<documentation>
|
1964 |
-
This element contains element for a wallet
|
1965 |
-
</documentation>
|
1966 |
-
</annotation>
|
1967 |
-
<sequence>
|
1968 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1969 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1970 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1971 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
1972 |
-
<element name="shippingAddress" nillable="true" type="tns1:address"/>
|
1973 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1974 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
1975 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
1976 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1977 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1978 |
-
<element name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
1979 |
-
<element name="default" nillable="true" type="xsd:string"/>
|
1980 |
-
</sequence>
|
1981 |
-
</complexType>
|
1982 |
-
<complexType name="walletIdList">
|
1983 |
-
<annotation>
|
1984 |
-
<documentation>
|
1985 |
-
This element contains the list of selected card
|
1986 |
-
</documentation>
|
1987 |
-
</annotation>
|
1988 |
-
<sequence>
|
1989 |
-
<element maxOccurs="500" minOccurs="1" name="walletId" type="xsd:string"/>
|
1990 |
-
</sequence>
|
1991 |
-
</complexType>
|
1992 |
-
<complexType name="transactionList">
|
1993 |
-
<annotation>
|
1994 |
-
<documentation>
|
1995 |
-
This element contains the list of selected card
|
1996 |
-
</documentation>
|
1997 |
-
</annotation>
|
1998 |
-
<sequence>
|
1999 |
-
<element maxOccurs="5000" minOccurs="0" name="transaction" type="tns1:transaction"/>
|
2000 |
-
</sequence>
|
2001 |
-
</complexType>
|
2002 |
-
<complexType name="authentication3DSecure">
|
2003 |
-
<annotation>
|
2004 |
-
<documentation>
|
2005 |
-
This element contains element for a 3DSecure
|
2006 |
-
transaction
|
2007 |
-
</documentation>
|
2008 |
-
</annotation>
|
2009 |
-
<sequence>
|
2010 |
-
<element minOccurs="0" name="md" nillable="true" type="xsd:string"/>
|
2011 |
-
<element minOccurs="0" name="pares" nillable="true" type="xsd:string"/>
|
2012 |
-
<element minOccurs="0" name="xid" nillable="true" type="xsd:string"/>
|
2013 |
-
<element minOccurs="0" name="eci" nillable="true" type="xsd:string"/>
|
2014 |
-
<element minOccurs="0" name="cavv" nillable="true" type="xsd:string"/>
|
2015 |
-
<element minOccurs="0" name="cavvAlgorithm" nillable="true" type="xsd:string"/>
|
2016 |
-
<element minOccurs="0" name="vadsResult" nillable="true" type="xsd:string"/>
|
2017 |
-
<element minOccurs="0" name="typeSecurisation" nillable="true" type="xsd:string"/>
|
2018 |
-
</sequence>
|
2019 |
-
</complexType>
|
2020 |
-
<complexType name="connectionData">
|
2021 |
-
<annotation>
|
2022 |
-
<documentation>
|
2023 |
-
This element contains the merchant connection
|
2024 |
-
parameters
|
2025 |
-
</documentation>
|
2026 |
-
</annotation>
|
2027 |
-
<sequence>
|
2028 |
-
<element name="merchantId" nillable="false" type="xsd:string"/>
|
2029 |
-
<element name="userId" nillable="false" type="xsd:string"/>
|
2030 |
-
<element name="password" nillable="false" type="xsd:string"/>
|
2031 |
-
<element name="secretQuestion" nillable="false" type="xsd:string"/>
|
2032 |
-
<element name="secretAnswer" nillable="false" type="xsd:string"/>
|
2033 |
-
</sequence>
|
2034 |
-
</complexType>
|
2035 |
-
<complexType name="scoringCheque">
|
2036 |
-
<annotation>
|
2037 |
-
<documentation>
|
2038 |
-
This element contains the scoring cheque parameters
|
2039 |
-
</documentation>
|
2040 |
-
</annotation>
|
2041 |
-
<sequence>
|
2042 |
-
<element name="chequeNumber" nillable="false" type="xsd:string"/>
|
2043 |
-
<element name="additionalDataResponse" nillable="false" type="xsd:string"/>
|
2044 |
-
<element name="terminalId" nillable="false" type="xsd:string"/>
|
2045 |
-
<element name="additionalPrivateData" nillable="false" type="xsd:string"/>
|
2046 |
-
</sequence>
|
2047 |
-
</complexType>
|
2048 |
-
<complexType name="addressInterlocutor">
|
2049 |
-
<annotation>
|
2050 |
-
<documentation>
|
2051 |
-
This element contains information about Interlocutor
|
2052 |
-
address
|
2053 |
-
</documentation>
|
2054 |
-
</annotation>
|
2055 |
-
<sequence>
|
2056 |
-
<element name="street1" nillable="true" type="xsd:string"/>
|
2057 |
-
<element name="street2" nillable="true" type="xsd:string"/>
|
2058 |
-
<element name="city" nillable="true" type="xsd:string"/>
|
2059 |
-
<element name="zipCode" nillable="true" type="xsd:string"/>
|
2060 |
-
<element name="state" nillable="true" type="xsd:string"/>
|
2061 |
-
<element name="country" nillable="true" type="xsd:string"/>
|
2062 |
-
</sequence>
|
2063 |
-
</complexType>
|
2064 |
-
<complexType name="interlocutor">
|
2065 |
-
<annotation>
|
2066 |
-
<documentation>
|
2067 |
-
This element contains information about Interlocutor
|
2068 |
-
</documentation>
|
2069 |
-
</annotation>
|
2070 |
-
<sequence>
|
2071 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
2072 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
2073 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
2074 |
-
<element name="phone" nillable="true" type="xsd:string"/>
|
2075 |
-
<element name="mobile" nillable="true" type="xsd:string"/>
|
2076 |
-
<element name="fax" nillable="true" type="xsd:string"/>
|
2077 |
-
<element name="addressInterlocutor" nillable="true" type="tns1:addressInterlocutor"/>
|
2078 |
-
</sequence>
|
2079 |
-
</complexType>
|
2080 |
-
<complexType name="option">
|
2081 |
-
<annotation>
|
2082 |
-
<documentation>
|
2083 |
-
An array of subscribed options
|
2084 |
-
</documentation>
|
2085 |
-
</annotation>
|
2086 |
-
<sequence>
|
2087 |
-
<element name="id" type="xsd:string"/>
|
2088 |
-
<element name="subscribed" nillable="true" type="xsd:boolean"/>
|
2089 |
-
<element name="endDate" nillable="true" type="xsd:dateTime"/>
|
2090 |
-
</sequence>
|
2091 |
-
</complexType>
|
2092 |
-
<complexType name="subscription">
|
2093 |
-
<annotation>
|
2094 |
-
<documentation>
|
2095 |
-
This element contains information about the payline
|
2096 |
-
package subscribed by the merchant
|
2097 |
-
</documentation>
|
2098 |
-
</annotation>
|
2099 |
-
<sequence>
|
2100 |
-
<element name="id" type="xsd:string"/>
|
2101 |
-
<element maxOccurs="unbounded" minOccurs="0" name="option" type="tns1:option"/>
|
2102 |
-
</sequence>
|
2103 |
-
</complexType>
|
2104 |
-
<complexType name="iban">
|
2105 |
-
<annotation>
|
2106 |
-
<documentation>
|
2107 |
-
This element contains IBAN information
|
2108 |
-
</documentation>
|
2109 |
-
</annotation>
|
2110 |
-
<sequence>
|
2111 |
-
<element name="CountryCode" nillable="true" type="xsd:string"/>
|
2112 |
-
<element name="checkKey" nillable="true" type="xsd:string"/>
|
2113 |
-
<element name="BBAN" nillable="true" type="xsd:string"/>
|
2114 |
-
<element name="BIC" nillable="true" type="xsd:string"/>
|
2115 |
-
</sequence>
|
2116 |
-
</complexType>
|
2117 |
-
<complexType name="rib">
|
2118 |
-
<annotation>
|
2119 |
-
<documentation>
|
2120 |
-
This element contains RIB information
|
2121 |
-
</documentation>
|
2122 |
-
</annotation>
|
2123 |
-
<sequence>
|
2124 |
-
<element name="tellerCode" nillable="true" type="xsd:string"/>
|
2125 |
-
<element name="accountNumber" nillable="true" type="xsd:string"/>
|
2126 |
-
<element name="key" nillable="true" type="xsd:string"/>
|
2127 |
-
</sequence>
|
2128 |
-
</complexType>
|
2129 |
-
<complexType name="bankAccount">
|
2130 |
-
<annotation>
|
2131 |
-
<documentation>
|
2132 |
-
This element contains bankAccount information
|
2133 |
-
</documentation>
|
2134 |
-
</annotation>
|
2135 |
-
<sequence>
|
2136 |
-
<element name="bankCode" nillable="true" type="xsd:string"/>
|
2137 |
-
<element name="bankNumber" nillable="true" type="xsd:string"/>
|
2138 |
-
<element name="iban" nillable="true" type="tns1:iban"/>
|
2139 |
-
<element name="rib" nillable="true" type="tns1:rib"/>
|
2140 |
-
</sequence>
|
2141 |
-
</complexType>
|
2142 |
-
<complexType name="bankAccountData">
|
2143 |
-
<annotation>
|
2144 |
-
<documentation>
|
2145 |
-
This element contains bank Account information
|
2146 |
-
</documentation>
|
2147 |
-
</annotation>
|
2148 |
-
<sequence>
|
2149 |
-
<element name="countryCode" nillable="true" type="xsd:string"/>
|
2150 |
-
<element name="bankCode" nillable="true" type="xsd:string"/>
|
2151 |
-
<element name="accountNumber" nillable="true" type="xsd:string"/>
|
2152 |
-
<element name="key" nillable="true" type="xsd:string"/>
|
2153 |
-
</sequence>
|
2154 |
-
</complexType>
|
2155 |
-
<complexType name="technicalData">
|
2156 |
-
<annotation>
|
2157 |
-
<documentation>
|
2158 |
-
This element contains technical data used to define
|
2159 |
-
acquirer service
|
2160 |
-
</documentation>
|
2161 |
-
</annotation>
|
2162 |
-
<sequence>
|
2163 |
-
<element name="terminalNumber" nillable="true" type="xsd:string"/>
|
2164 |
-
<element name="GTInstance" nillable="true" type="xsd:string"/>
|
2165 |
-
<element name="paymentProfil" nillable="true" type="xsd:string"/>
|
2166 |
-
</sequence>
|
2167 |
-
</complexType>
|
2168 |
-
<complexType name="contract">
|
2169 |
-
<annotation>
|
2170 |
-
<documentation>
|
2171 |
-
This element contains all information about contract
|
2172 |
-
</documentation>
|
2173 |
-
</annotation>
|
2174 |
-
<sequence>
|
2175 |
-
<element name="cardType" nillable="true" type="xsd:string"/>
|
2176 |
-
<element minOccurs="0" name="label" nillable="true" type="xsd:string"/>
|
2177 |
-
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
2178 |
-
<element name="currency" nillable="true" type="xsd:string"/>
|
2179 |
-
<element default="Manual" name="settlementType">
|
2180 |
-
<simpleType>
|
2181 |
-
<restriction base="xsd:string">
|
2182 |
-
<enumeration value="Manual"/>
|
2183 |
-
<enumeration value="Now"/>
|
2184 |
-
<enumeration value="1Day"/>
|
2185 |
-
<enumeration value="2Day"/>
|
2186 |
-
<enumeration value="3Day"/>
|
2187 |
-
<enumeration value="4Day"/>
|
2188 |
-
<enumeration value="5Day"/>
|
2189 |
-
<enumeration value="6Day"/>
|
2190 |
-
<enumeration value="7Day"/>
|
2191 |
-
</restriction>
|
2192 |
-
</simpleType>
|
2193 |
-
</element>
|
2194 |
-
<element name="maxAmountPerTransaction" nillable="true" type="xsd:int"/>
|
2195 |
-
<element name="technicalData" nillable="true" type="tns1:technicalData"/>
|
2196 |
-
<element name="bankAccount" nillable="true" type="tns1:bankAccount"/>
|
2197 |
-
<element name="acquirerInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
2198 |
-
<element name="description" nillable="true" type="xsd:string"/>
|
2199 |
-
<element name="logoEnable" nillable="false" type="xsd:boolean"/>
|
2200 |
-
<element maxOccurs="1" minOccurs="0" name="smallLogoMime" type="xsd:string">
|
2201 |
-
</element>
|
2202 |
-
<element maxOccurs="1" minOccurs="0" name="smallLogo" type="xsd:base64Binary">
|
2203 |
-
</element>
|
2204 |
-
<element maxOccurs="1" minOccurs="0" name="normalLogoMime" type="xsd:string">
|
2205 |
-
</element>
|
2206 |
-
<element maxOccurs="1" minOccurs="0" name="normalLogo" type="xsd:base64Binary">
|
2207 |
-
</element>
|
2208 |
-
<element maxOccurs="1" minOccurs="0" name="contribution" type="tns1:contribution">
|
2209 |
-
</element>
|
2210 |
-
<element maxOccurs="1" minOccurs="0" name="enrolment3DS" type="xsd:string">
|
2211 |
-
</element>
|
2212 |
-
</sequence>
|
2213 |
-
</complexType>
|
2214 |
-
<complexType name="customPaymentPageCode">
|
2215 |
-
<annotation>
|
2216 |
-
<documentation>
|
2217 |
-
This element contains all information about
|
2218 |
-
customPaymentPageCode
|
2219 |
-
</documentation>
|
2220 |
-
</annotation>
|
2221 |
-
<sequence>
|
2222 |
-
<element name="code" nillable="true" type="xsd:string"/>
|
2223 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
2224 |
-
<element name="type" nillable="true" type="xsd:string"/>
|
2225 |
-
</sequence>
|
2226 |
-
</complexType>
|
2227 |
-
<complexType name="ticketSend">
|
2228 |
-
<annotation>
|
2229 |
-
<documentation>
|
2230 |
-
This element contains information e-ticket
|
2231 |
-
</documentation>
|
2232 |
-
</annotation>
|
2233 |
-
<sequence>
|
2234 |
-
<element name="toBuyer" nillable="true" type="xsd:boolean"/>
|
2235 |
-
<element name="toMerchant" nillable="true" type="xsd:boolean"/>
|
2236 |
-
</sequence>
|
2237 |
-
</complexType>
|
2238 |
-
<complexType name="pointOfSell">
|
2239 |
-
<annotation>
|
2240 |
-
<documentation>
|
2241 |
-
This element contains all information about point of
|
2242 |
-
sell
|
2243 |
-
</documentation>
|
2244 |
-
</annotation>
|
2245 |
-
<sequence>
|
2246 |
-
<element name="siret" nillable="true" type="xsd:string"/>
|
2247 |
-
<element name="codeMcc" nillable="true">
|
2248 |
-
<annotation>
|
2249 |
-
<documentation>Merchant Category Code</documentation>
|
2250 |
-
</annotation>
|
2251 |
-
<simpleType>
|
2252 |
-
<restriction base="xsd:string">
|
2253 |
-
<xsd:length value="4"/>
|
2254 |
-
</restriction>
|
2255 |
-
</simpleType>
|
2256 |
-
</element>
|
2257 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
2258 |
-
<element name="webmasterEmail" nillable="true" type="xsd:string"/>
|
2259 |
-
<element minOccurs="0" name="comments" nillable="true" type="xsd:string"/>
|
2260 |
-
<element name="webstoreURL" nillable="true" type="xsd:string"/>
|
2261 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
2262 |
-
<element minOccurs="0" name="privateLifeURL" nillable="true" type="xsd:string"/>
|
2263 |
-
<element minOccurs="0" name="saleCondURL" nillable="true" type="xsd:string"/>
|
2264 |
-
<element minOccurs="0" name="buyerMustAcceptSaleCond" nillable="true" type="xsd:boolean"/>
|
2265 |
-
<element minOccurs="0" name="endOfPaymentRedirection" nillable="true" type="xsd:boolean"/>
|
2266 |
-
<element name="ticketSend" nillable="true" type="tns1:ticketSend"/>
|
2267 |
-
<element name="contracts">
|
2268 |
-
<annotation>
|
2269 |
-
<documentation>list of contract</documentation>
|
2270 |
-
</annotation>
|
2271 |
-
<complexType>
|
2272 |
-
<sequence>
|
2273 |
-
<element maxOccurs="unbounded" minOccurs="0" name="contract" type="tns1:contract"/>
|
2274 |
-
</sequence>
|
2275 |
-
</complexType>
|
2276 |
-
</element>
|
2277 |
-
<element name="virtualTerminal" nillable="true" type="tns1:virtualTerminal"/>
|
2278 |
-
<element name="customPaymentPageCodeList">
|
2279 |
-
<annotation>
|
2280 |
-
<documentation>list of custom payment page code</documentation>
|
2281 |
-
</annotation>
|
2282 |
-
<complexType>
|
2283 |
-
<sequence>
|
2284 |
-
<element maxOccurs="unbounded" minOccurs="0" name="customPaymentPageCode" type="tns1:customPaymentPageCode"/>
|
2285 |
-
</sequence>
|
2286 |
-
</complexType>
|
2287 |
-
</element>
|
2288 |
-
</sequence>
|
2289 |
-
</complexType>
|
2290 |
-
<complexType name="virtualTerminal">
|
2291 |
-
<annotation>
|
2292 |
-
<documentation>virtualTerminal</documentation>
|
2293 |
-
</annotation>
|
2294 |
-
<sequence>
|
2295 |
-
<element name="label" type="xsd:string"/>
|
2296 |
-
<element default="10" name="inactivityDelay" type="xsd:int">
|
2297 |
-
<annotation>
|
2298 |
-
<documentation>http session timeout delay</documentation>
|
2299 |
-
</annotation>
|
2300 |
-
</element>
|
2301 |
-
<element minOccurs="0" name="logo" type="xsd:string">
|
2302 |
-
<annotation>
|
2303 |
-
<documentation>path to logo</documentation>
|
2304 |
-
</annotation>
|
2305 |
-
</element>
|
2306 |
-
<element name="functions">
|
2307 |
-
<annotation>
|
2308 |
-
<documentation>list of functions</documentation>
|
2309 |
-
</annotation>
|
2310 |
-
<complexType>
|
2311 |
-
<sequence>
|
2312 |
-
<element maxOccurs="unbounded" name="function" type="tns1:virtualTerminalFunction"/>
|
2313 |
-
</sequence>
|
2314 |
-
</complexType>
|
2315 |
-
</element>
|
2316 |
-
</sequence>
|
2317 |
-
</complexType>
|
2318 |
-
<complexType name="virtualTerminalFunction">
|
2319 |
-
<annotation>
|
2320 |
-
<documentation>functions availbe in virtual terminal
|
2321 |
-
</documentation>
|
2322 |
-
</annotation>
|
2323 |
-
<sequence>
|
2324 |
-
<element name="function">
|
2325 |
-
<annotation>
|
2326 |
-
<documentation>Please refer to Payline documentation
|
2327 |
-
</documentation>
|
2328 |
-
</annotation>
|
2329 |
-
<simpleType>
|
2330 |
-
<restriction base="xsd:string">
|
2331 |
-
<enumeration value="simplePayment"/>
|
2332 |
-
<enumeration value="walletCreation"/>
|
2333 |
-
<enumeration value="nXPayment"/>
|
2334 |
-
</restriction>
|
2335 |
-
</simpleType>
|
2336 |
-
</element>
|
2337 |
-
<element name="label" type="xsd:string"/>
|
2338 |
-
<sequence minOccurs="0">
|
2339 |
-
<element maxOccurs="unbounded" name="functionParameter">
|
2340 |
-
<annotation>
|
2341 |
-
<documentation>Value of parameter</documentation>
|
2342 |
-
</annotation>
|
2343 |
-
<complexType>
|
2344 |
-
<attribute name="id">
|
2345 |
-
<annotation>
|
2346 |
-
<documentation>Parameter ID. Refer to payline documentation
|
2347 |
-
</documentation>
|
2348 |
-
</annotation>
|
2349 |
-
</attribute>
|
2350 |
-
</complexType>
|
2351 |
-
</element>
|
2352 |
-
</sequence>
|
2353 |
-
</sequence>
|
2354 |
-
</complexType>
|
2355 |
-
<complexType name="cheque">
|
2356 |
-
<annotation>
|
2357 |
-
<documentation>
|
2358 |
-
This element contains information about the
|
2359 |
-
cheque
|
2360 |
-
</documentation>
|
2361 |
-
</annotation>
|
2362 |
-
<sequence>
|
2363 |
-
<element name="number" nillable="false" type="xsd:string"/>
|
2364 |
-
</sequence>
|
2365 |
-
</complexType>
|
2366 |
-
<complexType name="contribution">
|
2367 |
-
<annotation>
|
2368 |
-
<documentation>
|
2369 |
-
This element contains all information about
|
2370 |
-
contrinution
|
2371 |
-
</documentation>
|
2372 |
-
</annotation>
|
2373 |
-
<sequence>
|
2374 |
-
<element name="enable" type="xsd:boolean"/>
|
2375 |
-
<element name="type" nillable="true" type="xsd:string"/>
|
2376 |
-
<element name="value" nillable="true" type="xsd:string"/>
|
2377 |
-
<element name="nbFreeTransaction" nillable="true" type="xsd:string"/>
|
2378 |
-
<element name="minAmountTransaction" nillable="true" type="xsd:string"/>
|
2379 |
-
<element name="maxAmountTransaction" nillable="true" type="xsd:string"/>
|
2380 |
-
</sequence>
|
2381 |
-
</complexType>
|
2382 |
-
<complexType name="associatedTransactions">
|
2383 |
-
<annotation>
|
2384 |
-
<documentation>
|
2385 |
-
This element contains information about the
|
2386 |
-
associated transactions
|
2387 |
-
</documentation>
|
2388 |
-
</annotation>
|
2389 |
-
<sequence>
|
2390 |
-
<element name="transactionId" nillable="false" type="xsd:string"/>
|
2391 |
-
<element name="type" nillable="false" type="xsd:string"/>
|
2392 |
-
<element name="date" nillable="false" type="string"/>
|
2393 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
2394 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
2395 |
-
<element name="originTransactionId" nillable="false" type="xsd:string"/>
|
2396 |
-
</sequence>
|
2397 |
-
</complexType>
|
2398 |
-
|
2399 |
-
<complexType name="associatedTransactionsList">
|
2400 |
-
<annotation>
|
2401 |
-
<documentation>
|
2402 |
-
An array of associatedTransactions
|
2403 |
-
</documentation>
|
2404 |
-
</annotation>
|
2405 |
-
<sequence>
|
2406 |
-
<element maxOccurs="100" minOccurs="0" name="associatedTransactions" type="tns1:associatedTransactions"/>
|
2407 |
-
</sequence>
|
2408 |
-
</complexType>
|
2409 |
-
|
2410 |
-
<complexType name="statusHistory">
|
2411 |
-
<annotation>
|
2412 |
-
<documentation>
|
2413 |
-
This element contains information about the
|
2414 |
-
status
|
2415 |
-
History
|
2416 |
-
</documentation>
|
2417 |
-
</annotation>
|
2418 |
-
<sequence>
|
2419 |
-
<element name="transactionId" nillable="false" type="xsd:string"/>
|
2420 |
-
<element name="date" nillable="false" type="string"/>
|
2421 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
2422 |
-
<element name="fees" nillable="false" type="xsd:string"/>
|
2423 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
2424 |
-
<element name="originTransactionId" nillable="false" type="xsd:string"/>
|
2425 |
-
</sequence>
|
2426 |
-
</complexType>
|
2427 |
-
|
2428 |
-
<complexType name="statusHistoryList">
|
2429 |
-
<annotation>
|
2430 |
-
<documentation>
|
2431 |
-
An array of statusHistory
|
2432 |
-
</documentation>
|
2433 |
-
</annotation>
|
2434 |
-
<sequence>
|
2435 |
-
<element maxOccurs="100" minOccurs="0" name="statusHistory" type="tns1:statusHistory"/>
|
2436 |
-
</sequence>
|
2437 |
-
</complexType>
|
2438 |
-
<complexType name="paymentAdditional">
|
2439 |
-
<annotation>
|
2440 |
-
<documentation>
|
2441 |
-
This element contains information about the
|
2442 |
-
paymentAdditional
|
2443 |
-
</documentation>
|
2444 |
-
</annotation>
|
2445 |
-
<sequence>
|
2446 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
2447 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
2448 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
2449 |
-
<element minOccurs="0" name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
2450 |
-
<element minOccurs="0" name="card" nillable="true" type="tns1:cardOut"/>
|
2451 |
-
<element minOccurs="0" name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
2452 |
-
</sequence>
|
2453 |
-
</complexType>
|
2454 |
-
|
2455 |
-
<complexType name="paymentAdditionalList">
|
2456 |
-
<annotation>
|
2457 |
-
<documentation>
|
2458 |
-
An array of paymentAdditionalList
|
2459 |
-
</documentation>
|
2460 |
-
</annotation>
|
2461 |
-
<sequence>
|
2462 |
-
<element maxOccurs="100" minOccurs="0" name="paymentAdditional" type="tns1:paymentAdditional"/>
|
2463 |
-
</sequence>
|
2464 |
-
</complexType>
|
2465 |
-
|
2466 |
-
<complexType name="CustomerTransHist">
|
2467 |
-
<annotation>
|
2468 |
-
<documentation>
|
2469 |
-
An array of CustomerTrans
|
2470 |
-
</documentation>
|
2471 |
-
</annotation>
|
2472 |
-
<sequence>
|
2473 |
-
<element maxOccurs="unbounded" minOccurs="0" name="CustomerTrans" type="tns1:CustomerTrans">
|
2474 |
-
</element>
|
2475 |
-
</sequence>
|
2476 |
-
</complexType>
|
2477 |
-
<complexType name="CustomerTrans">
|
2478 |
-
<sequence>
|
2479 |
-
<element maxOccurs="1" minOccurs="1" name="IsLCLFAlerted" nillable="false" type="xsd:string">
|
2480 |
-
</element>
|
2481 |
-
<element maxOccurs="1" minOccurs="1" name="ExternalTransactionId" nillable="false" type="xsd:string">
|
2482 |
-
</element>
|
2483 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceOrder" nillable="false" type="xsd:string">
|
2484 |
-
</element>
|
2485 |
-
<element maxOccurs="1" minOccurs="1" name="CardCode" nillable="false" type="xsd:string">
|
2486 |
-
</element>
|
2487 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionDate" nillable="false" type="xsd:string">
|
2488 |
-
</element>
|
2489 |
-
<element maxOccurs="1" minOccurs="1" name="Amount" nillable="false" type="xsd:string">
|
2490 |
-
</element>
|
2491 |
-
<element maxOccurs="1" minOccurs="1" name="Status" nillable="false" type="xsd:string">
|
2492 |
-
</element>
|
2493 |
-
<element maxOccurs="1" minOccurs="1" name="PosLabel" nillable="false" type="xsd:string">
|
2494 |
-
</element>
|
2495 |
-
</sequence>
|
2496 |
-
</complexType>
|
2497 |
-
|
2498 |
-
<complexType name="PaymentMeansTransHist">
|
2499 |
-
<annotation>
|
2500 |
-
<documentation>
|
2501 |
-
An array of PaymentMeansTrans
|
2502 |
-
</documentation>
|
2503 |
-
</annotation>
|
2504 |
-
<sequence>
|
2505 |
-
<element maxOccurs="unbounded" minOccurs="0" name="PaymentMeansTrans" type="tns1:PaymentMeansTrans">
|
2506 |
-
</element>
|
2507 |
-
</sequence>
|
2508 |
-
</complexType>
|
2509 |
-
<complexType name="PaymentMeansTrans">
|
2510 |
-
<sequence>
|
2511 |
-
<element maxOccurs="1" minOccurs="1" name="IsLCLFAlerted" nillable="false" type="xsd:string">
|
2512 |
-
</element>
|
2513 |
-
<element maxOccurs="1" minOccurs="1" name="ExternalTransactionId" nillable="false" type="xsd:string">
|
2514 |
-
</element>
|
2515 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceOrder" nillable="false" type="xsd:string">
|
2516 |
-
</element>
|
2517 |
-
<element maxOccurs="1" minOccurs="0" name="CustomerData" nillable="true" type="xsd:string">
|
2518 |
-
</element>
|
2519 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionDate" nillable="false" type="xsd:string">
|
2520 |
-
</element>
|
2521 |
-
<element maxOccurs="1" minOccurs="1" name="Amount" nillable="false" type="xsd:string">
|
2522 |
-
</element>
|
2523 |
-
<element maxOccurs="1" minOccurs="1" name="Status" nillable="false" type="xsd:string">
|
2524 |
-
</element>
|
2525 |
-
<element maxOccurs="1" minOccurs="1" name="PosLabel" nillable="false" type="xsd:string">
|
2526 |
-
</element>
|
2527 |
-
</sequence>
|
2528 |
-
</complexType>
|
2529 |
-
|
2530 |
-
<complexType name="AlertsTransHist">
|
2531 |
-
<annotation>
|
2532 |
-
<documentation>
|
2533 |
-
An array of AlertsTrans
|
2534 |
-
</documentation>
|
2535 |
-
</annotation>
|
2536 |
-
<sequence>
|
2537 |
-
<element maxOccurs="unbounded" minOccurs="0" name="AlertsTrans" type="tns1:AlertsTrans">
|
2538 |
-
</element>
|
2539 |
-
</sequence>
|
2540 |
-
</complexType>
|
2541 |
-
<complexType name="AlertsTrans">
|
2542 |
-
<sequence>
|
2543 |
-
<element maxOccurs="1" minOccurs="1" name="AlertId" nillable="false" type="xsd:string">
|
2544 |
-
</element>
|
2545 |
-
<element maxOccurs="1" minOccurs="1" name="ExplanationLabel" nillable="false" type="xsd:string">
|
2546 |
-
</element>
|
2547 |
-
<element maxOccurs="1" minOccurs="1" name="ExplanationCode" nillable="false" type="xsd:string">
|
2548 |
-
</element>
|
2549 |
-
<element maxOccurs="1" minOccurs="1" name="RuleName" nillable="false" type="xsd:string">
|
2550 |
-
</element>
|
2551 |
-
<element maxOccurs="1" minOccurs="0" name="RuleAction" nillable="true" type="xsd:string">
|
2552 |
-
</element>
|
2553 |
-
<element maxOccurs="1" minOccurs="0" name="RuleCriteria" nillable="true" type="xsd:string">
|
2554 |
-
</element>
|
2555 |
-
</sequence>
|
2556 |
-
</complexType>
|
2557 |
-
|
2558 |
-
<complexType name="creditor">
|
2559 |
-
<annotation>
|
2560 |
-
<documentation>
|
2561 |
-
This element contains information about the
|
2562 |
-
creditor
|
2563 |
-
</documentation>
|
2564 |
-
</annotation>
|
2565 |
-
<sequence>
|
2566 |
-
<element name="bic" nillable="false" type="xsd:string"/>
|
2567 |
-
<element name="iban" nillable="false" type="xsd:string"/>
|
2568 |
-
<element name="name" nillable="false" type="xsd:string"/>
|
2569 |
-
</sequence>
|
2570 |
-
</complexType>
|
2571 |
-
</schema>
|
2572 |
-
</wsdl:types>
|
2573 |
-
<wsdl:message name="getTransactionDetailsRequest">
|
2574 |
-
<wsdl:part name="parameters" element="impl:getTransactionDetailsRequest">
|
2575 |
-
</wsdl:part>
|
2576 |
-
</wsdl:message>
|
2577 |
-
<wsdl:message name="doScheduledWalletPaymentRequest">
|
2578 |
-
<wsdl:part name="parameters" element="impl:doScheduledWalletPaymentRequest">
|
2579 |
-
</wsdl:part>
|
2580 |
-
</wsdl:message>
|
2581 |
-
<wsdl:message name="doDebitRequest">
|
2582 |
-
<wsdl:part name="parameters" element="impl:doDebitRequest">
|
2583 |
-
</wsdl:part>
|
2584 |
-
</wsdl:message>
|
2585 |
-
<wsdl:message name="doScheduledWalletPaymentResponse">
|
2586 |
-
<wsdl:part name="parameters" element="impl:doScheduledWalletPaymentResponse">
|
2587 |
-
</wsdl:part>
|
2588 |
-
</wsdl:message>
|
2589 |
-
<wsdl:message name="doCaptureResponse">
|
2590 |
-
<wsdl:part name="parameters" element="impl:doCaptureResponse">
|
2591 |
-
</wsdl:part>
|
2592 |
-
</wsdl:message>
|
2593 |
-
<wsdl:message name="doRecurrentWalletPaymentRequest">
|
2594 |
-
<wsdl:part name="parameters" element="impl:doRecurrentWalletPaymentRequest">
|
2595 |
-
</wsdl:part>
|
2596 |
-
</wsdl:message>
|
2597 |
-
<wsdl:message name="getWalletRequest">
|
2598 |
-
<wsdl:part name="parameters" element="impl:getWalletRequest">
|
2599 |
-
</wsdl:part>
|
2600 |
-
</wsdl:message>
|
2601 |
-
<wsdl:message name="doAuthorizationResponse">
|
2602 |
-
<wsdl:part name="parameters" element="impl:doAuthorizationResponse">
|
2603 |
-
</wsdl:part>
|
2604 |
-
</wsdl:message>
|
2605 |
-
<wsdl:message name="getCardsResponse">
|
2606 |
-
<wsdl:part name="parameters" element="impl:getCardsResponse">
|
2607 |
-
</wsdl:part>
|
2608 |
-
</wsdl:message>
|
2609 |
-
<wsdl:message name="createWebWalletRequest">
|
2610 |
-
<wsdl:part name="parameters" element="impl:createWebWalletRequest">
|
2611 |
-
</wsdl:part>
|
2612 |
-
</wsdl:message>
|
2613 |
-
<wsdl:message name="getBalanceResponse">
|
2614 |
-
<wsdl:part name="parameters" element="impl:getBalanceResponse">
|
2615 |
-
</wsdl:part>
|
2616 |
-
</wsdl:message>
|
2617 |
-
<wsdl:message name="verifyAuthenticationRequest">
|
2618 |
-
<wsdl:part name="parameters" element="impl:verifyAuthenticationRequest">
|
2619 |
-
</wsdl:part>
|
2620 |
-
</wsdl:message>
|
2621 |
-
<wsdl:message name="verifyEnrollmentRequest">
|
2622 |
-
<wsdl:part name="parameters" element="impl:verifyEnrollmentRequest">
|
2623 |
-
</wsdl:part>
|
2624 |
-
</wsdl:message>
|
2625 |
-
<wsdl:message name="getWebWalletRequest">
|
2626 |
-
<wsdl:part name="parameters" element="impl:getWebWalletRequest">
|
2627 |
-
</wsdl:part>
|
2628 |
-
</wsdl:message>
|
2629 |
-
<wsdl:message name="verifyAuthenticationResponse">
|
2630 |
-
<wsdl:part name="parameters" element="impl:verifyAuthenticationResponse">
|
2631 |
-
</wsdl:part>
|
2632 |
-
</wsdl:message>
|
2633 |
-
<wsdl:message name="doScoringChequeRequest">
|
2634 |
-
<wsdl:part name="parameters" element="impl:doScoringChequeRequest">
|
2635 |
-
</wsdl:part>
|
2636 |
-
</wsdl:message>
|
2637 |
-
<wsdl:message name="doBankTransferRequest">
|
2638 |
-
<wsdl:part name="parameters" element="impl:doBankTransferRequest">
|
2639 |
-
</wsdl:part>
|
2640 |
-
</wsdl:message>
|
2641 |
-
<wsdl:message name="doRefundRequest">
|
2642 |
-
<wsdl:part name="parameters" element="impl:doRefundRequest">
|
2643 |
-
</wsdl:part>
|
2644 |
-
</wsdl:message>
|
2645 |
-
<wsdl:message name="getWebWalletResponse">
|
2646 |
-
<wsdl:part name="parameters" element="impl:getWebWalletResponse">
|
2647 |
-
</wsdl:part>
|
2648 |
-
</wsdl:message>
|
2649 |
-
<wsdl:message name="getAlertDetailsRequest">
|
2650 |
-
<wsdl:part name="parameters" element="impl:getAlertDetailsRequest">
|
2651 |
-
</wsdl:part>
|
2652 |
-
</wsdl:message>
|
2653 |
-
<wsdl:message name="getBalanceRequest">
|
2654 |
-
<wsdl:part name="parameters" element="impl:getBalanceRequest">
|
2655 |
-
</wsdl:part>
|
2656 |
-
</wsdl:message>
|
2657 |
-
<wsdl:message name="updateWalletRequest">
|
2658 |
-
<wsdl:part name="parameters" element="impl:updateWalletRequest">
|
2659 |
-
</wsdl:part>
|
2660 |
-
</wsdl:message>
|
2661 |
-
<wsdl:message name="doScoringChequeResponse">
|
2662 |
-
<wsdl:part name="parameters" element="impl:doScoringChequeResponse">
|
2663 |
-
</wsdl:part>
|
2664 |
-
</wsdl:message>
|
2665 |
-
<wsdl:message name="getBillingRecordResponse">
|
2666 |
-
<wsdl:part name="parameters" element="impl:getBillingRecordResponse">
|
2667 |
-
</wsdl:part>
|
2668 |
-
</wsdl:message>
|
2669 |
-
<wsdl:message name="getPaymentRecordRequest">
|
2670 |
-
<wsdl:part name="parameters" element="impl:getPaymentRecordRequest">
|
2671 |
-
</wsdl:part>
|
2672 |
-
</wsdl:message>
|
2673 |
-
<wsdl:message name="updateWebWalletRequest">
|
2674 |
-
<wsdl:part name="parameters" element="impl:updateWebWalletRequest">
|
2675 |
-
</wsdl:part>
|
2676 |
-
</wsdl:message>
|
2677 |
-
<wsdl:message name="unBlockRequest">
|
2678 |
-
<wsdl:part name="parameters" element="impl:unBlockRequest">
|
2679 |
-
</wsdl:part>
|
2680 |
-
</wsdl:message>
|
2681 |
-
<wsdl:message name="enableWalletRequest">
|
2682 |
-
<wsdl:part name="parameters" element="impl:enableWalletRequest">
|
2683 |
-
</wsdl:part>
|
2684 |
-
</wsdl:message>
|
2685 |
-
<wsdl:message name="doImmediateWalletPaymentRequest">
|
2686 |
-
<wsdl:part name="parameters" element="impl:doImmediateWalletPaymentRequest">
|
2687 |
-
</wsdl:part>
|
2688 |
-
</wsdl:message>
|
2689 |
-
<wsdl:message name="updateWalletResponse">
|
2690 |
-
<wsdl:part name="parameters" element="impl:updateWalletResponse">
|
2691 |
-
</wsdl:part>
|
2692 |
-
</wsdl:message>
|
2693 |
-
<wsdl:message name="doImmediateWalletPaymentResponse">
|
2694 |
-
<wsdl:part name="parameters" element="impl:doImmediateWalletPaymentResponse">
|
2695 |
-
</wsdl:part>
|
2696 |
-
</wsdl:message>
|
2697 |
-
<wsdl:message name="doAuthorizationRequest">
|
2698 |
-
<wsdl:part name="parameters" element="impl:doAuthorizationRequest">
|
2699 |
-
</wsdl:part>
|
2700 |
-
</wsdl:message>
|
2701 |
-
<wsdl:message name="doWebPaymentRequest">
|
2702 |
-
<wsdl:part name="parameters" element="impl:doWebPaymentRequest">
|
2703 |
-
</wsdl:part>
|
2704 |
-
</wsdl:message>
|
2705 |
-
<wsdl:message name="getWalletResponse">
|
2706 |
-
<wsdl:part name="parameters" element="impl:getWalletResponse">
|
2707 |
-
</wsdl:part>
|
2708 |
-
</wsdl:message>
|
2709 |
-
<wsdl:message name="doDebitResponse">
|
2710 |
-
<wsdl:part name="parameters" element="impl:doDebitResponse">
|
2711 |
-
</wsdl:part>
|
2712 |
-
</wsdl:message>
|
2713 |
-
<wsdl:message name="updateBillingRecordResponse">
|
2714 |
-
<wsdl:part name="parameters" element="impl:updateBillingRecordResponse">
|
2715 |
-
</wsdl:part>
|
2716 |
-
</wsdl:message>
|
2717 |
-
<wsdl:message name="doBankTransferResponse">
|
2718 |
-
<wsdl:part name="parameters" element="impl:doBankTransferResponse">
|
2719 |
-
</wsdl:part>
|
2720 |
-
</wsdl:message>
|
2721 |
-
<wsdl:message name="disableWalletRequest">
|
2722 |
-
<wsdl:part name="parameters" element="impl:disableWalletRequest">
|
2723 |
-
</wsdl:part>
|
2724 |
-
</wsdl:message>
|
2725 |
-
<wsdl:message name="createMerchantRequest">
|
2726 |
-
<wsdl:part name="parameters" element="impl:createMerchantRequest">
|
2727 |
-
</wsdl:part>
|
2728 |
-
</wsdl:message>
|
2729 |
-
<wsdl:message name="getEncryptionKeyResponse">
|
2730 |
-
<wsdl:part name="parameters" element="impl:getEncryptionKeyResponse">
|
2731 |
-
</wsdl:part>
|
2732 |
-
</wsdl:message>
|
2733 |
-
<wsdl:message name="createMerchantResponse">
|
2734 |
-
<wsdl:part name="parameters" element="impl:createMerchantResponse">
|
2735 |
-
</wsdl:part>
|
2736 |
-
</wsdl:message>
|
2737 |
-
<wsdl:message name="getMerchantSettingsRequest">
|
2738 |
-
<wsdl:part name="parameters" element="impl:getMerchantSettingsRequest">
|
2739 |
-
</wsdl:part>
|
2740 |
-
</wsdl:message>
|
2741 |
-
<wsdl:message name="disableWalletResponse">
|
2742 |
-
<wsdl:part name="parameters" element="impl:disableWalletResponse">
|
2743 |
-
</wsdl:part>
|
2744 |
-
</wsdl:message>
|
2745 |
-
<wsdl:message name="doRecurrentWalletPaymentResponse">
|
2746 |
-
<wsdl:part name="parameters" element="impl:doRecurrentWalletPaymentResponse">
|
2747 |
-
</wsdl:part>
|
2748 |
-
</wsdl:message>
|
2749 |
-
<wsdl:message name="createWalletResponse">
|
2750 |
-
<wsdl:part name="parameters" element="impl:createWalletResponse">
|
2751 |
-
</wsdl:part>
|
2752 |
-
</wsdl:message>
|
2753 |
-
<wsdl:message name="manageWebWalletRequest">
|
2754 |
-
<wsdl:part name="parameters" element="impl:manageWebWalletRequest">
|
2755 |
-
</wsdl:part>
|
2756 |
-
</wsdl:message>
|
2757 |
-
<wsdl:message name="doCreditResponse">
|
2758 |
-
<wsdl:part name="parameters" element="impl:doCreditResponse">
|
2759 |
-
</wsdl:part>
|
2760 |
-
</wsdl:message>
|
2761 |
-
<wsdl:message name="getPaymentRecordResponse">
|
2762 |
-
<wsdl:part name="parameters" element="impl:getPaymentRecordResponse">
|
2763 |
-
</wsdl:part>
|
2764 |
-
</wsdl:message>
|
2765 |
-
<wsdl:message name="transactionsSearchRequest">
|
2766 |
-
<wsdl:part name="parameters" element="impl:transactionsSearchRequest">
|
2767 |
-
</wsdl:part>
|
2768 |
-
</wsdl:message>
|
2769 |
-
<wsdl:message name="updateBillingRecordRequest">
|
2770 |
-
<wsdl:part name="parameters" element="impl:updateBillingRecordRequest">
|
2771 |
-
</wsdl:part>
|
2772 |
-
</wsdl:message>
|
2773 |
-
<wsdl:message name="getTokenResponse">
|
2774 |
-
<wsdl:part name="parameters" element="impl:getTokenResponse">
|
2775 |
-
</wsdl:part>
|
2776 |
-
</wsdl:message>
|
2777 |
-
<wsdl:message name="getWebPaymentDetailsResponse">
|
2778 |
-
<wsdl:part name="parameters" element="impl:getWebPaymentDetailsResponse">
|
2779 |
-
</wsdl:part>
|
2780 |
-
</wsdl:message>
|
2781 |
-
<wsdl:message name="verifyEnrollmentResponse">
|
2782 |
-
<wsdl:part name="parameters" element="impl:verifyEnrollmentResponse">
|
2783 |
-
</wsdl:part>
|
2784 |
-
</wsdl:message>
|
2785 |
-
<wsdl:message name="updatePaymentRecordRequest">
|
2786 |
-
<wsdl:part name="parameters" element="impl:updatePaymentRecordRequest">
|
2787 |
-
</wsdl:part>
|
2788 |
-
</wsdl:message>
|
2789 |
-
<wsdl:message name="doReAuthorizationRequest">
|
2790 |
-
<wsdl:part name="parameters" element="impl:doReAuthorizationRequest">
|
2791 |
-
</wsdl:part>
|
2792 |
-
</wsdl:message>
|
2793 |
-
<wsdl:message name="createWalletRequest">
|
2794 |
-
<wsdl:part name="parameters" element="impl:createWalletRequest">
|
2795 |
-
</wsdl:part>
|
2796 |
-
</wsdl:message>
|
2797 |
-
<wsdl:message name="getEncryptionKeyRequest">
|
2798 |
-
<wsdl:part name="parameters" element="impl:getEncryptionKeyRequest">
|
2799 |
-
</wsdl:part>
|
2800 |
-
</wsdl:message>
|
2801 |
-
<wsdl:message name="doResetResponse">
|
2802 |
-
<wsdl:part name="parameters" element="impl:doResetResponse">
|
2803 |
-
</wsdl:part>
|
2804 |
-
</wsdl:message>
|
2805 |
-
<wsdl:message name="manageWebWalletResponse">
|
2806 |
-
<wsdl:part name="parameters" element="impl:manageWebWalletResponse">
|
2807 |
-
</wsdl:part>
|
2808 |
-
</wsdl:message>
|
2809 |
-
<wsdl:message name="createWebWalletResponse">
|
2810 |
-
<wsdl:part name="parameters" element="impl:createWebWalletResponse">
|
2811 |
-
</wsdl:part>
|
2812 |
-
</wsdl:message>
|
2813 |
-
<wsdl:message name="unBlockResponse">
|
2814 |
-
<wsdl:part name="parameters" element="impl:unBlockResponse">
|
2815 |
-
</wsdl:part>
|
2816 |
-
</wsdl:message>
|
2817 |
-
<wsdl:message name="doReAuthorizationResponse">
|
2818 |
-
<wsdl:part name="parameters" element="impl:doReAuthorizationResponse">
|
2819 |
-
</wsdl:part>
|
2820 |
-
</wsdl:message>
|
2821 |
-
<wsdl:message name="doCreditRequest">
|
2822 |
-
<wsdl:part name="parameters" element="impl:doCreditRequest">
|
2823 |
-
</wsdl:part>
|
2824 |
-
</wsdl:message>
|
2825 |
-
<wsdl:message name="getTokenRequest">
|
2826 |
-
<wsdl:part name="parameters" element="impl:getTokenRequest">
|
2827 |
-
</wsdl:part>
|
2828 |
-
</wsdl:message>
|
2829 |
-
<wsdl:message name="doRefundResponse">
|
2830 |
-
<wsdl:part name="parameters" element="impl:doRefundResponse">
|
2831 |
-
</wsdl:part>
|
2832 |
-
</wsdl:message>
|
2833 |
-
<wsdl:message name="getTransactionDetailsResponse">
|
2834 |
-
<wsdl:part name="parameters" element="impl:getTransactionDetailsResponse">
|
2835 |
-
</wsdl:part>
|
2836 |
-
</wsdl:message>
|
2837 |
-
<wsdl:message name="getAlertDetailsResponse">
|
2838 |
-
<wsdl:part name="parameters" element="impl:getAlertDetailsResponse">
|
2839 |
-
</wsdl:part>
|
2840 |
-
</wsdl:message>
|
2841 |
-
<wsdl:message name="doCaptureRequest">
|
2842 |
-
<wsdl:part name="parameters" element="impl:doCaptureRequest">
|
2843 |
-
</wsdl:part>
|
2844 |
-
</wsdl:message>
|
2845 |
-
<wsdl:message name="getBillingRecordRequest">
|
2846 |
-
<wsdl:part name="parameters" element="impl:getBillingRecordRequest">
|
2847 |
-
</wsdl:part>
|
2848 |
-
</wsdl:message>
|
2849 |
-
<wsdl:message name="disablePaymentRecordRequest">
|
2850 |
-
<wsdl:part name="parameters" element="impl:disablePaymentRecordRequest">
|
2851 |
-
</wsdl:part>
|
2852 |
-
</wsdl:message>
|
2853 |
-
<wsdl:message name="updateWebWalletResponse">
|
2854 |
-
<wsdl:part name="parameters" element="impl:updateWebWalletResponse">
|
2855 |
-
</wsdl:part>
|
2856 |
-
</wsdl:message>
|
2857 |
-
<wsdl:message name="updatePaymentRecordResponse">
|
2858 |
-
<wsdl:part name="parameters" element="impl:updatePaymentRecordResponse">
|
2859 |
-
</wsdl:part>
|
2860 |
-
</wsdl:message>
|
2861 |
-
<wsdl:message name="doWebPaymentResponse">
|
2862 |
-
<wsdl:part name="parameters" element="impl:doWebPaymentResponse">
|
2863 |
-
</wsdl:part>
|
2864 |
-
</wsdl:message>
|
2865 |
-
<wsdl:message name="getWebPaymentDetailsRequest">
|
2866 |
-
<wsdl:part name="parameters" element="impl:getWebPaymentDetailsRequest">
|
2867 |
-
</wsdl:part>
|
2868 |
-
</wsdl:message>
|
2869 |
-
<wsdl:message name="doResetRequest">
|
2870 |
-
<wsdl:part name="parameters" element="impl:doResetRequest">
|
2871 |
-
</wsdl:part>
|
2872 |
-
</wsdl:message>
|
2873 |
-
<wsdl:message name="enableWalletResponse">
|
2874 |
-
<wsdl:part name="parameters" element="impl:enableWalletResponse">
|
2875 |
-
</wsdl:part>
|
2876 |
-
</wsdl:message>
|
2877 |
-
<wsdl:message name="getMerchantSettingsResponse">
|
2878 |
-
<wsdl:part name="parameters" element="impl:getMerchantSettingsResponse">
|
2879 |
-
</wsdl:part>
|
2880 |
-
</wsdl:message>
|
2881 |
-
<wsdl:message name="disablePaymentRecordResponse">
|
2882 |
-
<wsdl:part name="parameters" element="impl:disablePaymentRecordResponse">
|
2883 |
-
</wsdl:part>
|
2884 |
-
</wsdl:message>
|
2885 |
-
<wsdl:message name="transactionsSearchResponse">
|
2886 |
-
<wsdl:part name="parameters" element="impl:transactionsSearchResponse">
|
2887 |
-
</wsdl:part>
|
2888 |
-
</wsdl:message>
|
2889 |
-
<wsdl:message name="getCardsRequest">
|
2890 |
-
<wsdl:part name="parameters" element="impl:getCardsRequest">
|
2891 |
-
</wsdl:part>
|
2892 |
-
</wsdl:message>
|
2893 |
-
<wsdl:portType name="WebPaymentAPI">
|
2894 |
-
<wsdl:operation name="doWebPayment">
|
2895 |
-
<wsdl:input name="doWebPaymentRequest" message="impl:doWebPaymentRequest">
|
2896 |
-
</wsdl:input>
|
2897 |
-
<wsdl:output name="doWebPaymentResponse" message="impl:doWebPaymentResponse">
|
2898 |
-
</wsdl:output>
|
2899 |
-
</wsdl:operation>
|
2900 |
-
<wsdl:operation name="getWebPaymentDetails">
|
2901 |
-
<wsdl:input name="getWebPaymentDetailsRequest" message="impl:getWebPaymentDetailsRequest">
|
2902 |
-
</wsdl:input>
|
2903 |
-
<wsdl:output name="getWebPaymentDetailsResponse" message="impl:getWebPaymentDetailsResponse">
|
2904 |
-
</wsdl:output>
|
2905 |
-
</wsdl:operation>
|
2906 |
-
<wsdl:operation name="manageWebWallet">
|
2907 |
-
<wsdl:input name="manageWebWalletRequest" message="impl:manageWebWalletRequest">
|
2908 |
-
</wsdl:input>
|
2909 |
-
<wsdl:output name="manageWebWalletResponse" message="impl:manageWebWalletResponse">
|
2910 |
-
</wsdl:output>
|
2911 |
-
</wsdl:operation>
|
2912 |
-
<wsdl:operation name="createWebWallet">
|
2913 |
-
<wsdl:input name="createWebWalletRequest" message="impl:createWebWalletRequest">
|
2914 |
-
</wsdl:input>
|
2915 |
-
<wsdl:output name="createWebWalletResponse" message="impl:createWebWalletResponse">
|
2916 |
-
</wsdl:output>
|
2917 |
-
</wsdl:operation>
|
2918 |
-
<wsdl:operation name="updateWebWallet">
|
2919 |
-
<wsdl:input name="updateWebWalletRequest" message="impl:updateWebWalletRequest">
|
2920 |
-
</wsdl:input>
|
2921 |
-
<wsdl:output name="updateWebWalletResponse" message="impl:updateWebWalletResponse">
|
2922 |
-
</wsdl:output>
|
2923 |
-
</wsdl:operation>
|
2924 |
-
<wsdl:operation name="getWebWallet">
|
2925 |
-
<wsdl:input name="getWebWalletRequest" message="impl:getWebWalletRequest">
|
2926 |
-
</wsdl:input>
|
2927 |
-
<wsdl:output name="getWebWalletResponse" message="impl:getWebWalletResponse">
|
2928 |
-
</wsdl:output>
|
2929 |
-
</wsdl:operation>
|
2930 |
-
</wsdl:portType>
|
2931 |
-
<wsdl:portType name="DirectPaymentAPI">
|
2932 |
-
<wsdl:operation name="doAuthorization">
|
2933 |
-
<wsdl:input name="doAuthorizationRequest" message="impl:doAuthorizationRequest">
|
2934 |
-
</wsdl:input>
|
2935 |
-
<wsdl:output name="doAuthorizationResponse" message="impl:doAuthorizationResponse">
|
2936 |
-
</wsdl:output>
|
2937 |
-
</wsdl:operation>
|
2938 |
-
<wsdl:operation name="doCapture">
|
2939 |
-
<wsdl:input name="doCaptureRequest" message="impl:doCaptureRequest">
|
2940 |
-
</wsdl:input>
|
2941 |
-
<wsdl:output name="doCaptureResponse" message="impl:doCaptureResponse">
|
2942 |
-
</wsdl:output>
|
2943 |
-
</wsdl:operation>
|
2944 |
-
<wsdl:operation name="doReAuthorization">
|
2945 |
-
<wsdl:input name="doReAuthorizationRequest" message="impl:doReAuthorizationRequest">
|
2946 |
-
</wsdl:input>
|
2947 |
-
<wsdl:output name="doReAuthorizationResponse" message="impl:doReAuthorizationResponse">
|
2948 |
-
</wsdl:output>
|
2949 |
-
</wsdl:operation>
|
2950 |
-
<wsdl:operation name="doDebit">
|
2951 |
-
<wsdl:input name="doDebitRequest" message="impl:doDebitRequest">
|
2952 |
-
</wsdl:input>
|
2953 |
-
<wsdl:output name="doDebitResponse" message="impl:doDebitResponse">
|
2954 |
-
</wsdl:output>
|
2955 |
-
</wsdl:operation>
|
2956 |
-
<wsdl:operation name="doRefund">
|
2957 |
-
<wsdl:input name="doRefundRequest" message="impl:doRefundRequest">
|
2958 |
-
</wsdl:input>
|
2959 |
-
<wsdl:output name="doRefundResponse" message="impl:doRefundResponse">
|
2960 |
-
</wsdl:output>
|
2961 |
-
</wsdl:operation>
|
2962 |
-
<wsdl:operation name="doReset">
|
2963 |
-
<wsdl:input name="doResetRequest" message="impl:doResetRequest">
|
2964 |
-
</wsdl:input>
|
2965 |
-
<wsdl:output name="doResetResponse" message="impl:doResetResponse">
|
2966 |
-
</wsdl:output>
|
2967 |
-
</wsdl:operation>
|
2968 |
-
<wsdl:operation name="doCredit">
|
2969 |
-
<wsdl:input name="doCreditRequest" message="impl:doCreditRequest">
|
2970 |
-
</wsdl:input>
|
2971 |
-
<wsdl:output name="doCreditResponse" message="impl:doCreditResponse">
|
2972 |
-
</wsdl:output>
|
2973 |
-
</wsdl:operation>
|
2974 |
-
<wsdl:operation name="createWallet">
|
2975 |
-
<wsdl:input name="createWalletRequest" message="impl:createWalletRequest">
|
2976 |
-
</wsdl:input>
|
2977 |
-
<wsdl:output name="createWalletResponse" message="impl:createWalletResponse">
|
2978 |
-
</wsdl:output>
|
2979 |
-
</wsdl:operation>
|
2980 |
-
<wsdl:operation name="updateWallet">
|
2981 |
-
<wsdl:input name="updateWalletRequest" message="impl:updateWalletRequest">
|
2982 |
-
</wsdl:input>
|
2983 |
-
<wsdl:output name="updateWalletResponse" message="impl:updateWalletResponse">
|
2984 |
-
</wsdl:output>
|
2985 |
-
</wsdl:operation>
|
2986 |
-
<wsdl:operation name="getWallet">
|
2987 |
-
<wsdl:input name="getWalletRequest" message="impl:getWalletRequest">
|
2988 |
-
</wsdl:input>
|
2989 |
-
<wsdl:output name="getWalletResponse" message="impl:getWalletResponse">
|
2990 |
-
</wsdl:output>
|
2991 |
-
</wsdl:operation>
|
2992 |
-
<wsdl:operation name="getCards">
|
2993 |
-
<wsdl:input name="getCardsRequest" message="impl:getCardsRequest">
|
2994 |
-
</wsdl:input>
|
2995 |
-
<wsdl:output name="getCardsResponse" message="impl:getCardsResponse">
|
2996 |
-
</wsdl:output>
|
2997 |
-
</wsdl:operation>
|
2998 |
-
<wsdl:operation name="disableWallet">
|
2999 |
-
<wsdl:input name="disableWalletRequest" message="impl:disableWalletRequest">
|
3000 |
-
</wsdl:input>
|
3001 |
-
<wsdl:output name="disableWalletResponse" message="impl:disableWalletResponse">
|
3002 |
-
</wsdl:output>
|
3003 |
-
</wsdl:operation>
|
3004 |
-
<wsdl:operation name="enableWallet">
|
3005 |
-
<wsdl:input name="enableWalletRequest" message="impl:enableWalletRequest">
|
3006 |
-
</wsdl:input>
|
3007 |
-
<wsdl:output name="enableWalletResponse" message="impl:enableWalletResponse">
|
3008 |
-
</wsdl:output>
|
3009 |
-
</wsdl:operation>
|
3010 |
-
<wsdl:operation name="doImmediateWalletPayment">
|
3011 |
-
<wsdl:input name="doImmediateWalletPaymentRequest" message="impl:doImmediateWalletPaymentRequest">
|
3012 |
-
</wsdl:input>
|
3013 |
-
<wsdl:output name="doImmediateWalletPaymentResponse" message="impl:doImmediateWalletPaymentResponse">
|
3014 |
-
</wsdl:output>
|
3015 |
-
</wsdl:operation>
|
3016 |
-
<wsdl:operation name="doScheduledWalletPayment">
|
3017 |
-
<wsdl:input name="doScheduledWalletPaymentRequest" message="impl:doScheduledWalletPaymentRequest">
|
3018 |
-
</wsdl:input>
|
3019 |
-
<wsdl:output name="doScheduledWalletPaymentResponse" message="impl:doScheduledWalletPaymentResponse">
|
3020 |
-
</wsdl:output>
|
3021 |
-
</wsdl:operation>
|
3022 |
-
<wsdl:operation name="doRecurrentWalletPayment">
|
3023 |
-
<wsdl:input name="doRecurrentWalletPaymentRequest" message="impl:doRecurrentWalletPaymentRequest">
|
3024 |
-
</wsdl:input>
|
3025 |
-
<wsdl:output name="doRecurrentWalletPaymentResponse" message="impl:doRecurrentWalletPaymentResponse">
|
3026 |
-
</wsdl:output>
|
3027 |
-
</wsdl:operation>
|
3028 |
-
<wsdl:operation name="getPaymentRecord">
|
3029 |
-
<wsdl:input name="getPaymentRecordRequest" message="impl:getPaymentRecordRequest">
|
3030 |
-
</wsdl:input>
|
3031 |
-
<wsdl:output name="getPaymentRecordResponse" message="impl:getPaymentRecordResponse">
|
3032 |
-
</wsdl:output>
|
3033 |
-
</wsdl:operation>
|
3034 |
-
<wsdl:operation name="disablePaymentRecord">
|
3035 |
-
<wsdl:input name="disablePaymentRecordRequest" message="impl:disablePaymentRecordRequest">
|
3036 |
-
</wsdl:input>
|
3037 |
-
<wsdl:output name="disablePaymentRecordResponse" message="impl:disablePaymentRecordResponse">
|
3038 |
-
</wsdl:output>
|
3039 |
-
</wsdl:operation>
|
3040 |
-
<wsdl:operation name="verifyEnrollment">
|
3041 |
-
<wsdl:input name="verifyEnrollmentRequest" message="impl:verifyEnrollmentRequest">
|
3042 |
-
</wsdl:input>
|
3043 |
-
<wsdl:output name="verifyEnrollmentResponse" message="impl:verifyEnrollmentResponse">
|
3044 |
-
</wsdl:output>
|
3045 |
-
</wsdl:operation>
|
3046 |
-
<wsdl:operation name="verifyAuthentication">
|
3047 |
-
<wsdl:input name="verifyAuthenticationRequest" message="impl:verifyAuthenticationRequest">
|
3048 |
-
</wsdl:input>
|
3049 |
-
<wsdl:output name="verifyAuthenticationResponse" message="impl:verifyAuthenticationResponse">
|
3050 |
-
</wsdl:output>
|
3051 |
-
</wsdl:operation>
|
3052 |
-
<wsdl:operation name="createMerchant">
|
3053 |
-
<wsdl:input name="createMerchantRequest" message="impl:createMerchantRequest">
|
3054 |
-
</wsdl:input>
|
3055 |
-
<wsdl:output name="createMerchantResponse" message="impl:createMerchantResponse">
|
3056 |
-
</wsdl:output>
|
3057 |
-
</wsdl:operation>
|
3058 |
-
<wsdl:operation name="doScoringCheque">
|
3059 |
-
<wsdl:input name="doScoringChequeRequest" message="impl:doScoringChequeRequest">
|
3060 |
-
</wsdl:input>
|
3061 |
-
<wsdl:output name="doScoringChequeResponse" message="impl:doScoringChequeResponse">
|
3062 |
-
</wsdl:output>
|
3063 |
-
</wsdl:operation>
|
3064 |
-
<wsdl:operation name="getEncryptionKey">
|
3065 |
-
<wsdl:input name="getEncryptionKeyRequest" message="impl:getEncryptionKeyRequest">
|
3066 |
-
</wsdl:input>
|
3067 |
-
<wsdl:output name="getEncryptionKeyResponse" message="impl:getEncryptionKeyResponse">
|
3068 |
-
</wsdl:output>
|
3069 |
-
</wsdl:operation>
|
3070 |
-
<wsdl:operation name="getMerchantSettings">
|
3071 |
-
<wsdl:input name="getMerchantSettingsRequest" message="impl:getMerchantSettingsRequest">
|
3072 |
-
</wsdl:input>
|
3073 |
-
<wsdl:output name="getMerchantSettingsResponse" message="impl:getMerchantSettingsResponse">
|
3074 |
-
</wsdl:output>
|
3075 |
-
</wsdl:operation>
|
3076 |
-
<wsdl:operation name="getBalance">
|
3077 |
-
<wsdl:input name="getBalanceRequest" message="impl:getBalanceRequest">
|
3078 |
-
</wsdl:input>
|
3079 |
-
<wsdl:output name="getBalanceResponse" message="impl:getBalanceResponse">
|
3080 |
-
</wsdl:output>
|
3081 |
-
</wsdl:operation>
|
3082 |
-
<wsdl:operation name="getToken">
|
3083 |
-
<wsdl:input message="impl:getTokenRequest">
|
3084 |
-
</wsdl:input>
|
3085 |
-
<wsdl:output message="impl:getTokenResponse">
|
3086 |
-
</wsdl:output>
|
3087 |
-
</wsdl:operation>
|
3088 |
-
<wsdl:operation name="unBlock">
|
3089 |
-
<wsdl:input name="unBlockRequest" message="impl:unBlockRequest">
|
3090 |
-
</wsdl:input>
|
3091 |
-
<wsdl:output name="unBlockResponse" message="impl:unBlockResponse">
|
3092 |
-
</wsdl:output>
|
3093 |
-
</wsdl:operation>
|
3094 |
-
<wsdl:operation name="updatePaymentRecord">
|
3095 |
-
<wsdl:input name="updatePaymentRecordRequest" message="impl:updatePaymentRecordRequest">
|
3096 |
-
</wsdl:input>
|
3097 |
-
<wsdl:output name="updatePaymentRecordResponse" message="impl:updatePaymentRecordResponse">
|
3098 |
-
</wsdl:output>
|
3099 |
-
</wsdl:operation>
|
3100 |
-
<wsdl:operation name="getBillingRecord">
|
3101 |
-
<wsdl:input name="getBillingRecordRequest" message="impl:getBillingRecordRequest">
|
3102 |
-
</wsdl:input>
|
3103 |
-
<wsdl:output name="getBillingRecordResponse" message="impl:getBillingRecordResponse">
|
3104 |
-
</wsdl:output>
|
3105 |
-
</wsdl:operation>
|
3106 |
-
<wsdl:operation name="updateBillingRecord">
|
3107 |
-
<wsdl:input name="updateBillingRecordRequest" message="impl:updateBillingRecordRequest">
|
3108 |
-
</wsdl:input>
|
3109 |
-
<wsdl:output name="updateBillingRecordResponse" message="impl:updateBillingRecordResponse">
|
3110 |
-
</wsdl:output>
|
3111 |
-
</wsdl:operation>
|
3112 |
-
<wsdl:operation name="doBankTransfer">
|
3113 |
-
<wsdl:input name="doBankTransferRequest" message="impl:doBankTransferRequest">
|
3114 |
-
</wsdl:input>
|
3115 |
-
<wsdl:output name="doBankTransferResponse" message="impl:doBankTransferResponse">
|
3116 |
-
</wsdl:output>
|
3117 |
-
</wsdl:operation>
|
3118 |
-
</wsdl:portType>
|
3119 |
-
<wsdl:portType name="ExtendedAPI">
|
3120 |
-
<wsdl:operation name="getTransactionDetails">
|
3121 |
-
<wsdl:input name="getTransactionDetailsRequest" message="impl:getTransactionDetailsRequest">
|
3122 |
-
</wsdl:input>
|
3123 |
-
<wsdl:output name="getTransactionDetailsResponse" message="impl:getTransactionDetailsResponse">
|
3124 |
-
</wsdl:output>
|
3125 |
-
</wsdl:operation>
|
3126 |
-
<wsdl:operation name="transactionsSearch">
|
3127 |
-
<wsdl:input name="transactionsSearchRequest" message="impl:transactionsSearchRequest">
|
3128 |
-
</wsdl:input>
|
3129 |
-
<wsdl:output name="transactionsSearchResponse" message="impl:transactionsSearchResponse">
|
3130 |
-
</wsdl:output>
|
3131 |
-
</wsdl:operation>
|
3132 |
-
<wsdl:operation name="getAlertDetails">
|
3133 |
-
<wsdl:input message="impl:getAlertDetailsRequest">
|
3134 |
-
</wsdl:input>
|
3135 |
-
<wsdl:output message="impl:getAlertDetailsResponse">
|
3136 |
-
</wsdl:output>
|
3137 |
-
</wsdl:operation>
|
3138 |
-
</wsdl:portType>
|
3139 |
-
<wsdl:binding name="DirectPaymentAPISoapBinding" type="impl:DirectPaymentAPI">
|
3140 |
-
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
3141 |
-
<wsdl:operation name="doAuthorization">
|
3142 |
-
<wsdlsoap:operation soapAction="doAuthorization"/>
|
3143 |
-
<wsdl:input>
|
3144 |
-
<wsdlsoap:body use="literal"/>
|
3145 |
-
</wsdl:input>
|
3146 |
-
<wsdl:output>
|
3147 |
-
<wsdlsoap:body use="literal"/>
|
3148 |
-
</wsdl:output>
|
3149 |
-
</wsdl:operation>
|
3150 |
-
<wsdl:operation name="doCapture">
|
3151 |
-
<wsdlsoap:operation soapAction="doCapture"/>
|
3152 |
-
<wsdl:input>
|
3153 |
-
<wsdlsoap:body use="literal"/>
|
3154 |
-
</wsdl:input>
|
3155 |
-
<wsdl:output>
|
3156 |
-
<wsdlsoap:body use="literal"/>
|
3157 |
-
</wsdl:output>
|
3158 |
-
</wsdl:operation>
|
3159 |
-
<wsdl:operation name="doReAuthorization">
|
3160 |
-
<wsdlsoap:operation soapAction="doReAuthorization"/>
|
3161 |
-
<wsdl:input>
|
3162 |
-
<wsdlsoap:body use="literal"/>
|
3163 |
-
</wsdl:input>
|
3164 |
-
<wsdl:output>
|
3165 |
-
<wsdlsoap:body use="literal"/>
|
3166 |
-
</wsdl:output>
|
3167 |
-
</wsdl:operation>
|
3168 |
-
<wsdl:operation name="doDebit">
|
3169 |
-
<wsdlsoap:operation soapAction="doDebit"/>
|
3170 |
-
<wsdl:input>
|
3171 |
-
<wsdlsoap:body use="literal"/>
|
3172 |
-
</wsdl:input>
|
3173 |
-
<wsdl:output>
|
3174 |
-
<wsdlsoap:body use="literal"/>
|
3175 |
-
</wsdl:output>
|
3176 |
-
</wsdl:operation>
|
3177 |
-
<wsdl:operation name="doRefund">
|
3178 |
-
<wsdlsoap:operation soapAction="doRefund"/>
|
3179 |
-
<wsdl:input>
|
3180 |
-
<wsdlsoap:body use="literal"/>
|
3181 |
-
</wsdl:input>
|
3182 |
-
<wsdl:output>
|
3183 |
-
<wsdlsoap:body use="literal"/>
|
3184 |
-
</wsdl:output>
|
3185 |
-
</wsdl:operation>
|
3186 |
-
<wsdl:operation name="doReset">
|
3187 |
-
<wsdlsoap:operation soapAction="doReset"/>
|
3188 |
-
<wsdl:input>
|
3189 |
-
<wsdlsoap:body use="literal"/>
|
3190 |
-
</wsdl:input>
|
3191 |
-
<wsdl:output>
|
3192 |
-
<wsdlsoap:body use="literal"/>
|
3193 |
-
</wsdl:output>
|
3194 |
-
</wsdl:operation>
|
3195 |
-
<wsdl:operation name="doCredit">
|
3196 |
-
<wsdlsoap:operation soapAction="doCredit"/>
|
3197 |
-
<wsdl:input>
|
3198 |
-
<wsdlsoap:body use="literal"/>
|
3199 |
-
</wsdl:input>
|
3200 |
-
<wsdl:output>
|
3201 |
-
<wsdlsoap:body use="literal"/>
|
3202 |
-
</wsdl:output>
|
3203 |
-
</wsdl:operation>
|
3204 |
-
<wsdl:operation name="createWallet">
|
3205 |
-
<wsdlsoap:operation soapAction="createWallet"/>
|
3206 |
-
<wsdl:input>
|
3207 |
-
<wsdlsoap:body use="literal"/>
|
3208 |
-
</wsdl:input>
|
3209 |
-
<wsdl:output>
|
3210 |
-
<wsdlsoap:body use="literal"/>
|
3211 |
-
</wsdl:output>
|
3212 |
-
</wsdl:operation>
|
3213 |
-
<wsdl:operation name="updateWallet">
|
3214 |
-
<wsdlsoap:operation soapAction="updateWallet"/>
|
3215 |
-
<wsdl:input>
|
3216 |
-
<wsdlsoap:body use="literal"/>
|
3217 |
-
</wsdl:input>
|
3218 |
-
<wsdl:output>
|
3219 |
-
<wsdlsoap:body use="literal"/>
|
3220 |
-
</wsdl:output>
|
3221 |
-
</wsdl:operation>
|
3222 |
-
<wsdl:operation name="getWallet">
|
3223 |
-
<wsdlsoap:operation soapAction="getWallet"/>
|
3224 |
-
<wsdl:input>
|
3225 |
-
<wsdlsoap:body use="literal"/>
|
3226 |
-
</wsdl:input>
|
3227 |
-
<wsdl:output>
|
3228 |
-
<wsdlsoap:body use="literal"/>
|
3229 |
-
</wsdl:output>
|
3230 |
-
</wsdl:operation>
|
3231 |
-
<wsdl:operation name="getCards">
|
3232 |
-
<wsdlsoap:operation soapAction="getCards"/>
|
3233 |
-
<wsdl:input>
|
3234 |
-
<wsdlsoap:body use="literal"/>
|
3235 |
-
</wsdl:input>
|
3236 |
-
<wsdl:output>
|
3237 |
-
<wsdlsoap:body use="literal"/>
|
3238 |
-
</wsdl:output>
|
3239 |
-
</wsdl:operation>
|
3240 |
-
<wsdl:operation name="disableWallet">
|
3241 |
-
<wsdlsoap:operation soapAction="disableWallet"/>
|
3242 |
-
<wsdl:input>
|
3243 |
-
<wsdlsoap:body use="literal"/>
|
3244 |
-
</wsdl:input>
|
3245 |
-
<wsdl:output>
|
3246 |
-
<wsdlsoap:body use="literal"/>
|
3247 |
-
</wsdl:output>
|
3248 |
-
</wsdl:operation>
|
3249 |
-
<wsdl:operation name="enableWallet">
|
3250 |
-
<wsdlsoap:operation soapAction="enableWallet"/>
|
3251 |
-
<wsdl:input>
|
3252 |
-
<wsdlsoap:body use="literal"/>
|
3253 |
-
</wsdl:input>
|
3254 |
-
<wsdl:output>
|
3255 |
-
<wsdlsoap:body use="literal"/>
|
3256 |
-
</wsdl:output>
|
3257 |
-
</wsdl:operation>
|
3258 |
-
<wsdl:operation name="doImmediateWalletPayment">
|
3259 |
-
<wsdlsoap:operation soapAction="doImmediateWalletPayment"/>
|
3260 |
-
<wsdl:input>
|
3261 |
-
<wsdlsoap:body use="literal"/>
|
3262 |
-
</wsdl:input>
|
3263 |
-
<wsdl:output>
|
3264 |
-
<wsdlsoap:body use="literal"/>
|
3265 |
-
</wsdl:output>
|
3266 |
-
</wsdl:operation>
|
3267 |
-
<wsdl:operation name="doScheduledWalletPayment">
|
3268 |
-
<wsdlsoap:operation soapAction="doScheduledWalletPayment"/>
|
3269 |
-
<wsdl:input>
|
3270 |
-
<wsdlsoap:body use="literal"/>
|
3271 |
-
</wsdl:input>
|
3272 |
-
<wsdl:output>
|
3273 |
-
<wsdlsoap:body use="literal"/>
|
3274 |
-
</wsdl:output>
|
3275 |
-
</wsdl:operation>
|
3276 |
-
<wsdl:operation name="doRecurrentWalletPayment">
|
3277 |
-
<wsdlsoap:operation soapAction="doRecurrentWalletPayment"/>
|
3278 |
-
<wsdl:input>
|
3279 |
-
<wsdlsoap:body use="literal"/>
|
3280 |
-
</wsdl:input>
|
3281 |
-
<wsdl:output>
|
3282 |
-
<wsdlsoap:body use="literal"/>
|
3283 |
-
</wsdl:output>
|
3284 |
-
</wsdl:operation>
|
3285 |
-
<wsdl:operation name="getPaymentRecord">
|
3286 |
-
<wsdlsoap:operation soapAction="getPaymentRecord"/>
|
3287 |
-
<wsdl:input>
|
3288 |
-
<wsdlsoap:body use="literal"/>
|
3289 |
-
</wsdl:input>
|
3290 |
-
<wsdl:output>
|
3291 |
-
<wsdlsoap:body use="literal"/>
|
3292 |
-
</wsdl:output>
|
3293 |
-
</wsdl:operation>
|
3294 |
-
<wsdl:operation name="disablePaymentRecord">
|
3295 |
-
<wsdlsoap:operation soapAction="disablePaymentRecord"/>
|
3296 |
-
<wsdl:input>
|
3297 |
-
<wsdlsoap:body use="literal"/>
|
3298 |
-
</wsdl:input>
|
3299 |
-
<wsdl:output>
|
3300 |
-
<wsdlsoap:body use="literal"/>
|
3301 |
-
</wsdl:output>
|
3302 |
-
</wsdl:operation>
|
3303 |
-
<wsdl:operation name="verifyEnrollment">
|
3304 |
-
<wsdlsoap:operation soapAction="verifyEnrollment"/>
|
3305 |
-
<wsdl:input>
|
3306 |
-
<wsdlsoap:body use="literal"/>
|
3307 |
-
</wsdl:input>
|
3308 |
-
<wsdl:output>
|
3309 |
-
<wsdlsoap:body use="literal"/>
|
3310 |
-
</wsdl:output>
|
3311 |
-
</wsdl:operation>
|
3312 |
-
<wsdl:operation name="verifyAuthentication">
|
3313 |
-
<wsdlsoap:operation soapAction="verifyAuthentication"/>
|
3314 |
-
<wsdl:input>
|
3315 |
-
<wsdlsoap:body use="literal"/>
|
3316 |
-
</wsdl:input>
|
3317 |
-
<wsdl:output>
|
3318 |
-
<wsdlsoap:body use="literal"/>
|
3319 |
-
</wsdl:output>
|
3320 |
-
</wsdl:operation>
|
3321 |
-
<wsdl:operation name="createMerchant">
|
3322 |
-
<wsdlsoap:operation soapAction="createMerchant"/>
|
3323 |
-
<wsdl:input>
|
3324 |
-
<wsdlsoap:body use="literal"/>
|
3325 |
-
</wsdl:input>
|
3326 |
-
<wsdl:output>
|
3327 |
-
<wsdlsoap:body use="literal"/>
|
3328 |
-
</wsdl:output>
|
3329 |
-
</wsdl:operation>
|
3330 |
-
<wsdl:operation name="doScoringCheque">
|
3331 |
-
<wsdlsoap:operation soapAction="doScoringCheque"/>
|
3332 |
-
<wsdl:input>
|
3333 |
-
<wsdlsoap:body use="literal"/>
|
3334 |
-
</wsdl:input>
|
3335 |
-
<wsdl:output>
|
3336 |
-
<wsdlsoap:body use="literal"/>
|
3337 |
-
</wsdl:output>
|
3338 |
-
</wsdl:operation>
|
3339 |
-
<wsdl:operation name="getEncryptionKey">
|
3340 |
-
<wsdlsoap:operation soapAction="getEncryptionKey"/>
|
3341 |
-
<wsdl:input>
|
3342 |
-
<wsdlsoap:body use="literal"/>
|
3343 |
-
</wsdl:input>
|
3344 |
-
<wsdl:output>
|
3345 |
-
<wsdlsoap:body use="literal"/>
|
3346 |
-
</wsdl:output>
|
3347 |
-
</wsdl:operation>
|
3348 |
-
<wsdl:operation name="getMerchantSettings">
|
3349 |
-
<wsdlsoap:operation soapAction="getMerchantSettings"/>
|
3350 |
-
<wsdl:input name="getMerchantSettingsRequest">
|
3351 |
-
<wsdlsoap:body use="literal"/>
|
3352 |
-
</wsdl:input>
|
3353 |
-
<wsdl:output name="getMerchantSettingsResponse">
|
3354 |
-
<wsdlsoap:body use="literal"/>
|
3355 |
-
</wsdl:output>
|
3356 |
-
</wsdl:operation>
|
3357 |
-
<wsdl:operation name="getBalance">
|
3358 |
-
<wsdlsoap:operation soapAction="getBalance"/>
|
3359 |
-
<wsdl:input>
|
3360 |
-
<wsdlsoap:body use="literal"/>
|
3361 |
-
</wsdl:input>
|
3362 |
-
<wsdl:output>
|
3363 |
-
<wsdlsoap:body use="literal"/>
|
3364 |
-
</wsdl:output>
|
3365 |
-
</wsdl:operation>
|
3366 |
-
<wsdl:operation name="getToken">
|
3367 |
-
<wsdlsoap:operation soapAction="getToken"/>
|
3368 |
-
<wsdl:input>
|
3369 |
-
<wsdlsoap:body use="literal"/>
|
3370 |
-
</wsdl:input>
|
3371 |
-
<wsdl:output>
|
3372 |
-
<wsdlsoap:body use="literal"/>
|
3373 |
-
</wsdl:output>
|
3374 |
-
</wsdl:operation>
|
3375 |
-
<wsdl:operation name="unBlock">
|
3376 |
-
<wsdlsoap:operation soapAction="unBlock"/>
|
3377 |
-
<wsdl:input>
|
3378 |
-
<wsdlsoap:body use="literal"/>
|
3379 |
-
</wsdl:input>
|
3380 |
-
<wsdl:output>
|
3381 |
-
<wsdlsoap:body use="literal"/>
|
3382 |
-
</wsdl:output>
|
3383 |
-
</wsdl:operation>
|
3384 |
-
<wsdl:operation name="updatePaymentRecord">
|
3385 |
-
<wsdlsoap:operation soapAction="updatePaymentRecord"/>
|
3386 |
-
<wsdl:input>
|
3387 |
-
<wsdlsoap:body use="literal"/>
|
3388 |
-
</wsdl:input>
|
3389 |
-
<wsdl:output>
|
3390 |
-
<wsdlsoap:body use="literal"/>
|
3391 |
-
</wsdl:output>
|
3392 |
-
</wsdl:operation>
|
3393 |
-
<wsdl:operation name="getBillingRecord">
|
3394 |
-
<wsdlsoap:operation soapAction="getBillingRecord"/>
|
3395 |
-
<wsdl:input>
|
3396 |
-
<wsdlsoap:body use="literal"/>
|
3397 |
-
</wsdl:input>
|
3398 |
-
<wsdl:output>
|
3399 |
-
<wsdlsoap:body use="literal"/>
|
3400 |
-
</wsdl:output>
|
3401 |
-
</wsdl:operation>
|
3402 |
-
<wsdl:operation name="updateBillingRecord">
|
3403 |
-
<wsdlsoap:operation soapAction="updateBillingRecord"/>
|
3404 |
-
<wsdl:input>
|
3405 |
-
<wsdlsoap:body use="literal"/>
|
3406 |
-
</wsdl:input>
|
3407 |
-
<wsdl:output>
|
3408 |
-
<wsdlsoap:body use="literal"/>
|
3409 |
-
</wsdl:output>
|
3410 |
-
</wsdl:operation>
|
3411 |
-
<wsdl:operation name="doBankTransfer">
|
3412 |
-
<wsdlsoap:operation soapAction="doBankTransfer"/>
|
3413 |
-
<wsdl:input>
|
3414 |
-
<wsdlsoap:body use="literal"/>
|
3415 |
-
</wsdl:input>
|
3416 |
-
<wsdl:output>
|
3417 |
-
<wsdlsoap:body use="literal"/>
|
3418 |
-
</wsdl:output>
|
3419 |
-
</wsdl:operation>
|
3420 |
-
</wsdl:binding>
|
3421 |
-
<wsdl:binding name="WebPaymentAPISoapBinding" type="impl:WebPaymentAPI">
|
3422 |
-
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
3423 |
-
<wsdl:operation name="getWebPaymentDetails">
|
3424 |
-
<wsdlsoap:operation soapAction="getWebPaymentDetails"/>
|
3425 |
-
<wsdl:input>
|
3426 |
-
<wsdlsoap:body use="literal"/>
|
3427 |
-
</wsdl:input>
|
3428 |
-
<wsdl:output>
|
3429 |
-
<wsdlsoap:body use="literal"/>
|
3430 |
-
</wsdl:output>
|
3431 |
-
</wsdl:operation>
|
3432 |
-
<wsdl:operation name="doWebPayment">
|
3433 |
-
<wsdlsoap:operation soapAction="doWebPayment"/>
|
3434 |
-
<wsdl:input>
|
3435 |
-
<wsdlsoap:body use="literal"/>
|
3436 |
-
</wsdl:input>
|
3437 |
-
<wsdl:output>
|
3438 |
-
<wsdlsoap:body use="literal"/>
|
3439 |
-
</wsdl:output>
|
3440 |
-
</wsdl:operation>
|
3441 |
-
<wsdl:operation name="manageWebWallet">
|
3442 |
-
<wsdlsoap:operation soapAction="manageWebWallet"/>
|
3443 |
-
<wsdl:input>
|
3444 |
-
<wsdlsoap:body use="literal"/>
|
3445 |
-
</wsdl:input>
|
3446 |
-
<wsdl:output>
|
3447 |
-
<wsdlsoap:body use="literal"/>
|
3448 |
-
</wsdl:output>
|
3449 |
-
</wsdl:operation>
|
3450 |
-
<wsdl:operation name="createWebWallet">
|
3451 |
-
<wsdlsoap:operation soapAction="createWebWallet"/>
|
3452 |
-
<wsdl:input>
|
3453 |
-
<wsdlsoap:body use="literal"/>
|
3454 |
-
</wsdl:input>
|
3455 |
-
<wsdl:output>
|
3456 |
-
<wsdlsoap:body use="literal"/>
|
3457 |
-
</wsdl:output>
|
3458 |
-
</wsdl:operation>
|
3459 |
-
<wsdl:operation name="updateWebWallet">
|
3460 |
-
<wsdlsoap:operation soapAction="updateWebWallet"/>
|
3461 |
-
<wsdl:input>
|
3462 |
-
<wsdlsoap:body use="literal"/>
|
3463 |
-
</wsdl:input>
|
3464 |
-
<wsdl:output>
|
3465 |
-
<wsdlsoap:body use="literal"/>
|
3466 |
-
</wsdl:output>
|
3467 |
-
</wsdl:operation>
|
3468 |
-
<wsdl:operation name="getWebWallet">
|
3469 |
-
<wsdlsoap:operation soapAction="getWebWallet"/>
|
3470 |
-
<wsdl:input>
|
3471 |
-
<wsdlsoap:body use="literal"/>
|
3472 |
-
</wsdl:input>
|
3473 |
-
<wsdl:output>
|
3474 |
-
<wsdlsoap:body use="literal"/>
|
3475 |
-
</wsdl:output>
|
3476 |
-
</wsdl:operation>
|
3477 |
-
</wsdl:binding>
|
3478 |
-
<wsdl:binding name="ExtendedAPISoapBinding" type="impl:ExtendedAPI">
|
3479 |
-
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
3480 |
-
<wsdl:operation name="getTransactionDetails">
|
3481 |
-
<wsdlsoap:operation soapAction="getTransactionDetails"/>
|
3482 |
-
<wsdl:input>
|
3483 |
-
<wsdlsoap:body use="literal"/>
|
3484 |
-
</wsdl:input>
|
3485 |
-
<wsdl:output>
|
3486 |
-
<wsdlsoap:body use="literal"/>
|
3487 |
-
</wsdl:output>
|
3488 |
-
</wsdl:operation>
|
3489 |
-
<wsdl:operation name="transactionsSearch">
|
3490 |
-
<wsdlsoap:operation soapAction="transactionsSearch"/>
|
3491 |
-
<wsdl:input>
|
3492 |
-
<wsdlsoap:body use="literal"/>
|
3493 |
-
</wsdl:input>
|
3494 |
-
<wsdl:output>
|
3495 |
-
<wsdlsoap:body use="literal"/>
|
3496 |
-
</wsdl:output>
|
3497 |
-
</wsdl:operation>
|
3498 |
-
<wsdl:operation name="getAlertDetails">
|
3499 |
-
<wsdlsoap:operation soapAction="getAlertDetails"/>
|
3500 |
-
<wsdl:input>
|
3501 |
-
<wsdlsoap:body use="literal"/>
|
3502 |
-
</wsdl:input>
|
3503 |
-
<wsdl:output>
|
3504 |
-
<wsdlsoap:body use="literal"/>
|
3505 |
-
</wsdl:output>
|
3506 |
-
</wsdl:operation>
|
3507 |
-
</wsdl:binding>
|
3508 |
-
<wsdl:service name="WebPaymentAPI">
|
3509 |
-
<wsdl:port name="WebPaymentAPI" binding="impl:WebPaymentAPISoapBinding">
|
3510 |
-
<wsdlsoap:address location="https://homologation.payline.com/V4/services/WebPaymentAPI"/>
|
3511 |
-
</wsdl:port>
|
3512 |
-
</wsdl:service>
|
3513 |
-
<wsdl:service name="ExtendedAPI">
|
3514 |
-
<wsdl:port name="ExtendedAPI" binding="impl:ExtendedAPISoapBinding">
|
3515 |
-
<wsdlsoap:address location="https://homologation.payline.com/V4/services/ExtendedAPI"/>
|
3516 |
-
</wsdl:port>
|
3517 |
-
</wsdl:service>
|
3518 |
-
<wsdl:service name="DirectPaymentAPI">
|
3519 |
-
<wsdl:port name="DirectPaymentAPI" binding="impl:DirectPaymentAPISoapBinding">
|
3520 |
-
<wsdlsoap:address location="https://homologation.payline.com/V4/services/DirectPaymentAPI"/>
|
3521 |
-
</wsdl:port>
|
3522 |
-
</wsdl:service>
|
3523 |
-
</wsdl:definitions>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Monext/Payline/lib/v4.44.wsdl
CHANGED
@@ -1,3453 +1,3453 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<wsdl:definitions targetNamespace="http://impl.ws.payline.experian.com" xmlns:impl="http://impl.ws.payline.experian.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:intf="http://impl.ws.payline.experian.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns1="http://obj.ws.payline.experian.com">
|
3 |
-
<wsdl:types>
|
4 |
-
<schema elementFormDefault="qualified" targetNamespace="http://impl.ws.payline.experian.com" xmlns="http://www.w3.org/2001/XMLSchema">
|
5 |
-
<import namespace="http://obj.ws.payline.experian.com"/>
|
6 |
-
<element name="doWebPaymentRequest">
|
7 |
-
<complexType>
|
8 |
-
<annotation>
|
9 |
-
<documentation>
|
10 |
-
This element is the request for the
|
11 |
-
doWebPayment
|
12 |
-
method
|
13 |
-
</documentation>
|
14 |
-
</annotation>
|
15 |
-
<sequence>
|
16 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
17 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
18 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
19 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
20 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
21 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
22 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
23 |
-
<element name="secondSelectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
24 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
25 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
26 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
27 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
28 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
29 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
30 |
-
<element name="recurring" nillable="true" type="tns1:recurring"/>
|
31 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
32 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
33 |
-
</sequence>
|
34 |
-
</complexType>
|
35 |
-
</element>
|
36 |
-
<element name="doWebPaymentResponse">
|
37 |
-
<complexType>
|
38 |
-
<annotation>
|
39 |
-
<documentation>
|
40 |
-
This element is the reponse from the
|
41 |
-
doWebPayment
|
42 |
-
method
|
43 |
-
</documentation>
|
44 |
-
</annotation>
|
45 |
-
<sequence>
|
46 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
47 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
48 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
49 |
-
<element minOccurs="0" name="stepCode" nillable="true" type="xsd:string"/>
|
50 |
-
<element minOccurs="0" name="reqCode" nillable="true" type="xsd:string"/>
|
51 |
-
<element minOccurs="0" name="method" nillable="true" type="xsd:string"/>
|
52 |
-
</sequence>
|
53 |
-
</complexType>
|
54 |
-
</element>
|
55 |
-
<element name="getWebPaymentDetailsRequest">
|
56 |
-
<complexType>
|
57 |
-
<annotation>
|
58 |
-
<documentation>
|
59 |
-
This element is the reponse from the
|
60 |
-
getWebPayment
|
61 |
-
method
|
62 |
-
</documentation>
|
63 |
-
</annotation>
|
64 |
-
<sequence>
|
65 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
66 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
67 |
-
</sequence>
|
68 |
-
</complexType>
|
69 |
-
</element>
|
70 |
-
<element name="getWebPaymentDetailsResponse">
|
71 |
-
<complexType>
|
72 |
-
<annotation>
|
73 |
-
<documentation>
|
74 |
-
This element is the reponse from the
|
75 |
-
doWebPayment
|
76 |
-
method
|
77 |
-
</documentation>
|
78 |
-
</annotation>
|
79 |
-
<sequence>
|
80 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
81 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
82 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
83 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
84 |
-
<element minOccurs="0" name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
85 |
-
<element minOccurs="0" name="paymentRecordId" nillable="true" type="xsd:string"/>
|
86 |
-
<element minOccurs="0" name="billingRecordList" nillable="true" type="tns1:billingRecordList"/>
|
87 |
-
<element minOccurs="0" name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
88 |
-
<element name="card" type="tns1:cardOut"/>
|
89 |
-
<element minOccurs="0" name="extendedCard" type="tns1:extendedCardType"/>
|
90 |
-
<element name="order" type="tns1:order"/>
|
91 |
-
<element minOccurs="0" name="paymentAdditionalList" nillable="true" type="tns1:paymentAdditionalList"/>
|
92 |
-
<element minOccurs="0" name="media" nillable="true" type="xsd:string"/>
|
93 |
-
<element minOccurs="0" name="numberOfAttempt" nillable="true" type="xsd:string"/>
|
94 |
-
<element minOccurs="0" name="wallet" nillable="true" type="tns1:wallet"/>
|
95 |
-
<element minOccurs="0" name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
96 |
-
<element minOccurs="0" name="contractNumber" nillable="false" type="xsd:string"/>
|
97 |
-
<element name="bankAccountData" nillable="true" type="tns1:bankAccountData"/>
|
98 |
-
</sequence>
|
99 |
-
</complexType>
|
100 |
-
</element>
|
101 |
-
<element name="doAuthorizationRequest">
|
102 |
-
<complexType>
|
103 |
-
<annotation>
|
104 |
-
<documentation>
|
105 |
-
This element is the request for the
|
106 |
-
doAuthorization
|
107 |
-
method
|
108 |
-
</documentation>
|
109 |
-
</annotation>
|
110 |
-
<sequence>
|
111 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
112 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
113 |
-
<element name="bankAccountData" nillable="false" type="tns1:bankAccountData"/>
|
114 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
115 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
116 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
117 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
118 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
119 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
120 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
121 |
-
</sequence>
|
122 |
-
</complexType>
|
123 |
-
</element>
|
124 |
-
<element name="doAuthorizationResponse">
|
125 |
-
<complexType>
|
126 |
-
<annotation>
|
127 |
-
<documentation>
|
128 |
-
This element is the reponse from the
|
129 |
-
doAuthorization method
|
130 |
-
</documentation>
|
131 |
-
</annotation>
|
132 |
-
<sequence>
|
133 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
134 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
135 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
136 |
-
<element name="card" type="tns1:cardOut"/>
|
137 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
138 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
139 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
140 |
-
</sequence>
|
141 |
-
</complexType>
|
142 |
-
</element>
|
143 |
-
<element name="doCaptureRequest">
|
144 |
-
<complexType>
|
145 |
-
<annotation>
|
146 |
-
<documentation>
|
147 |
-
This element is the request for the
|
148 |
-
doCapture method
|
149 |
-
</documentation>
|
150 |
-
</annotation>
|
151 |
-
<sequence>
|
152 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
153 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
154 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
155 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
156 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
157 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
158 |
-
</sequence>
|
159 |
-
</complexType>
|
160 |
-
</element>
|
161 |
-
<element name="doCaptureResponse">
|
162 |
-
<complexType>
|
163 |
-
<annotation>
|
164 |
-
<documentation>
|
165 |
-
This element is the reponse from the
|
166 |
-
doCapture
|
167 |
-
method
|
168 |
-
</documentation>
|
169 |
-
</annotation>
|
170 |
-
<sequence>
|
171 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
172 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
173 |
-
<element name="reAuthorization" nillable="true" type="xsd:string"/>
|
174 |
-
</sequence>
|
175 |
-
</complexType>
|
176 |
-
</element>
|
177 |
-
<element name="doDebitRequest">
|
178 |
-
<complexType>
|
179 |
-
<sequence>
|
180 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
181 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
182 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
183 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
184 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
185 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
186 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
187 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
188 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
189 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
190 |
-
</sequence>
|
191 |
-
</complexType>
|
192 |
-
</element>
|
193 |
-
<element name="doDebitResponse">
|
194 |
-
<complexType>
|
195 |
-
<sequence>
|
196 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
197 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
198 |
-
<element name="card" type="tns1:cardOut"/>
|
199 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
200 |
-
</sequence>
|
201 |
-
</complexType>
|
202 |
-
</element>
|
203 |
-
<element name="doRefundRequest">
|
204 |
-
<complexType>
|
205 |
-
<annotation>
|
206 |
-
<documentation>
|
207 |
-
This element is the request for the doRefund
|
208 |
-
method
|
209 |
-
</documentation>
|
210 |
-
</annotation>
|
211 |
-
<sequence>
|
212 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
213 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
214 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
215 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
216 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
217 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
218 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
219 |
-
</sequence>
|
220 |
-
</complexType>
|
221 |
-
</element>
|
222 |
-
<element name="doRefundResponse">
|
223 |
-
<complexType>
|
224 |
-
<annotation>
|
225 |
-
<documentation>
|
226 |
-
This element is the reponse from the
|
227 |
-
doRefund method
|
228 |
-
</documentation>
|
229 |
-
</annotation>
|
230 |
-
<sequence>
|
231 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
232 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
233 |
-
</sequence>
|
234 |
-
</complexType>
|
235 |
-
</element>
|
236 |
-
<element name="doResetRequest">
|
237 |
-
<complexType>
|
238 |
-
<annotation>
|
239 |
-
<documentation>
|
240 |
-
This element is the request for the doReset
|
241 |
-
method
|
242 |
-
</documentation>
|
243 |
-
</annotation>
|
244 |
-
<sequence>
|
245 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
246 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
247 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
248 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
249 |
-
</sequence>
|
250 |
-
</complexType>
|
251 |
-
</element>
|
252 |
-
<element name="doResetResponse">
|
253 |
-
<complexType>
|
254 |
-
<annotation>
|
255 |
-
<documentation>
|
256 |
-
This element is the reponse from the doReset
|
257 |
-
method
|
258 |
-
</documentation>
|
259 |
-
</annotation>
|
260 |
-
<sequence>
|
261 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
262 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
263 |
-
</sequence>
|
264 |
-
</complexType>
|
265 |
-
</element>
|
266 |
-
<element name="doCreditRequest">
|
267 |
-
<complexType>
|
268 |
-
<annotation>
|
269 |
-
<documentation>
|
270 |
-
This element is the request for the doCredit
|
271 |
-
method
|
272 |
-
</documentation>
|
273 |
-
</annotation>
|
274 |
-
<sequence>
|
275 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
276 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
277 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
278 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
279 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
280 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
281 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
282 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
283 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
284 |
-
</sequence>
|
285 |
-
</complexType>
|
286 |
-
</element>
|
287 |
-
<element name="doCreditResponse">
|
288 |
-
<complexType>
|
289 |
-
<annotation>
|
290 |
-
<documentation>
|
291 |
-
This element is the reponse from the
|
292 |
-
doCredit method
|
293 |
-
</documentation>
|
294 |
-
</annotation>
|
295 |
-
<sequence>
|
296 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
297 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
298 |
-
<element name="card" type="tns1:cardOut"/>
|
299 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
300 |
-
</sequence>
|
301 |
-
</complexType>
|
302 |
-
</element>
|
303 |
-
<element name="createWalletRequest">
|
304 |
-
<complexType>
|
305 |
-
<annotation>
|
306 |
-
<documentation>
|
307 |
-
This element is the request for the
|
308 |
-
createWallet
|
309 |
-
method
|
310 |
-
</documentation>
|
311 |
-
</annotation>
|
312 |
-
<sequence>
|
313 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
314 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
315 |
-
<element name="wallet" nillable="false" type="tns1:wallet"/>
|
316 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
317 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
318 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
319 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
320 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
321 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
322 |
-
</sequence>
|
323 |
-
</complexType>
|
324 |
-
</element>
|
325 |
-
<element name="createWalletResponse">
|
326 |
-
<complexType>
|
327 |
-
<annotation>
|
328 |
-
<documentation>
|
329 |
-
This element is the reponse from the
|
330 |
-
createWallet
|
331 |
-
method
|
332 |
-
</documentation>
|
333 |
-
</annotation>
|
334 |
-
<sequence>
|
335 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
336 |
-
<element name="card" type="tns1:cardOut"/>
|
337 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
338 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
339 |
-
<element name="fraudResultDetails" nillable="true" type="tns1:fraudResultDetails"/>
|
340 |
-
</sequence>
|
341 |
-
</complexType>
|
342 |
-
</element>
|
343 |
-
<element name="updateWalletRequest">
|
344 |
-
<complexType>
|
345 |
-
<annotation>
|
346 |
-
<documentation>
|
347 |
-
This element is the request for the
|
348 |
-
updateWallet
|
349 |
-
method
|
350 |
-
</documentation>
|
351 |
-
</annotation>
|
352 |
-
<sequence>
|
353 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
354 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
355 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
356 |
-
<element name="wallet" nillable="false" type="tns1:wallet"/>
|
357 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
358 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
359 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
360 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
361 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
362 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
363 |
-
</sequence>
|
364 |
-
</complexType>
|
365 |
-
</element>
|
366 |
-
<element name="updateWalletResponse">
|
367 |
-
<complexType>
|
368 |
-
<annotation>
|
369 |
-
<documentation>
|
370 |
-
This element is the reponse from the
|
371 |
-
updateWallet
|
372 |
-
method
|
373 |
-
</documentation>
|
374 |
-
</annotation>
|
375 |
-
<sequence>
|
376 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
377 |
-
<element name="card" type="tns1:cardOut"/>
|
378 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
379 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
380 |
-
</sequence>
|
381 |
-
</complexType>
|
382 |
-
</element>
|
383 |
-
<element name="getWalletRequest">
|
384 |
-
<complexType>
|
385 |
-
<annotation>
|
386 |
-
<documentation>
|
387 |
-
This element is the request for the
|
388 |
-
getWallet method
|
389 |
-
</documentation>
|
390 |
-
</annotation>
|
391 |
-
<sequence>
|
392 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
393 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
394 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
395 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
396 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
397 |
-
</sequence>
|
398 |
-
</complexType>
|
399 |
-
</element>
|
400 |
-
<element name="getWalletResponse">
|
401 |
-
<complexType>
|
402 |
-
<annotation>
|
403 |
-
<documentation>
|
404 |
-
This element is the reponse from the
|
405 |
-
getWallet
|
406 |
-
method
|
407 |
-
</documentation>
|
408 |
-
</annotation>
|
409 |
-
<sequence>
|
410 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
411 |
-
<element name="wallet" nillable="true" type="tns1:wallet"/>
|
412 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
413 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
414 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
415 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
416 |
-
<element name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
417 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
418 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
419 |
-
</sequence>
|
420 |
-
</complexType>
|
421 |
-
</element>
|
422 |
-
<element name="getCardsRequest">
|
423 |
-
<complexType>
|
424 |
-
<annotation>
|
425 |
-
<documentation>
|
426 |
-
This element is the request for the
|
427 |
-
getCards method
|
428 |
-
</documentation>
|
429 |
-
</annotation>
|
430 |
-
<sequence>
|
431 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
432 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
433 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
434 |
-
</sequence>
|
435 |
-
</complexType>
|
436 |
-
</element>
|
437 |
-
<element name="getCardsResponse">
|
438 |
-
<complexType>
|
439 |
-
<annotation>
|
440 |
-
<documentation>
|
441 |
-
This element is the reponse from the
|
442 |
-
getCards method
|
443 |
-
</documentation>
|
444 |
-
</annotation>
|
445 |
-
<sequence>
|
446 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
447 |
-
<element name="cardsList" nillable="true" type="tns1:cardsList"/>
|
448 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
449 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
450 |
-
</sequence>
|
451 |
-
</complexType>
|
452 |
-
</element>
|
453 |
-
<element name="disableWalletRequest">
|
454 |
-
<complexType>
|
455 |
-
<annotation>
|
456 |
-
<documentation>
|
457 |
-
This element is the request for the
|
458 |
-
disableWallet
|
459 |
-
method
|
460 |
-
</documentation>
|
461 |
-
</annotation>
|
462 |
-
<sequence>
|
463 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
464 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
465 |
-
<element name="walletIdList" nillable="false" type="tns1:walletIdList"/>
|
466 |
-
</sequence>
|
467 |
-
</complexType>
|
468 |
-
</element>
|
469 |
-
<element name="disableWalletResponse">
|
470 |
-
<complexType>
|
471 |
-
<annotation>
|
472 |
-
<documentation>
|
473 |
-
This element is the reponse from the
|
474 |
-
disableWallet
|
475 |
-
method
|
476 |
-
</documentation>
|
477 |
-
</annotation>
|
478 |
-
<sequence>
|
479 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
480 |
-
<element name="walletIdList" nillable="false" type="tns1:walletIdList"/>
|
481 |
-
</sequence>
|
482 |
-
</complexType>
|
483 |
-
</element>
|
484 |
-
<element name="enableWalletRequest">
|
485 |
-
<complexType>
|
486 |
-
<annotation>
|
487 |
-
<documentation>
|
488 |
-
This element is the request for the
|
489 |
-
enableWallet
|
490 |
-
method
|
491 |
-
</documentation>
|
492 |
-
</annotation>
|
493 |
-
<sequence>
|
494 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
495 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
496 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
497 |
-
</sequence>
|
498 |
-
</complexType>
|
499 |
-
</element>
|
500 |
-
<element name="enableWalletResponse">
|
501 |
-
<complexType>
|
502 |
-
<annotation>
|
503 |
-
<documentation>
|
504 |
-
This element is the reponse from the
|
505 |
-
enableWallet
|
506 |
-
method
|
507 |
-
</documentation>
|
508 |
-
</annotation>
|
509 |
-
<sequence>
|
510 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
511 |
-
</sequence>
|
512 |
-
</complexType>
|
513 |
-
</element>
|
514 |
-
<element name="doImmediateWalletPaymentRequest">
|
515 |
-
<complexType>
|
516 |
-
<annotation>
|
517 |
-
<documentation>
|
518 |
-
This element is the request for the
|
519 |
-
doImmediateWalletPayment method
|
520 |
-
</documentation>
|
521 |
-
</annotation>
|
522 |
-
<sequence>
|
523 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
524 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
525 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
526 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
527 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
528 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
529 |
-
<element name="cvx" nillable="true" type="xsd:string"/>
|
530 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
531 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
532 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
533 |
-
</sequence>
|
534 |
-
</complexType>
|
535 |
-
</element>
|
536 |
-
<element name="doImmediateWalletPaymentResponse">
|
537 |
-
<complexType>
|
538 |
-
<annotation>
|
539 |
-
<documentation>
|
540 |
-
This element is the reponse from the
|
541 |
-
doImmediateWalletPayment method
|
542 |
-
</documentation>
|
543 |
-
</annotation>
|
544 |
-
<sequence>
|
545 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
546 |
-
<element name="transaction" nillable="true" type="tns1:transaction"/>
|
547 |
-
<element name="authorization" nillable="true" type="tns1:authorization"/>
|
548 |
-
</sequence>
|
549 |
-
</complexType>
|
550 |
-
</element>
|
551 |
-
<element name="doScheduledWalletPaymentRequest">
|
552 |
-
<complexType>
|
553 |
-
<annotation>
|
554 |
-
<documentation>
|
555 |
-
This element is the request for the
|
556 |
-
doScheduledWalletPayment method
|
557 |
-
</documentation>
|
558 |
-
</annotation>
|
559 |
-
<sequence>
|
560 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
561 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
562 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
563 |
-
<element name="orderDate" nillable="true" type="xsd:string"/>
|
564 |
-
<element name="scheduledDate" nillable="false" type="xsd:string"/>
|
565 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
566 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
567 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
568 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
569 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
570 |
-
</sequence>
|
571 |
-
</complexType>
|
572 |
-
</element>
|
573 |
-
<element name="doScheduledWalletPaymentResponse">
|
574 |
-
<complexType>
|
575 |
-
<annotation>
|
576 |
-
<documentation>
|
577 |
-
This element is the reponse from the
|
578 |
-
doScheduledWalletPayment method
|
579 |
-
</documentation>
|
580 |
-
</annotation>
|
581 |
-
<sequence>
|
582 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
583 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
584 |
-
</sequence>
|
585 |
-
</complexType>
|
586 |
-
</element>
|
587 |
-
<element name="doRecurrentWalletPaymentRequest">
|
588 |
-
<complexType>
|
589 |
-
<annotation>
|
590 |
-
<documentation>
|
591 |
-
This element is the request for the
|
592 |
-
doRecurrentWalletPayment method
|
593 |
-
</documentation>
|
594 |
-
</annotation>
|
595 |
-
<sequence>
|
596 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
597 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
598 |
-
<element name="orderRef" nillable="false" type="xsd:string"/>
|
599 |
-
<element name="orderDate" nillable="false" type="xsd:string"/>
|
600 |
-
<element name="scheduledDate" nillable="false" type="xsd:string"/>
|
601 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
602 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
603 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
604 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
605 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
606 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
607 |
-
</sequence>
|
608 |
-
</complexType>
|
609 |
-
</element>
|
610 |
-
<element name="doRecurrentWalletPaymentResponse">
|
611 |
-
<complexType>
|
612 |
-
<annotation>
|
613 |
-
<documentation>
|
614 |
-
This element is the reponse from the
|
615 |
-
doRecurrentWalletPayment method
|
616 |
-
</documentation>
|
617 |
-
</annotation>
|
618 |
-
<sequence>
|
619 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
620 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
621 |
-
<element name="billingRecordList" nillable="false" type="tns1:billingRecordList"/>
|
622 |
-
</sequence>
|
623 |
-
</complexType>
|
624 |
-
</element>
|
625 |
-
<element name="getPaymentRecordRequest">
|
626 |
-
<complexType>
|
627 |
-
<annotation>
|
628 |
-
<documentation>
|
629 |
-
This element is the request for the
|
630 |
-
getPaymentRecord method
|
631 |
-
</documentation>
|
632 |
-
</annotation>
|
633 |
-
<sequence>
|
634 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
635 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
636 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
637 |
-
</sequence>
|
638 |
-
</complexType>
|
639 |
-
</element>
|
640 |
-
<element name="getPaymentRecordResponse">
|
641 |
-
<complexType>
|
642 |
-
<annotation>
|
643 |
-
<documentation>
|
644 |
-
This element is the reponse from the
|
645 |
-
getPaymentRecord method
|
646 |
-
</documentation>
|
647 |
-
</annotation>
|
648 |
-
<sequence>
|
649 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
650 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
651 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
652 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
653 |
-
<element name="billingRecordList" nillable="false" type="tns1:billingRecordList"/>
|
654 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
655 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
656 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
657 |
-
</sequence>
|
658 |
-
</complexType>
|
659 |
-
</element>
|
660 |
-
<element name="disablePaymentRecordRequest">
|
661 |
-
<complexType>
|
662 |
-
<annotation>
|
663 |
-
<documentation>
|
664 |
-
This element is the request for the
|
665 |
-
disablePaymentRecord method
|
666 |
-
</documentation>
|
667 |
-
</annotation>
|
668 |
-
<sequence>
|
669 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
670 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
671 |
-
</sequence>
|
672 |
-
</complexType>
|
673 |
-
</element>
|
674 |
-
<element name="disablePaymentRecordResponse">
|
675 |
-
<complexType>
|
676 |
-
<annotation>
|
677 |
-
<documentation>
|
678 |
-
This element is the reponse from the
|
679 |
-
disablePaymentRecord method
|
680 |
-
</documentation>
|
681 |
-
</annotation>
|
682 |
-
<sequence>
|
683 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
684 |
-
</sequence>
|
685 |
-
</complexType>
|
686 |
-
</element>
|
687 |
-
<element name="manageWebWalletRequest">
|
688 |
-
<complexType>
|
689 |
-
<annotation>
|
690 |
-
<documentation>
|
691 |
-
This element is the request for the
|
692 |
-
manageWebWallet
|
693 |
-
method
|
694 |
-
</documentation>
|
695 |
-
</annotation>
|
696 |
-
<sequence>
|
697 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
698 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
699 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
700 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
701 |
-
<element name="buyer" nillable="false" type="tns1:buyer"/>
|
702 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
703 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
704 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
705 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
706 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
707 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
708 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
709 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
710 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
711 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
712 |
-
</sequence>
|
713 |
-
</complexType>
|
714 |
-
</element>
|
715 |
-
<element name="manageWebWalletResponse">
|
716 |
-
<complexType>
|
717 |
-
<annotation>
|
718 |
-
<documentation>
|
719 |
-
This element is the reponse from the
|
720 |
-
manageWebWallet method
|
721 |
-
</documentation>
|
722 |
-
</annotation>
|
723 |
-
<sequence>
|
724 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
725 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
726 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
727 |
-
</sequence>
|
728 |
-
</complexType>
|
729 |
-
</element>
|
730 |
-
<element name="createWebWalletRequest">
|
731 |
-
<complexType>
|
732 |
-
<annotation>
|
733 |
-
<documentation>
|
734 |
-
This element is the request for the
|
735 |
-
createWebWallet
|
736 |
-
method
|
737 |
-
</documentation>
|
738 |
-
</annotation>
|
739 |
-
<sequence>
|
740 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
741 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
742 |
-
<element name="selectedContractList" nillable="true" type="tns1:selectedContractList"/>
|
743 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
744 |
-
<element name="buyer" nillable="false" type="tns1:buyer"/>
|
745 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
746 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
747 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
748 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
749 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
750 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
751 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
752 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
753 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
754 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
755 |
-
</sequence>
|
756 |
-
</complexType>
|
757 |
-
</element>
|
758 |
-
<element name="createWebWalletResponse">
|
759 |
-
<complexType>
|
760 |
-
<annotation>
|
761 |
-
<documentation>
|
762 |
-
This element is the reponse from the
|
763 |
-
createWebWallet method
|
764 |
-
</documentation>
|
765 |
-
</annotation>
|
766 |
-
<sequence>
|
767 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
768 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
769 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
770 |
-
</sequence>
|
771 |
-
</complexType>
|
772 |
-
</element>
|
773 |
-
<element name="updateWebWalletRequest">
|
774 |
-
<complexType>
|
775 |
-
<annotation>
|
776 |
-
<documentation>
|
777 |
-
This element is the request for the
|
778 |
-
updateWebWallet
|
779 |
-
method
|
780 |
-
</documentation>
|
781 |
-
</annotation>
|
782 |
-
<sequence>
|
783 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
784 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
785 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
786 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
787 |
-
<element name="updatePersonalDetails" nillable="true" type="xsd:string"/>
|
788 |
-
<element name="updateOwnerDetails" nillable="true" type="xsd:string"/>
|
789 |
-
<element name="updatePaymentDetails" nillable="true" type="xsd:string"/>
|
790 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
791 |
-
<element name="languageCode" nillable="true" type="xsd:string"/>
|
792 |
-
<element name="customPaymentPageCode" nillable="true" type="xsd:string"/>
|
793 |
-
<element name="securityMode" nillable="true" type="xsd:string"/>
|
794 |
-
<element name="returnURL" nillable="false" type="xsd:string"/>
|
795 |
-
<element name="cancelURL" nillable="false" type="xsd:string"/>
|
796 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
797 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
798 |
-
<element name="customPaymentTemplateURL" nillable="true" type="xsd:string"/>
|
799 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
800 |
-
</sequence>
|
801 |
-
</complexType>
|
802 |
-
</element>
|
803 |
-
<element name="updateWebWalletResponse">
|
804 |
-
<complexType>
|
805 |
-
<annotation>
|
806 |
-
<documentation>
|
807 |
-
This element is the reponse from the
|
808 |
-
updateWebWallet method
|
809 |
-
</documentation>
|
810 |
-
</annotation>
|
811 |
-
<sequence>
|
812 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
813 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
814 |
-
<element name="redirectURL" nillable="false" type="xsd:string"/>
|
815 |
-
</sequence>
|
816 |
-
</complexType>
|
817 |
-
</element>
|
818 |
-
<element name="getWebWalletRequest">
|
819 |
-
<complexType>
|
820 |
-
<annotation>
|
821 |
-
<documentation>
|
822 |
-
This element is the request for the
|
823 |
-
getWebWallet
|
824 |
-
method
|
825 |
-
</documentation>
|
826 |
-
</annotation>
|
827 |
-
<sequence>
|
828 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
829 |
-
<element name="token" nillable="false" type="xsd:string"/>
|
830 |
-
</sequence>
|
831 |
-
</complexType>
|
832 |
-
</element>
|
833 |
-
<element name="getWebWalletResponse">
|
834 |
-
<complexType>
|
835 |
-
<annotation>
|
836 |
-
<documentation>
|
837 |
-
This element is the reponse from the
|
838 |
-
getWebWallet
|
839 |
-
method
|
840 |
-
</documentation>
|
841 |
-
</annotation>
|
842 |
-
<sequence>
|
843 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
844 |
-
<element name="wallet" nillable="true" type="tns1:wallet"/>
|
845 |
-
<element name="owner" nillable="true" type="tns1:owner"/>
|
846 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
847 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
848 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
849 |
-
<element name="numberOfAttempt" nillable="true" type="xsd:string"/>
|
850 |
-
<element name="contractNumberWalletList" nillable="true" type="tns1:contractNumberWalletList"/>
|
851 |
-
</sequence>
|
852 |
-
</complexType>
|
853 |
-
</element>
|
854 |
-
<element name="getTransactionDetailsRequest">
|
855 |
-
<complexType>
|
856 |
-
<annotation>
|
857 |
-
<documentation>
|
858 |
-
This element is the request for the
|
859 |
-
getTransactionDetails method
|
860 |
-
</documentation>
|
861 |
-
</annotation>
|
862 |
-
<sequence>
|
863 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
864 |
-
<element name="transactionId" nillable="true" type="xsd:string"/>
|
865 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
866 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
867 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
868 |
-
<element name="transactionHistory" nillable="true" type="xsd:string"/>
|
869 |
-
<element name="archiveSearch" nillable="true" type="xsd:string"/>
|
870 |
-
</sequence>
|
871 |
-
</complexType>
|
872 |
-
</element>
|
873 |
-
<element name="getTransactionDetailsResponse">
|
874 |
-
<complexType>
|
875 |
-
<annotation>
|
876 |
-
<documentation>
|
877 |
-
This element is the response for the
|
878 |
-
getTransactionDetails method
|
879 |
-
</documentation>
|
880 |
-
</annotation>
|
881 |
-
<sequence>
|
882 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
883 |
-
<element name="transaction" nillable="true" type="tns1:transaction"/>
|
884 |
-
<element name="payment" nillable="true" type="tns1:payment"/>
|
885 |
-
<element name="authorization" nillable="true" type="tns1:authorization"/>
|
886 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
887 |
-
<element name="buyer" nillable="true" type="tns1:buyer"/>
|
888 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
889 |
-
<element name="card" type="tns1:cardOut"/>
|
890 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
891 |
-
<element name="associatedTransactionsList" nillable="true" type="tns1:associatedTransactionsList"/>
|
892 |
-
<element name="statusHistoryList" nillable="true" type="tns1:statusHistoryList"/>
|
893 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
894 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
895 |
-
<element minOccurs="0" name="paymentAdditionalList" nillable="true" type="tns1:paymentAdditionalList"/>
|
896 |
-
<element name="bankAccountData" nillable="true" type="tns1:bankAccountData"/>
|
897 |
-
</sequence>
|
898 |
-
</complexType>
|
899 |
-
</element>
|
900 |
-
<element name="transactionsSearchRequest">
|
901 |
-
<complexType>
|
902 |
-
<annotation>
|
903 |
-
<documentation>
|
904 |
-
This element is the request for the
|
905 |
-
transactionsSearch method
|
906 |
-
</documentation>
|
907 |
-
</annotation>
|
908 |
-
<sequence>
|
909 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
910 |
-
<element name="transactionId" nillable="true" type="xsd:string"/>
|
911 |
-
<element name="orderRef" nillable="true" type="xsd:string"/>
|
912 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
913 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
914 |
-
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
915 |
-
<element name="authorizationNumber" nillable="true" type="xsd:string"/>
|
916 |
-
<element name="returnCode" nillable="true" type="xsd:string"/>
|
917 |
-
<element name="paymentMean" nillable="true" type="xsd:string"/>
|
918 |
-
<element name="transactionType" nillable="true" type="xsd:string"/>
|
919 |
-
<element name="name" nillable="true" type="xsd:string"/>
|
920 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
921 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
922 |
-
<element name="cardNumber" nillable="true" type="xsd:string"/>
|
923 |
-
<element name="currency" nillable="true" type="xsd:string"/>
|
924 |
-
<element name="minAmount" nillable="true" type="xsd:string"/>
|
925 |
-
<element name="maxAmount" nillable="true" type="xsd:string"/>
|
926 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
927 |
-
<element name="sequenceNumber" nillable="true" type="xsd:string"/>
|
928 |
-
<element name="token" nillable="true" type="xsd:string"/>
|
929 |
-
</sequence>
|
930 |
-
</complexType>
|
931 |
-
</element>
|
932 |
-
<element name="transactionsSearchResponse">
|
933 |
-
<complexType>
|
934 |
-
<annotation>
|
935 |
-
<documentation>
|
936 |
-
This element is the response for the
|
937 |
-
transactionsSearch method
|
938 |
-
</documentation>
|
939 |
-
</annotation>
|
940 |
-
<sequence>
|
941 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
942 |
-
<element name="transactionList" nillable="true" type="tns1:transactionList"/>
|
943 |
-
</sequence>
|
944 |
-
</complexType>
|
945 |
-
</element>
|
946 |
-
<element name="verifyEnrollmentRequest">
|
947 |
-
<complexType>
|
948 |
-
<annotation>
|
949 |
-
<documentation>
|
950 |
-
This element is the request for the
|
951 |
-
verifyEnrollment method
|
952 |
-
</documentation>
|
953 |
-
</annotation>
|
954 |
-
<sequence>
|
955 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
956 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
957 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
958 |
-
<element name="orderRef" nillable="false" type="xsd:string"/>
|
959 |
-
<element name="mdFieldValue" nillable="true" type="xsd:string"/>
|
960 |
-
<element name="userAgent" nillable="true" type="xsd:string"/>
|
961 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
962 |
-
<element name="walletCardInd" nillable="true" type="xsd:string"/>
|
963 |
-
</sequence>
|
964 |
-
</complexType>
|
965 |
-
</element>
|
966 |
-
<element name="verifyEnrollmentResponse">
|
967 |
-
<complexType>
|
968 |
-
<annotation>
|
969 |
-
<documentation>
|
970 |
-
This element is the reponse from the
|
971 |
-
verifyEnrollment method
|
972 |
-
</documentation>
|
973 |
-
</annotation>
|
974 |
-
<sequence>
|
975 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
976 |
-
<element name="actionUrl" nillable="true" type="xsd:string"/>
|
977 |
-
<element name="actionMethod" nillable="true" type="xsd:string"/>
|
978 |
-
<element name="pareqFieldName" nillable="true" type="xsd:string"/>
|
979 |
-
<element name="pareqFieldValue" nillable="true" type="xsd:string"/>
|
980 |
-
<element name="termUrlName" nillable="true" type="xsd:string"/>
|
981 |
-
<element name="termUrlValue" nillable="true" type="xsd:string"/>
|
982 |
-
<element name="mdFieldName" nillable="true" type="xsd:string"/>
|
983 |
-
<element name="mdFieldValue" nillable="true" type="xsd:string"/>
|
984 |
-
<element name="mpiResult" nillable="true" type="xsd:string"/>
|
985 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
986 |
-
</sequence>
|
987 |
-
</complexType>
|
988 |
-
</element>
|
989 |
-
<element name="verifyAuthenticationRequest">
|
990 |
-
<complexType>
|
991 |
-
<annotation>
|
992 |
-
<documentation>
|
993 |
-
This element is the request for the
|
994 |
-
doAuthentication method
|
995 |
-
</documentation>
|
996 |
-
</annotation>
|
997 |
-
<sequence>
|
998 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
999 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1000 |
-
<element name="pares" nillable="false" type="xsd:string"/>
|
1001 |
-
<element name="md" nillable="true" type="xsd:string"/>
|
1002 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1003 |
-
</sequence>
|
1004 |
-
</complexType>
|
1005 |
-
</element>
|
1006 |
-
<element name="verifyAuthenticationResponse">
|
1007 |
-
<complexType>
|
1008 |
-
<annotation>
|
1009 |
-
<documentation>
|
1010 |
-
This element is the reponse from the
|
1011 |
-
doAuthentication method
|
1012 |
-
</documentation>
|
1013 |
-
</annotation>
|
1014 |
-
<sequence>
|
1015 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1016 |
-
<element name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
1017 |
-
<element name="mpiResult" nillable="true" type="xsd:string"/>
|
1018 |
-
</sequence>
|
1019 |
-
</complexType>
|
1020 |
-
</element>
|
1021 |
-
<element name="createMerchantRequest">
|
1022 |
-
<complexType>
|
1023 |
-
<annotation>
|
1024 |
-
<documentation>
|
1025 |
-
This element is the request for the
|
1026 |
-
createMerchant
|
1027 |
-
method
|
1028 |
-
</documentation>
|
1029 |
-
</annotation>
|
1030 |
-
<sequence>
|
1031 |
-
<element name="corporateName" nillable="true" type="xsd:string"/>
|
1032 |
-
<element name="publicName" nillable="true" type="xsd:string"/>
|
1033 |
-
<element name="currency">
|
1034 |
-
<annotation>
|
1035 |
-
<documentation>currency in ISO 4217 numeric format
|
1036 |
-
</documentation>
|
1037 |
-
</annotation>
|
1038 |
-
<simpleType>
|
1039 |
-
<restriction base="xsd:string">
|
1040 |
-
<length value="3"/>
|
1041 |
-
</restriction>
|
1042 |
-
</simpleType>
|
1043 |
-
</element>
|
1044 |
-
<element name="nationalID" nillable="true">
|
1045 |
-
<annotation>
|
1046 |
-
<documentation>unique national merchant ID</documentation>
|
1047 |
-
</annotation>
|
1048 |
-
<complexType>
|
1049 |
-
<choice>
|
1050 |
-
<element name="SIRET">
|
1051 |
-
<annotation>
|
1052 |
-
<documentation>Systeme d identification du Repertoire des
|
1053 |
-
ENtreprises
|
1054 |
-
</documentation>
|
1055 |
-
</annotation>
|
1056 |
-
<simpleType>
|
1057 |
-
<restriction base="xsd:string">
|
1058 |
-
<length value="14"/>
|
1059 |
-
</restriction>
|
1060 |
-
</simpleType>
|
1061 |
-
</element>
|
1062 |
-
<element name="other" type="xsd:string">
|
1063 |
-
<annotation>
|
1064 |
-
<documentation>to use if country is not France
|
1065 |
-
</documentation>
|
1066 |
-
</annotation>
|
1067 |
-
</element>
|
1068 |
-
</choice>
|
1069 |
-
</complexType>
|
1070 |
-
</element>
|
1071 |
-
<element name="distributor" nillable="true" type="xsd:string">
|
1072 |
-
<annotation>
|
1073 |
-
<documentation>Payline Distributor ID</documentation>
|
1074 |
-
</annotation>
|
1075 |
-
</element>
|
1076 |
-
<element name="merchantAddress" nillable="true" type="tns1:addressInterlocutor"/>
|
1077 |
-
<element name="businessInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
1078 |
-
<element name="technicalInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
1079 |
-
<element name="subscription" nillable="true" type="tns1:subscription"/>
|
1080 |
-
<element name="poss" nillable="true">
|
1081 |
-
<annotation>
|
1082 |
-
<documentation>list of point of sell</documentation>
|
1083 |
-
</annotation>
|
1084 |
-
<complexType>
|
1085 |
-
<sequence>
|
1086 |
-
<element maxOccurs="unbounded" minOccurs="0" name="pos" nillable="true" type="tns1:pointOfSell"/>
|
1087 |
-
</sequence>
|
1088 |
-
</complexType>
|
1089 |
-
</element>
|
1090 |
-
<element name="partner" nillable="true" type="xsd:string">
|
1091 |
-
<annotation>
|
1092 |
-
<documentation>Billing partner. 1:monext, 2:cetib, 3:payline.com
|
1093 |
-
</documentation>
|
1094 |
-
</annotation>
|
1095 |
-
</element>
|
1096 |
-
</sequence>
|
1097 |
-
</complexType>
|
1098 |
-
</element>
|
1099 |
-
<element name="createMerchantResponse">
|
1100 |
-
<complexType>
|
1101 |
-
<annotation>
|
1102 |
-
<documentation>
|
1103 |
-
This element is the reponse from the
|
1104 |
-
createMerchant
|
1105 |
-
method
|
1106 |
-
</documentation>
|
1107 |
-
</annotation>
|
1108 |
-
<sequence>
|
1109 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1110 |
-
<element name="connectionData" nillable="false" type="tns1:connectionData"/>
|
1111 |
-
</sequence>
|
1112 |
-
</complexType>
|
1113 |
-
</element>
|
1114 |
-
<element name="doScoringChequeRequest">
|
1115 |
-
<complexType>
|
1116 |
-
<annotation>
|
1117 |
-
<documentation>
|
1118 |
-
This element is the request for the
|
1119 |
-
doScoringCheque
|
1120 |
-
method
|
1121 |
-
</documentation>
|
1122 |
-
</annotation>
|
1123 |
-
<sequence>
|
1124 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1125 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1126 |
-
<element name="cheque" nillable="false" type="tns1:cheque"/>
|
1127 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
1128 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1129 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
1130 |
-
</sequence>
|
1131 |
-
</complexType>
|
1132 |
-
</element>
|
1133 |
-
<element name="doScoringChequeResponse">
|
1134 |
-
<complexType>
|
1135 |
-
<annotation>
|
1136 |
-
<documentation>
|
1137 |
-
This element is the reponse from the
|
1138 |
-
doScoringCheque method
|
1139 |
-
</documentation>
|
1140 |
-
</annotation>
|
1141 |
-
<sequence>
|
1142 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1143 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
1144 |
-
<element name="scoringCheque" nillable="false" type="tns1:scoringCheque"/>
|
1145 |
-
</sequence>
|
1146 |
-
</complexType>
|
1147 |
-
</element>
|
1148 |
-
<element name="getEncryptionKeyRequest">
|
1149 |
-
<complexType>
|
1150 |
-
<annotation>
|
1151 |
-
<documentation>
|
1152 |
-
This element is the request for the
|
1153 |
-
getEncryptionKeyRequest method
|
1154 |
-
</documentation>
|
1155 |
-
</annotation>
|
1156 |
-
</complexType>
|
1157 |
-
</element>
|
1158 |
-
<element name="getEncryptionKeyResponse">
|
1159 |
-
<complexType>
|
1160 |
-
<annotation>
|
1161 |
-
<documentation>
|
1162 |
-
This element is the reponse from the
|
1163 |
-
getEncryptionKeyResponse method
|
1164 |
-
</documentation>
|
1165 |
-
</annotation>
|
1166 |
-
<sequence>
|
1167 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1168 |
-
<element name="key" nillable="false" type="tns1:key"/>
|
1169 |
-
</sequence>
|
1170 |
-
</complexType>
|
1171 |
-
</element>
|
1172 |
-
<element name="doReAuthorizationRequest">
|
1173 |
-
<complexType>
|
1174 |
-
<annotation>
|
1175 |
-
<documentation>
|
1176 |
-
This element is the request for the
|
1177 |
-
doReAuthorization method
|
1178 |
-
</documentation>
|
1179 |
-
</annotation>
|
1180 |
-
<sequence>
|
1181 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1182 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1183 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1184 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1185 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1186 |
-
<element name="media" nillable="true" type="xsd:string"/>
|
1187 |
-
</sequence>
|
1188 |
-
</complexType>
|
1189 |
-
</element>
|
1190 |
-
<element name="doReAuthorizationResponse">
|
1191 |
-
<complexType>
|
1192 |
-
<annotation>
|
1193 |
-
<documentation>
|
1194 |
-
This element is the reponse from the
|
1195 |
-
doReAuthorization method
|
1196 |
-
</documentation>
|
1197 |
-
</annotation>
|
1198 |
-
<sequence>
|
1199 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1200 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
1201 |
-
<element name="card" type="tns1:cardOut"/>
|
1202 |
-
<element name="extendedCard" type="tns1:extendedCardType"/>
|
1203 |
-
</sequence>
|
1204 |
-
</complexType>
|
1205 |
-
</element>
|
1206 |
-
<element name="getMerchantSettingsRequest">
|
1207 |
-
<complexType>
|
1208 |
-
<annotation>
|
1209 |
-
<documentation>
|
1210 |
-
This element is the request for the
|
1211 |
-
getMerchantSettings method
|
1212 |
-
</documentation>
|
1213 |
-
</annotation>
|
1214 |
-
<sequence>
|
1215 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1216 |
-
</sequence>
|
1217 |
-
</complexType>
|
1218 |
-
</element>
|
1219 |
-
<element name="getMerchantSettingsResponse">
|
1220 |
-
<complexType>
|
1221 |
-
<annotation>
|
1222 |
-
<documentation>
|
1223 |
-
This element is the response from the
|
1224 |
-
getMerchantSettings method
|
1225 |
-
</documentation>
|
1226 |
-
</annotation>
|
1227 |
-
<sequence>
|
1228 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1229 |
-
<element name="listPointOfSell" nillable="false">
|
1230 |
-
<complexType>
|
1231 |
-
<sequence>
|
1232 |
-
<element maxOccurs="unbounded" minOccurs="0" name="pointOfSell" type="tns1:pointOfSell"/>
|
1233 |
-
</sequence>
|
1234 |
-
</complexType>
|
1235 |
-
</element>
|
1236 |
-
</sequence>
|
1237 |
-
</complexType>
|
1238 |
-
</element>
|
1239 |
-
<element name="getBalanceRequest">
|
1240 |
-
<complexType>
|
1241 |
-
<annotation>
|
1242 |
-
<documentation>
|
1243 |
-
This element is the request for the
|
1244 |
-
getBalance
|
1245 |
-
method
|
1246 |
-
</documentation>
|
1247 |
-
</annotation>
|
1248 |
-
<sequence>
|
1249 |
-
<element name="version" nillable="false" type="xsd:string"/>
|
1250 |
-
<element name="cardID" nillable="false" type="xsd:string"/>
|
1251 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1252 |
-
</sequence>
|
1253 |
-
</complexType>
|
1254 |
-
</element>
|
1255 |
-
<element name="getBalanceResponse">
|
1256 |
-
<complexType>
|
1257 |
-
<annotation>
|
1258 |
-
<documentation>
|
1259 |
-
This element is the reponse from the
|
1260 |
-
getBalance
|
1261 |
-
method
|
1262 |
-
</documentation>
|
1263 |
-
</annotation>
|
1264 |
-
<sequence>
|
1265 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1266 |
-
<element name="balance" nillable="false">
|
1267 |
-
<complexType>
|
1268 |
-
<sequence>
|
1269 |
-
<element maxOccurs="1" minOccurs="0" name="amount" type="xsd:string"/>
|
1270 |
-
<element maxOccurs="1" minOccurs="0" name="currency" type="xsd:string"/>
|
1271 |
-
</sequence>
|
1272 |
-
</complexType>
|
1273 |
-
</element>
|
1274 |
-
<element name="crdproduct" nillable="false" type="xsd:string"/>
|
1275 |
-
<element name="crdprogram" nillable="false" type="xsd:string"/>
|
1276 |
-
<element name="crddesign" nillable="false" type="xsd:string"/>
|
1277 |
-
</sequence>
|
1278 |
-
</complexType>
|
1279 |
-
</element>
|
1280 |
-
<element name="getAlertDetailsRequest">
|
1281 |
-
<complexType>
|
1282 |
-
<sequence>
|
1283 |
-
<element maxOccurs="1" minOccurs="1" name="AlertId" nillable="false" type="xsd:string">
|
1284 |
-
</element>
|
1285 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionId" nillable="false" type="xsd:string">
|
1286 |
-
</element>
|
1287 |
-
</sequence>
|
1288 |
-
</complexType>
|
1289 |
-
</element>
|
1290 |
-
<element name="getAlertDetailsResponse">
|
1291 |
-
<complexType>
|
1292 |
-
<sequence>
|
1293 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1294 |
-
<element maxOccurs="1" minOccurs="1" name="AlertId" nillable="false" type="xsd:string">
|
1295 |
-
</element>
|
1296 |
-
<element maxOccurs="1" minOccurs="0" name="ExplanationCode" nillable="true" type="xsd:string">
|
1297 |
-
</element>
|
1298 |
-
<element maxOccurs="1" minOccurs="0" name="ExplanationLabel" nillable="true" type="xsd:string">
|
1299 |
-
</element>
|
1300 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionStatus" nillable="false" type="xsd:string">
|
1301 |
-
</element>
|
1302 |
-
<element maxOccurs="1" minOccurs="1" name="MerchantLabel" nillable="false" type="xsd:string">
|
1303 |
-
</element>
|
1304 |
-
<element maxOccurs="1" minOccurs="1" name="PosLabel" nillable="false" type="xsd:string">
|
1305 |
-
</element>
|
1306 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionId" nillable="false" type="xsd:string">
|
1307 |
-
</element>
|
1308 |
-
<element maxOccurs="1" minOccurs="1" name="SecurityLevel" nillable="false" type="xsd:string">
|
1309 |
-
</element>
|
1310 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionDate" nillable="false" type="xsd:string">
|
1311 |
-
</element>
|
1312 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionAmount" nillable="false" type="xsd:string">
|
1313 |
-
</element>
|
1314 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionCurrency" nillable="false" type="xsd:string">
|
1315 |
-
</element>
|
1316 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentType" nillable="false" type="xsd:string">
|
1317 |
-
</element>
|
1318 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentData" nillable="false" type="xsd:string">
|
1319 |
-
</element>
|
1320 |
-
<element maxOccurs="1" minOccurs="0" name="HolderName" nillable="true" type="xsd:string">
|
1321 |
-
</element>
|
1322 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceData" nillable="false" type="xsd:string">
|
1323 |
-
</element>
|
1324 |
-
<element maxOccurs="1" minOccurs="0" name="CustomerId" nillable="true" type="xsd:string">
|
1325 |
-
</element>
|
1326 |
-
<element maxOccurs="1" minOccurs="0" name="BuyerFirstName" nillable="true" type="xsd:string">
|
1327 |
-
</element>
|
1328 |
-
<element maxOccurs="1" minOccurs="0" name="BuyerLastName" nillable="true" type="xsd:string">
|
1329 |
-
</element>
|
1330 |
-
<element maxOccurs="1" minOccurs="1" name="CustomerTransHist" nillable="false" type="tns1:CustomerTransHist">
|
1331 |
-
</element>
|
1332 |
-
<element maxOccurs="1" minOccurs="1" name="PaymentMeansTransHist" nillable="false" type="tns1:PaymentMeansTransHist">
|
1333 |
-
</element>
|
1334 |
-
<element maxOccurs="1" minOccurs="1" name="AlertsTransHist" nillable="false" type="tns1:AlertsTransHist">
|
1335 |
-
</element>
|
1336 |
-
</sequence>
|
1337 |
-
</complexType>
|
1338 |
-
</element>
|
1339 |
-
<element name="getTokenRequest">
|
1340 |
-
<complexType>
|
1341 |
-
<sequence>
|
1342 |
-
<element name="cardNumber" nillable="false" type="xsd:string"/>
|
1343 |
-
<element name="expirationDate" nillable="true" type="xsd:string"/>
|
1344 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1345 |
-
</sequence>
|
1346 |
-
</complexType>
|
1347 |
-
</element>
|
1348 |
-
<element name="getTokenResponse">
|
1349 |
-
<complexType>
|
1350 |
-
<sequence>
|
1351 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1352 |
-
<element maxOccurs="1" minOccurs="1" name="token" nillable="false" type="xsd:string"/>
|
1353 |
-
<element maxOccurs="1" minOccurs="1" name="maskedCardNumber" nillable="false" type="xsd:string"/>
|
1354 |
-
<element maxOccurs="1" minOccurs="1" name="expirationDate" nillable="false" type="xsd:string"/>
|
1355 |
-
<element maxOccurs="1" minOccurs="1" name="virtualCard" nillable="false" type="xsd:string"/>
|
1356 |
-
<element maxOccurs="1" minOccurs="1" name="cardType" nillable="false" type="xsd:string"/>
|
1357 |
-
<element maxOccurs="1" minOccurs="1" name="cardProduct" nillable="false" type="xsd:string"/>
|
1358 |
-
<element maxOccurs="1" minOccurs="1" name="acceptanceNetwork" nillable="false" type="xsd:string"/>
|
1359 |
-
<element maxOccurs="1" minOccurs="1" name="bank" nillable="false" type="xsd:string"/>
|
1360 |
-
</sequence>
|
1361 |
-
</complexType>
|
1362 |
-
</element>
|
1363 |
-
<element name="unBlockRequest">
|
1364 |
-
<complexType>
|
1365 |
-
<sequence>
|
1366 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1367 |
-
<element name="transactionDate" nillable="true" type="xsd:string"/>
|
1368 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1369 |
-
</sequence>
|
1370 |
-
</complexType>
|
1371 |
-
</element>
|
1372 |
-
<element name="unBlockResponse">
|
1373 |
-
<complexType>
|
1374 |
-
<sequence>
|
1375 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1376 |
-
</sequence>
|
1377 |
-
</complexType>
|
1378 |
-
</element>
|
1379 |
-
|
1380 |
-
<element name="updatePaymentRecordRequest">
|
1381 |
-
<complexType>
|
1382 |
-
<sequence>
|
1383 |
-
<element name="version" nillable="true" type="xsd:string"/>
|
1384 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1385 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1386 |
-
<element name="recurring" nillable="false" type="tns1:recurringForUpdate"/>
|
1387 |
-
</sequence>
|
1388 |
-
</complexType>
|
1389 |
-
</element>
|
1390 |
-
<element name="updatePaymentRecordResponse">
|
1391 |
-
<complexType>
|
1392 |
-
<sequence>
|
1393 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1394 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1395 |
-
<element name="isDisabled" nillable="false" type="xsd:string"/>
|
1396 |
-
<element name="disableDate" nillable="false" type="xsd:string"/>
|
1397 |
-
<element name="privateDataList" nillable="false" type="tns1:privateDataList"/>
|
1398 |
-
<element name="order" nillable="false" type="tns1:order"/>
|
1399 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1400 |
-
</sequence>
|
1401 |
-
</complexType>
|
1402 |
-
</element>
|
1403 |
-
|
1404 |
-
<element name="getBillingRecordRequest">
|
1405 |
-
<complexType>
|
1406 |
-
<sequence>
|
1407 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1408 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1409 |
-
<element name="billingRecordId" nillable="false" type="xsd:string"/>
|
1410 |
-
</sequence>
|
1411 |
-
</complexType>
|
1412 |
-
</element>
|
1413 |
-
<element name="getBillingRecordResponse">
|
1414 |
-
<complexType>
|
1415 |
-
<sequence>
|
1416 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1417 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1418 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1419 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1420 |
-
<element name="billingRecord" nillable="false" type="tns1:billingRecord"/>
|
1421 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1422 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1423 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1424 |
-
</sequence>
|
1425 |
-
</complexType>
|
1426 |
-
</element>
|
1427 |
-
|
1428 |
-
<element name="updateBillingRecordRequest">
|
1429 |
-
<complexType>
|
1430 |
-
<sequence>
|
1431 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1432 |
-
<element name="paymentRecordId" nillable="false" type="xsd:string"/>
|
1433 |
-
<element name="billingRecordId" nillable="false" type="xsd:string"/>
|
1434 |
-
<element name="billingRecordForUpdate" nillable="false" type="tns1:billingRecordForUpdate"/>
|
1435 |
-
</sequence>
|
1436 |
-
</complexType>
|
1437 |
-
</element>
|
1438 |
-
|
1439 |
-
<element name="updateBillingRecordResponse">
|
1440 |
-
<complexType>
|
1441 |
-
<sequence>
|
1442 |
-
<element name="result" nillable="false" type="tns1:result"/>
|
1443 |
-
<element name="recurring" nillable="false" type="tns1:recurring"/>
|
1444 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1445 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1446 |
-
<element name="billingRecord" nillable="false" type="tns1:billingRecord"/>
|
1447 |
-
<element name="order" nillable="true" type="tns1:order"/>
|
1448 |
-
<element name="privateDataList" nillable="true" type="tns1:privateDataList"/>
|
1449 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1450 |
-
</sequence>
|
1451 |
-
</complexType>
|
1452 |
-
</element>
|
1453 |
-
|
1454 |
-
</schema>
|
1455 |
-
<schema elementFormDefault="qualified" targetNamespace="http://obj.ws.payline.experian.com" xmlns="http://www.w3.org/2001/XMLSchema">
|
1456 |
-
<complexType name="result">
|
1457 |
-
<annotation>
|
1458 |
-
<documentation>
|
1459 |
-
This element contains information about the
|
1460 |
-
process
|
1461 |
-
</documentation>
|
1462 |
-
</annotation>
|
1463 |
-
<sequence>
|
1464 |
-
<element name="code" nillable="false" type="xsd:string"/>
|
1465 |
-
<element minOccurs="0" name="shortMessage" nillable="true" type="xsd:string"/>
|
1466 |
-
<element minOccurs="0" name="longMessage" nillable="true" type="xsd:string"/>
|
1467 |
-
</sequence>
|
1468 |
-
</complexType>
|
1469 |
-
<complexType name="cardOut">
|
1470 |
-
<sequence>
|
1471 |
-
<element minOccurs="0" name="number" nillable="true" type="xsd:string"/>
|
1472 |
-
<element minOccurs="0" name="type" nillable="true" type="xsd:string"/>
|
1473 |
-
<element minOccurs="0" name="expirationDate" nillable="true" type="xsd:string"/>
|
1474 |
-
<element minOccurs="0" name="cardholder" nillable="true" type="xsd:string"/>
|
1475 |
-
<element minOccurs="0" name="token" nillable="true" type="xsd:string"/>
|
1476 |
-
</sequence>
|
1477 |
-
</complexType>
|
1478 |
-
|
1479 |
-
<complexType name="extendedCardType">
|
1480 |
-
<sequence>
|
1481 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1482 |
-
<element minOccurs="0" name="isCvd" nillable="true" type="xsd:string"/>
|
1483 |
-
<element minOccurs="0" name="bank" nillable="true" type="xsd:string"/>
|
1484 |
-
<element minOccurs="0" name="type" nillable="true" type="xsd:string"/>
|
1485 |
-
<element minOccurs="0" name="network" nillable="true" type="xsd:string"/>
|
1486 |
-
<element minOccurs="0" name="product" nillable="true" type="xsd:string"/>
|
1487 |
-
</sequence>
|
1488 |
-
</complexType>
|
1489 |
-
<complexType name="order">
|
1490 |
-
<annotation>
|
1491 |
-
<documentation>
|
1492 |
-
This element contains information about the
|
1493 |
-
order
|
1494 |
-
</documentation>
|
1495 |
-
</annotation>
|
1496 |
-
<sequence>
|
1497 |
-
<element name="ref" nillable="false" type="xsd:string"/>
|
1498 |
-
<element minOccurs="0" name="origin" nillable="true" type="xsd:string"/>
|
1499 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1500 |
-
<element minOccurs="0" name="taxes" nillable="true" type="xsd:string"/>
|
1501 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1502 |
-
<element name="currency" nillable="false" type="xsd:string"/>
|
1503 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1504 |
-
<element minOccurs="0" name="details" nillable="true" type="tns1:details"/>
|
1505 |
-
<element minOccurs="0" name="deliveryTime" nillable="true" type="xsd:string"/>
|
1506 |
-
<element minOccurs="0" name="deliveryMode" nillable="true" type="xsd:string"/>
|
1507 |
-
<element minOccurs="0" name="deliveryExpectedDate" nillable="true" type="xsd:string"/>
|
1508 |
-
<element minOccurs="0" name="deliveryExpectedDelay" nillable="true" type="xsd:string"/>
|
1509 |
-
</sequence>
|
1510 |
-
</complexType>
|
1511 |
-
<complexType name="key">
|
1512 |
-
<annotation>
|
1513 |
-
<documentation>
|
1514 |
-
This element contains information about the
|
1515 |
-
encryptionKey
|
1516 |
-
</documentation>
|
1517 |
-
</annotation>
|
1518 |
-
<sequence>
|
1519 |
-
<element name="keyId" nillable="false" type="xsd:integer"/>
|
1520 |
-
<element name="modulus" nillable="false" type="xsd:string"/>
|
1521 |
-
<element name="publicExponent" nillable="false" type="xsd:string"/>
|
1522 |
-
<element name="expirationDate" nillable="false" type="xsd:string"/>
|
1523 |
-
</sequence>
|
1524 |
-
</complexType>
|
1525 |
-
<complexType name="details">
|
1526 |
-
<annotation>
|
1527 |
-
<documentation>
|
1528 |
-
This element contains an array of orderDetail
|
1529 |
-
</documentation>
|
1530 |
-
</annotation>
|
1531 |
-
<sequence>
|
1532 |
-
<element maxOccurs="100" minOccurs="0" name="details" type="tns1:orderDetail"/>
|
1533 |
-
</sequence>
|
1534 |
-
</complexType>
|
1535 |
-
|
1536 |
-
<complexType name="orderDetail">
|
1537 |
-
<annotation>
|
1538 |
-
<documentation>
|
1539 |
-
This element contains information about the
|
1540 |
-
order
|
1541 |
-
product
|
1542 |
-
</documentation>
|
1543 |
-
</annotation>
|
1544 |
-
<sequence>
|
1545 |
-
<element minOccurs="0" name="ref" nillable="true" type="xsd:string"/>
|
1546 |
-
<element minOccurs="0" name="price" nillable="true" type="xsd:string"/>
|
1547 |
-
<element minOccurs="0" name="quantity" nillable="true" type="xsd:string"/>
|
1548 |
-
<element minOccurs="0" name="comment" nillable="true" type="xsd:string"/>
|
1549 |
-
<element minOccurs="0" name="category" nillable="true" type="xsd:string"/>
|
1550 |
-
<element minOccurs="0" name="brand" nillable="true" type="xsd:string"/>
|
1551 |
-
<element minOccurs="0" name="subcategory1" nillable="true" type="xsd:string"/>
|
1552 |
-
<element minOccurs="0" name="subcategory2" nillable="true" type="xsd:string"/>
|
1553 |
-
<element minOccurs="0" name="additionalData" nillable="true" type="xsd:string"/>
|
1554 |
-
<element minOccurs="0" name="taxRate" nillable="true" type="xsd:string"/>
|
1555 |
-
</sequence>
|
1556 |
-
</complexType>
|
1557 |
-
<complexType name="privateData">
|
1558 |
-
<annotation>
|
1559 |
-
<documentation>
|
1560 |
-
This element contains information about the
|
1561 |
-
merchant
|
1562 |
-
private data
|
1563 |
-
</documentation>
|
1564 |
-
</annotation>
|
1565 |
-
<sequence>
|
1566 |
-
<element name="key" nillable="false" type="xsd:string"/>
|
1567 |
-
<element name="value" nillable="false" type="xsd:string"/>
|
1568 |
-
</sequence>
|
1569 |
-
</complexType>
|
1570 |
-
<complexType name="transaction">
|
1571 |
-
<annotation>
|
1572 |
-
<documentation>
|
1573 |
-
This element contains information about the
|
1574 |
-
transaction
|
1575 |
-
</documentation>
|
1576 |
-
</annotation>
|
1577 |
-
<sequence>
|
1578 |
-
<element name="id" nillable="false" type="xsd:string"/>
|
1579 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1580 |
-
<element minOccurs="0" name="isDuplicated" nillable="true" type="xsd:string"/>
|
1581 |
-
<element name="isPossibleFraud" nillable="true" type="xsd:string"/>
|
1582 |
-
<element minOccurs="0" name="fraudResult" nillable="true" type="xsd:string"/>
|
1583 |
-
<element minOccurs="0" name="fraudResultDetails" nillable="true" type="tns1:fraudResultDetails"/>
|
1584 |
-
<element minOccurs="0" name="explanation" nillable="true" type="xsd:string"/>
|
1585 |
-
<element minOccurs="0" name="threeDSecure" nillable="true" type="xsd:string"/>
|
1586 |
-
<element minOccurs="0" name="score" nillable="true" type="xsd:string"/>
|
1587 |
-
<element minOccurs="0" name="externalWalletType" nillable="true" type="xsd:string"/>
|
1588 |
-
<element minOccurs="0" name="externalWalletContractNumber" nillable="true" type="xsd:string"/>
|
1589 |
-
|
1590 |
-
</sequence>
|
1591 |
-
</complexType>
|
1592 |
-
<complexType name="fraudResultDetails">
|
1593 |
-
<annotation>
|
1594 |
-
<documentation>
|
1595 |
-
This element contains information about the
|
1596 |
-
fraud
|
1597 |
-
result details
|
1598 |
-
</documentation>
|
1599 |
-
</annotation>
|
1600 |
-
<sequence>
|
1601 |
-
<element name="code" nillable="false" type="xsd:string"/>
|
1602 |
-
<element name="shortMessage" nillable="false" type="xsd:string"/>
|
1603 |
-
<element name="longMessage" nillable="false" type="xsd:string"/>
|
1604 |
-
</sequence>
|
1605 |
-
</complexType>
|
1606 |
-
<complexType name="payment">
|
1607 |
-
<annotation>
|
1608 |
-
<documentation>
|
1609 |
-
This element contains information about the
|
1610 |
-
payment
|
1611 |
-
</documentation>
|
1612 |
-
</annotation>
|
1613 |
-
<sequence>
|
1614 |
-
<element name="amount" nillable="true" type="xsd:string"/>
|
1615 |
-
<element name="currency" nillable="false" type="xsd:string"/>
|
1616 |
-
<element name="action" nillable="false" type="xsd:string"/>
|
1617 |
-
<element name="mode" nillable="false" type="xsd:string"/>
|
1618 |
-
<element name="contractNumber" nillable="false" type="xsd:string"/>
|
1619 |
-
<element minOccurs="0" name="differedActionDate" nillable="true" type="xsd:string"/>
|
1620 |
-
<element minOccurs="0" name="method" nillable="true" type="xsd:string"/>
|
1621 |
-
</sequence>
|
1622 |
-
</complexType>
|
1623 |
-
<complexType name="authorization">
|
1624 |
-
<annotation>
|
1625 |
-
<documentation>
|
1626 |
-
This element contains information about the
|
1627 |
-
authorization
|
1628 |
-
</documentation>
|
1629 |
-
</annotation>
|
1630 |
-
<sequence>
|
1631 |
-
<element name="number" nillable="false" type="xsd:string"/>
|
1632 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1633 |
-
</sequence>
|
1634 |
-
</complexType>
|
1635 |
-
<complexType name="card">
|
1636 |
-
<annotation>
|
1637 |
-
<documentation>
|
1638 |
-
This element contains information about the card
|
1639 |
-
</documentation>
|
1640 |
-
</annotation>
|
1641 |
-
<sequence>
|
1642 |
-
<element minOccurs="0" name="encryptionKeyId" nillable="true" type="xsd:string"/>
|
1643 |
-
<element minOccurs="0" name="encryptedData" nillable="true" type="xsd:string"/>
|
1644 |
-
<element minOccurs="0" name="number" nillable="true" type="xsd:string"/>
|
1645 |
-
<element name="type" nillable="false" type="xsd:string"/>
|
1646 |
-
<element minOccurs="0" name="expirationDate" nillable="true" type="xsd:string"/>
|
1647 |
-
<element minOccurs="0" name="cvx" nillable="true" type="xsd:string"/>
|
1648 |
-
<element minOccurs="0" name="ownerBirthdayDate" nillable="true" type="xsd:string"/>
|
1649 |
-
<element minOccurs="0" name="password" nillable="true" type="xsd:string"/>
|
1650 |
-
<element minOccurs="0" name="cardPresent" nillable="true" type="xsd:string"/>
|
1651 |
-
<element minOccurs="0" name="cardholder" nillable="true" type="xsd:string"/>
|
1652 |
-
<element minOccurs="0" name="token" nillable="true" type="xsd:string"/>
|
1653 |
-
</sequence>
|
1654 |
-
</complexType>
|
1655 |
-
<complexType name="buyer">
|
1656 |
-
<annotation>
|
1657 |
-
<documentation>
|
1658 |
-
This element contains information about the
|
1659 |
-
buyer
|
1660 |
-
</documentation>
|
1661 |
-
</annotation>
|
1662 |
-
<sequence>
|
1663 |
-
<element name="title" nillable="true" type="xsd:string"/>
|
1664 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1665 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1666 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
1667 |
-
<element name="shippingAdress" nillable="true" type="tns1:address"/>
|
1668 |
-
<element name="billingAddress" nillable="true" type="tns1:address"/>
|
1669 |
-
<element name="accountCreateDate" nillable="true" type="xsd:string"/>
|
1670 |
-
<element name="accountAverageAmount" nillable="true" type="xsd:string"/>
|
1671 |
-
<element name="accountOrderCount" nillable="true" type="xsd:string"/>
|
1672 |
-
<element name="walletId" nillable="true" type="xsd:string"/>
|
1673 |
-
<element name="walletDisplayed" nillable="true" type="xsd:string"/>
|
1674 |
-
<element name="walletSecured" nillable="true" type="xsd:string"/>
|
1675 |
-
<element name="walletCardInd" nillable="true" type="xsd:string"/>
|
1676 |
-
<element name="ip" nillable="true" type="xsd:string"/>
|
1677 |
-
<element name="mobilePhone" nillable="true" type="xsd:string"/>
|
1678 |
-
<element name="customerId" nillable="true" type="xsd:string"/>
|
1679 |
-
<element name="legalStatus" nillable="true" type="xsd:string"/>
|
1680 |
-
<element name="legalDocument" nillable="true" type="xsd:string"/>
|
1681 |
-
<element name="birthDate" nillable="true" type="xsd:string"/>
|
1682 |
-
<element name="fingerprintID" nillable="true" type="xsd:string"/>
|
1683 |
-
</sequence>
|
1684 |
-
</complexType>
|
1685 |
-
<complexType name="owner">
|
1686 |
-
<annotation>
|
1687 |
-
<documentation>
|
1688 |
-
This element contains information about the
|
1689 |
-
owner
|
1690 |
-
</documentation>
|
1691 |
-
</annotation>
|
1692 |
-
<sequence>
|
1693 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1694 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1695 |
-
<element name="billingAddress" nillable="true" type="tns1:addressOwner"/>
|
1696 |
-
<element name="issueCardDate" nillable="true" type="xsd:string"/>
|
1697 |
-
</sequence>
|
1698 |
-
</complexType>
|
1699 |
-
<complexType name="address">
|
1700 |
-
<annotation>
|
1701 |
-
<documentation>
|
1702 |
-
This element contains information about the
|
1703 |
-
address
|
1704 |
-
</documentation>
|
1705 |
-
</annotation>
|
1706 |
-
<sequence>
|
1707 |
-
<element minOccurs="0" name="title" nillable="true" type="xsd:string"/>
|
1708 |
-
<element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
|
1709 |
-
<element minOccurs="0" name="firstName" nillable="true" type="xsd:string"/>
|
1710 |
-
<element minOccurs="0" name="lastName" nillable="true" type="xsd:string"/>
|
1711 |
-
<element minOccurs="0" name="street1" nillable="true" type="xsd:string"/>
|
1712 |
-
<element minOccurs="0" name="street2" nillable="true" type="xsd:string"/>
|
1713 |
-
<element minOccurs="0" name="cityName" nillable="true" type="xsd:string"/>
|
1714 |
-
<element minOccurs="0" name="zipCode" nillable="true" type="xsd:string"/>
|
1715 |
-
<element minOccurs="0" name="country" nillable="true" type="xsd:string"/>
|
1716 |
-
<element minOccurs="0" name="phone" nillable="true" type="xsd:string"/>
|
1717 |
-
<element minOccurs="0" name="state" nillable="true" type="xsd:string"/>
|
1718 |
-
<element minOccurs="0" name="county" nillable="true" type="xsd:string"/>
|
1719 |
-
<element minOccurs="0" name="phoneType" nillable="true" type="xsd:string"/>
|
1720 |
-
</sequence>
|
1721 |
-
</complexType>
|
1722 |
-
<complexType name="addressOwner">
|
1723 |
-
<annotation>
|
1724 |
-
<documentation>
|
1725 |
-
This element contains information about the
|
1726 |
-
address
|
1727 |
-
</documentation>
|
1728 |
-
</annotation>
|
1729 |
-
<sequence>
|
1730 |
-
<element name="street" nillable="true" type="xsd:string"/>
|
1731 |
-
<element name="cityName" nillable="true" type="xsd:string"/>
|
1732 |
-
<element name="zipCode" nillable="true" type="xsd:string"/>
|
1733 |
-
<element name="country" nillable="true" type="xsd:string"/>
|
1734 |
-
<element name="phone" nillable="true" type="xsd:string"/>
|
1735 |
-
</sequence>
|
1736 |
-
</complexType>
|
1737 |
-
<complexType name="capture">
|
1738 |
-
<annotation>
|
1739 |
-
<documentation>
|
1740 |
-
This element contains information about the
|
1741 |
-
capture
|
1742 |
-
</documentation>
|
1743 |
-
</annotation>
|
1744 |
-
<sequence>
|
1745 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1746 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1747 |
-
</sequence>
|
1748 |
-
</complexType>
|
1749 |
-
<complexType name="refund">
|
1750 |
-
<annotation>
|
1751 |
-
<documentation>
|
1752 |
-
This element contains information about the
|
1753 |
-
refund
|
1754 |
-
</documentation>
|
1755 |
-
</annotation>
|
1756 |
-
<sequence>
|
1757 |
-
<element name="transactionID" nillable="false" type="xsd:string"/>
|
1758 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
1759 |
-
</sequence>
|
1760 |
-
</complexType>
|
1761 |
-
<complexType name="selectedContractList">
|
1762 |
-
<annotation>
|
1763 |
-
<documentation>
|
1764 |
-
This element contains the list of selected card
|
1765 |
-
</documentation>
|
1766 |
-
</annotation>
|
1767 |
-
<sequence>
|
1768 |
-
<element maxOccurs="25" minOccurs="1" name="selectedContract" type="xsd:string"/>
|
1769 |
-
</sequence>
|
1770 |
-
</complexType>
|
1771 |
-
<complexType name="privateDataList">
|
1772 |
-
<annotation>
|
1773 |
-
<documentation>
|
1774 |
-
An array of private data
|
1775 |
-
</documentation>
|
1776 |
-
</annotation>
|
1777 |
-
<sequence>
|
1778 |
-
<element maxOccurs="100" minOccurs="0" name="privateData" type="tns1:privateData"/>
|
1779 |
-
</sequence>
|
1780 |
-
</complexType>
|
1781 |
-
<complexType name="contractNumberWalletList">
|
1782 |
-
<annotation>
|
1783 |
-
<documentation>
|
1784 |
-
An array of contract number of a wallet
|
1785 |
-
</documentation>
|
1786 |
-
</annotation>
|
1787 |
-
<sequence>
|
1788 |
-
<element maxOccurs="10" minOccurs="0" name="contractNumberWallet" type="xsd:string"/>
|
1789 |
-
</sequence>
|
1790 |
-
</complexType>
|
1791 |
-
<complexType name="cardsList">
|
1792 |
-
<annotation>
|
1793 |
-
<documentation>
|
1794 |
-
An array of cards
|
1795 |
-
</documentation>
|
1796 |
-
</annotation>
|
1797 |
-
<sequence>
|
1798 |
-
<element maxOccurs="99" minOccurs="0" name="cards" type="tns1:cards"/>
|
1799 |
-
</sequence>
|
1800 |
-
</complexType>
|
1801 |
-
<complexType name="captureAuthorizationList">
|
1802 |
-
<annotation>
|
1803 |
-
<documentation>
|
1804 |
-
An array of authorization to capture
|
1805 |
-
</documentation>
|
1806 |
-
</annotation>
|
1807 |
-
<sequence>
|
1808 |
-
<element maxOccurs="5000" minOccurs="1" name="capture" type="tns1:capture"/>
|
1809 |
-
</sequence>
|
1810 |
-
</complexType>
|
1811 |
-
<complexType name="refundAuthorizationList">
|
1812 |
-
<annotation>
|
1813 |
-
<documentation>
|
1814 |
-
An array of authorization to refund
|
1815 |
-
</documentation>
|
1816 |
-
</annotation>
|
1817 |
-
<sequence>
|
1818 |
-
<element maxOccurs="5000" minOccurs="1" name="refund" type="tns1:refund"/>
|
1819 |
-
</sequence>
|
1820 |
-
</complexType>
|
1821 |
-
<complexType name="resetAuthorizationList">
|
1822 |
-
<annotation>
|
1823 |
-
<documentation>
|
1824 |
-
An array of authorization to reset
|
1825 |
-
</documentation>
|
1826 |
-
</annotation>
|
1827 |
-
<sequence>
|
1828 |
-
<element maxOccurs="5000" minOccurs="1" name="transactionID" type="xsd:string"/>
|
1829 |
-
</sequence>
|
1830 |
-
</complexType>
|
1831 |
-
<complexType name="recurring">
|
1832 |
-
<annotation>
|
1833 |
-
<documentation>
|
1834 |
-
This element contains element for recurring
|
1835 |
-
operation
|
1836 |
-
</documentation>
|
1837 |
-
</annotation>
|
1838 |
-
<sequence>
|
1839 |
-
<element name="firstAmount" nillable="true" type="xsd:string"/>
|
1840 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1841 |
-
<element name="billingCycle" nillable="false" type="xsd:string"/>
|
1842 |
-
<element name="billingLeft" nillable="false" type="xsd:string"/>
|
1843 |
-
<element name="billingDay" nillable="true" type="xsd:string"/>
|
1844 |
-
<element name="startDate" nillable="true" type="xsd:string"/>
|
1845 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
1846 |
-
<element name="newAmount" nillable="true" type="xsd:string"/>
|
1847 |
-
<element name="amountModificationDate" nillable="true" type="xsd:string"/>
|
1848 |
-
</sequence>
|
1849 |
-
</complexType>
|
1850 |
-
<complexType name="recurringForUpdate">
|
1851 |
-
<annotation>
|
1852 |
-
<documentation>
|
1853 |
-
This element contains element for update a recurring
|
1854 |
-
operation
|
1855 |
-
</documentation>
|
1856 |
-
</annotation>
|
1857 |
-
<sequence>
|
1858 |
-
<element name="billingLeft" nillable="true" type="xsd:string"/>
|
1859 |
-
<element name="billingDay" nillable="true" type="xsd:string"/>
|
1860 |
-
<element name="endDate" nillable="true" type="xsd:string"/>
|
1861 |
-
<element name="newAmount" nillable="true" type="xsd:string"/>
|
1862 |
-
<element name="amountModificationDate" nillable="true" type="xsd:string"/>
|
1863 |
-
</sequence>
|
1864 |
-
</complexType>
|
1865 |
-
<complexType name="billingRecord">
|
1866 |
-
<annotation>
|
1867 |
-
<documentation>
|
1868 |
-
This element contains element for a billing
|
1869 |
-
record
|
1870 |
-
</documentation>
|
1871 |
-
</annotation>
|
1872 |
-
<sequence>
|
1873 |
-
<element name="date" nillable="false" type="xsd:string"/>
|
1874 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
1875 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
1876 |
-
<element minOccurs="0" name="result" nillable="true" type="tns1:result"/>
|
1877 |
-
<element minOccurs="0" name="transaction" nillable="true" type="tns1:transaction"/>
|
1878 |
-
<element minOccurs="0" name="authorization" nillable="true" type="tns1:authorization"/>
|
1879 |
-
<element minOccurs="0" name="nbTry" nillable="true" type="xsd:string"/>
|
1880 |
-
<element minOccurs="0" name="rank" nillable="true" type="xsd:string"/>
|
1881 |
-
</sequence>
|
1882 |
-
</complexType>
|
1883 |
-
<complexType name="billingRecordList">
|
1884 |
-
<annotation>
|
1885 |
-
<documentation>
|
1886 |
-
An array of billing record
|
1887 |
-
</documentation>
|
1888 |
-
</annotation>
|
1889 |
-
<sequence>
|
1890 |
-
<element maxOccurs="100" minOccurs="0" name="billingRecord" type="tns1:billingRecord"/>
|
1891 |
-
</sequence>
|
1892 |
-
</complexType>
|
1893 |
-
|
1894 |
-
<complexType name="billingRecordForUpdate">
|
1895 |
-
<annotation>
|
1896 |
-
<documentation>
|
1897 |
-
This element contains element for update a recurring
|
1898 |
-
operation
|
1899 |
-
</documentation>
|
1900 |
-
</annotation>
|
1901 |
-
<sequence>
|
1902 |
-
<element name="date" nillable="true" type="xsd:string"/>
|
1903 |
-
<element name="amount" nillable="true" type="xsd:string"/>
|
1904 |
-
<element name="status" nillable="true" type="xsd:string"/>
|
1905 |
-
<element name="executionDate" nillable="true" type="xsd:string"/>
|
1906 |
-
</sequence>
|
1907 |
-
</complexType>
|
1908 |
-
|
1909 |
-
<complexType name="wallet">
|
1910 |
-
<annotation>
|
1911 |
-
<documentation>
|
1912 |
-
This element contains element for a wallet
|
1913 |
-
</documentation>
|
1914 |
-
</annotation>
|
1915 |
-
<sequence>
|
1916 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1917 |
-
<element minOccurs="0" name="lastName" nillable="true" type="xsd:string"/>
|
1918 |
-
<element minOccurs="0" name="firstName" nillable="true" type="xsd:string"/>
|
1919 |
-
<element minOccurs="0" name="email" nillable="true" type="xsd:string"/>
|
1920 |
-
<element minOccurs="0" name="shippingAddress" nillable="true" type="tns1:address"/>
|
1921 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1922 |
-
<element minOccurs="0" name="comment" nillable="true" type="xsd:string"/>
|
1923 |
-
<element minOccurs="0" name="default" nillable="true" type="xsd:string"/>
|
1924 |
-
<element minOccurs="0" name="cardStatus" nillable="true" type="xsd:string"/>
|
1925 |
-
</sequence>
|
1926 |
-
</complexType>
|
1927 |
-
<complexType name="cards">
|
1928 |
-
<annotation>
|
1929 |
-
<documentation>
|
1930 |
-
This element contains element for a wallet
|
1931 |
-
</documentation>
|
1932 |
-
</annotation>
|
1933 |
-
<sequence>
|
1934 |
-
<element name="walletId" nillable="false" type="xsd:string"/>
|
1935 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
1936 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
1937 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
1938 |
-
<element name="shippingAddress" nillable="true" type="tns1:address"/>
|
1939 |
-
<element name="card" nillable="false" type="tns1:card"/>
|
1940 |
-
<element name="cardInd" nillable="true" type="xsd:string"/>
|
1941 |
-
<element name="comment" nillable="true" type="xsd:string"/>
|
1942 |
-
<element name="isDisabled" nillable="true" type="xsd:string"/>
|
1943 |
-
<element name="disableDate" nillable="true" type="xsd:string"/>
|
1944 |
-
<element name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
1945 |
-
<element name="default" nillable="true" type="xsd:string"/>
|
1946 |
-
</sequence>
|
1947 |
-
</complexType>
|
1948 |
-
<complexType name="walletIdList">
|
1949 |
-
<annotation>
|
1950 |
-
<documentation>
|
1951 |
-
This element contains the list of selected card
|
1952 |
-
</documentation>
|
1953 |
-
</annotation>
|
1954 |
-
<sequence>
|
1955 |
-
<element maxOccurs="500" minOccurs="1" name="walletId" type="xsd:string"/>
|
1956 |
-
</sequence>
|
1957 |
-
</complexType>
|
1958 |
-
<complexType name="transactionList">
|
1959 |
-
<annotation>
|
1960 |
-
<documentation>
|
1961 |
-
This element contains the list of selected card
|
1962 |
-
</documentation>
|
1963 |
-
</annotation>
|
1964 |
-
<sequence>
|
1965 |
-
<element maxOccurs="5000" minOccurs="0" name="transaction" type="tns1:transaction"/>
|
1966 |
-
</sequence>
|
1967 |
-
</complexType>
|
1968 |
-
<complexType name="authentication3DSecure">
|
1969 |
-
<annotation>
|
1970 |
-
<documentation>
|
1971 |
-
This element contains element for a 3DSecure
|
1972 |
-
transaction
|
1973 |
-
</documentation>
|
1974 |
-
</annotation>
|
1975 |
-
<sequence>
|
1976 |
-
<element minOccurs="0" name="md" nillable="true" type="xsd:string"/>
|
1977 |
-
<element minOccurs="0" name="pares" nillable="true" type="xsd:string"/>
|
1978 |
-
<element minOccurs="0" name="xid" nillable="true" type="xsd:string"/>
|
1979 |
-
<element minOccurs="0" name="eci" nillable="true" type="xsd:string"/>
|
1980 |
-
<element minOccurs="0" name="cavv" nillable="true" type="xsd:string"/>
|
1981 |
-
<element minOccurs="0" name="cavvAlgorithm" nillable="true" type="xsd:string"/>
|
1982 |
-
<element minOccurs="0" name="vadsResult" nillable="true" type="xsd:string"/>
|
1983 |
-
<element minOccurs="0" name="typeSecurisation" nillable="true" type="xsd:string"/>
|
1984 |
-
</sequence>
|
1985 |
-
</complexType>
|
1986 |
-
<complexType name="connectionData">
|
1987 |
-
<annotation>
|
1988 |
-
<documentation>
|
1989 |
-
This element contains the merchant connection
|
1990 |
-
parameters
|
1991 |
-
</documentation>
|
1992 |
-
</annotation>
|
1993 |
-
<sequence>
|
1994 |
-
<element name="merchantId" nillable="false" type="xsd:string"/>
|
1995 |
-
<element name="userId" nillable="false" type="xsd:string"/>
|
1996 |
-
<element name="password" nillable="false" type="xsd:string"/>
|
1997 |
-
<element name="secretQuestion" nillable="false" type="xsd:string"/>
|
1998 |
-
<element name="secretAnswer" nillable="false" type="xsd:string"/>
|
1999 |
-
</sequence>
|
2000 |
-
</complexType>
|
2001 |
-
<complexType name="scoringCheque">
|
2002 |
-
<annotation>
|
2003 |
-
<documentation>
|
2004 |
-
This element contains the scoring cheque parameters
|
2005 |
-
</documentation>
|
2006 |
-
</annotation>
|
2007 |
-
<sequence>
|
2008 |
-
<element name="chequeNumber" nillable="false" type="xsd:string"/>
|
2009 |
-
<element name="additionalDataResponse" nillable="false" type="xsd:string"/>
|
2010 |
-
<element name="terminalId" nillable="false" type="xsd:string"/>
|
2011 |
-
<element name="additionalPrivateData" nillable="false" type="xsd:string"/>
|
2012 |
-
</sequence>
|
2013 |
-
</complexType>
|
2014 |
-
<complexType name="addressInterlocutor">
|
2015 |
-
<annotation>
|
2016 |
-
<documentation>
|
2017 |
-
This element contains information about Interlocutor
|
2018 |
-
address
|
2019 |
-
</documentation>
|
2020 |
-
</annotation>
|
2021 |
-
<sequence>
|
2022 |
-
<element name="street1" nillable="true" type="xsd:string"/>
|
2023 |
-
<element name="street2" nillable="true" type="xsd:string"/>
|
2024 |
-
<element name="city" nillable="true" type="xsd:string"/>
|
2025 |
-
<element name="zipCode" nillable="true" type="xsd:string"/>
|
2026 |
-
<element name="state" nillable="true" type="xsd:string"/>
|
2027 |
-
<element name="country" nillable="true" type="xsd:string"/>
|
2028 |
-
</sequence>
|
2029 |
-
</complexType>
|
2030 |
-
<complexType name="interlocutor">
|
2031 |
-
<annotation>
|
2032 |
-
<documentation>
|
2033 |
-
This element contains information about Interlocutor
|
2034 |
-
</documentation>
|
2035 |
-
</annotation>
|
2036 |
-
<sequence>
|
2037 |
-
<element name="firstName" nillable="true" type="xsd:string"/>
|
2038 |
-
<element name="lastName" nillable="true" type="xsd:string"/>
|
2039 |
-
<element name="email" nillable="true" type="xsd:string"/>
|
2040 |
-
<element name="phone" nillable="true" type="xsd:string"/>
|
2041 |
-
<element name="mobile" nillable="true" type="xsd:string"/>
|
2042 |
-
<element name="fax" nillable="true" type="xsd:string"/>
|
2043 |
-
<element name="addressInterlocutor" nillable="true" type="tns1:addressInterlocutor"/>
|
2044 |
-
</sequence>
|
2045 |
-
</complexType>
|
2046 |
-
<complexType name="option">
|
2047 |
-
<annotation>
|
2048 |
-
<documentation>
|
2049 |
-
An array of subscribed options
|
2050 |
-
</documentation>
|
2051 |
-
</annotation>
|
2052 |
-
<sequence>
|
2053 |
-
<element name="id" type="xsd:string"/>
|
2054 |
-
<element name="subscribed" nillable="true" type="xsd:boolean"/>
|
2055 |
-
<element name="endDate" nillable="true" type="xsd:dateTime"/>
|
2056 |
-
</sequence>
|
2057 |
-
</complexType>
|
2058 |
-
<complexType name="subscription">
|
2059 |
-
<annotation>
|
2060 |
-
<documentation>
|
2061 |
-
This element contains information about the payline
|
2062 |
-
package subscribed by the merchant
|
2063 |
-
</documentation>
|
2064 |
-
</annotation>
|
2065 |
-
<sequence>
|
2066 |
-
<element name="id" type="xsd:string"/>
|
2067 |
-
<element maxOccurs="unbounded" minOccurs="0" name="option" type="tns1:option"/>
|
2068 |
-
</sequence>
|
2069 |
-
</complexType>
|
2070 |
-
<complexType name="iban">
|
2071 |
-
<annotation>
|
2072 |
-
<documentation>
|
2073 |
-
This element contains IBAN information
|
2074 |
-
</documentation>
|
2075 |
-
</annotation>
|
2076 |
-
<sequence>
|
2077 |
-
<element name="CountryCode" nillable="true" type="xsd:string"/>
|
2078 |
-
<element name="checkKey" nillable="true" type="xsd:string"/>
|
2079 |
-
<element name="BBAN" nillable="true" type="xsd:string"/>
|
2080 |
-
<element name="BIC" nillable="true" type="xsd:string"/>
|
2081 |
-
</sequence>
|
2082 |
-
</complexType>
|
2083 |
-
<complexType name="rib">
|
2084 |
-
<annotation>
|
2085 |
-
<documentation>
|
2086 |
-
This element contains RIB information
|
2087 |
-
</documentation>
|
2088 |
-
</annotation>
|
2089 |
-
<sequence>
|
2090 |
-
<element name="tellerCode" nillable="true" type="xsd:string"/>
|
2091 |
-
<element name="accountNumber" nillable="true" type="xsd:string"/>
|
2092 |
-
<element name="key" nillable="true" type="xsd:string"/>
|
2093 |
-
</sequence>
|
2094 |
-
</complexType>
|
2095 |
-
<complexType name="bankAccount">
|
2096 |
-
<annotation>
|
2097 |
-
<documentation>
|
2098 |
-
This element contains bankAccount information
|
2099 |
-
</documentation>
|
2100 |
-
</annotation>
|
2101 |
-
<sequence>
|
2102 |
-
<element name="bankCode" nillable="true" type="xsd:string"/>
|
2103 |
-
<element name="bankNumber" nillable="true" type="xsd:string"/>
|
2104 |
-
<element name="iban" nillable="true" type="tns1:iban"/>
|
2105 |
-
<element name="rib" nillable="true" type="tns1:rib"/>
|
2106 |
-
</sequence>
|
2107 |
-
</complexType>
|
2108 |
-
<complexType name="bankAccountData">
|
2109 |
-
<annotation>
|
2110 |
-
<documentation>
|
2111 |
-
This element contains bank Account information
|
2112 |
-
</documentation>
|
2113 |
-
</annotation>
|
2114 |
-
<sequence>
|
2115 |
-
<element name="countryCode" nillable="true" type="xsd:string"/>
|
2116 |
-
<element name="bankCode" nillable="true" type="xsd:string"/>
|
2117 |
-
<element name="accountNumber" nillable="true" type="xsd:string"/>
|
2118 |
-
<element name="key" nillable="true" type="xsd:string"/>
|
2119 |
-
</sequence>
|
2120 |
-
</complexType>
|
2121 |
-
<complexType name="technicalData">
|
2122 |
-
<annotation>
|
2123 |
-
<documentation>
|
2124 |
-
This element contains technical data used to define
|
2125 |
-
acquirer service
|
2126 |
-
</documentation>
|
2127 |
-
</annotation>
|
2128 |
-
<sequence>
|
2129 |
-
<element name="terminalNumber" nillable="true" type="xsd:string"/>
|
2130 |
-
<element name="GTInstance" nillable="true" type="xsd:string"/>
|
2131 |
-
<element name="paymentProfil" nillable="true" type="xsd:string"/>
|
2132 |
-
</sequence>
|
2133 |
-
</complexType>
|
2134 |
-
<complexType name="contract">
|
2135 |
-
<annotation>
|
2136 |
-
<documentation>
|
2137 |
-
This element contains all information about contract
|
2138 |
-
</documentation>
|
2139 |
-
</annotation>
|
2140 |
-
<sequence>
|
2141 |
-
<element name="cardType" nillable="true" type="xsd:string"/>
|
2142 |
-
<element minOccurs="0" name="label" nillable="true" type="xsd:string"/>
|
2143 |
-
<element name="contractNumber" nillable="true" type="xsd:string"/>
|
2144 |
-
<element name="currency" nillable="true" type="xsd:string"/>
|
2145 |
-
<element default="Manual" name="settlementType">
|
2146 |
-
<simpleType>
|
2147 |
-
<restriction base="xsd:string">
|
2148 |
-
<enumeration value="Manual"/>
|
2149 |
-
<enumeration value="Now"/>
|
2150 |
-
<enumeration value="1Day"/>
|
2151 |
-
<enumeration value="2Day"/>
|
2152 |
-
<enumeration value="3Day"/>
|
2153 |
-
<enumeration value="4Day"/>
|
2154 |
-
<enumeration value="5Day"/>
|
2155 |
-
<enumeration value="6Day"/>
|
2156 |
-
<enumeration value="7Day"/>
|
2157 |
-
</restriction>
|
2158 |
-
</simpleType>
|
2159 |
-
</element>
|
2160 |
-
<element name="maxAmountPerTransaction" nillable="true" type="xsd:int"/>
|
2161 |
-
<element name="technicalData" nillable="true" type="tns1:technicalData"/>
|
2162 |
-
<element name="bankAccount" nillable="true" type="tns1:bankAccount"/>
|
2163 |
-
<element name="acquirerInterlocutor" nillable="true" type="tns1:interlocutor"/>
|
2164 |
-
<element name="description" nillable="true" type="xsd:string"/>
|
2165 |
-
<element name="logoEnable" nillable="false" type="xsd:boolean"/>
|
2166 |
-
<element maxOccurs="1" minOccurs="0" name="smallLogoMime" type="xsd:string">
|
2167 |
-
</element>
|
2168 |
-
<element maxOccurs="1" minOccurs="0" name="smallLogo" type="xsd:base64Binary">
|
2169 |
-
</element>
|
2170 |
-
<element maxOccurs="1" minOccurs="0" name="normalLogoMime" type="xsd:string">
|
2171 |
-
</element>
|
2172 |
-
<element maxOccurs="1" minOccurs="0" name="normalLogo" type="xsd:base64Binary">
|
2173 |
-
</element>
|
2174 |
-
<element maxOccurs="1" minOccurs="0" name="contribution" type="tns1:contribution">
|
2175 |
-
</element>
|
2176 |
-
<element maxOccurs="1" minOccurs="0" name="enrolment3DS" type="xsd:string">
|
2177 |
-
</element>
|
2178 |
-
</sequence>
|
2179 |
-
</complexType>
|
2180 |
-
<complexType name="customPaymentPageCode">
|
2181 |
-
<annotation>
|
2182 |
-
<documentation>
|
2183 |
-
This element contains all information about
|
2184 |
-
customPaymentPageCode
|
2185 |
-
</documentation>
|
2186 |
-
</annotation>
|
2187 |
-
<sequence>
|
2188 |
-
<element name="code" nillable="true" type="xsd:string"/>
|
2189 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
2190 |
-
<element name="type" nillable="true" type="xsd:string"/>
|
2191 |
-
</sequence>
|
2192 |
-
</complexType>
|
2193 |
-
<complexType name="ticketSend">
|
2194 |
-
<annotation>
|
2195 |
-
<documentation>
|
2196 |
-
This element contains information e-ticket
|
2197 |
-
</documentation>
|
2198 |
-
</annotation>
|
2199 |
-
<sequence>
|
2200 |
-
<element name="toBuyer" nillable="true" type="xsd:boolean"/>
|
2201 |
-
<element name="toMerchant" nillable="true" type="xsd:boolean"/>
|
2202 |
-
</sequence>
|
2203 |
-
</complexType>
|
2204 |
-
<complexType name="pointOfSell">
|
2205 |
-
<annotation>
|
2206 |
-
<documentation>
|
2207 |
-
This element contains all information about point of
|
2208 |
-
sell
|
2209 |
-
</documentation>
|
2210 |
-
</annotation>
|
2211 |
-
<sequence>
|
2212 |
-
<element name="siret" nillable="true" type="xsd:string"/>
|
2213 |
-
<element name="codeMcc" nillable="true">
|
2214 |
-
<annotation>
|
2215 |
-
<documentation>Merchant Category Code</documentation>
|
2216 |
-
</annotation>
|
2217 |
-
<simpleType>
|
2218 |
-
<restriction base="xsd:string">
|
2219 |
-
<xsd:length value="4"/>
|
2220 |
-
</restriction>
|
2221 |
-
</simpleType>
|
2222 |
-
</element>
|
2223 |
-
<element name="label" nillable="true" type="xsd:string"/>
|
2224 |
-
<element name="webmasterEmail" nillable="true" type="xsd:string"/>
|
2225 |
-
<element minOccurs="0" name="comments" nillable="true" type="xsd:string"/>
|
2226 |
-
<element name="webstoreURL" nillable="true" type="xsd:string"/>
|
2227 |
-
<element name="notificationURL" nillable="true" type="xsd:string"/>
|
2228 |
-
<element minOccurs="0" name="privateLifeURL" nillable="true" type="xsd:string"/>
|
2229 |
-
<element minOccurs="0" name="saleCondURL" nillable="true" type="xsd:string"/>
|
2230 |
-
<element minOccurs="0" name="buyerMustAcceptSaleCond" nillable="true" type="xsd:boolean"/>
|
2231 |
-
<element minOccurs="0" name="endOfPaymentRedirection" nillable="true" type="xsd:boolean"/>
|
2232 |
-
<element name="ticketSend" nillable="true" type="tns1:ticketSend"/>
|
2233 |
-
<element name="contracts">
|
2234 |
-
<annotation>
|
2235 |
-
<documentation>list of contract</documentation>
|
2236 |
-
</annotation>
|
2237 |
-
<complexType>
|
2238 |
-
<sequence>
|
2239 |
-
<element maxOccurs="unbounded" minOccurs="0" name="contract" type="tns1:contract"/>
|
2240 |
-
</sequence>
|
2241 |
-
</complexType>
|
2242 |
-
</element>
|
2243 |
-
<element name="virtualTerminal" nillable="true" type="tns1:virtualTerminal"/>
|
2244 |
-
<element name="customPaymentPageCodeList">
|
2245 |
-
<annotation>
|
2246 |
-
<documentation>list of custom payment page code</documentation>
|
2247 |
-
</annotation>
|
2248 |
-
<complexType>
|
2249 |
-
<sequence>
|
2250 |
-
<element maxOccurs="unbounded" minOccurs="0" name="customPaymentPageCode" type="tns1:customPaymentPageCode"/>
|
2251 |
-
</sequence>
|
2252 |
-
</complexType>
|
2253 |
-
</element>
|
2254 |
-
</sequence>
|
2255 |
-
</complexType>
|
2256 |
-
<complexType name="virtualTerminal">
|
2257 |
-
<annotation>
|
2258 |
-
<documentation>virtualTerminal</documentation>
|
2259 |
-
</annotation>
|
2260 |
-
<sequence>
|
2261 |
-
<element name="label" type="xsd:string"/>
|
2262 |
-
<element default="10" name="inactivityDelay" type="xsd:int">
|
2263 |
-
<annotation>
|
2264 |
-
<documentation>http session timeout delay</documentation>
|
2265 |
-
</annotation>
|
2266 |
-
</element>
|
2267 |
-
<element minOccurs="0" name="logo" type="xsd:string">
|
2268 |
-
<annotation>
|
2269 |
-
<documentation>path to logo</documentation>
|
2270 |
-
</annotation>
|
2271 |
-
</element>
|
2272 |
-
<element name="functions">
|
2273 |
-
<annotation>
|
2274 |
-
<documentation>list of functions</documentation>
|
2275 |
-
</annotation>
|
2276 |
-
<complexType>
|
2277 |
-
<sequence>
|
2278 |
-
<element maxOccurs="unbounded" name="function" type="tns1:virtualTerminalFunction"/>
|
2279 |
-
</sequence>
|
2280 |
-
</complexType>
|
2281 |
-
</element>
|
2282 |
-
</sequence>
|
2283 |
-
</complexType>
|
2284 |
-
<complexType name="virtualTerminalFunction">
|
2285 |
-
<annotation>
|
2286 |
-
<documentation>functions availbe in virtual terminal
|
2287 |
-
</documentation>
|
2288 |
-
</annotation>
|
2289 |
-
<sequence>
|
2290 |
-
<element name="function">
|
2291 |
-
<annotation>
|
2292 |
-
<documentation>Please refer to Payline documentation
|
2293 |
-
</documentation>
|
2294 |
-
</annotation>
|
2295 |
-
<simpleType>
|
2296 |
-
<restriction base="xsd:string">
|
2297 |
-
<enumeration value="simplePayment"/>
|
2298 |
-
<enumeration value="walletCreation"/>
|
2299 |
-
<enumeration value="nXPayment"/>
|
2300 |
-
</restriction>
|
2301 |
-
</simpleType>
|
2302 |
-
</element>
|
2303 |
-
<element name="label" type="xsd:string"/>
|
2304 |
-
<sequence minOccurs="0">
|
2305 |
-
<element maxOccurs="unbounded" name="functionParameter">
|
2306 |
-
<annotation>
|
2307 |
-
<documentation>Value of parameter</documentation>
|
2308 |
-
</annotation>
|
2309 |
-
<complexType>
|
2310 |
-
<attribute name="id">
|
2311 |
-
<annotation>
|
2312 |
-
<documentation>Parameter ID. Refer to payline documentation
|
2313 |
-
</documentation>
|
2314 |
-
</annotation>
|
2315 |
-
</attribute>
|
2316 |
-
</complexType>
|
2317 |
-
</element>
|
2318 |
-
</sequence>
|
2319 |
-
</sequence>
|
2320 |
-
</complexType>
|
2321 |
-
<complexType name="cheque">
|
2322 |
-
<annotation>
|
2323 |
-
<documentation>
|
2324 |
-
This element contains information about the
|
2325 |
-
cheque
|
2326 |
-
</documentation>
|
2327 |
-
</annotation>
|
2328 |
-
<sequence>
|
2329 |
-
<element name="number" nillable="false" type="xsd:string"/>
|
2330 |
-
</sequence>
|
2331 |
-
</complexType>
|
2332 |
-
<complexType name="contribution">
|
2333 |
-
<annotation>
|
2334 |
-
<documentation>
|
2335 |
-
This element contains all information about
|
2336 |
-
contrinution
|
2337 |
-
</documentation>
|
2338 |
-
</annotation>
|
2339 |
-
<sequence>
|
2340 |
-
<element name="enable" type="xsd:boolean"/>
|
2341 |
-
<element name="type" nillable="true" type="xsd:string"/>
|
2342 |
-
<element name="value" nillable="true" type="xsd:string"/>
|
2343 |
-
<element name="nbFreeTransaction" nillable="true" type="xsd:string"/>
|
2344 |
-
<element name="minAmountTransaction" nillable="true" type="xsd:string"/>
|
2345 |
-
<element name="maxAmountTransaction" nillable="true" type="xsd:string"/>
|
2346 |
-
</sequence>
|
2347 |
-
</complexType>
|
2348 |
-
<complexType name="associatedTransactions">
|
2349 |
-
<annotation>
|
2350 |
-
<documentation>
|
2351 |
-
This element contains information about the
|
2352 |
-
associated transactions
|
2353 |
-
</documentation>
|
2354 |
-
</annotation>
|
2355 |
-
<sequence>
|
2356 |
-
<element name="transactionId" nillable="false" type="xsd:string"/>
|
2357 |
-
<element name="type" nillable="false" type="xsd:string"/>
|
2358 |
-
<element name="date" nillable="false" type="string"/>
|
2359 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
2360 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
2361 |
-
<element name="originTransactionId" nillable="false" type="xsd:string"/>
|
2362 |
-
</sequence>
|
2363 |
-
</complexType>
|
2364 |
-
|
2365 |
-
<complexType name="associatedTransactionsList">
|
2366 |
-
<annotation>
|
2367 |
-
<documentation>
|
2368 |
-
An array of associatedTransactions
|
2369 |
-
</documentation>
|
2370 |
-
</annotation>
|
2371 |
-
<sequence>
|
2372 |
-
<element maxOccurs="100" minOccurs="0" name="associatedTransactions" type="tns1:associatedTransactions"/>
|
2373 |
-
</sequence>
|
2374 |
-
</complexType>
|
2375 |
-
|
2376 |
-
<complexType name="statusHistory">
|
2377 |
-
<annotation>
|
2378 |
-
<documentation>
|
2379 |
-
This element contains information about the
|
2380 |
-
status
|
2381 |
-
History
|
2382 |
-
</documentation>
|
2383 |
-
</annotation>
|
2384 |
-
<sequence>
|
2385 |
-
<element name="transactionId" nillable="false" type="xsd:string"/>
|
2386 |
-
<element name="date" nillable="false" type="string"/>
|
2387 |
-
<element name="amount" nillable="false" type="xsd:string"/>
|
2388 |
-
<element name="fees" nillable="false" type="xsd:string"/>
|
2389 |
-
<element name="status" nillable="false" type="xsd:string"/>
|
2390 |
-
<element name="originTransactionId" nillable="false" type="xsd:string"/>
|
2391 |
-
</sequence>
|
2392 |
-
</complexType>
|
2393 |
-
|
2394 |
-
<complexType name="statusHistoryList">
|
2395 |
-
<annotation>
|
2396 |
-
<documentation>
|
2397 |
-
An array of statusHistory
|
2398 |
-
</documentation>
|
2399 |
-
</annotation>
|
2400 |
-
<sequence>
|
2401 |
-
<element maxOccurs="100" minOccurs="0" name="statusHistory" type="tns1:statusHistory"/>
|
2402 |
-
</sequence>
|
2403 |
-
</complexType>
|
2404 |
-
<complexType name="paymentAdditional">
|
2405 |
-
<annotation>
|
2406 |
-
<documentation>
|
2407 |
-
This element contains information about the
|
2408 |
-
paymentAdditional
|
2409 |
-
</documentation>
|
2410 |
-
</annotation>
|
2411 |
-
<sequence>
|
2412 |
-
<element name="transaction" nillable="false" type="tns1:transaction"/>
|
2413 |
-
<element name="payment" nillable="false" type="tns1:payment"/>
|
2414 |
-
<element name="authorization" nillable="false" type="tns1:authorization"/>
|
2415 |
-
<element minOccurs="0" name="authentication3DSecure" nillable="true" type="tns1:authentication3DSecure"/>
|
2416 |
-
<element minOccurs="0" name="card" nillable="true" type="tns1:cardOut"/>
|
2417 |
-
<element minOccurs="0" name="extendedCard" nillable="true" type="tns1:extendedCardType"/>
|
2418 |
-
</sequence>
|
2419 |
-
</complexType>
|
2420 |
-
|
2421 |
-
<complexType name="paymentAdditionalList">
|
2422 |
-
<annotation>
|
2423 |
-
<documentation>
|
2424 |
-
An array of paymentAdditionalList
|
2425 |
-
</documentation>
|
2426 |
-
</annotation>
|
2427 |
-
<sequence>
|
2428 |
-
<element maxOccurs="100" minOccurs="0" name="paymentAdditional" type="tns1:paymentAdditional"/>
|
2429 |
-
</sequence>
|
2430 |
-
</complexType>
|
2431 |
-
|
2432 |
-
<complexType name="CustomerTransHist">
|
2433 |
-
<annotation>
|
2434 |
-
<documentation>
|
2435 |
-
An array of CustomerTrans
|
2436 |
-
</documentation>
|
2437 |
-
</annotation>
|
2438 |
-
<sequence>
|
2439 |
-
<element maxOccurs="unbounded" minOccurs="0" name="CustomerTrans" type="tns1:CustomerTrans">
|
2440 |
-
</element>
|
2441 |
-
</sequence>
|
2442 |
-
</complexType>
|
2443 |
-
<complexType name="CustomerTrans">
|
2444 |
-
<sequence>
|
2445 |
-
<element maxOccurs="1" minOccurs="1" name="IsLCLFAlerted" nillable="false" type="xsd:string">
|
2446 |
-
</element>
|
2447 |
-
<element maxOccurs="1" minOccurs="1" name="ExternalTransactionId" nillable="false" type="xsd:string">
|
2448 |
-
</element>
|
2449 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceOrder" nillable="false" type="xsd:string">
|
2450 |
-
</element>
|
2451 |
-
<element maxOccurs="1" minOccurs="1" name="CardCode" nillable="false" type="xsd:string">
|
2452 |
-
</element>
|
2453 |
-
<element maxOccurs="1" minOccurs="1" name="TransactionDate" nillable="false" type="xsd:string">
|
2454 |
-
</element>
|
2455 |
-
<element maxOccurs="1" minOccurs="1" name="Amount" nillable="false" type="xsd:string">
|
2456 |
-
</element>
|
2457 |
-
<element maxOccurs="1" minOccurs="1" name="Status" nillable="false" type="xsd:string">
|
2458 |
-
</element>
|
2459 |
-
<element maxOccurs="1" minOccurs="1" name="PosLabel" nillable="false" type="xsd:string">
|
2460 |
-
</element>
|
2461 |
-
</sequence>
|
2462 |
-
</complexType>
|
2463 |
-
|
2464 |
-
<complexType name="PaymentMeansTransHist">
|
2465 |
-
<annotation>
|
2466 |
-
<documentation>
|
2467 |
-
An array of PaymentMeansTrans
|
2468 |
-
</documentation>
|
2469 |
-
</annotation>
|
2470 |
-
<sequence>
|
2471 |
-
<element maxOccurs="unbounded" minOccurs="0" name="PaymentMeansTrans" type="tns1:PaymentMeansTrans">
|
2472 |
-
</element>
|
2473 |
-
</sequence>
|
2474 |
-
</complexType>
|
2475 |
-
<complexType name="PaymentMeansTrans">
|
2476 |
-
<sequence>
|
2477 |
-
<element maxOccurs="1" minOccurs="1" name="IsLCLFAlerted" nillable="false" type="xsd:string">
|
2478 |
-
</element>
|
2479 |
-
<element maxOccurs="1" minOccurs="1" name="ExternalTransactionId" nillable="false" type="xsd:string">
|
2480 |
-
</element>
|
2481 |
-
<element maxOccurs="1" minOccurs="1" name="ReferenceOrder" nillable="false" type="xsd:string">
|
2482 |
-
</element>
|
2483 |
-
<element maxOccurs="1" minOccurs="0" name="CustomerData" nillable="true" type="xsd:string">
|
2484 |
-
</element>
|
2485 |
-
<element maxOccurs="1" minOccu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|