Skip to content

Commit

Permalink
Merge branch 'release/1.10.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nabil509 committed Dec 21, 2018
2 parents fe3eab8 + fe3f93f commit f1e0820
Show file tree
Hide file tree
Showing 96 changed files with 838 additions and 484 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ To configure the payment module, click on Configure button corresponding to "Pay

Each PayZen payment module source file included in this distribution is licensed under Academic Free License (AFL 3.0).

Please see LICENSE for the full text of the AFL 3.0 license. It is also available through the world-wide-web at this URL: https://opensource.org/licenses/afl-3.0.php.
Please see LICENSE.txt for the full text of the AFL 3.0 license. It is also available through the world-wide-web at this URL: https://opensource.org/licenses/afl-3.0.php.
48 changes: 28 additions & 20 deletions payzen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,66 @@
1.10.2, 2018-12-24:
- Fix new signature algorithm name (HMAC-SHA-256).
- Compatibility with PrestaShop 1.7.4.x versions (fix logs directory).
- Update payment means logos.
- [prodfaq] Fix notice about shifting the shop to production mode.
- Added Spanish translation.
- Improve iframe mode interface.

1.10.1, 2018-07-06:
- Bug fix: Fixed negative amount for order "total_paid_real" field on out of stock orders (PrestaShop 1.5 only).
- Bug fix: Deleted payment error message shown for buyer on out of stock orders (PrestaShop < 1.6.1 only).
- [shatwo]Enable SHA-256 signature algorithm by default.
- [shatwo] Enable HMAC-SHA-256 signature algorithm by default.
- Ignore spaces at the beginning and the end of certificates on return signature processing.

1.10.0, 2018-05-23:
- Bug fix: relative to JavaScript action of payment button on order validation page (with one page checkout only).
- Bug fix: fatal error when creating order from PrestaShop backend with Colissimo carrier enabled.
- Bug fix: use frontend shop name available under "Preferences > Store contacts".
- Bug fix: do not update order state from "Accepted payment" to "Payment error" when replaying IPN URL for orders with many attempts.
- Enable signature algorithm selection (SHA-1 or SHA-256).
- Enable signature algorithm selection (SHA-1 or HMAC-SHA-256).
- Improve JS code redirecting to payment gateway to avoid possible conflicts with other modules.
- Re-order configuration options in sub-modules backend.
- Display all links to multilingual documentation files in module backend.
- Possibility to cancel payment in iframe mode.
- Possibility to configure 3D Secure by customer group.
- [technical]Manage enabled/disabled features by plugin variant.
- [technical] Manage enabled/disabled features by plugin variant.

1.9.0, 2017-10-16:
- Bug fix: send selected cards in payment in installments sub-module.
- [oney]Bug fix: correct simulated FacilyPay Oney funding fees calculation.
- [oney]Bug fix: save failed and cancelled orders to avoid sending same order ID for FacilyPay Oney payments.
- [oney] Bug fix: correct simulated FacilyPay Oney funding fees calculation.
- [oney] Bug fix: save failed and cancelled orders to avoid sending same order ID for FacilyPay Oney payments.
- Bug fix: error relative to missed checkout header and footer templates (PrestaShop 1.7 only).
- Bug fix: set negative tax amount to 0.
- Fix authentication error when shopping cart is shared between more than one shop.
- Added payment in pop-in using iframe mode.
- No longer use jQuery in redirection to gateway page to avoid compatibility errors.
- Disable payment button after redirect starts.
- Display payment in installments option label if only one option is available (PrestaShop 1.5 & 1.6).
- [oney]Consider Mondial Relay delivery method by sending selected relay point address to FacilyPay Oney.
- [oney]Consider DPD France Relais delivery method by sending selected relay point address to FacilyPay Oney.
- [oney]Consider SoColissimo delivery method by sending selected relay point address to FacilyPay Oney.
- [oney] Consider Mondial Relay delivery method by sending selected relay point address to FacilyPay Oney.
- [oney] Consider DPD France Relais delivery method by sending selected relay point address to FacilyPay Oney.
- [oney] Consider SoColissimo delivery method by sending selected relay point address to FacilyPay Oney.
- Display card brand user choice if any in backend order details.
- [fullcb]Added FullCB sub-module.
- [fullcb] Added FullCB sub-module.
- Disbale payment sub-modules for unsupported currencies.
- Add new "To validate payment" order state.
- Manage extended IPN calls (transaction validation, refund, modification and cancellation).
- Add "Delay" field and update "Rapidity" field in shipping options configuration.

1.8.2, 2017-05-01:
- [oney]Bug fix: order total really paid doubled for validated FacilyPay Oney payments in some PrestaShop versions.
- [oney] Bug fix: order total really paid doubled for validated FacilyPay Oney payments in some PrestaShop versions.
- Use merchant server timezone to display payment times.

1.8.1, 2016-03-27:
- Bug fix: relative to default language for multilingual fields.
- [oney]Bug fix: relative to sending shipping data when using reclaim in shop carrier with FacilyPay Oney payments.
- [oney] Bug fix: relative to sending shipping data when using reclaim in shop carrier with FacilyPay Oney payments.
- Bug fix: default values lost for disabled fields after saving configuration.
- Bug fix: minor graphic bug in one page checkout mode (PrestaShop < 1.7).
- Bug fix: fix the potential error "Cannot redeclare class FileLoggerCore" when file logger is used by other installed modules.
- Update supported cards for payment in installments sub-module.
- Use PHP 5.2 syntax to remain compatible with PrestaShop installations.
- Improve CSS and templates management.
- [oney]Possibility to configure FacilyPay Oney options inside merchant website.
- [oney]Do not create order if cancelled or failed FacilyPay Oney payment unless merchant enables "Order creation on failure" option.
- [oney] Possibility to configure FacilyPay Oney options inside merchant website.
- [oney] Do not create order if cancelled or failed FacilyPay Oney payment unless merchant enables "Order creation on failure" option.
- Sending customer cellular phone number if any.
- Possibility to manage empty cart before redirection to gateway in admin interface.

Expand All @@ -65,15 +73,15 @@
- Adding support of "Advanced EU compliance" module by implementing displayPaymentEU hook. In this case, only standard payment is available.
- Use of AFL license (instead of OSL) as other PrestaShop modules and themes.
- Save presentation date in payment order table (displayed in order view on PrestaShop backend).
- [oney]Send delivery address in vads_ship_to_street for FacilyPay Oney payments.
- [oney] Send delivery address in vads_ship_to_street for FacilyPay Oney payments.
- Do not send cart data if too big cart (more than 85 products) unless it is mandatory.
- Take in account theme left and right column configurations.
- Module code refacting to improve performance and pass PrestaShop Addons validator.
- Improve management of regular expressions with UTF-8 special characters.
- Remove control over certificate format modified on the gateway.
- Compatibility with PrestaShop 1.7.x versions (imlementing paymentOptions hook).
- Perform data validation (customer address and card data) if necessary after payment mean selection.
- [oney]Give user the choice to enable / disable FacilyPay Oney payment in standard sub-module.
- [oney] Give user the choice to enable / disable FacilyPay Oney payment in standard sub-module.
- Make payment in installments option labels translatable.
- Possibility to choose payment types to allow in payment in installments sub-module.
- Possibility to enable payment card selection on merchant website.
Expand All @@ -95,17 +103,17 @@
- Creation of an order state for "Pending authorisation" payments.

1.5.0, 2015-07-16:
- [sofort]Adding SOFORT Banking sub-module.
- [sofort,sepa]Adding custom state for pending funds transfer payments.
- [sofort] Adding SOFORT Banking sub-module.
- [sofort,sepa] Adding custom state for pending funds transfer payments.
- Correction of IPN URL displayed in module backend (common URL for all stores in multistore mode).

1.4.0, 2015-06-09:
- Bug fix: relative to sub-modules availability in frontend.
- Bug fix: relative to max version specified in PrestaShop "ps_versions_compliancy" module property.
- Bug fix: do not send shipping_amount and insurance_amount variables to avoid amount consistency bug for PayPal payment.
- Bug fix: store ID missed when IPN URL called (in multistore mode).
- [ancv]Adding ANCV sub-module.
- [sepa]Adding SEPA sub-module.
- [ancv] Adding ANCV sub-module.
- [sepa] Adding SEPA sub-module.
- Reorganization of module settings display.
- Use of language dropdown (in PrestaShop v1.6.x) instead of flags for multilingual setting fields.
- Adding PT and DE translations for IPN responses.
Expand All @@ -116,7 +124,7 @@
- Bug fix: relative to order amount rounding.
- Consideration of locales (of languages) like pt_BR for Brazilian portuguese.
- Checking php.ini limits (post_max_size et max_input_vars) when displaying module configuration in backend.
- [oney]Bug fix: dot not post shipping options to server when merchant has not FacilyPay Oney contract (in module backend configuration).
- [oney] Bug fix: dot not post shipping options to server when merchant has not FacilyPay Oney contract (in module backend configuration).

1.3.1, 2015-03-19:
- Bug fix: relative to checking PrestaShop (v 1.5.0.x) supported version at module installation.
Expand Down
97 changes: 58 additions & 39 deletions payzen/classes/PayzenApi.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* PayZen V2-Payment Module version 1.10.1 for PrestaShop 1.5-1.7. Support contact : [email protected].
* PayZen V2-Payment Module version 1.10.2 for PrestaShop 1.5-1.7. Support contact : [email protected].
*
* NOTICE OF LICENSE
*
Expand All @@ -9,11 +9,11 @@
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/afl-3.0.php
*
* @category Payment
* @package Payzen
* @author Lyra Network (http://www.lyra-network.com/)
* @copyright 2014-2018 Lyra Network and contributors
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category payment
* @package payzen
*/

if (! defined('_PS_VERSION_')) {
Expand Down Expand Up @@ -80,9 +80,19 @@ public static function generateTransId($timestamp = null)
public static function getSupportedLanguages()
{
return array(
'de' => 'German', 'en' => 'English', 'zh' => 'Chinese', 'es' => 'Spanish', 'fr' => 'French',
'it' => 'Italian', 'ja' => 'Japanese', 'nl' => 'Dutch', 'pl' => 'Polish', 'pt' => 'Portuguese',
'ru' => 'Russian', 'sv' => 'Swedish', 'tr' => 'Turkish'
'de' => 'German',
'en' => 'English',
'zh' => 'Chinese',
'es' => 'Spanish',
'fr' => 'French',
'it' => 'Italian',
'ja' => 'Japanese',
'nl' => 'Dutch',
'pl' => 'Polish',
'pt' => 'Portuguese',
'ru' => 'Russian',
'sv' => 'Swedish',
'tr' => 'Turkish'
);
}

Expand Down Expand Up @@ -111,16 +121,15 @@ public static function isSupportedLanguage($lang)
public static function getSupportedCurrencies()
{
$currencies = array(
array('ARS', '032', 2), array('AUD', '036', 2), array('KHR', '116', 0), array('CAD', '124', 2),
array('CNY', '156', 1), array('HRK', '191', 2), array('CZK', '203', 2), array('DKK', '208', 2),
array('EKK', '233', 2), array('HKD', '344', 2), array('HUF', '348', 2), array('ISK', '352', 0),
array('IDR', '360', 0), array('JPY', '392', 0), array('KRW', '410', 0), array('LVL', '428', 2),
array('LTL', '440', 2), array('MYR', '458', 2), array('MXN', '484', 2), array('NZD', '554', 2),
array('NOK', '578', 2), array('PHP', '608', 2), array('RUB', '643', 2), array('SGD', '702', 2),
array('ZAR', '710', 2), array('SEK', '752', 2), array('CHF', '756', 2), array('THB', '764', 2),
array('GBP', '826', 2), array('USD', '840', 2), array('TWD', '901', 1), array('RON', '946', 2),
array('TRY', '949', 2), array('XOF', '952', 0), array('BGN', '975', 2), array('EUR', '978', 2),
array('PLN', '985', 2), array('BRL', '986', 2)
array('AUD', '036', 2), array('KHR', '116', 0), array('CAD', '124', 2), array('CNY', '156', 1),
array('CZK', '203', 2), array('DKK', '208', 2), array('HKD', '344', 2), array('HUF', '348', 2),
array('INR', '356', 2), array('IDR', '360', 2), array('JPY', '392', 0), array('KRW', '410', 0),
array('KWD', '414', 3), array('MYR', '458', 2), array('MXN', '484', 2), array('MAD', '504', 2),
array('NZD', '554', 2), array('NOK', '578', 2), array('PHP', '608', 2), array('RUB', '643', 2),
array('SGD', '702', 2), array('ZAR', '710', 2), array('SEK', '752', 2), array('CHF', '756', 2),
array('THB', '764', 2), array('TND', '788', 3), array('GBP', '826', 2), array('USD', '840', 2),
array('TWD', '901', 2), array('TRY', '949', 2), array('EUR', '978', 2), array('PLN', '985', 2),
array('BRL', '986', 2)
);

$payzen_currencies = array();
Expand Down Expand Up @@ -215,30 +224,40 @@ 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 de paiement Oney', 'ACCORD_STORE_SB' => 'Carte de paiement Oney - Sandbox',
'ALINEA' => 'Carte Privative Alinea', 'ALINEA_CDX' => 'Carte cadeau Alinea',
'ALINEA_CDX_SB' => 'Carte cadeau Alinea - SandBox', 'ALINEA_SB' => 'Carte Privative Alinea - SandBox',
'AURORE-MULTI' => 'Carte Aurore', 'BANCONTACT' => 'Carte Maestro Bancontact Mistercash',
'BITCOIN' => 'Bitcoin', 'BIZZBEE_CDX' => 'Carte cadeau Bizzbee',
'BIZZBEE_CDX_SB' => 'Carte cadeau Bizzbee - Sandbox', 'BRICE_CDX' => 'Carte cadeau Brice',
'BRICE_CDX_SB' => 'Carte cadeau Brice - Sandbox', 'CDGP' => 'Carte Privilège', 'COF3XCB' => '3 fois CB Cofinoga',
'COF3XCB_SB' => '3 fois CB Cofinoga - Sandbox', 'COFINOGA' => 'Carte Be Smart', 'CORA_BLANCHE' => 'Carte Cora Blanche',
'CORA_PREM' => 'Carte Cora Premium', 'CORA_VISA' => 'Carte Cora Visa', 'DINERS' => 'Carte Diners Club',
'E_CV' => 'E-chèque vacance', 'EDENRED_TR' => 'Ticket Restaurant', 'EDENRED_EC' => 'Ticket EcoCheque', 'EDENRED_TC' => 'Ticket Compliments',
'EPS' => 'eps-Überweisung', 'FULLCB3X' => 'Paiement en 3X avec BNPP PF', 'FULLCB4X' => 'Paiement en 4X avec BNPP PF',
'GIROPAY' => 'Giropay', 'KLARNA' => 'Klarna', 'IDEAL' => 'iDEAL', 'ILLICADO' => 'Carte cadeau Illicado',
'ILLICADO_SB' => 'Carte cadeau Illicado - Sandbox', 'JCB' => 'Carte 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', 'MASTERPASS' => 'Portefeuille numérique MasterCard',
'ONEY' => 'Paiement en 3/4 fois Oney FacilyPay', 'ONEY_SANDBOX' => 'Paiement en 3/4 fois Oney FacilyPay - Sandbox',
'PAYLIB' => 'Paylib', 'PAYPAL' => 'PayPal', 'PAYPAL_SB' => 'PayPal - Sandbox',
'PAYSAFECARD' => 'Carte prépayée Paysafecard', 'POSTFINANCE' => 'PostFinance',
'POSTFINANCE_EFIN' => 'PostFinance mode E-finance', 'RUPAY' => 'RuPay',
'SCT' => 'Virement SEPA', 'SDD' => 'Prélèvement SEPA', 'SOFORT_BANKING' => 'Sofort',
'TRUFFAUT_CDX' => 'Carte cadeau Truffaut', 'VILLAVERDE' => 'Carte cadeau Villaverde',
'VILLAVERDE_SB' => 'Carte cadeau Villaverde - SandBox', 'ECCARD' => 'EC Card'
'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' => 'Carte 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', 'CONECS_APETIZ' => 'Titre-Restaurant Dématérialisé Apetiz',
'CONECS_CHQ_DEJ' => 'Titre-Restaurant Dématérialisé Chèque Déjeuner',
'CONECS_SODEXO' => 'Titre-Restaurant Dématérialisé Sodexo', 'CONECS_EDENRED' => 'Ticket Restaurant',
'DINERS' => 'Carte Diners Club', 'DISCOVER' => 'Carte 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',
'EPS' => 'EPS Online Überweisung', 'EPS_GIROPAY' => 'EPS Online Überweisung',
'FULLCB_3X' => 'Paiement en 3x sans frais par BNPP PF', 'FULLCB_4X' => 'Paiement en 4x sans frais par BNPP PF',
'GIROPAY' => 'Giropay', 'IDEAL' => 'iDEAL', 'ILLICADO' => 'Cartes Cadeau Illicado',
'ILLICADO_SB' => 'Cartes Cadeau Illicado - Sandbox - Sandbox', 'JCB' => 'JCB',
'JOUECLUB_CDX' => 'Carte cadeau JouéClub', 'JOUECLUB_CDX_SB' => 'Carte cadeau JouéClub - Sandbox',
'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', 'PAYDIREKT' => 'PayDirekt',
'PAYLIB' => 'Wallet Paylib', 'PAYPAL' => 'PayPal', 'PAYPAL_SB' => 'PayPal - Sandbox',
'PAYSAFECARD' => 'Carte prépayée paysafecard', 'PICWIC' => 'Carte enseigne PicWic',
'PICWIC_SB' => 'Carte enseigne PicWic - Sandbox', 'POSTFINANCE' => 'PostFinance',
'POSTFINANCE_EFIN' => 'PostFinance E-finance', 'SCT' => 'Virement SEPA Credit Transfer',
'SDD' => 'Prélèvement SEPA Direct Debit', 'SOFICARTE' => 'Carte Soficarte',
'SOFORT_BANKING' => 'Sofort', 'TRUFFAUX_CDX' => 'Carte Cadeau Truffaut', 'UNION_PAY' => 'UnionPay',
'VILLAVERDE' => 'Carte enseigne Villaverde', 'VILLAVERDE_SB' => 'Carte enseigne Villaverde - Sandbox',
'WECHAT' => 'WeChat Pay', 'MYBANK' => 'MyBank', 'PRZELEWY24' => 'Przelewy24'
);
}

Expand Down
Loading

0 comments on commit f1e0820

Please sign in to comment.