fix(medusa-payment-stripe): Resend capture event to ensure auto-capture (#3100)
This commit is contained in:
1 parent
2e7e16b917
commit
0009da0261
2 files changed
+8
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"medusa-payment-stripe": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(medusa-payment-stripe): Resend capture event to ensure auto-capture
|
||||||
@@ -31,6 +31,9 @@ export default async (req, res) => {
|
|||||||
await manager.transaction(async (manager) => {
|
await manager.transaction(async (manager) => {
|
||||||
await orderService.withTransaction(manager).capturePayment(order.id)
|
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
|
break
|
||||||
case "payment_intent.amount_capturable_updated":
|
case "payment_intent.amount_capturable_updated":
|
||||||
|
|||||||
Reference in new issue
Block a user