How to Clear all unexecuted Order from Publisher Cart

Tamalk
Tamalk edited February 2022 in Kite Publisher
If the User clicks on Submit Button for placing order, we are calling your Publisher JS and you are opening pop up page filled with required details to place the order on your platform. Now if the User clicks on cancel button on your platform and again clicks on Submit Button for placing order from our platform your Publisher JS is opening the pop up page filled with order details of existing order as well as new order. So we want to remove all pending data from your Publisher Cart in case the Users clicks on Cancel button on your platform. Please guide.
  • Tamalk
    Any update sujith
  • sujith
    sujith edited February 2022
    Kite Publisher doesn't retain context. It will just open basket on kite web with whatever params are sent.
    You need to look for status query param after the redirect from Publisher and handle it at your end.
  • Tamalk
    Sujith can you please elaborate.
  • rakeshr
    You need to dynamically create basket at your end, based on finished() callback i.e if status is cancelled, create/update the basket orders. You can go through the example here.
  • tuhinkole
    @rakeshr @sujith

    _this.kiteInstance.finished(function (status, request_token) {
    if (status == "success") {
    } else if (status == "cancelled") {
    // Here i want to completely clear the busket .
    // There is any method to clear the busket ?
    // Any other way please suggest
    }
    });
Sign In or Register to comment.