Developer forum
CheckOutDone and SetOrderComplete
Replies
You must be logged in to post in the forum
Hi Per
You use CheckoutDone to tell CartV2 that you (the CheckoutHandler) has finished and you don't want to control the next step. This is usually done after a callback from an external provider or if a "Cancel" state is returned from the provider. You use SetOrderComplete to set all the properties on the order object that indicate that payment succedeed.
Consider this example:
You POST a user to your external providers system. You then receive a callback from your provider. You verify that everything is ok, invoke SetOrderComplete and tell CartV2 that you're done by invoking CheckoutDone. The cart will then take over and do whatever it needs to do and then the callback request ends. Usually the external provider will then redirect the user back to the cart. At this point your Redirect method is invoked again. If you need to do some more validation on the order, you can, otherwise simply invoke the RedirectToCart method to tell the cart that you're done and the flow can continue.
Hope this helps :)
- Jeppe
You must be logged in to post in the forum