Merged in SW-3459-setup-booking-confirmation-page-in-sas (pull request #2794)

Setup booking-confirmation page in SAS

* Setup booking-confirmation page in SAS
move booking-confirmation tracking to booking-flow

* remove unused param

* Add test cards to documentation

* Fix payment callback page to use correct status


Approved-by: Anton Gunnarsson
Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
Joakim Jäderberg
2025-09-11 12:19:26 +00:00
parent 6b01dd9a8f
commit 4893eb8b25
15 changed files with 355 additions and 32 deletions

View File

@@ -23,19 +23,20 @@ type PaymentCallbackPageProps = {
lang: Lang
searchParams: NextSearchParams
userAccessToken: string | null
status: PaymentCallbackStatusEnum
}
export async function PaymentCallbackPage({
lang,
userAccessToken,
searchParams,
status,
}: PaymentCallbackPageProps) {
const { status, confirmationNumber } = searchParams
const { confirmationNumber } = searchParams
if (
!status ||
!confirmationNumber ||
typeof confirmationNumber !== "string" ||
typeof status !== "string"
typeof confirmationNumber !== "string"
) {
logger.error(
`[payment-callback] missing status or confirmationNumber in search params`
@@ -143,8 +144,7 @@ export async function PaymentCallbackPage({
<HandleErrorCallback
returnUrl={returnUrl.toString()}
searchObject={searchObject}
// TODO we should parse instead of cast
status={status as PaymentCallbackStatusEnum}
status={status}
errorMessage={errorMessage}
/>
)