diff --git a/api.planx.uk/modules/pay/middleware.ts b/api.planx.uk/modules/pay/middleware.ts index f799b02429..3f687ba710 100644 --- a/api.planx.uk/modules/pay/middleware.ts +++ b/api.planx.uk/modules/pay/middleware.ts @@ -46,8 +46,8 @@ interface GetPaymentRequestDetails { slug: string; }; }; + passport: Passport; }; - passport: Passport; } | null; } @@ -99,7 +99,7 @@ export async function fetchPaymentRequestDetails( if (paymentAmount) req.params.paymentAmount = paymentAmount; res.locals.govPayMetadata = paymentRequest.govPayMetadata; - res.locals.passport = paymentRequest.passport; + res.locals.passport = paymentRequest.session.passport; next(); }