From 186b7d27735f25b33e0ac45a30bcc0a6d3347b26 Mon Sep 17 00:00:00 2001 From: Didier Guyon <60464752+DidierGuyon@users.noreply.github.com> Date: Thu, 18 May 2023 08:46:09 +0200 Subject: [PATCH] fix(medusa-payment-stripe): Added withTransaction to capturePaymentIfNecessary (#3930) * Added withTransaction to capturePaymentIfNecessary * Removed catch from idempotencyKey.retrieve in completeCartIfNecessary * Synced with upstream develop branch --------- Co-authored-by: Didier Guyon Co-authored-by: pepijn-vanvlaanderen --- packages/medusa-payment-stripe/src/api/utils/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/medusa-payment-stripe/src/api/utils/utils.ts b/packages/medusa-payment-stripe/src/api/utils/utils.ts index d0340dfe4a..f17af21a80 100644 --- a/packages/medusa-payment-stripe/src/api/utils/utils.ts +++ b/packages/medusa-payment-stripe/src/api/utils/utils.ts @@ -194,6 +194,7 @@ async function capturePaymentIfNecessary({ }) { const orderService = container.resolve("orderService") const order = await orderService + .withTransaction(transactionManager) .retrieveByCartId(cartId) .catch(() => undefined)