What I did was, since I’ve created a third party payment provider, the goal is to manually create an order since Wix doesnt recognize third party transactions. So, I’m doing work-arounds for this and createOrder() would be very useful, however, in order to properly use this, I need to generate the details from the checkout.
One of the parameters for getCheckout() is checkoutId, and I’m not sure how to retrieve this so I just used getCurrentCart() to generate checkoutId
So I passed the checkoutId from getCurrentCart() as parameter for getCheckout()
and I’ve already created a fallback error message in case getCheckout doesnt exist or something is missing. But it’s not logging any error messages whatsoever.
The issue is it won’t log the checkout details in the Monitoring Logs given this approach. Can someone help me? Thank you in advance.
I’m successfully retrieving the checkoutId by the way. But when it comes to using it as a parameter for getCheckout() it still wouldn’t generate the checkout details. I just wanna generate checkout details for assessment before creating order.
That is weird. If we go by the doc, passing the Checkout ID inside getCheckout() should yield the checkout object.
As an alternative approach, you might want to try fetching the Checkout ID from the onCheckoutCreated() event that fires when a new checkout is created.