Skip to content

Commit e1e0906

Browse files
author
Hadjer Chabane
committed
Merge branch 'support/1.x/hotfix/1.11.3' into support/1.x/master
2 parents 7b8cf79 + 31f7261 commit e1e0906

File tree

184 files changed

+843
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+843
-219
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.11.3, 2020-10-14:
2+
- [oney] Do not display payment installments for buyer.
3+
14
1.11.2, 2020-08-19:
25
- [embedded] Bug fix: Do not cancel orders in status "Fraud suspected" when new IPN calls are made.
36
- [embedded] Bug fix: Error due to strongAuthenticationState field renaming in REST token creation.

app/code/community/Lyranetwork/Payzen/Block/Adminhtml/System/Config/Field/CategoryMapping.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public function __construct()
4343
}
4444

4545
/**
46-
* Obtain existing data from form element.
46+
* Obtain existing data from form element
4747
*
48-
* Each row will be instance of Varien_Object.
48+
* Each row will be instance of Varien_Object
4949
*
5050
* @return array
5151
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Lyra Network.
4+
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
5+
*
6+
* @author Lyra Network (https://www.lyra.com/)
7+
* @copyright Lyra Network
8+
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9+
*/
10+
11+
/**
12+
* Custom renderer for the customer group options field.
13+
*/
14+
class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_CustgroupOptions
15+
extends Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions
16+
{
17+
public function __construct()
18+
{
19+
parent::__construct();
20+
21+
$this->_default = array('amount_min' => '135', 'amount_max' => '2000');
22+
}
23+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
/**
3+
* Copyright © Lyra Network.
4+
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
5+
*
6+
* @author Lyra Network (https://www.lyra.com/)
7+
* @copyright Lyra Network
8+
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9+
*/
10+
11+
/**
12+
* Custom renderer for the Choozeo payment options field.
13+
*/
14+
class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_PaymentOptions
15+
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
16+
{
17+
public function __construct()
18+
{
19+
$this->addColumn(
20+
'label',
21+
array(
22+
'label' => Mage::helper('payzen')->__('Label'),
23+
'style' => 'width: 260px;',
24+
'renderer' => new Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Column_Label
25+
)
26+
);
27+
$this->addColumn(
28+
'amount_min',
29+
array(
30+
'label' => Mage::helper('payzen')->__('Minimum amount'),
31+
'style' => 'width: 210px;'
32+
)
33+
);
34+
$this->addColumn(
35+
'amount_max',
36+
array(
37+
'label' => Mage::helper('payzen')->__('Maximum amount'),
38+
'style' => 'width: 210px;'
39+
)
40+
);
41+
42+
$this->_addAfter = false;
43+
44+
parent::__construct();
45+
46+
$this->setTemplate('payzen/field/array.phtml');
47+
}
48+
49+
/**
50+
* Obtain existing data from form element.
51+
*
52+
* Each row will be instance of Varien_Object
53+
*
54+
* @return array
55+
*/
56+
public function getArrayRows()
57+
{
58+
/**
59+
* @var array[string][string] $options
60+
*/
61+
$options = array(
62+
'EPNF_3X' => 'Choozeo 3X CB',
63+
'EPNF_4X' => 'Choozeo 4X CB'
64+
);
65+
66+
$savedOptions = $this->getElement()->getValue();
67+
if (! is_array($savedOptions)) {
68+
$savedOptions = array();
69+
}
70+
71+
foreach ($savedOptions as $id => $savedOption) {
72+
if (key_exists($savedOption['code'], $options)) {
73+
$savedOptions[$id]['label'] = $options[$savedOption['code']];
74+
unset($options[$savedOption['code']]);
75+
}
76+
}
77+
78+
// Add not saved yet groups.
79+
foreach ($options as $code => $label) {
80+
$option = array(
81+
'code' => $code,
82+
'label' => $label,
83+
'amount_min' => '',
84+
'amount_max' => ''
85+
);
86+
87+
$savedOptions[uniqid('_' . $code . '_')] = $option;
88+
}
89+
90+
$this->getElement()->setValue($savedOptions);
91+
return parent::getArrayRows();
92+
}
93+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright © Lyra Network.
4+
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
5+
*
6+
* @author Lyra Network (https://www.lyra.com/)
7+
* @copyright Lyra Network
8+
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9+
*/
10+
11+
class Lyranetwork_Payzen_Block_Choozeo extends Lyranetwork_Payzen_Block_Abstract
12+
{
13+
protected $_model = 'choozeo';
14+
15+
protected function _construct()
16+
{
17+
parent::_construct();
18+
$this->setTemplate('payzen/choozeo.phtml');
19+
}
20+
21+
public function getAvailableOptions()
22+
{
23+
$amount = $this->getMethod()->getInfoInstance()->getQuote()->getBaseGrandTotal();
24+
return $this->_getModel()->getAvailableOptions($amount);
25+
}
26+
}

app/code/community/Lyranetwork/Payzen/Block/Redirect.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
class Lyranetwork_Payzen_Block_Redirect extends Mage_Core_Block_Template
1212
{
13+
1314
/**
14-
* Get checkout session namespace.
15+
* Get checkout session namespace
1516
*
1617
* @return Mage_Checkout_Model_Session
1718
*/
@@ -31,7 +32,7 @@ protected function _getMethodInstance()
3132
}
3233

3334
/**
34-
* Return order instance with loaded information by increment id.
35+
* Return order instance with loaded information by increment id
3536
*
3637
* @return Mage_Sales_Model_Order
3738
*/
@@ -49,7 +50,7 @@ protected function _getOrder()
4950
}
5051

5152
/**
52-
* Get Form data by using ops payment api.
53+
* Get Form data by using ops payment api
5354
*
5455
* @return array
5556
*/
@@ -59,7 +60,7 @@ public function getFormFields()
5960
}
6061

6162
/**
62-
* Getting gateway url.
63+
* Getting gateway url
6364
*
6465
* @return string
6566
*/

app/code/community/Lyranetwork/Payzen/Helper/Data.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
1212
{
13+
1314
/**
1415
*
1516
* @var array a global var to easily enable/disable features
@@ -30,6 +31,7 @@ class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
3031
'postfinance' => true,
3132
'giropay' => true,
3233
'ideal' => true,
34+
'choozeo' => false,
3335
'fullcb' => true,
3436
'sepa' => true
3537
);

app/code/community/Lyranetwork/Payzen/Helper/Payment/Data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
class Lyranetwork_Payzen_Helper_Payment_Data extends Mage_Payment_Helper_Data
1212
{
13+
1314
/**
14-
* Retrieve method model object.
15+
* Retrieve method model object
1516
*
1617
* @param string $code
1718
* @return Mage_Payment_Model_Method_Abstract|false
@@ -22,7 +23,7 @@ public function getMethodInstance($code)
2223
$code = 'payzen_other';
2324
}
2425

25-
$key = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/model';
26+
$key = self::XML_PATH_PAYMENT_METHODS.'/'.$code.'/model';
2627
$class = Mage::getStoreConfig($key);
2728
return Mage::getModel($class);
2829
}

app/code/community/Lyranetwork/Payzen/Model/Api/Api.php

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -212,35 +212,32 @@ public static function getSupportedCardTypes()
212212
'CB' => 'CB', 'E-CARTEBLEUE' => 'e-Carte Bleue', 'MAESTRO' => 'Maestro', 'MASTERCARD' => 'Mastercard',
213213
'VISA' => 'Visa', 'VISA_ELECTRON' => 'Visa Electron', 'VPAY' => 'V PAY', 'AMEX' => 'American Express',
214214
'ACCORD_STORE' => 'Cartes Enseignes Partenaires', 'ACCORD_STORE_SB' => 'Cartes Enseignes Partenaires (sandbox)',
215-
'ALINEA' => 'Carte myalinea', 'ALINEA_CDX' => 'Carte Cadeau Alinéa',
216-
'ALINEA_CDX_SB' => 'Carte Cadeau Alinéa (sandbox)', 'ALINEA_SB' => 'Carte myalinea (sandbox)',
217-
'ALIPAY' => 'Alipay', 'ALLOBEBE_CDX' => 'Carte Cadeau Allobébé', 'ALLOBEBE_CDX_SB' => 'Carte Cadeau Allobébé (sandbox)',
215+
'ALINEA_CDX' => 'Carte Cadeau Alinéa', 'ALINEA_CDX_SB' => 'Carte Cadeau Alinéa (sandbox)', 'ALIPAY' => 'Alipay',
216+
'ALLOBEBE_CDX' => 'Carte Cadeau Allobébé', 'ALLOBEBE_CDX_SB' => 'Carte Cadeau Allobébé (sandbox)', 'APETIZ' => 'Apetiz',
218217
'AUCHAN' => 'Carte Auchan', 'AUCHAN_SB' => 'Carte Auchan (sandbox)', 'AURORE-MULTI' => 'Cpay Aurore',
219218
'BANCONTACT' => 'Bancontact Mistercash', 'BIZZBEE_CDX' => 'Carte Cadeau Bizzbee',
220-
'BIZZBEE_CDX_SB' => 'Carte Cadeau Bizzbee (sandbox)', 'BOULANGER' => 'Carte b+',
221-
'BOULANGER_SB' => 'Carte b+ (sandbox)', 'BRICE_CDX' => 'Carte Cadeau Brice',
222-
'BRICE_CDX_SB' => 'Carte Cadeau Brice (sandbox)', 'COFINOGA' => 'Cofinoga',
223-
'CONECS' => 'Conecs', 'APETIZ' => 'Apetiz',
224-
'CHQ_DEJ' => 'Chèque Déjeuner',
225-
'SODEXO' => 'Pass Restaurant', 'EDENRED' => 'Ticket Restaurant',
226-
'CORA_BLANCHE' => 'Cora blanche', 'CORA_PREM' => 'Cora Visa Premier', 'CORA_VISA' => 'Cora Visa',
227-
'DINERS' => 'Diners', 'DISCOVER' => 'Discover', 'E_CV' => 'e-Chèque-Vacances', 'ECCARD' => 'EC Card',
228-
'EDENRED_EC' => 'Ticket EcoCheque', 'EDENRED_TC' => 'Ticket Compliments',
229-
'EDENRED_TR' => 'Ticket Restaurant', 'ELV' => 'ELV',
230-
'FULLCB3X' => 'Paiement en 3 fois CB', 'FULLCB4X' => 'Paiement en 4 fois CB',
231-
'GOOGLEPAY' => 'Google Pay', 'GIROPAY' => 'Giropay', 'IDEAL' => 'iDEAL', 'ILLICADO' => 'Carte Illicado',
232-
'ILLICADO_SB' => 'Carte Illicado (sandbox)', 'JCB' => 'JCB',
233-
'KLARNA' => 'Klarna', 'LEROY-MERLIN' => 'Carte Maison Financement',
234-
'LEROY-MERLIN_SB' => 'Carte Maison Financement (sandbox)', 'MASTERPASS' => 'MasterPass',
235-
'MULTIBANCO' => 'Multibanco', 'NORAUTO' => 'Carte Norauto option Financement', 'NORAUTO_SB' => 'Carte Norauto option Financement (sandbox)',
236-
'ONEY' => 'Paiement en 3 ou 4 fois par CB', 'ONEY_SANDBOX' => 'Paiement en 3 ou 4 fois par CB (sandbox)', 'ONEY_3X_4X' => 'Paiement en 3 ou 4 fois Oney',
237-
'PAYDIREKT' => 'Paydirekt', 'PAYLIB' => 'Paylib', 'PAYPAL' => 'PayPal', 'PAYPAL_SB' => 'PayPal Sandbox',
238-
'POSTFINANCE' => 'PostFinance Card', 'POSTFINANCE_EFIN' => 'PostFinance E-Finance', 'SCT' => 'Virement SEPA',
239-
'SDD' => 'Prélèvement SEPA', 'SOFICARTE' => 'Soficarte',
240-
'SOFORT_BANKING' => 'Sofort', 'TRUFFAUT_CDX' => 'Carte Cadeau Truffaut', 'UNION_PAY' => 'UnionPay',
241-
'VILLAVERDE' => 'Carte Cadeau VillaVerde', 'VILLAVERDE_SB' => 'Carte Cadeau VillaVerde (sandbox)',
242-
'WECHAT' => 'WeChat Pay', 'MYBANK' => 'MyBank', 'PRZELEWY24' => 'Przelewy24',
243-
'ONEY_ENSEIGNE' => 'Cartes enseignes Oney'
219+
'BIZZBEE_CDX_SB' => 'Carte Cadeau Bizzbee (sandbox)', 'BOULANGER' => 'Carte b+', 'BOULANGER_SB' => 'Carte b+ (sandbox)',
220+
'BRICE_CDX' => 'Carte Cadeau Brice', 'BRICE_CDX_SB' => 'Carte Cadeau Brice (sandbox)', 'BUT' => 'But', 'CABAL' => 'Cabal',
221+
'CARNET' => 'Carnet', 'CA_DO_CARTE' => 'CA DO Carte', 'CHQ_DEJ' => 'Chèque Déjeuner', 'CONECS' => 'Conecs',
222+
'CONFORAMA' => 'Conforama', 'CORA' => 'Cora', 'CORA_BLANCHE' => 'Cora blanche', 'CORA_PREM' => 'Cora Visa Premier',
223+
'CORA_VISA' => 'Cora Visa', 'CVCO' => 'Chèque-Vacances Connect', 'DINERS' => 'Diners', 'DISCOVER' => 'Discover',
224+
'ECCARD' => 'EC Card', 'EDENRED' => 'Ticket Restaurant', 'EDENRED_EC' => 'Ticket EcoCheque',
225+
'EDENRED_SC' => 'Ticket Sport & Culture', 'EDENRED_TC' => 'Ticket Compliments', 'EDENRED_TR' => 'Ticket Restaurant',
226+
'ELO' => 'Elo', 'E_CV' => 'e-Chèque-Vacances', 'FRANFINANCE_3X' => 'Paiement en 3 fois',
227+
'FRANFINANCE_4X' => 'Paiement en 4 fois', 'FULLCB3X' => 'Paiement en 3 fois CB', 'FULLCB4X' => 'Paiement en 4 fois CB',
228+
'GEMO_CDX' => 'Carte Cadeau Gémo', 'GEMO_CDX_SB' => 'Carte Cadeau Gémo (sandbox)', 'GIROPAY' => 'Giropay',
229+
'GOOGLEPAY' => 'Google Pay', 'HIPER' => 'Hiper', 'HIPERCARD' => 'Hipercard', 'IDEAL' => 'iDEAL', 'JCB' => 'JCB',
230+
'JOUECLUB_CDX' => 'Carte Cadeau Joué Club', 'JOUECLUB_CDX_SB' => 'Carte Cadeau Joué Club (sandbox)',
231+
'JULES_CDX' => 'Carte Cadeau Jules', 'JULES_CDX_SB' => 'Carte Cadeau Jules (sandbox)', 'KLARNA' => 'Klarna',
232+
'LECLERC' => 'Carte Reglo', 'MC_CORDOBESA' => 'Mastercard Cordobesa',
233+
'MULTIBANCO' => 'Multibanco', 'MYBANK' => 'MyBank', 'NARANJA' => 'Naranja', 'NORAUTO' => 'Carte Norauto option Financement',
234+
'NORAUTO_SB' => 'Carte Norauto option Financement (sandbox)', 'ONEY_3X_4X' => 'Paiement en 3 ou 4 fois Oney',
235+
'ONEY_ENSEIGNE' => 'Cartes enseignes Oney', 'PAYDIREKT' => 'Paydirekt', 'PAYLIB' => 'Paylib', 'PAYPAL' => 'PayPal',
236+
'PAYPAL_SB' => 'PayPal Sandbox', 'PICWIC' => 'Carte Picwic', 'PICWIC_SB' => 'Carte Picwic (sandbox)',
237+
'POSTFINANCE' => 'PostFinance Card', 'POSTFINANCE_EFIN' => 'PostFinance E-Finance', 'PRESTO' => 'Presto',
238+
'PRZELEWY24' => 'Przelewy24', 'S-MONEY' => 'S-money', 'SCT' => 'Virement SEPA', 'SDD' => 'Prélèvement SEPA',
239+
'SODEXO' => 'Pass Restaurant', 'SOFORT_BANKING' => 'Sofort', 'SOROCRED' => 'Sorocred',
240+
'TRUFFAUT_CDX' => 'Carte Cadeau Truffaut', 'UNION_PAY' => 'UnionPay', 'WECHAT' => 'WeChat Pay'
244241
);
245242
}
246243

app/code/community/Lyranetwork/Payzen/Model/Api/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public function __construct($encoding = 'UTF-8')
119119
// Defining all parameters and setting formats and default values.
120120
$this->addField('signature', 'Signature', '#^[0-9a-f]{40}$#u', true);
121121

122+
$this->addField('vads_acquirer_transient_data', 'Acquirer transient data', $ans255);
122123
$this->addField('vads_action_mode', 'Action mode', '#^INTERACTIVE|SILENT$#u', true, 11);
123124
$this->addField('vads_amount', 'Amount', '#^' . $supzero . '$#u', true);
124125
$this->addField('vads_available_languages', 'Available languages', '#^(|[A-Za-z]{2}(;[A-Za-z]{2})*)$#u', false, 2);

0 commit comments

Comments
 (0)