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ć
2022-10-31 12:24:59 +00:00
committed by GitHub
parent 58c7ffdc6e
commit 591668d332
2 changed files with 9 additions and 6 deletions
@@ -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, {