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:
co-authored by
Carlos R. L. Rodrigues
parent
a9d33bc8d1
commit
9fdc00350a
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user