Closed mdkdev closed 4 years ago
Hi,
Thanks for reporting.
We fixed this some time ago and it's going to be shipped with the next release.
If you wish to use a hotfix until the official release is shipped, your proposed fix was correct and we tested it internally - just add $payment
to those method calls.
Best, Raido
Hello!
When an order is cancelled in de Ogone test environment,
a 500 internal server error appears. This is caused by the following error: `2020/08/25 12:41:51 [error] 4501#4501: *32043 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Ingenico\Payment\Model\Processor::processOrderCancellation(), 1 passed in vendor/ingenico/m2-payment/Model/Connector.php on line 1396 and at least 2 expected in vendor/ingenico/m2-payment/Model/Processor.php:254 Stack trace:
0 vendor/ingenico/m2-payment/Model/Connector.php(1396): Ingenico\Payment\Model\Processor->processOrderCancellation('000000080')
1 vendor/ingenico/ogone-client/src/IngenicoCoreLibrary.php(862): Ingenico\Payment\Model\Connector->showCancellationTemplate(Array, Object(IngenicoClient\Payment))
2 vendor/ingenico/m2-payment/Model/Connector.php(366): IngenicoClient\IngenicoCoreLibrary->processReturnUrls()
3 vendor/ingenico/m2-payment/Controller/Payment/Result.php(19): Ingenico\Payment\Model\Connector->processSuccessUrls()
`
That this happens makes perfect sence, since
Ingenico\Payment\Model\Processor::processOrderCancellation()
accepts at least 2 parameters, while 1 is given in:Ingenico\Payment\Model\Connector::showCancellationTemplate() (1396) Ingenico\Payment\Model\Connector::showPaymentErrorTemplate() (1452)
The simple solution would be to add
\IngenicoClient\Payment $payment
to the function call, but this is untested. I hope you can look into it further.Best Regards, Marcel de Koning