-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions
- Magento 2.2.4
- PHP 7.0.18
Steps to reproduce
POST http://magento2.test/index.php/rest/V1/orders
{ "entity": { "base_grand_total" : 100, "customer_email" : "user@domain.tld", "grand_total" : 100, "items" : [ { "sku" : "TESTSEB" } ] } }
Expected result
An order should have been created
Actual result
I received this json:
{ "messages": { "error": [ { "code": 500, "message": "Server internal error. See details in report api/487380499411" } ] } }
And in the report file I get this error:
Fatal Error: 'Uncaught TypeError: Argument 1 passed to Magento\Paypal\Model\Adminhtml\Express\Interceptor::isOrderAuthorizationAllowed() must be an instance of Magento\Sales\Model\Order\Payment, null given, called in /home/forge/magento2.test/public/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php on line 41 and defined in /home/forge/magento2.infinity-mobile.io/public/generated/code/Magento/Paypal/Model/Adminhtml/Express/Interceptor.php:33
Stack trace:
#0 /home/forge/magento2.test/public/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php(41): Magento\Paypal\Model\Adminhtml\Express\Interceptor->isOrderAuthorizationAllowed(NULL)
#1 /home/forge/magento2.test/public/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Paypal\Plugin\OrderCanInvoice->afterCanInvoice(Object(Magento\Sales\Model\Order\Interceptor), false)
#2 /home/forge/magento2.test/public/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interce' in '/home/forge/magento2.test/public/generated/code/Magento/Paypal/Model/Adminhtml/Express/Interceptor.php' on line 33