fix(medusa-payment-stripe): Resend capture event to ensure auto-capture (#3100)

This commit is contained in:
Oliver Windall Juhl
2023-01-25 10:10:31 +01:00
committed by GitHub
parent 2e7e16b917
commit 0009da0261
2 changed files with 8 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ export default async (req, res) => {
await manager.transaction(async (manager) => {
await orderService.withTransaction(manager).capturePayment(order.id)
})
} else {
// If we receive the event, before the order is created, we respond with 404 as this will trigger Stripe to resend the event later
return res.sendStatus(404)
}
break
case "payment_intent.amount_capturable_updated":