hipay / hipay-enterprise-sdk-prestashop Goto Github PK
View Code? Open in Web Editor NEWOfficial repository of the HiPay Enterprise module for PrestaShop.
License: Apache License 2.0
Official repository of the HiPay Enterprise module for PrestaShop.
License: Apache License 2.0
Hi,
I tried to install the module on a 1.6 PrestaShop, and received the next error :
[PrestaShop] Fatal error in module file : /modules/hipay_enterprise/upgrade/Upgrade-2.3.0.php:
Class 'HipayDBQuery' not found
I checked in the code, and the class mentioned is empty, it seems to be the same in the sources.
I replaced in my code by an old version.
Could you confirm it is ok to do that ?
And put the class again in the repository ?
Thanks,
Jean-Marc Peterkenne
Hi,
I've noticed several problems with your upgrade files.
First of all, 2.18.0 and 2.20.0 are executing the same query, resulting in a SQL exception failing the upgrade. SQL query from 2.20 has to be removed.
Second, the 2.21.4 does not return true at the end of the upgrade, resulting in a fail upgrade.
Thanks.
Hi,
When I want to install the latest version 2.2.5 of your module on a prestashop 1.7.4.0, I have a message in the backoffice that appears to tell me that the installation failed because it could not write the log file at the root of the site. This folder doesn't exist by default in prestashop 1.7.
I created manually the file and the installation is done properly. It might be necessary to manage differently the writing of the logs if one is in 1.7
HiPay Enterprise module does not work on our Prestashop 1.7.6.1 test shop: https://123plombsps17.mickael-maury.fr/
In DEBUG mode we get errors (Apache PHP version 7.3) - see attached screenshot.
Hi,
Why there are no check on PS version here ? This lead to a 500 because you try to use 16 template instead 17...
You just need to do the same thing as below:
$path = (_PS_VERSION_ >= '1.7' ? 'module:' .
$this->module->name .
'/views/templates/front/payment/ps17/paymentForm-' . $uxMode . '-17'
: 'payment/ps16/paymentForm-' . $uxMode . '-16') . '.tpl';
Bonjour,
Je crée cette issue car nous rencontrons un problème sur notre boutique lié à la création de certaines commandes :
Contexte :
Pour certaines commandes, nous créons la commande dans le back-office en cochant l'option de livraison gratuite. Ensuite, lorsque nous passons à la validation de la commande (via le front-end ou la méthode MoTo), la commande est annulée en raison d'une erreur, comme le montre la capture d'écran ci-jointe.
Reproduction :
Voici les erreurs que nous trouvons dans les logs du module :
2023/12/07 - 15:23:32: HipayLogs:logException:Invalid format basket
2023/12/07 - 15:23:32: HipayLogs:logException:#0 /public_html/modules/hipay_enterprise/lib/vendor/hipay/hipay-fullservice-sdk-php/lib/HiPay/Fullservice/HTTP/ClientProvider.php(93): HiPay\Fullservice\HTTP\SimpleHTTPClient->doRequest('POST', 'v1/order', Array, false, false)
#1 /public_html/modules/hipay_enterprise/lib/vendor/hipay/hipay-fullservice-sdk-php/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php(147): HiPay\Fullservice\HTTP\ClientProvider->request('POST', 'v1/order', Array)
#2 /public_html/modules/hipay_enterprise/classes/apiCaller/ApiCaller.php(141): HiPay\Fullservice\Gateway\Client\GatewayClient->requestNewOrder(Object(HiPay\Fullservice\Gateway\Request\Order\OrderRequest))
#3 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(429): ApiCaller::requestDirectPost(Object(Hipay_enterprise), Array)
#4 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(108): Apihandler->handleDirectOrder(Array)
#5 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(310): Apihandler->handleCreditCard('direct_post', Array)
#6 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(127): Hipay_enterpriseRedirectModuleFrontController->apiNewCC(Object(Cart), Object(Context), Object(Customer), false, false)
#7 /public_html/classes/controller/Controller.php(295): Hipay_enterpriseRedirectModuleFrontController->postProcess()
#8 /public_html/classes/Dispatcher.php(525): ControllerCore->run()
#9 /public_html/index.php(28): DispatcherCore->dispatch()
#10 {main}
En activant le mode débug, nous obtenons un peu plus d'informations sur l'origine du problème :
2023/12/07 - 15:41:38: HipayLogs:logException:Warning: Division by zero
2023/12/07 - 15:41:38: HipayLogs:logException:#0 /public_html/modules/hipay_enterprise/classes/apiFormatter/Cart/CartFormatter.php(76): CartFormatter->getFeesItem(Array)
#1 /public_html/modules/hipay_enterprise/classes/apiFormatter/Cart/CartFormatter.php(43): CartFormatter->mapRequest(Object(HiPay\Fullservice\Gateway\Model\Cart\Cart))
#2 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(360): CartFormatter->generate()
#3 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(339): Apihandler->getCart(Object(CartFormatter))
#4 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(96): Apihandler->baseParamsInit(Array)
#5 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(310): Apihandler->handleCreditCard('direct_post', Array)
#6 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(127): Hipay_enterpriseRedirectModuleFrontController->apiNewCC(Object(Cart), Object(Context), Object(Customer), false, false)
#7 /public_html/classes/controller/Controller.php(295): Hipay_enterpriseRedirectModuleFrontController->postProcess()
#8 /public_html/classes/Dispatcher.php(525): ControllerCore->run()
#9 /public_html/index.php(28): DispatcherCore->dispatch()
#10 {main}
Informations sur l'environnement :
Version du module : v2.20.0
Version de PrestaShop : 1.7.8.10
Version PHP : 7.4.33
Hello,
I am creating this issue because we are experiencing a problem on our shop related to the creation of certain orders:
Context:
For some orders, we create the order in the back-office by checking the option for free shipping. Then, when we proceed to validate the order (via the front-end or the MoTo method), the order gets canceled due to an error, as shown in the attached screenshot.
Reproduction:
Here are the errors we find in the module's logs:
2023/12/07 - 15:23:32: HipayLogs:logException:Invalid format basket
2023/12/07 - 15:23:32: HipayLogs:logException:#0 /public_html/modules/hipay_enterprise/lib/vendor/hipay/hipay-fullservice-sdk-php/lib/HiPay/Fullservice/HTTP/ClientProvider.php(93): HiPay\Fullservice\HTTP\SimpleHTTPClient->doRequest('POST', 'v1/order', Array, false, false)
#1 /public_html/modules/hipay_enterprise/lib/vendor/hipay/hipay-fullservice-sdk-php/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php(147): HiPay\Fullservice\HTTP\ClientProvider->request('POST', 'v1/order', Array)
#2 /public_html/modules/hipay_enterprise/classes/apiCaller/ApiCaller.php(141): HiPay\Fullservice\Gateway\Client\GatewayClient->requestNewOrder(Object(HiPay\Fullservice\Gateway\Request\Order\OrderRequest))
#3 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(429): ApiCaller::requestDirectPost(Object(Hipay_enterprise), Array)
#4 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(108): Apihandler->handleDirectOrder(Array)
#5 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(310): Apihandler->handleCreditCard('direct_post', Array)
#6 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(127): Hipay_enterpriseRedirectModuleFrontController->apiNewCC(Object(Cart), Object(Context), Object(Customer), false, false)
#7 /public_html/classes/controller/Controller.php(295): Hipay_enterpriseRedirectModuleFrontController->postProcess()
#8 /public_html/classes/Dispatcher.php(525): ControllerCore->run()
#9 /public_html/index.php(28): DispatcherCore->dispatch()
#10 {main}
When enabling debug mode, we get more information about the origin of the problem:
2023/12/07 - 15:41:38: HipayLogs:logException:Warning: Division by zero
2023/12/07 - 15:41:38: HipayLogs:logException:#0 /public_html/modules/hipay_enterprise/classes/apiFormatter/Cart/CartFormatter.php(76): CartFormatter->getFeesItem(Array)
#1 /public_html/modules/hipay_enterprise/classes/apiFormatter/Cart/CartFormatter.php(43): CartFormatter->mapRequest(Object(HiPay\Fullservice\Gateway\Model\Cart\Cart))
#2 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(360): CartFormatter->generate()
#3 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(339): Apihandler->getCart(Object(CartFormatter))
#4 /public_html/modules/hipay_enterprise/classes/apiHandler/ApiHandler.php(96): Apihandler->baseParamsInit(Array)
#5 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(310): Apihandler->handleCreditCard('direct_post', Array)
#6 /public_html/modules/hipay_enterprise/controllers/front/redirect.php(127): Hipay_enterpriseRedirectModuleFrontController->apiNewCC(Object(Cart), Object(Context), Object(Customer), false, false)
#7 /public_html/classes/controller/Controller.php(295): Hipay_enterpriseRedirectModuleFrontController->postProcess()
#8 /public_html/classes/Dispatcher.php(525): ControllerCore->run()
#9 /public_html/index.php(28): DispatcherCore->dispatch()
#10 {main}
Environment Information:
Module Version: v2.20.0
PrestaShop Version: 1.7.8.10
PHP Version: 7.4.33
Bonjour,
nous rencontrons des soucis lors de l'installation de votre module sur notre plateforme Prestashop
Test avec les versions 2.13.7 et 2.13.8
- erreur 500
- Après passage récursif des fichiers et dossiers en 766 : le module n'apparait pas dans le gestionnaire de modules
- Après test et passage récursif des fichiers et dossiers en 775 : erreur 500 sur la page du gestionnaire de modules
Avez-vous des pistes à nous fournir (config serveur spécifique, version de module non compatible avec notre version de Prestashop, etc....)
Boutique concernée : https://boutique.lemans.org/
Merci à vous,
Module v2.17.2 for PrestaShop 1.7.5.5 in PHP 7.2.
When I have an order with only one virtual product, the hookDisplayAdminOrder causes an error:
Following the stackTrace, I realize that the problematic line comes from a DiplayPrice in the smarty file "refund.partial.tpl". After a test, it is line 108, "{displayPrice price=$amountFees currency=$id_currency}".
So I tested to display the content of amountFees and we can see that "$this->order->getShipping()" returns a data, but with most of the values at "NULL" :
And so the displayPrice is done on "NULL" and generates an error.
The fact that there is no row created in the "ps_order_carrier" table (virtual product). If we look at the "getShipping" function which is a function of the Order class of Prestashop :
We see that most of the fields are precisely defined by OC (ps_order_carrier) and C (ps_carrier), and since the query starts from ps_order (which is defined) and the rest of the query uses LEFT JOIN, we will automatically have an array with the keys whose values will be mostly NULL.
Personally, I made a quickfix that fixes my problem, I can always make a pull request to manage this problem.
In the ApiHandler, a bad parameter passed in the getTransactionById() function in the case of a cancellation
$order->id passed instead of $params['transaction_reference']
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.