Magento 2.2.2 error when setting order status with APICall to a member function dispatch() on null MagentoFrameworkModelAbstractModel.php on line 562Data migration from non-magento DB about sales_order tablesMagento 2 Sending emails triggered by observerMagento2 (v2.2) Error Login Admin + FrontendUnable to create order from admin in magento 2Incompatible argument type error in Magento 2.2.2Magento 2.2.2 REST API - I need to change the customer password using REST APIAdd to cart button freezes and nothing is put in basketHow to set additional data to quote_item table from controller in Magento 2?Magento 2.2.3 CE unable to add/remove item from wishlist?
What if you don't bring your credit card or debit for incidentals?
Does it cost a spell slot to cast a spell from a Ring of Spell Storing?
Sucuri detects malware on wordpress but I can't find the malicious code
Is the capacitor drawn or wired wrongly?
Chopin: marche funèbre bar 15 impossible place
Show sparse matrices like chessboards
Unorthodox way of solving Einstein field equations
Incremental Ranges!
What happens if you do emergency landing on a US base in middle of the ocean?
Restoring order in a deck of playing cards (II)
Is having a hidden directory under /etc safe?
Credit card offering 0.5 miles for every cent rounded up. Too good to be true?
NTP rollover-safe design with ESP8266 (Curiosity)
Short story written from alien perspective with this line: "It's too bright to look at, so they don't"
Responsibility for visa checking
Initialize an array of doubles at compile time
How to detach yourself from a character you're going to kill?
Do marked cards or loaded dice have any mechanical benefit?
How to decline physical affection from a child whose parents are pressuring them?
Strange math syntax in old basic listing
Rotated Position of Integers
Hygienic footwear for prehensile feet?
What does War Machine's "Canopy! Canopy!" line mean in "Avengers: Endgame"?
Is the decompression of compressed and encrypted data without decryption also theoretically impossible?
Magento 2.2.2 error when setting order status with API
Call to a member function dispatch() on null MagentoFrameworkModelAbstractModel.php on line 562Data migration from non-magento DB about sales_order tablesMagento 2 Sending emails triggered by observerMagento2 (v2.2) Error Login Admin + FrontendUnable to create order from admin in magento 2Incompatible argument type error in Magento 2.2.2Magento 2.2.2 REST API - I need to change the customer password using REST APIAdd to cart button freezes and nothing is put in basketHow to set additional data to quote_item table from controller in Magento 2?Magento 2.2.3 CE unable to add/remove item from wishlist?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to set the order status of orders to "Complete" using the API. I am running Magento Enterprise 2.2.2. Am I missing something in the data?
This is the url I am calling
https://localhost/rest/V1/orders
This is the data I am sending
"entity": "entity_id": 10000001, "status": "Complete"
This is the error I am getting
"Fatal Error: 'Uncaught Error: Call to a member function
getMethodInstance() on null in
/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php:24
Stack trace:
0 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoPaymentObserverSalesOrderBeforeSaveObserver->execute(Object(MagentoFrameworkEventObserver))
1 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoPaymentObserverSalesOrderBeforeSaveObserver),
Object(MagentoFrameworkEventObserver))
2 /vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array,
Object(MagentoFrameworkEventObserver))
3 /generated/code/Magento/Stag' in '/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php'
on line 24"
magento2 rest-api order-status
add a comment |
I am trying to set the order status of orders to "Complete" using the API. I am running Magento Enterprise 2.2.2. Am I missing something in the data?
This is the url I am calling
https://localhost/rest/V1/orders
This is the data I am sending
"entity": "entity_id": 10000001, "status": "Complete"
This is the error I am getting
"Fatal Error: 'Uncaught Error: Call to a member function
getMethodInstance() on null in
/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php:24
Stack trace:
0 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoPaymentObserverSalesOrderBeforeSaveObserver->execute(Object(MagentoFrameworkEventObserver))
1 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoPaymentObserverSalesOrderBeforeSaveObserver),
Object(MagentoFrameworkEventObserver))
2 /vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array,
Object(MagentoFrameworkEventObserver))
3 /generated/code/Magento/Stag' in '/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php'
on line 24"
magento2 rest-api order-status
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19
add a comment |
I am trying to set the order status of orders to "Complete" using the API. I am running Magento Enterprise 2.2.2. Am I missing something in the data?
This is the url I am calling
https://localhost/rest/V1/orders
This is the data I am sending
"entity": "entity_id": 10000001, "status": "Complete"
This is the error I am getting
"Fatal Error: 'Uncaught Error: Call to a member function
getMethodInstance() on null in
/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php:24
Stack trace:
0 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoPaymentObserverSalesOrderBeforeSaveObserver->execute(Object(MagentoFrameworkEventObserver))
1 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoPaymentObserverSalesOrderBeforeSaveObserver),
Object(MagentoFrameworkEventObserver))
2 /vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array,
Object(MagentoFrameworkEventObserver))
3 /generated/code/Magento/Stag' in '/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php'
on line 24"
magento2 rest-api order-status
I am trying to set the order status of orders to "Complete" using the API. I am running Magento Enterprise 2.2.2. Am I missing something in the data?
This is the url I am calling
https://localhost/rest/V1/orders
This is the data I am sending
"entity": "entity_id": 10000001, "status": "Complete"
This is the error I am getting
"Fatal Error: 'Uncaught Error: Call to a member function
getMethodInstance() on null in
/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php:24
Stack trace:
0 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): MagentoPaymentObserverSalesOrderBeforeSaveObserver->execute(Object(MagentoFrameworkEventObserver))
1 /vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoPaymentObserverSalesOrderBeforeSaveObserver),
Object(MagentoFrameworkEventObserver))
2 /vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array,
Object(MagentoFrameworkEventObserver))
3 /generated/code/Magento/Stag' in '/vendor/magento/module-payment/Observer/SalesOrderBeforeSaveObserver.php'
on line 24"
magento2 rest-api order-status
magento2 rest-api order-status
asked May 25 at 15:46
Trevor OrrTrevor Orr
1527
1527
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19
add a comment |
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19
add a comment |
1 Answer
1
active
oldest
votes
You are sending order increment id as order id (primary key of sales order table). Thats why this error pops up. You need to send actual order id.
Let me know if this doesn't fix your issue.
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276108%2fmagento-2-2-2-error-when-setting-order-status-with-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are sending order increment id as order id (primary key of sales order table). Thats why this error pops up. You need to send actual order id.
Let me know if this doesn't fix your issue.
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
add a comment |
You are sending order increment id as order id (primary key of sales order table). Thats why this error pops up. You need to send actual order id.
Let me know if this doesn't fix your issue.
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
add a comment |
You are sending order increment id as order id (primary key of sales order table). Thats why this error pops up. You need to send actual order id.
Let me know if this doesn't fix your issue.
You are sending order increment id as order id (primary key of sales order table). Thats why this error pops up. You need to send actual order id.
Let me know if this doesn't fix your issue.
answered May 26 at 11:25
Ramkishan SutharRamkishan Suthar
2,34421435
2,34421435
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
add a comment |
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
That gets rid of the error but still does not change the status of the order but your comment is correct in fixing the error.
– Trevor Orr
May 26 at 16:36
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
If I just have the increment id would I need to do a get to retrieve the order details and then use the order id from that returned data to then do a post to set the order status? Which I found out that I had to use lowercase "complete" for the status to set correctly.
– Trevor Orr
May 26 at 18:13
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Yes exactly @TrevorOrr, I think you need to create new API for this as I think there is no default API which returns order data from increment id.
– Ramkishan Suthar
May 27 at 4:46
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Actually I did find a way to get the order id from the increment id from another post here. Multiple steps to set the status but at least it works
– Trevor Orr
May 27 at 5:04
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
Great @TrevorOrr, Happy coding :)
– Ramkishan Suthar
May 27 at 5:05
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276108%2fmagento-2-2-2-error-when-setting-order-status-with-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi There, Is this increment id or order id (primary key of sales_order table) because if this is increment id then you need to replace it with order id, I am sure this is the issue in your case.
– Ramkishan Suthar
May 26 at 11:19