MultiSafepay / Magento2Msp

MultiSafepay plugin for Magento 2 (Deprecated) see: https://github.com/MultiSafepay/magento2
Open Software License 3.0
29 stars 25 forks source link

Uncaught Error: Call to member function getAdditionalInformation() on null #94

Closed noahp78 closed 5 years ago

noahp78 commented 5 years ago

Hi,

We are updating a Magento 2 Website, and encountering a error when trying to 'checkout' a product. It looks like the getPayment() method returns null.

`message: "Fatal Error: 'Uncaught Error: Call to a member function getAdditionalInformation() on null in vendor/magento/module-sales/Model/OrderRepository.php:172 Stack trace:

0 vendor/magento/module-sales/Model/OrderRepository.php(134): Magento\Sales\Model\OrderRepository->setPaymentAdditionalInfo(Object(Magento\Sales\Model\Order\Interceptor))

1 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\OrderRepository->get('5944')

2 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\OrderRepository\Interceptor->___callParent('get', Array)

3 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\OrderRepository\Interceptor->Magento\Framework\Interception{closure}('5944')

4 generated/code/Magento/Sales/Model/OrderRepository/Interceptor.php(26): Magento\Sales\Model\OrderRep' in 'vendor/magento/module-sales/Model/OrderRepository.php' on line 172"`

hiren-styli commented 5 years ago

Even I am facing same error while using orderRepo to search order with order status "pending", I am getting same error, whereas for other order status it's working fine.

Did you find any solution for same ??

Here is error log for reference, `Fatal error: Uncaught Error: Call to a member function getAdditionalInformation() on null in /var/www/html/vendor/magento/module-sales/Model/OrderRepository.php:172 Stack trace:

0 /var/www/html/vendor/magento/module-sales/Model/OrderRepository.php(206): Magento\Sales\Model\OrderRepository->setPaymentAdditionalInfo(Object(Magento\Sales\Model\Order\Interceptor))

1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\OrderRepository->getList(Object(Magento\Framework\Api\SearchCriteria))

2 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\OrderRepository\Interceptor->___callParent(‘getList’, Array)

3 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\OrderRepository\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\Api\SearchCriteria))

4 /var/www/html/generated/code/Magento/Sales/Model/OrderRepository/Interceptor.php(39): Magento\Sales\Model\OrderRepository\Intercepto in /var/www/html/vendor/magento/module-sales/Model/OrderRepository.php on line 172`

vinodsowdagar commented 5 years ago

@hiren-styli

Thank you for reporting this issue. We can not reproduce this issue based on the information you gave us. Could you give us the REST API call so we can quickly try and reproduce this?

We would also like to have the following information: