Browse Source

fix(payments-plugin): Return 200 on Stripe payment failed event (#1878)

Vinicius Rosa 3 years ago
parent
commit
ec205ea89a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/payments-plugin/src/stripe/stripe.controller.ts

+ 1 - 0
packages/payments-plugin/src/stripe/stripe.controller.ts

@@ -65,6 +65,7 @@ export class StripeController {
         if (event.type === 'payment_intent.payment_failed') {
             const message = paymentIntent.last_payment_error?.message;
             Logger.warn(`Payment for order ${orderCode} failed: ${message}`, loggerCtx);
+            response.status(HttpStatus.OK).send('Ok');
             return;
         }