question

demskigroup avatar image
demskigroup asked David Marginian Deactivated answered

createOrder not actually creating order

We have this method of creating an order then we call the register with the order id thar is returned, and register comes up but without an order in it and no order is in the system with that id, any reason why it's not working?


 Order mOrder= orderConnector.createOrder(new Order());
                            LineItem myLineItem = new LineItem();
                            myLineItem.setPrice(Long.parseLong(totalPrice));
                            orderConnector.addCustomLineItem(mOrder.getId(), myLineItem, false);


                            orderConnector.updateOrder(mOrder);
                            orderId = mOrder.getId();
Orders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

This is new and it never worked, or it has worked but just stopped working? Have you checked the logs? I believe the order needs to be in an open state to be displayed in register.

6 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

demskigroup avatar image demskigroup commented ·
It has never worked
0 Likes 0 ·
demskigroup avatar image demskigroup commented ·
Wouldn't the order be in an open state by default when its created?
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ demskigroup commented ·
No, it won't be.
0 Likes 0 ·
demskigroup avatar image demskigroup David Marginian ♦♦ commented ·
Ok so how would I set it to be open?
0 Likes 0 ·
Show more comments
David Marginian avatar image
David Marginian Deactivated answered

You may want to read this - https://docs.clover.com/docs/creating-custom-orders.. It focuses on the REST API but many of the concepts are the same (calculating setting total, setting state to open, etc.).

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community