Giter Site home page Giter Site logo

hipay / hipay-fullservice-sdk-magento2 Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 16.0 2.94 MB

Official repository of the HiPay Fullservice extension for Magento v2.

Home Page: https://developer.hipay.com/doc/hipay-fullservice-sdk-magento2/

License: Apache License 2.0

PHP 73.00% HTML 6.96% JavaScript 16.42% CSS 0.62% Shell 2.88% Dockerfile 0.13%

hipay-fullservice-sdk-magento2's People

Contributors

etiennelandais avatar francescferresanchez avatar hipaybot avatar jbaptistelvt avatar jlestel avatar jprotin avatar jtiret avatar legithubdeaymeric avatar ryneczko avatar sirateck avatar thibautgdt avatar tviardin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hipay-fullservice-sdk-magento2's Issues

Undefined index: mage_catalog_category_entity

Context

  • Migration from Magento 2.1.9 to Magento 2.3
  • Hipay Module 1.3.4
  • Since the migration only Magento core modules are enabled
  • PHP 7.1.19

Issue

  • bin/magento setup:upgrade does not work and display the error message

Undefined index: mage_catalog_category_entity in path_to_ptoject/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 155.

Full Description

Good Morning,

I'm trying to migrate one of our project from magento 2.1.9 to 2.3.

I'm having a weird error related to hipay_cart_mapping_categories when trying to launch the command bin/magento setup:upgrade.

Undefined index: mage_catalog_category_entity in path_to_ptoject/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 155.

mage_catalog_category_entity is referenced in \HiPay\FullserviceMagento\Setup\UpgradeSchema as a foreign key target. There is not table with name mage_catalog_category_entity , did you want to target catalog_category_entity instead ?

It seems Magento 2.3 is making additionnal checks to validate database integrity.

Please find below some information that can help you detect / resolve the incident.

\Magento\Setup\Console\Command\UpgradeCommand::execute
\Magento\Setup\Model\Installer::installSchema
\Magento\Setup\Model\Installer::declarativeInstallSchema
\Magento\Setup\Model\DeclarationInstaller::installSchema
\Magento\Framework\Setup\Declaration\Schema\SchemaConfig::getDbConfig
\Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::build
\Magento\Framework\Setup\Declaration\Schema\Db\SchemaBuilder::processReferenceKeys
\Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::readReferences
\Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::getCreateTableSql

Best Regards

Erreur de log lors d'une notification

Bonjour,

Si une notification lève une exception, le logger renvoie une erreur (HiPay\FullserviceMagento\Controller\Notify\Index L82) car la méthode warn n'existe pas. Ceci est du a une modification de l'injection de dépendance sur Magento 2.4:
magento/magento2@28d2a5b#diff-12072a309c8288501e47bf04037c9330e474f560da6e9fac8aaf8018330aa19a qui au lieu de passer la classe Monolog passe maintenant la classe LoggerProxy. Il faudrait donc renommer la méthode warn en warning comme dit dans la documentation: https://devdocs.magento.com/guides/v2.4/config-guide/log/log-magento.html

TypeError: array_merge(): Argument #1 must be of type array, null given in /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Cart/Cart.php:294

Lors d'un paiement, une erreur est levée dans la classe: hipay/hipay-fullservice-sdk-magento2/Model/Cart/Cart.php

L'attribut de classe $_itemsCollectingRequired est déjà déclaré dans la classe parente et initialisé à true. Je pense qu'il n'est pas nécessaire de redéfinir cet attribut de classe et de plus sans aucune initialisation, la valeur sera à NULL.

Voici l'erreur après test d'un passage de paiement:

TypeError: array_merge(): Argument #1 must be of type array, null given in /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Cart/Cart.php:294
Stack trace:
#0 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Cart/Cart.php(294): array_merge(NULL, NULL)
#1 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/CommonRequest.php(185): HiPay\FullserviceMagento\Model\Cart\Cart->getAllItems('0')
#2 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/Order.php(438): HiPay\FullserviceMagento\Model\Request\CommonRequest->processCartFromOrder('Authorization', '0')
#3 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/Order.php(329): HiPay\FullserviceMagento\Model\Request\Order->processExtraInformations(Object(HiPay\Fullservice\Gateway\Request\Order\OrderRequest), '0')
#4 /var/www/html/generated/code/HiPay/FullserviceMagento/Model/Request/Order/Interceptor.php(23): HiPay\FullserviceMagento\Model\Request\Order->mapRequest()
#5 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/AbstractRequest.php(135): HiPay\FullserviceMagento\Model\Request\Order\Interceptor->mapRequest()
#6 /var/www/html/generated/code/HiPay/FullserviceMagento/Model/Request/Order/Interceptor.php(140): HiPay\FullserviceMagento\Model\Request\AbstractRequest->getRequestObject()
#7 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Gateway/Manager.php(318): HiPay\FullserviceMagento\Model\Request\Order\Interceptor->getRequestObject()
#8 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Gateway/Manager.php(214): HiPay\FullserviceMagento\Model\Gateway\Manager->_getRequestObject('\\HiPay\\Fullserv...', Array)
#9 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/FullserviceMethod.php(444): HiPay\FullserviceMagento\Model\Gateway\Manager->requestNewOrder()
#10 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/FullserviceMethod.php(362): HiPay\FullserviceMagento\Model\Method\FullserviceMethod->place(Object(Magento\Sales\Model\Order\Payment\Interceptor))
#11 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/CcMethod.php(158): HiPay\FullserviceMagento\Model\Method\FullserviceMethod->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), 494.8)
#12 /var/www/html/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/CcMethod.php(132): HiPay\FullserviceMagento\Model\Method\CcMethod->processAction('Sale', Object(Magento\Sales\Model\Order\Payment\Interceptor))
#13 /var/www/html/vendor/magento/module-sales/Model/Order/Payment.php(377): HiPay\FullserviceMagento\Model\Method\CcMethod->initialize('Sale', Object(Magento\Framework\DataObject))
#14 /var/www/html/generated/code/Magento/Sales/Model/Order/Payment/Interceptor.php(122): Magento\Sales\Model\Order\Payment->place()
#15 /var/www/html/vendor/magento/module-sales/Model/Order.php(1002): Magento\Sales\Model\Order\Payment\Interceptor->place()
#16 /var/www/html/vendor/magento/module-sales/Model/Order.php(1228): Magento\Sales\Model\Order->_placePayment()
#17 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Order->place()
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Order\Interceptor->___callParent('place', Array)
#19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interception\{closure}()
#20 /var/www/html/generated/code/Magento/Sales/Model/Order/Interceptor.php(356): Magento\Sales\Model\Order\Interceptor->___callPlugins('place', Array, Array)
#21 /var/www/html/vendor/magento/module-sales/Model/Service/OrderService.php(207): Magento\Sales\Model\Order\Interceptor->place()
#22 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Service\OrderService->place(Object(Magento\Sales\Model\Order\Interceptor))
#23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Service\OrderService\Interceptor->___callParent('place', Array)
#24 /var/www/html/vendor/magento/module-inventory-sales/Plugin/Sales/OrderManagement/AppendReservationsAfterOrderPlacementPlugin.php(166): Magento\Sales\Model\Service\OrderService\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Sales\Model\Order\Interceptor))
#25 /var/www/html/vendor/magento/module-inventory-sales/Plugin/Sales/OrderManagement/AppendReservationsAfterOrderPlacementPlugin.php(141): Magento\InventorySales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin->createOrder(Object(Closure), Object(Magento\Sales\Model\Order\Interceptor), Array, Object(Magento\InventorySales\Model\SalesChannel), Object(Magento\InventorySalesApi\Api\Data\SalesEventExtension))
#26 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\InventorySales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin->aroundPlace(Object(Magento\Sales\Model\Service\OrderService\Interceptor), Object(Closure), Object(Magento\Sales\Model\Order\Interceptor))
#27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Service\OrderService\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Sales\Model\Order\Interceptor))
#28 /var/www/html/generated/code/Magento/Sales/Model/Service/OrderService/Interceptor.php(86): Magento\Sales\Model\Service\OrderService\Interceptor->___callPlugins('place', Array, Array)
#29 /var/www/html/vendor/magento/module-quote/Model/QuoteManagement.php(624): Magento\Sales\Model\Service\OrderService\Interceptor->place(Object(Magento\Sales\Model\Order\Interceptor))
#30 /var/www/html/vendor/magento/module-quote/Model/QuoteManagement.php(500): Magento\Quote\Model\QuoteManagement->submitQuote(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#31 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteManagement->submit(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#32 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteManagement\Interceptor->___callParent('submit', Array)
#33 /var/www/html/vendor/magento/module-sales-rule/Plugin/CouponUsagesIncrement.php(54): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#34 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\SalesRule\Plugin\CouponUsagesIncrement->aroundSubmit(Object(Magento\Quote\Model\QuoteManagement\Interceptor), Object(Closure), Object(Magento\Quote\Model\Quote\Interceptor))
#35 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor))
#36 /var/www/html/generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php(68): Magento\Quote\Model\QuoteManagement\Interceptor->___callPlugins('submit', Array, NULL)
#37 /var/www/html/vendor/magento/module-quote/Model/QuoteManagement.php(458): Magento\Quote\Model\QuoteManagement\Interceptor->submit(Object(Magento\Quote\Model\Quote\Interceptor))
#38 /var/www/html/generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php(50): Magento\Quote\Model\QuoteManagement->placeOrder(14, NULL)
#39 /var/www/html/vendor/magento/module-checkout/Model/PaymentInformationManagement.php(152): Magento\Quote\Model\QuoteManagement\Interceptor->placeOrder(14)
#40 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(14, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#41 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)
#42 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}(14, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#43 /var/www/html/generated/code/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(23): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#44 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(14, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#45 /var/www/html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#46 /var/www/html/vendor/magento/module-webapi/Controller/Rest.php(202): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#47 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#48 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#49 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#50 /var/www/html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#51 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#52 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#53 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#54 /var/www/html/vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php(57): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#55 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch(Object(Magento\Framework\App\Http\Interceptor), Object(Closure))
#56 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#57 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#58 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#59 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#60 {main}

PWA support

Hello,
Are you currently working on a GraphQL implementation to use your solution in a Magento 2 PWA ?
Best,

Other XML error

Hi,

following issue #147 we have an include of files that does not exist.
vendor/hipay/hipay-fullservice-sdk-magento2/etc/adminhtml/system.xml
line 31 : <include path="HiPay_FullserviceMagento::system/credentials_applepay_tokenjs.xml"/>
line 53 : <include path="HiPay_FullserviceMagento::system/method/mbway_hosted_fields.xml"/>
line 80 : <include path="HiPay_FullserviceMagento::system/method/multibanco_hosted_fields.xml"/>

Module version is : 1.14.1

Si la méthode de paiement Enterprise Credit Card Hosted Fields est activée, les autres modes ne fonctionnent pas

Comme dit dans le titre, si cette méthode de paiement est activée, alors les autres modes de paiement ne fonctionnent plus (Checkmo / Hipay Paypal etc...).

Dans le fichier: HiPay_FullserviceMagento/web/js/view/payment/method-renderer/hipay-hosted-fields.js il y a un appel explicite à la méthode isPlaceOrderActionAllowed() dans l'initialize ce qui a pour action de désactiver les boutons de validation des autres modes de paiement.

Il y a également un autre souci avec l'évènement onChange sur les champs du formulaire de saisie de CB. Si un numéro de CB erroné est saisie alors les autres moyens de paiement seront désactivés. Il faudrait rappeler la méthode isPlaceOrderActionAllowed(true) dans le cas ou le formulaire est vidé.

Critical Error with "Send cart" flagged to true in configuration

Hello

It seems that there is a bug with the possibility to send the cart in configuration ("Send Cart" => true)

Here is the critical Error :

[2020-11-27 09:48:35] report.CRITICAL: Error: Call to a member function getValue() on null in /app/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/CommonRequest.php:210

It seems that "description" attribute is not tested before getting value

Problem with algorith to display cards on backend Customer and Payment

Hello,

I have seen an issue on the version 1.1.5.
On this file HiPay\FullserviceMagento\Model\ResourceModel\Card\Collection for the method onlyValid()
Instead of to have this code :
if($card->getCcExpYear() == $currentYear && $currentMonth < $card->getCcExpMonth())

it should be:
if($card->getCcExpYear() == $currentYear && $card->getCcExpMonth() < $currentMonth)

Regards,

Api username can't be emtpy and must be a string

Description du bug

Le fichier var/log/system.log se remplit énormément à chaque passage au checkout avec l'erreur suivante :

main.CRITICAL: Api username can't be emtpy and must be a string [] []

Pré-conditions

  1. Magento: 2.2.3
  2. PHP: 7.1
  3. Module HiPay version 1.3.2

Étapes pour reproduire

  1. Créer plusieurs websites
  2. Se connecter au back-office Magento 2
  3. Aller dans Boutiques -> Paramètres -> Configurations -> Ventes -> HiPay Enterprise
  4. Changer la vue pour se placer au niveau website
  5. Renseigner les identifiants API au niveau website
  6. Sauvegarder la configuration
  7. Accéder au checkout
  8. Ouvrir le fichier var/log/system.log

Résultat attendu

  1. Aucune erreur ne devrait apparaître dans le fichier de log

Résultat obtenu

  1. Une erreur apparaît en masse :

main.CRITICAL: Api username can't be emtpy and must be a string [] []

Après avoir tenté de modifier la configuration et renseigner les identifiants au niveau global, nous obtenons toujours le même log qui fait que le fichier system.log grossit énormément.

Multishipping

Hello,

I noticed that the payment methods provided by this module don't show up on the frontend when multishipping is enabled.

That's because allow_multiple_address is set to 0 in the payment.xml file (for all payment methods).

Of course, overriding it to 1 isn't enough. The payment methods get displayed on the billing page, but they don't ask for the payment information.

So, is there any way to make it work with the multishipping checkout?

Impossible de réutiliser un code promo après une commande "canceled" suite à une transaction en erreur

Description

Après le passage d'une commande utilisant une code promo dont la transaction est en échec, avec pour résultat une commande en statut "canceled". Il est impossible de réutiliser ce même code promo pour repasser une commande.

Pré-conditions

Magento 2.4.4-p2 (pas testé sous d'autres versions)
PHP 8.1
Module HiPay installé (hipay/hipay-fullservice-sdk-magento2) 1.16.0

Étapes pour reproduire

Activer le mode de paiement HiPay Enterprise Hosted Page (Stores > Configuration > Sales > Order > Payment methods > HiPay Enterprise Hosted Page)
Configurer HiPay Enterprise Credit Card Hosted field :

  • payment/hipay_hosted_fields/active => yes
  • payment/hipay_hosted_fields/payment_action => capture
  • payment/hipay_hosted_fields/order_status_payment_refused => canceled

Créer une règle panier (salesrule) :

    • active => yes
    • coupon => coupon specific
    • coupon code : XXXXXXXX
    • Uses per Coupon : 0
  • Uses per Customer : 1

Ajouter un produit panier
Accéder à la page panier
Ajouter le coupon précédemment créée
Valider le panier pour aller dans le checkout
Utiliser la carte de test 4010 0586 9321 4759 pour avoir un code retour d'erreur
La page d’échec s'affiche.
Faire une nouvelle commande.
Ajouter le même code promo.

Résultat actuel

Lors de l'ajout du code même promo, après avoir passé une commande qui a échoué, le message d'erreur "le code de réduction "XXXXXXXX" n'est pas valide" s'affiche et le code promo ne s'applique pas

Résultat attendu

Lors de l'ajout du code même promo, après avoir passé une commande qui a échoué, le code promo devrait s'appliqué

Informations complémentaires

Avec plugin aroundSubmit sur la "quote" , magento ajoute un message en queue. Ce message va incrémenter l'usage des coupons.
Avec plugin afterCacncel" , magento va décrémenter l'usage des coupons.

Le soucis vient du fait qu'à part lors de votre cron qui "cancel" les commandes, votre module ne gère pas l'usage des coupons.
Les methodes comme \HiPay\FullserviceMagento\Model\Notify::_doTransactionDenied ou \HiPay\FullserviceMagento\Model\Notify::_doTransactionFailure ne font que changer le statut de la commande. Il faut aussi gérer les coupons dans cette partie là.

LocalizedException not found

Hello,

There is a fatal error on LocalizedException call.

Fatal error: Uncaught Error: Class 'HiPay\FullserviceMagento\Observer\LocalizedException' not found in vendor/hipay/hipay-fullservice-sdk-magento2/Observer/CheckHttpSignatureObserver.php:104

Missing \Magento\Framework\Exception\LocalizedException.

composer.json error

Hello HiPay Team,

We just tried to install this component and we saw an error in composer.json.

"autoload": { "psr-4": { "HiPay\\": "tests/functional/tests/app/HiPay/" } },

You never declare the module. See the following example from Magento Catalog Module.

"autoload": { [...] "psr-4": { "Magento\\Catalog\\": "" } }

You have to specify how to load your module. So it should be, in your composer.json:

"autoload": { "psr-4": { "HiPay\\FullserviceMagento\\": "" } },

Without this code, Magento is unable to load your module (php bin/magento module:status do not show Hipay).

Damien.

Error for declined payment.

Magento ver. 2.2.3
Module version: 1.2.2

Step to reproduce:

  1. Create new order.
  2. Try to pay with test card

4111113333333333
VISA
toujours refusée
(Development mode)

  1. We have next error.

screenshot from 2018-09-03 16-39-07

Request validation failed for action

Hi,

We have an error on notification url after upgrading to Magento 2.3.2 version :

Nginx log :
"POST /hipay/notify/index HTTP/1.1" 302 30 "-" "Allopass" "-"

Error log :
Request validation failed for action "HiPay\FullserviceMagento\Controller\Notify\Index\Interceptor"

Thanks.

M2.3.5 Impossible de passer commande en guest

Bonjour,

Je ne suis pas sûr que ça soit spécifique à Magento 2.3.5-p1 ou au guest checkout.

Lorsque je valide ma commande, j'ai 3 requêtes XHR et ensuite rien ne se passe :

OPTIONS https://stage-secure2-vault.hipay-tpp.com/rest/v2/token/update

POST https://stage-secure2-vault.hipay-tpp.com/rest/v2/token/update
     params:  {"multi_use":false,"card_expiry_month":"12","card_expiry_year":"2024","card_token":"c425a0a2103310eea30e7584babdcccf65dd3f11fd4b14e3a31cc6f7ce762b50","request_id":0,"card_holder":"a a","cvc":"123"}
     reponse: {"token":"c425a0a2103310eea30e7584babdcccf65dd3f11fd4b14e3a31cc6f7ce762b50","request_id":"0","card_holder":"a a","card_expiry_month":"12","card_expiry_year":"2024"}

POST https://stage-data.hipay.com/checkout-data
    params:  {"event":"tokenize","payment_method":"mastercard","monitoring":{"date_pay":"2020-06-10T12:01:06.527Z"},"components":{"sdk_js_version":"1.10.0","integration_type":"hosted-fields"},"card_country":"PL","id":"0910a8504c0b8d40b5a7f3e47b6a5f9bd50adce51db1e491cd90eb984bfa847b","domain":"dev2.beautysuccess.fr"}
    reponse: true

Si je clique plusieurs fois sur le bouton place-order ces trois requêtes sont rejouées.

En étant connecté lorsque j'ai passé commande, je n'ai eu aucun appel de https://stage-data.hipay.com/checkout-data.

Problème de paiement avec Oney

Bonjour,

Nous avons un souci sur l'implémentation d'Oney avec un produit contenant des options personnalisables.

Quand le panier est envoyé à Oney et que le produit contient des options personnalisables, il est impossible de charger
le produit via un productRepository car le sku du produit est suffixé du SKU de l'option personnalisable, cela lève donc
une exception.

L'erreur se situe ici:

https://github.com/hipay/hipay-fullservice-sdk-magento2/blob/master/Model/Request/CommonRequest.php#L199

Il ne faut pas prendre le SKU de l'objet OrderItem mais le SKU du produit.

1.7.0 errors

Hi,

I have several errors due to the new version 1.7.0 :

  • magento version : 2.3.1
  • hipay module : "hipay/hipay-fullservice-sdk-magento2" at master branch (1.7.0 tag)

Errors when setup:di:compile :
1/ PHP Fatal error: Declaration of HiPay\FullserviceMagento\Model\Config::setApiUsername($apiUsername) must be compatible with HiPay\Fullservice\HTTP\Configuration\ConfigurationInterface::setApiUsername(string $apiUsername) in vendor/hipay/hipay-fullservice-sdk-magento2/Model/Config.php on line 37

➡️ Resolved by cast parameters of this functions :
string :
setApiHTTPHeaderAccept
setApiPassword
setApiUsername
setApiEnv

array :
setProxy

int :
setCurlConnectTimeout
setCurlTimeoutstring

2/ PHP Fatal error: Class HiPay\FullserviceMagento\Model\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (HiPay\Fullservice\HTTP\Configuration\ConfigurationInterface::setCurlTimeout) in vendor/hipay/hipay-fullservice-sdk-magento2/Model/Config.php on line 37

Magento JS minification corrupts output files due to comments

Hello,
on a Magento 2.1.8 if I turn on JS minification in Backend (Stores -> Configuration -> Advanced -> developer -> Minify JavaScript Files) I get errors at checkout and the page breaks.

It looks like the problem is a comment in several js files like this: https://github.com/hipay/hipay-fullservice-sdk-magento2/blob/1.9.0/view/frontend/web/js/view/payment/method-renderer/hipay-banco.js#L21

The comment //@override hipay-hosted confuses the minifier and the output is a one-liner that is almost all commented out.

Removing those comments fixes the issue.

Thanks!

Partial capture from Magento

Pré-conditions

  1. Magento 2.3.5 ou 2.4.3-p3 (pas testé sous d'autres versions)
  2. PHP 7.2 pour Magento 2.3.5 ou 7.4 pour Magento 2.4.3-p3
  3. Module HiPay installé (hipay/hipay-fullservice-sdk-magento2) dans sa dernière version (1.16.0 à date)
  4. [CRUCIAL] URL du site web accessible par HiPay pour retours (116, 117, 118)

Étapes pour reproduire

  1. Activer le mode de paiement HiPay Enterprise Hosted Page (Stores > Configuration > Sales > Order > Payment methods > HiPay Enterprise Hosted Page)
  2. Configurer HiPay Enterprise Hosted Page pour passer en capture manuelle (Stores > Configuration > Sales > Order > Payment methods > HiPay Enterprise Hosted Page > Capture)
  3. Configurer HiPay Enterprise Hosted Page pour utiliser le statut "Capture Requested" (code 117) pour valider la commande (Stores > Configuration > Sales > Payment method > HiPay Enterprise Hosted Page > Hipay status to validate order)
  4. Ajouter deux produits panier
  5. Accéder au checkout
  6. Valider la commande
  7. Attendre que le retour 116 (Authorized) se fasse
  8. Créer une facture en ne facturant qu'un seul des deux produits

Résultat attendu

  1. Une seule facture est créée avec le produit facturé manuellement
  2. La facture en question est en statut "Payée"
  3. La commande a bien le "total due" et le "total paid" actualisés

Résultat actuel

  1. Deux factures sont créées : une manuelle et une générée par HiPay lors du retour 117 (car configuration mise pour valider la commande sur le statut 117, cf étape n°3 pour reproduire).
  2. Le statut des factures ne correspond pas toujours aux items désirés (la facture créée par HiPay est en statut "Payée" mais celle crée par Magento est en statut "En attente").
  3. Les montants "total due" / "total paid" sont complètement erronés

Informations complémentaires

Le soucis vient du fait que lorsque la facture est créée, la capture se fait immédiatement par HiPay, sans le moindre délai, mais la facture n'est pas encore totalement validée / créée côté Magento.

De ce fait, lorsque la méthode \HiPay\FullserviceMagento\Model\Notify::_doTransactionCapture est appelée (via le retour HiPay 117), la ligne $invoiceFromDB = $this->getInvoiceForTransactionId($this->_order, $payment->getTransactionId()); (ligne 1030 sur version 1.16.0) ne trouve pas la facture et en crée donc une nouvelle.

Suite à un test assez basique en ayant mit un sleep(5); au début de la méthode \HiPay\FullserviceMagento\Controller\Notify\Index::execute, le processus revient à la normale, ce qui montre bien que le retour HiPay "trop rapide" est la cause de ce bug.

Le problème n'est pas reproduisible à 100% des tests puisqu'il faut vraiment que le retour HiPay se fasse extrêmement rapidement, avant même que Magento n'ait finalisé la sauvegarde de la facture.

2.4 Install not works PHP 7.4

Hi,

It's impossible to install your last version (1.11.0) we have an error about deprecated functionnality when setup:upgrade.

Deprecated Functionality: Unparenthesized a ? b : c ? d : e is deprecated Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /app/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Config.php on line 144

GraphQl support for PWA ?

Hi,
Did you plan to implement GraphQL in your extension in next release in order to use your payment solution in PWA project ?
If yes, do you have an estimated release date for this ?
Thanks a lot

Inscription - Validation cassée

Pré-conditions

  1. Magento: 2.2.3
  2. PHP: 7.1

Étapes pour reproduire

  1. Installer Magento 2.2.3
  2. Installer le module HiPay_FullService avec la dernière version (à date 1.4.2)
  3. Mettre à jours la base de données (php bin/magento setup:upgrade)
  4. Purger les fichiers statiques (rm -rf pub/static/frontend/Magento/)
  5. Purger le cache magento (php bin/magento cache:flush)
  6. Accéder à la page de création de compte client (/customer/account/create)
  7. Valider le formulaire sans remplir aucun champ

Résultat attendu

  1. Des messages d'erreurs doivent apparaître sous chaque champ requis
  2. L'envoie du formulaire est bloqué

Résultat obtenu

  1. Le formulaire s'envoie malgré tout
  2. Aucune validation n'est faite
  3. Au rechargement de la page, un message d'erreur apparaît à propos du champ mot de passe uniquement.

Informations complémentaires

Le problème semble venir de la surcharge du JS "validation" dans le fichier "hipay/hipay-fullservice-sdk-magento2/view/frontend/web/js/validation.js", déclaré dans le fichier hipay/hipay-fullservice-sdk-magento2/view/frontend/requirejs-config.js :

var config = {
    "map": {
        "*": {
            "card": "HiPay_FullserviceMagento/card",
            "validation": "HiPay_FullserviceMagento/js/validation"
        }
    },
    "config": {
        "mixins": {
            "Magento_Tax/js/view/checkout/summary/grand-total": {
                "HiPay_FullserviceMagento/js/grand-total-mixin": true
            }
        }
    }
};

Credit cards sorting

Hello,

I would like to know if we can sort credit cards type in the payment method "HiPay Enterprise Hosted Page". For example, I want to put AMEX last and not first.
There is no such configuration to order the credits cards in the M2 module (in was present in the M1 module though), do you confirm ?

As I can see in the module "hipay-fullservice-sdk-php", there is some json with an attribute "priority" for each payment methods. This priorities work if I change the return isOverridePaymentProductSorting() return true in vendor/hipay/hipay-fullservice-sdk-magento2/Model/Config.php
(Last thing : I changed the priority directly in vendor, I don't know how to override vendor/hipay/hipay-fullservice-sdk-php/lib/HiPay/Fullservice/PaymentConfigFiles/visa.json right now)

It is not ideal though because I can't order for each methods and for each stores.
Should I create my own config data field to address the issue ?

Undefined property: HiPay\FullserviceMagento\Helper\Data::$_ruleFactory

Hi,

There is a name mismatching between the property $ruleFactory and its usage:

{"message":"Erreur de requete pour la nouvelle transaction : Notice: Undefined property: HiPay\FullserviceMagento\Helper\Data::$_ruleFactory in [...]/vendor/hipay/hipay-fullservice-sdk-magento2/Helper/Data.php on line 84."}

    /**
     *
     * @var \HiPay\FullserviceMagento\Model\RuleFactory $_ruleFactory
     */
    protected $ruleFactory;

    public function is3dSecure($use3dSecure, $config3dsRules, $quote = null)
    {
        [...]
                    $rule = $this->_ruleFactory->create();

Regards

Namespace errors ?

Hello !

We encountered errors during DI generation in production mode.
It seems that the errors come from the namespace of two classes :

https://github.com/hipay/hipay-fullservice-sdk-magento2/blob/master/src/Model/Method/Sisal.php
https://github.com/hipay/hipay-fullservice-sdk-magento2/blob/master/src/Model/Method/QiwiWallet.php

You can see that the namespace begins by "Hipay" instead of "HiPay", which apparently cause a lot of troubles in production mode.

Thanks in advance.

Notification on BO

Hello

We have an error on our BO due to notification from your module.

image

Please can you fix this ?

Bad constantes in di.xml

Updating module via composer, last version 1.14.1 have bad constant defined in the di.xml file.

This is the list :
vendor/hipay/hipay-fullservice-sdk-magento2/etc/frontend/di.xml:34: HiPay\FullserviceMagento\Model\Method\MbwayHostedFields::HIPAY_METHOD_CODE
vendor/hipay/hipay-fullservice-sdk-magento2/etc/frontend/di.xml:108: HiPay\FullserviceMagento\Model\Method\MbwayHostedFields::HIPAY_METHOD_CODE
vendor/hipay/hipay-fullservice-sdk-magento2/etc/frontend/di.xml:34: HiPay\FullserviceMagento\Model\Method\MultibancoHostedFields::HIPAY_METHOD_CODE
vendor/hipay/hipay-fullservice-sdk-magento2/etc/frontend/di.xml:127: HiPay\FullserviceMagento\Model\Method\MultibancoHostedFields::HIPAY_METHOD_CODE

Classes MbwayHostedFields and MultibancoHostedFields does not exist.

I make a PR

Mapping Catégories ne fonctionne pas en multi website

Pré-conditions
Magento >= 2.4.1p1
PHP 7.4
Module HiPay installé (hipay/hipay-fullservice-sdk-magento2) version : 1.13.1
Multi Website avec Root Category différentes

Étapes pour reproduire
Se rendre dans le BO puis dans Hipay Enterprise / Mapping Categories

Résultat actuel
Seul les catégories du store par défaut sont visibles

Résultat attendu
Que l'ensemble des catégories puissent être mappées.

Impossible d'installer la dernière version (1.21) avec Magento 2.4.6-p2

Bonjour,

J'ai un site internet en fonctionnement, mis à jour avec Magento 2.4.6-p2 le mois dernier.

J'ai beaucoup d'erreurs dans les logs et je souhaiterai mettre à jour le module HiPay 1.20 > 1.21

La commande composer require hipay/hipay-fullservice-sdk-magento2:1.21 me retourne l'erreur suivante :

Problem 1
- hipay/hipay-fullservice-sdk-php 2.15.0 requires ramsey/uuid ^3.9.7 -> found ramsey/uuid[3.9.7] but these were not loaded, likely because it conflicts with another require.
- hipay/hipay-fullservice-sdk-magento2 1.21.0 requires hipay/hipay-fullservice-sdk-php ^2.15.0 -> satisfiable by hipay/hipay-fullservice-sdk-php[2.15.0].
- Root composer.json requires hipay/hipay-fullservice-sdk-magento2 ^1.21 -> satisfiable by hipay/hipay-fullservice-sdk-magento2[1.21.0].

La commande composer require ramsey/uuid:3.9.7 me renvoie le message suivant :

Problem 1
- Root composer.json requires ramsey/uuid 3.9.7, found ramsey/uuid[3.9.7] but these were not loaded, likely because it conflicts with another require.
Problem 2
- magento/product-community-edition 2.4.6-p2 requires ramsey/uuid ^4.2 -> found ramsey/uuid[4.2.0, ..., 4.7.4] but it conflicts with your root composer.json require (3.9.7).
Problem 3
- allure-framework/allure-php-commons v2.3.1 requires ramsey/uuid ^3 || ^4 -> found ramsey/uuid[3.0.0, ..., 3.9.7, 4.0.0, ..., 4.7.4] but these were not loaded, likely because it confli
- allure-framework/allure-phpunit v2.1.0 requires allure-framework/allure-php-commons ^2 -> satisfiable by allure-framework/allure-php-commons[v2.3.1].
- allure-framework/allure-phpunit is locked to version v2.1.0 and an update of this package was not requested.

Avez-vous une idée de comment faire pour mettre à jour s'il vous plait ?

M2.3.5 Undefined index: in [...] vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/HostedFieldsMethod.php on line 82

Bonjour,

Depuis la monté de version à Magento 2.3.5-p1, sélectionner une méthode de paiement (click: selectPaymentMethod) émet une requête XHR /rest/default/V1/carts/mine/set-payment-information.

Cet appel produit une erreur 500 :

[2020-06-10 06:47:04] main.CRITICAL: Report ID: webapi-5ee081e862154; Message: Notice: Undefined index: in /home/ari/dev/bs-mg2-prod/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/HostedFieldsMethod.php on line 82 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5ee081e862154; Message: Notice: Undefined index: in /home/ari/dev/bs-mg2-prod/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/HostedFieldsMethod.php on line 82 at /home/ari/dev/bs-mg2-prod/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Exception(code: 0): Notice: Undefined index: in /home/ari/dev/bs-mg2-prod/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Method/HostedFieldsMethod.php on line 82 at /home/ari/dev/bs-mg2-prod/vendor/magento/framework/App/ErrorHandler.php:61)"}

L'appel est fait par vendor/magento/module-sales-rule/view/frontend/web/js/action/select-payment-method-mixin.js :

            $.when(
                setPaymentInformationAction(
                    messageContainer,
                    {
                        method: paymentMethod.method
                    }
                )
            )

HostedFieldsMethod utilise le champ cc_type qui n'a pas été fourni par l'appel :

        $info = $this->getInfoInstance();
        $errorMsg = false;
        if (!$info->getAdditionalInformation('card_token')) {
            $errorMsg = __('We can\'t place the order.');
        }

        $availableTypes = explode(',', $this->getConfigData('cctypes'));
        $paymentProduct =  $this->_hipayConfig->getCcTypesMapper();

        if (!in_array($paymentProduct[strtolower($info->getCcType())], $availableTypes)) {
            $errorMsg = __('This credit card type is not allowed for this payment method.');
        }

Avoir non créé sur Magento

Pré-conditions

  1. Magento >= 2.3.1
  2. PHP 7.2
  3. Module HiPay installé (hipay/hipay-fullservice-sdk-magento2)

Étapes pour reproduire

  1. Créer un avoir côté HiPay

Résultat attendu

  1. La commande est remboursée côté Magento
  2. La commande passe en statut "Closed"
  3. L'avoir est créé sur Magento

Résultat actuel

  1. La commande passe en statut "Refund requested"
  2. L'avoir n'est pas créé
  3. Un commentaire est ajouté à la commande :

IPN "Remboursement". Remboursement émis par le marchand. Notification sauvegardée concernant le montant remboursé de -167,40 €. ID de transaction : "xxxxxxxxxx-refund-manual-xxxx". L’avoir n’a pas été créé. Veuillez créer un avoir hors ligne.

Informations de debug

Il me semble que le problème vient de la méthode \HiPay\FullserviceMagento\Model\Notify::_doTransactionRefund qui déclenche une transaction en "négatif" via une formule mathématique : -1 * $amount pour créer le remboursement.
Cette transaction appelle la méthode \Magento\Sales\Model\Order\Payment::registerRefundNotification qui fait une comparaison sur le montant de la transaction avec le montant de la facture et s'il diffère, il ne la crée pas.

Or le montant de la facture est positif alors que le montant de la transaction est envoyé par HiPay en négatif et donc sont différent.

Order cancel create two reservations on inventory_reservation table with MSI

Hi,

I saw the issue when i had difference between qty and salable_qty on my product

To reproduce the issue, follow these steps :

  • Create an order with hipay creditcard payment (for example) and 3DS but do not valid the order. Just close your page when you are on the bank page.
  • Wait the cron cancel the order (task hipay_clean_pending_orders)
  • Go to inventory_reservation and filter on your order. You saw two line for the same item.

To have a temporary fix, i just comment the line $order->cancel(); on the Cron/CleanPendingOrders.php file.

It is not a correct fix, it causes other issues but not important on my side.

Thank you.

Script Error with Hipay

Hello Hipay Guys !

I have another problem with your module. In file "hipay-fullservice-sdk-magento2/src/view/frontend/templates/fingerprint/fingerprint_js.phtml", you do this :

<script src="<?php echo $block->getJsSrc();?>" type="text/javascript" charset="utf-8" />

But <script> tag do not allowed autoclosing. You should have :

<script src="<?php echo $block->getJsSrc();?>" type="text/javascript" charset="utf-8"></script>

Store credit not refunded to customer when order is cancelled by cron (Magento Commerce)

Preconditions :

  • Magento commerce
  • Add a store credit to customer
  • Create an order an use the store credit, pay the remaining amount with credit card
  • Fail/stop the payment

Bug :
The cron "CleanPendingOrders" with cancel the order, but will not refund store credit to customer.

Context :
There is an event on order cancellation in magento commerce to refund store credit, but there is this condition a the beginning :

if (!$order->getCustomerId() || !$order->getBaseCustomerBalanceAmount()) {
    return $this;
}

Store credit is not refunded because customer_id is not loaded within the order collection.

Fix :
Simply add 'customer_id' to the order collection selected fields in CleanPendingOrders and the process works well.

Compilation hipay/hipay-fullservice-sdk-magento2 version 1.14.0 is ko

Hello,

I'm writing to you to report a bug when deploying module 'hipay/hipay-fullservice-sdk-magento2 version 1.14.0' on a Magento commerce ver. 2.4.3-p1 .

I have this message during 'bin/magento setup:di:compile':

Repositories code generation... 1/9 [===>------------------------] 11% 1 sec 138.0 MiB
Fatal error: Access level to HiPay\FullserviceMagento\Logger\Logger::DEBUG_KEYS_MASK must be public (as in class Magento\Payment\Model\Method\Logger) in /app/vendor/hipay/hipay-fullservice-sdk-magento2/Logger/Logger.php on line 0

Could you please look at this point?

Thanks in advance

error when compile di

Deprecated Functionality: Unparenthesized a ?: b ? c : d is deprecated.
Use either (a ?: b) ? c : d or a ?: (b ? c : d) in /htdocs/vendor/hipay/hipay-fullservice-sdk-magento2/Model/Request/PaymentMe
thod/CardToken.php on line 39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.