fix(medusa-payment-stripe): Resend capture event to ensure auto-capture (#3100)
This commit is contained in:
committed by
GitHub
parent
2e7e16b917
commit
0009da0261
5
.changeset/selfish-pianos-wonder.md
Normal file
5
.changeset/selfish-pianos-wonder.md
Normal file
@@ -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 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":
|
||||
|
||||
Reference in New Issue
Block a user