Hello! I'm still a beginner there. I'm trying to complete an order with the following code:
const { cart } = await medusa.carts.createPaymentSessions(medusaCartId)
await medusa.carts.setPaymentSession(medusaCartId, {
provider_id: cart.payment_sessions[0].provider_id, // manual
})
const { type, data } = await medusa.carts.complete(medusaCartId);
But the last line throws an error (from the attached screenshot). Any thoughts how to fix that? Thank you!