fix(medusa): draft order set payment as captured (#2479)

**What**
- when an order is created from a draft order, set the payment of the order as captured

FIXES CORE-592
This commit is contained in:
Frane Polić authored and GitHub committed 2022-10-31 12:24:59 +00:00
1 parent 58c7ffdc6e
commit 591668d332
2 files changed
+9 -6

No files matched your search

@@ -111,6 +111,8 @@ export default async (req, res) => {
await draftOrderService
.withTransaction(manager)
.registerCartCompletion(draftOrder.id, result.id)
await orderService.withTransaction(manager).capturePayment(result.id)
})
const order = await orderService.retrieve(result.id, {