multisafepay / prestashop-official Goto Github PK
View Code? Open in Web Editor NEWMultiSafepay plugin for PrestaShop 1.7 and PrestaShop 8.0.X
Home Page: https://docs.multisafepay.com/docs/prestashop-1-7
MultiSafepay plugin for PrestaShop 1.7 and PrestaShop 8.0.X
Home Page: https://docs.multisafepay.com/docs/prestashop-1-7
Although in the multisafepay console the transaction status is completed, in the back office the transaction remains on MultiSafepay initialized and the transition to the accepted payment status does not take place
Is the plugin ready for PrestaShop 8.0.X and PHP 8.1 / 8.2 ?
In development and staging with debugging mode we get this:
In production without debugging mode we get a 500.
These are the logs:
PrestaShop logs (var/logs
)
./prod.log:[2022-05-20 17:03:13] request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "multisafepay.payment_option_service"." at /var/www/example/example.com/public/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php line 348 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code: 0): You have requested a non-existent service \"multisafepay.payment_option_service\". at /var/www/example/example.com/public/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:348)"} []
Server logs
./example.com.access.log:83.219.74.254 - - [20/May/2022:14:37:27 +0200] "GET /adminxxxxxxxx/index.php?controller=AdminModules&configure=multisafepayofficial&token=700085417bd3cb03b7fd8f1f71efbf28 HTTP/2.0" 500 495 "https://www.example.com/adminxxxxxxxx/index.php/improve/modules/manage?_token=EBNLuNIXao25jl6H3ZsJfMXJ8zEKr14CsuivalxpBnU" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36" "-" "www.example.com" 0.568
Module version: 5.4.2
Hello,
I installed the plugin and I got an error in the function hookActionSetInvoice on these lines :
$orderInvoice = OrderInvoice::getInvoiceByNumber($params['OrderInvoice']->id);
$orderInvoiceNumber = $orderInvoice->getInvoiceNumberFormatted($order->id_lang, $order->id_shop);
The error :
Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getInvoiceNumberFormatted() on bool
We are on PS 1.7.7.3.
I changed the line
$orderInvoice = OrderInvoice::getInvoiceByNumber($params['OrderInvoice']->id);
by
$orderInvoice = $params['OrderInvoice'];
And that is OK now.
It seems logical because on the hook ActionSetInvoice in the class Order, the variables sent are
$invoice_number = Hook::exec('actionSetInvoice', [
get_class($this) => $this,
get_class($order_invoice) => $order_invoice,
'use_existing_payment' => (bool) $use_existing_payment,
]);
So the var 'OrderInvoice' is already an object 'OrderInvoice' so no need to refetch again the invoice by number, we already have it.
Or I'm wrong ?
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.