Closed taskula closed 11 months ago
@taskula thank you for you Pull Request, we are now reviewing the issue.
@taskula, I was able to reproduce the issue. It seems that your fix is valid. It will be included in version 2.0.2, which is scheduled to be published soon.
Related tickets & documents
77
Description
https://github.com/paytrail/paytrail-for-adobe-commerce/blob/de5b21b7efc8639b175a350800d198fcfa723ae8/Controller/Callback/Index.php#L45
$response
is an object of type Magento\Framework\Controller\Result\Json, and we must use $response->setData() instead of handling it as an array. https://github.com/paytrail/paytrail-for-adobe-commerce/blob/de5b21b7efc8639b175a350800d198fcfa723ae8/Controller/Callback/Index.php#L59Otherwise we will die with
main.CRITICAL: Error: Cannot use object of type Magento\Framework\Controller\Result\Json\Interceptor as array in /vendor/paytrail/paytrail-for-adobe-commerce/Controller/Callback/Index.php:59