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:
@@ -0,0 +1,31 @@
|
||||
import { PaymentCallbackPage as PaymentCallbackPagePrimitive } from "@scandic-hotels/booking-flow/pages/PaymentCallbackPage"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import type { PaymentCallbackStatusEnum } from "@scandic-hotels/common/constants/paymentCallbackStatusEnum"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function PaymentCallbackPage(
|
||||
props: PageArgs<LangParams & { status: string }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
const params = await props.params
|
||||
logger.debug(`[payment-callback] callback started`)
|
||||
const lang = params.lang
|
||||
|
||||
let userAccessToken = null
|
||||
// TODO fix when auth is implemented
|
||||
// const session = await auth()
|
||||
// if (isValidSession(session)) {
|
||||
// userAccessToken = session.token.access_token
|
||||
// }
|
||||
|
||||
return (
|
||||
<PaymentCallbackPagePrimitive
|
||||
lang={lang}
|
||||
userAccessToken={userAccessToken}
|
||||
searchParams={searchParams}
|
||||
status={params.status as PaymentCallbackStatusEnum}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user