question

demskigroup avatar image
demskigroup asked David Marginian 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 characters needed characters left characters exceeded

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 answered David Marginian 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 characters needed characters left characters exceeded

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

It has never worked
0 Likes 0 ·
Wouldn't the order be in an open state by default when its created?
0 Likes 0 ·
No, it won't be.
0 Likes 0 ·
demskigroup avatar image demskigroup David Marginian ♦♦ ·
Ok so how would I set it to be open?
0 Likes 0 ·
Show more comments
David Marginian avatar image
David Marginian 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 characters needed characters left characters exceeded

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