if i capture the order in commercejs i need to provide ´line_items´ with the item_id as key. But I dont have an item_id (item_xyz0123) i just have an product id (prod_xyz123).
is there an way to capture the order without implemting the whole cart logig?
This is my code so far:
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",
},
},
});