Skip to content

Commit

Permalink
Merge branch 'support/1.x/hotfix/1.11.3' into support/1.x/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadjer Chabane committed Oct 14, 2020
2 parents 7b8cf79 + 31f7261 commit e1e0906
Show file tree
Hide file tree
Showing 184 changed files with 843 additions and 219 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.11.3, 2020-10-14:
- [oney] Do not display payment installments for buyer.

1.11.2, 2020-08-19:
- [embedded] Bug fix: Do not cancel orders in status "Fraud suspected" when new IPN calls are made.
- [embedded] Bug fix: Error due to strongAuthenticationState field renaming in REST token creation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public function __construct()
}

/**
* Obtain existing data from form element.
* Obtain existing data from form element
*
* Each row will be instance of Varien_Object.
* Each row will be instance of Varien_Object
*
* @return array
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* Copyright © Lyra Network.
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
*
* @author Lyra Network (https://www.lyra.com/)
* @copyright Lyra Network
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* Custom renderer for the customer group options field.
*/
class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_CustgroupOptions
extends Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_CustgroupOptions
{
public function __construct()
{
parent::__construct();

$this->_default = array('amount_min' => '135', 'amount_max' => '2000');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php
/**
* Copyright © Lyra Network.
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
*
* @author Lyra Network (https://www.lyra.com/)
* @copyright Lyra Network
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* Custom renderer for the Choozeo payment options field.
*/
class Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Choozeo_PaymentOptions
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
{
public function __construct()
{
$this->addColumn(
'label',
array(
'label' => Mage::helper('payzen')->__('Label'),
'style' => 'width: 260px;',
'renderer' => new Lyranetwork_Payzen_Block_Adminhtml_System_Config_Field_Column_Label
)
);
$this->addColumn(
'amount_min',
array(
'label' => Mage::helper('payzen')->__('Minimum amount'),
'style' => 'width: 210px;'
)
);
$this->addColumn(
'amount_max',
array(
'label' => Mage::helper('payzen')->__('Maximum amount'),
'style' => 'width: 210px;'
)
);

$this->_addAfter = false;

parent::__construct();

$this->setTemplate('payzen/field/array.phtml');
}

/**
* Obtain existing data from form element.
*
* Each row will be instance of Varien_Object
*
* @return array
*/
public function getArrayRows()
{
/**
* @var array[string][string] $options
*/
$options = array(
'EPNF_3X' => 'Choozeo 3X CB',
'EPNF_4X' => 'Choozeo 4X CB'
);

$savedOptions = $this->getElement()->getValue();
if (! is_array($savedOptions)) {
$savedOptions = array();
}

foreach ($savedOptions as $id => $savedOption) {
if (key_exists($savedOption['code'], $options)) {
$savedOptions[$id]['label'] = $options[$savedOption['code']];
unset($options[$savedOption['code']]);
}
}

// Add not saved yet groups.
foreach ($options as $code => $label) {
$option = array(
'code' => $code,
'label' => $label,
'amount_min' => '',
'amount_max' => ''
);

$savedOptions[uniqid('_' . $code . '_')] = $option;
}

$this->getElement()->setValue($savedOptions);
return parent::getArrayRows();
}
}
26 changes: 26 additions & 0 deletions app/code/community/Lyranetwork/Payzen/Block/Choozeo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Copyright © Lyra Network.
* This file is part of PayZen plugin for Magento. See COPYING.md for license details.
*
* @author Lyra Network (https://www.lyra.com/)
* @copyright Lyra Network
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

class Lyranetwork_Payzen_Block_Choozeo extends Lyranetwork_Payzen_Block_Abstract
{
protected $_model = 'choozeo';

protected function _construct()
{
parent::_construct();
$this->setTemplate('payzen/choozeo.phtml');
}

public function getAvailableOptions()
{
$amount = $this->getMethod()->getInfoInstance()->getQuote()->getBaseGrandTotal();
return $this->_getModel()->getAvailableOptions($amount);
}
}
9 changes: 5 additions & 4 deletions app/code/community/Lyranetwork/Payzen/Block/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

class Lyranetwork_Payzen_Block_Redirect extends Mage_Core_Block_Template
{

/**
* Get checkout session namespace.
* Get checkout session namespace
*
* @return Mage_Checkout_Model_Session
*/
Expand All @@ -31,7 +32,7 @@ protected function _getMethodInstance()
}

/**
* Return order instance with loaded information by increment id.
* Return order instance with loaded information by increment id
*
* @return Mage_Sales_Model_Order
*/
Expand All @@ -49,7 +50,7 @@ protected function _getOrder()
}

/**
* Get Form data by using ops payment api.
* Get Form data by using ops payment api
*
* @return array
*/
Expand All @@ -59,7 +60,7 @@ public function getFormFields()
}

/**
* Getting gateway url.
* Getting gateway url
*
* @return string
*/
Expand Down
2 changes: 2 additions & 0 deletions app/code/community/Lyranetwork/Payzen/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
{

/**
*
* @var array a global var to easily enable/disable features
Expand All @@ -30,6 +31,7 @@ class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
'postfinance' => true,
'giropay' => true,
'ideal' => true,
'choozeo' => false,
'fullcb' => true,
'sepa' => true
);
Expand Down
5 changes: 3 additions & 2 deletions app/code/community/Lyranetwork/Payzen/Helper/Payment/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

class Lyranetwork_Payzen_Helper_Payment_Data extends Mage_Payment_Helper_Data
{

/**
* Retrieve method model object.
* Retrieve method model object
*
* @param string $code
* @return Mage_Payment_Model_Method_Abstract|false
Expand All @@ -22,7 +23,7 @@ public function getMethodInstance($code)
$code = 'payzen_other';
}

$key = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/model';
$key = self::XML_PATH_PAYMENT_METHODS.'/'.$code.'/model';
$class = Mage::getStoreConfig($key);
return Mage::getModel($class);
}
Expand Down
51 changes: 24 additions & 27 deletions app/code/community/Lyranetwork/Payzen/Model/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,35 +212,32 @@ public static function getSupportedCardTypes()
'CB' => 'CB', 'E-CARTEBLEUE' => 'e-Carte Bleue', 'MAESTRO' => 'Maestro', 'MASTERCARD' => 'Mastercard',
'VISA' => 'Visa', 'VISA_ELECTRON' => 'Visa Electron', 'VPAY' => 'V PAY', 'AMEX' => 'American Express',
'ACCORD_STORE' => 'Cartes Enseignes Partenaires', 'ACCORD_STORE_SB' => 'Cartes Enseignes Partenaires (sandbox)',
'ALINEA' => 'Carte myalinea', 'ALINEA_CDX' => 'Carte Cadeau Alinéa',
'ALINEA_CDX_SB' => 'Carte Cadeau Alinéa (sandbox)', 'ALINEA_SB' => 'Carte myalinea (sandbox)',
'ALIPAY' => 'Alipay', 'ALLOBEBE_CDX' => 'Carte Cadeau Allobébé', 'ALLOBEBE_CDX_SB' => 'Carte Cadeau Allobébé (sandbox)',
'ALINEA_CDX' => 'Carte Cadeau Alinéa', 'ALINEA_CDX_SB' => 'Carte Cadeau Alinéa (sandbox)', 'ALIPAY' => 'Alipay',
'ALLOBEBE_CDX' => 'Carte Cadeau Allobébé', 'ALLOBEBE_CDX_SB' => 'Carte Cadeau Allobébé (sandbox)', 'APETIZ' => 'Apetiz',
'AUCHAN' => 'Carte Auchan', 'AUCHAN_SB' => 'Carte Auchan (sandbox)', 'AURORE-MULTI' => 'Cpay Aurore',
'BANCONTACT' => 'Bancontact Mistercash', 'BIZZBEE_CDX' => 'Carte Cadeau Bizzbee',
'BIZZBEE_CDX_SB' => 'Carte Cadeau Bizzbee (sandbox)', 'BOULANGER' => 'Carte b+',
'BOULANGER_SB' => 'Carte b+ (sandbox)', 'BRICE_CDX' => 'Carte Cadeau Brice',
'BRICE_CDX_SB' => 'Carte Cadeau Brice (sandbox)', 'COFINOGA' => 'Cofinoga',
'CONECS' => 'Conecs', 'APETIZ' => 'Apetiz',
'CHQ_DEJ' => 'Chèque Déjeuner',
'SODEXO' => 'Pass Restaurant', 'EDENRED' => 'Ticket Restaurant',
'CORA_BLANCHE' => 'Cora blanche', 'CORA_PREM' => 'Cora Visa Premier', 'CORA_VISA' => 'Cora Visa',
'DINERS' => 'Diners', 'DISCOVER' => 'Discover', 'E_CV' => 'e-Chèque-Vacances', 'ECCARD' => 'EC Card',
'EDENRED_EC' => 'Ticket EcoCheque', 'EDENRED_TC' => 'Ticket Compliments',
'EDENRED_TR' => 'Ticket Restaurant', 'ELV' => 'ELV',
'FULLCB3X' => 'Paiement en 3 fois CB', 'FULLCB4X' => 'Paiement en 4 fois CB',
'GOOGLEPAY' => 'Google Pay', 'GIROPAY' => 'Giropay', 'IDEAL' => 'iDEAL', 'ILLICADO' => 'Carte Illicado',
'ILLICADO_SB' => 'Carte Illicado (sandbox)', 'JCB' => 'JCB',
'KLARNA' => 'Klarna', 'LEROY-MERLIN' => 'Carte Maison Financement',
'LEROY-MERLIN_SB' => 'Carte Maison Financement (sandbox)', 'MASTERPASS' => 'MasterPass',
'MULTIBANCO' => 'Multibanco', 'NORAUTO' => 'Carte Norauto option Financement', 'NORAUTO_SB' => 'Carte Norauto option Financement (sandbox)',
'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',
'PAYDIREKT' => 'Paydirekt', 'PAYLIB' => 'Paylib', 'PAYPAL' => 'PayPal', 'PAYPAL_SB' => 'PayPal Sandbox',
'POSTFINANCE' => 'PostFinance Card', 'POSTFINANCE_EFIN' => 'PostFinance E-Finance', 'SCT' => 'Virement SEPA',
'SDD' => 'Prélèvement SEPA', 'SOFICARTE' => 'Soficarte',
'SOFORT_BANKING' => 'Sofort', 'TRUFFAUT_CDX' => 'Carte Cadeau Truffaut', 'UNION_PAY' => 'UnionPay',
'VILLAVERDE' => 'Carte Cadeau VillaVerde', 'VILLAVERDE_SB' => 'Carte Cadeau VillaVerde (sandbox)',
'WECHAT' => 'WeChat Pay', 'MYBANK' => 'MyBank', 'PRZELEWY24' => 'Przelewy24',
'ONEY_ENSEIGNE' => 'Cartes enseignes Oney'
'BIZZBEE_CDX_SB' => 'Carte Cadeau Bizzbee (sandbox)', 'BOULANGER' => 'Carte b+', 'BOULANGER_SB' => 'Carte b+ (sandbox)',
'BRICE_CDX' => 'Carte Cadeau Brice', 'BRICE_CDX_SB' => 'Carte Cadeau Brice (sandbox)', 'BUT' => 'But', 'CABAL' => 'Cabal',
'CARNET' => 'Carnet', 'CA_DO_CARTE' => 'CA DO Carte', 'CHQ_DEJ' => 'Chèque Déjeuner', 'CONECS' => 'Conecs',
'CONFORAMA' => 'Conforama', 'CORA' => 'Cora', 'CORA_BLANCHE' => 'Cora blanche', 'CORA_PREM' => 'Cora Visa Premier',
'CORA_VISA' => 'Cora Visa', 'CVCO' => 'Chèque-Vacances Connect', 'DINERS' => 'Diners', 'DISCOVER' => 'Discover',
'ECCARD' => 'EC Card', 'EDENRED' => 'Ticket Restaurant', 'EDENRED_EC' => 'Ticket EcoCheque',
'EDENRED_SC' => 'Ticket Sport & Culture', 'EDENRED_TC' => 'Ticket Compliments', 'EDENRED_TR' => 'Ticket Restaurant',
'ELO' => 'Elo', 'E_CV' => 'e-Chèque-Vacances', 'FRANFINANCE_3X' => 'Paiement en 3 fois',
'FRANFINANCE_4X' => 'Paiement en 4 fois', 'FULLCB3X' => 'Paiement en 3 fois CB', 'FULLCB4X' => 'Paiement en 4 fois CB',
'GEMO_CDX' => 'Carte Cadeau Gémo', 'GEMO_CDX_SB' => 'Carte Cadeau Gémo (sandbox)', 'GIROPAY' => 'Giropay',
'GOOGLEPAY' => 'Google Pay', 'HIPER' => 'Hiper', 'HIPERCARD' => 'Hipercard', 'IDEAL' => 'iDEAL', 'JCB' => 'JCB',
'JOUECLUB_CDX' => 'Carte Cadeau Joué Club', 'JOUECLUB_CDX_SB' => 'Carte Cadeau Joué Club (sandbox)',
'JULES_CDX' => 'Carte Cadeau Jules', 'JULES_CDX_SB' => 'Carte Cadeau Jules (sandbox)', 'KLARNA' => 'Klarna',
'LECLERC' => 'Carte Reglo', 'MC_CORDOBESA' => 'Mastercard Cordobesa',
'MULTIBANCO' => 'Multibanco', 'MYBANK' => 'MyBank', 'NARANJA' => 'Naranja', 'NORAUTO' => 'Carte Norauto option Financement',
'NORAUTO_SB' => 'Carte Norauto option Financement (sandbox)', 'ONEY_3X_4X' => 'Paiement en 3 ou 4 fois Oney',
'ONEY_ENSEIGNE' => 'Cartes enseignes Oney', 'PAYDIREKT' => 'Paydirekt', 'PAYLIB' => 'Paylib', 'PAYPAL' => 'PayPal',
'PAYPAL_SB' => 'PayPal Sandbox', 'PICWIC' => 'Carte Picwic', 'PICWIC_SB' => 'Carte Picwic (sandbox)',
'POSTFINANCE' => 'PostFinance Card', 'POSTFINANCE_EFIN' => 'PostFinance E-Finance', 'PRESTO' => 'Presto',
'PRZELEWY24' => 'Przelewy24', 'S-MONEY' => 'S-money', 'SCT' => 'Virement SEPA', 'SDD' => 'Prélèvement SEPA',
'SODEXO' => 'Pass Restaurant', 'SOFORT_BANKING' => 'Sofort', 'SOROCRED' => 'Sorocred',
'TRUFFAUT_CDX' => 'Carte Cadeau Truffaut', 'UNION_PAY' => 'UnionPay', 'WECHAT' => 'WeChat Pay'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public function __construct($encoding = 'UTF-8')
// Defining all parameters and setting formats and default values.
$this->addField('signature', 'Signature', '#^[0-9a-f]{40}$#u', true);

$this->addField('vads_acquirer_transient_data', 'Acquirer transient data', $ans255);
$this->addField('vads_action_mode', 'Action mode', '#^INTERACTIVE|SILENT$#u', true, 11);
$this->addField('vads_amount', 'Amount', '#^' . $supzero . '$#u', true);
$this->addField('vads_available_languages', 'Available languages', '#^(|[A-Za-z]{2}(;[A-Za-z]{2})*)$#u', false, 2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.11.2 for Magento 1.4-1.9. Support contact : [email protected].
* PayZen V2-Payment Module version 1.11.3 for Magento 1.4-1.9. Support contact : [email protected].
*
* @category Payment
* @package Payzen
Expand Down
Loading

0 comments on commit e1e0906

Please sign in to comment.