Skip to content

Commit

Permalink
Merge branch 'support/1.x/hotfix/1.11.2' into support/1.x/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alima Grine committed Aug 19, 2020
2 parents 40c4d57 + 57f44ec commit 7b8cf79
Show file tree
Hide file tree
Showing 184 changed files with 355 additions and 872 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
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.
- [embedded] Bug fix: Compatibility of payment with embedded fields with Internet Explorer 11.
- [embedded] Bug fix: Error 500 due to riskControl modified format in REST response.
- [oney] Bug fix: Fix Oney3x4x options requirement.
- [oney] Make phone number mandatory for Oney 3x/4x payments.
- Update payment means logos.

1.11.1, 2020-04-29:
- [embedded] Bugfix: Payment fields error relative to new JavaScript client library.
- [embedded] Disable 1-Click payment buttons when using payment with embedded fields.
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

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ public function __construct()
)
);

$options = array('options' => Lyranetwork_Payzen_Model_Api_Api::getSupportedCardTypes());
$cards = Lyranetwork_Payzen_Model_Api_Api::getSupportedCardTypes();

foreach ($cards as $code => $label) {
$cards[$code] = $code . " - " . $label;
}

$options = array('options' => $cards);

$this->addColumn(
'means',
array(
Expand Down
26 changes: 0 additions & 26 deletions app/code/community/Lyranetwork/Payzen/Block/Choozeo.php

This file was deleted.

9 changes: 4 additions & 5 deletions app/code/community/Lyranetwork/Payzen/Block/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

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 @@ -32,7 +31,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 @@ -50,7 +49,7 @@ protected function _getOrder()
}

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

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

class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
{

/**
*
* @var array a global var to easily enable/disable features
Expand All @@ -31,7 +30,6 @@ class Lyranetwork_Payzen_Helper_Data extends Mage_Core_Helper_Abstract
'postfinance' => true,
'giropay' => true,
'ideal' => true,
'choozeo' => false,
'fullcb' => true,
'sepa' => true
);
Expand Down
10 changes: 9 additions & 1 deletion app/code/community/Lyranetwork/Payzen/Helper/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,14 @@ public function doPaymentRestCheck($controller)
return;
}

// Case of failure when retries are enabled, do nothing before last attempt.
if (! $response->isAcceptedPayment() && ($answer['orderCycle'] !== 'CLOSED')) {
$this->_getHelper()->log("Payment is not accepted but buyer can try to re-order. Do not create order at this time. Quote ID: #{$quoteId},
reserved order ID: #{$quote->getReservedOrderId()}.");
$controller->getResponse()->setBody($response->getOutputForPlatform('payment_ko_bis'));
return;
}

// Clear quote data.
$quote->getPayment()->unsAdditionalInformation(self::TOKEN_DATA);
$quote->getPayment()->unsAdditionalInformation(self::TOKEN);
Expand Down Expand Up @@ -904,7 +912,7 @@ public function updatePaymentInfo(Mage_Sales_Model_Order $order, $response)
' '
);

$amountDetail = $effectiveAmount. ' ' . $effectiveCurrency->getAlpha3() . ' (' . $amountDetail . ')';
$amountDetail = $effectiveAmount . ' ' . $effectiveCurrency->getAlpha3() . ' (' . $amountDetail . ')';
}

$additionalInfo = array(
Expand Down
5 changes: 2 additions & 3 deletions app/code/community/Lyranetwork/Payzen/Helper/Payment/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

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 @@ -23,7 +22,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
4 changes: 2 additions & 2 deletions app/code/community/Lyranetwork/Payzen/Helper/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public function convertRestResult($answer)
if ($riskControl = $this->getProperty($fraudManagement, 'riskControl')) {
$response['vads_risk_control'] = '';

foreach ($riskControl as $key => $value) {
$response['vads_risk_control'] .= "$key=$value;";
foreach ($riskControl as $value) {
$response['vads_risk_control'] .= "{$value['name']}={$value['result']};";
}
}

Expand Down
10 changes: 10 additions & 0 deletions app/code/community/Lyranetwork/Payzen/Helper/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class Lyranetwork_Payzen_Helper_Util extends Mage_Core_Helper_Abstract
'country' => '#^FR|GP|MQ|GF|RE|YT$#i',
'phone' => '#^[0-9]{10}$#'
),
'oney3x4x' => array(
'name' => "#^[A-ZÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ/ '-]{1,63}$#ui",
'street' => "#^[A-Z0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ/ '.,-]{1,127}$#ui",
'zip' => '#^[0-9]{5}$#',
'city' => "#^[A-Z0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ/ '-]{1,127}$#ui",
'country' => '#^FR|GP|MQ|GF|RE|YT$#i',
'phone' => '#^[0-9]{10}$#'
),
'fullcb' => array(
'name' => "#^[A-Za-z0-9àâçèéêîôùû]+([ \-']?[A-Za-z0-9àâçèéêîôùû]+)*$#",
'street' => '#^[^;]*$#',
Expand Down Expand Up @@ -439,6 +447,8 @@ public function checkAddressValidity($address, $payment)
$this->_throwException($emptyMsg, 'First Name', $addressType);
} elseif (! preg_match($nameRegex, $address->getFirstname())) {
$this->_throwException($invalidMsg, 'First Name', $addressType);
} elseif (($payment === 'oney3x4x') && ! $address->getTelephone()) {
$this->_throwException($emptyMsg, 'Telephone', $addressType);
} elseif ($address->getTelephone() && ! preg_match($phoneRegex, $address->getTelephone())) {
$this->_throwException($invalidMsg, 'Telephone', $addressType);
} elseif (! $address->getStreet(1)) {
Expand Down
54 changes: 27 additions & 27 deletions app/code/community/Lyranetwork/Payzen/Model/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,36 +209,36 @@ public static function getCurrencyNumCode($alpha3)
public static function getSupportedCardTypes()
{
return array(
'CB' => 'CB', 'E-CARTEBLEUE' => 'e-Carte Bleue', 'MAESTRO' => 'Maestro', 'MASTERCARD' => 'MasterCard',
'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' => 'Carte enseigne Accord', 'ACCORD_STORE_SB' => 'Carte enseigne Accord - Sandbox',
'ALINEA' => 'Carte enseigne Alinéa', 'ALINEA_CDX' => 'Carte cadeau Alinéa',
'ALINEA_CDX_SB' => 'Carte cadeau Alinéa - Sandbox', 'ALINEA_SB' => 'Carte enseigne Alinéa - Sandbox',
'ALIPAY' => 'Alipay', 'ALLOBEBE_CDX' => 'Carte cadeau AlloBébé', 'ALLOBEBE_CDX_SB' => 'Carte cadeau AlloBébé - Sandbox',
'AUCHAN' => 'Carte enseigne Auchan', 'AUCHAN_SB' => 'Carte enseigne Auchan - Sandbox', 'AURORE-MULTI' => 'Cpay Aurore',
'BANCONTACT' => 'Bancontact Mistercash', 'BIZZBEE_CDX' => 'Carte cadeau BizzBee',
'BIZZBEE_CDX_SB' => 'Carte cadeau BizzBee - Sandbox', 'BOULANGER' => 'Carte enseigne Boulanger',
'BOULANGER_SB' => 'Carte enseigne Boulanger - Sandbox', 'BRICE_CDX' => 'Carte cadeau Brice',
'BRICE_CDX_SB' => 'Carte cadeau Brice - Sandbox', 'COFINOGA' => 'Carte Cofinoga Be Smart',
'CONECS' => 'Titre-Restaurant Dématérialisé Conecs', 'APETIZ' => 'Titre-Restaurant Dématérialisé Apetiz',
'CHQ_DEJ' => 'Titre-Restaurant Dématérialisé Chèque Déjeuner',
'SODEXO' => 'Titre-Restaurant Dématérialisé Sodexo', 'EDENRED' => 'Ticket Restaurant',
'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)',
'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' => 'Euro-Cheque card',
'EDENRED_EC' => 'Ticket Eco Chèque Edenred', 'EDENRED_TC' => 'Ticket Culture Edenred',
'EDENRED_TR' => 'Ticket Restaurant Edenred', 'ELV' => 'Prélèvement Bancaire Hobex',
'FULLCB_3X' => 'Paiement en 3x sans frais par BNPP PF', 'FULLCB_4X' => 'Paiement en 4x sans frais par BNPP PF',
'GOOGLEPAY' => 'Google Pay', 'GIROPAY' => 'Giropay', 'IDEAL' => 'iDEAL', 'ILLICADO' => 'Cartes Cadeau Illicado',
'ILLICADO_SB' => 'Cartes Cadeau Illicado - Sandbox - Sandbox', 'JCB' => 'JCB',
'KLARNA' => 'Klarna Internet Banking', 'LEROY-MERLIN' => 'Carte enseigne Leroy-Merlin',
'LEROY-MERLIN_SB' => 'Carte enseigne Leroy-Merlin - Sandbox', 'MASTERPASS' => 'MasterPass',
'MULTIBANCO' => 'Multibanco', 'NORAUTO' => 'Carte enseigne Norauto', 'NORAUTO_SB' => 'Carte enseigne Norauto - Sandbox',
'ONEY' => 'FacilyPay Oney', 'ONEY_SANDBOX' => 'FacilyPay Oney - Sandbox', 'ONEY_3X_4X' => 'Paiement en 3 ou 4 fois Oney',
'PAYDIREKT' => 'PayDirekt', 'PAYLIB' => 'Wallet Paylib', 'PAYPAL' => 'PayPal', 'PAYPAL_SB' => 'PayPal - Sandbox',
'POSTFINANCE' => 'PostFinance', 'POSTFINANCE_EFIN' => 'PostFinance E-finance', 'SCT' => 'Virement SEPA Credit Transfer',
'SDD' => 'Prélèvement SEPA Direct Debit', 'SOFICARTE' => 'Soficarte',
'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 enseigne Villaverde', 'VILLAVERDE_SB' => 'Carte enseigne Villaverde - Sandbox',
'VILLAVERDE' => 'Carte Cadeau VillaVerde', 'VILLAVERDE_SB' => 'Carte Cadeau VillaVerde (sandbox)',
'WECHAT' => 'WeChat Pay', 'MYBANK' => 'MyBank', 'PRZELEWY24' => 'Przelewy24',
'ONEY_ENSEIGNE' => 'Cartes enseignes Oney'
);
Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Lyranetwork/Payzen/Model/Api/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,12 @@ public function setPlatformUrl($url)
/**
* Enable/disable vads_redirect_* parameters.
*
* @param mixed $enabled false, 0, null, negative integer or 'false' to disable
* @param mixed $enabled false, 0, null or 'false' to disable
* @return boolean
*/
public function setRedirectEnabled($enabled)
{
$this->redirectEnabled = ($enabled && $enabled != '0' && strtolower($enabled) != 'false');
$this->redirectEnabled = ($enabled && (! is_string($enabled) || strtolower($enabled) !== 'false'));
return true;
}

Expand Down
Loading

0 comments on commit 7b8cf79

Please sign in to comment.