si capturo el pedido en commercejs, necesito proporcionar 'line_items' con el item_id como clave. Pero no tengo un item_id ( item_xyz0123 ), solo tengo un ID de producto ( prod_xyz123 ). ¿Hay alguna forma de capturar el pedido sin implementar todo el registro del carrito?
Este es mi código hasta ahora:
res = await commerce.checkout.capture(token.id, { line_items: { item_0919893978: {quantity: 1} // i dont want this, because i have not a cart customer: { firstname: "John", lastname: "Doe", email: "john.doe@example.com", }, payment: { gateway: "test_gateway", card: { number: "4242424242424242", expiry_month: "02", expiry_year: "24", cvc: "123", postal_zip_code: "94107", }, }, });