New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(medusa-payment-stripe): Resend capture event to ensure auto-capture #3100
Conversation
🦋 Changeset detectedLatest commit: 4de3af8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Solves #2629 |
Lets go your a legend! |
88f2f94
to
4de3af8
Compare
/snapshot-this |
1 similar comment
/snapshot-this |
Thanks 🙏 |
I have some feedback about this fix. But now the I dont't know if we have another solution. I don't think we can delay the webhooks on Stripe side. As far as I understandThis problem only occurs when capture payment is set to What I suggest
Or
One more thingI would have added in the fix (to prevent other issues)
|
@@ -31,6 +31,9 @@ export default async (req, res) => { | |||
await manager.transaction(async (manager) => { | |||
await orderService.withTransaction(manager).capturePayment(order.id) | |||
}) | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else (!order)
could prevent special case
I have that special case, I don't know how it happened but an order is already in The condition should be added |
@nekszt I'll look into it and open a PR for it 🙌 |
I still have the same issue. To solve this, I added a subscriber that checks payment
|
What
When
medusa-payment-stripe
is configured to auto-capture, Stripe should re-send the event to ensure order capturing is always performed - eventually.