fix(): Lock process payment to prevent ingesting payment processing t… (#13977)

* fix(): Lock process payment to prevent ingesting payment processing twice

* Create brave-lamps-beg.md

* fix(): Lock process payment to prevent ingesting payment processing twice

* fix changeset

* resolve conflicts

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
Adrien de Peretti
2025-11-07 10:14:56 +01:00
committed by GitHub
co-authored by Carlos R. L. Rodrigues
parent a9d33bc8d1
commit 9fdc00350a
3 changed files with 40 additions and 3 deletions
@@ -1,4 +1,4 @@
import { processPaymentWorkflow } from "@medusajs/core-flows"
import { processPaymentWorkflowId } from "@medusajs/core-flows"
import {
IPaymentModuleService,
ProviderWebhookPayload,
@@ -49,7 +49,8 @@ export default async function paymentWebhookhandler({
return
}
await processPaymentWorkflow(container).run({ input: processedEvent })
const wfEngine = container.resolve(Modules.WORKFLOW_ENGINE)
await wfEngine.run(processPaymentWorkflowId, { input: processedEvent })
}
export const config: SubscriberConfig = {