Merged in fix/SW-3020-paymentInfo-tracking (pull request #2403)

fix(SW-3020): add correct paymentInfo in booking flow and ancillary flow

* fix(SW-3020): add correct paymentInfo in booking flow and ancillary flow

* fix(SW-3020): fix pr comments


Approved-by: Tobias Johansson
This commit is contained in:
Bianca Widstam
2025-06-24 13:38:30 +00:00
parent eb77241a4e
commit 5c3b30ea93
10 changed files with 136 additions and 23 deletions

View File

@@ -5,6 +5,8 @@ export const glaStorageName = "gla-storage"
type GlaSessionData = {
lateArrivalGuarantee: string
hotelId: string
paymentMethod?: string
isSavedCreditCard?: boolean
}
export function readGlaFromSessionStorage(): GlaSessionData | null {
@@ -20,12 +22,19 @@ export function readGlaFromSessionStorage(): GlaSessionData | null {
export function writeGlaToSessionStorage(
lateArrivalGuarantee: string,
hotelId: string
hotelId: string,
paymentMethod: string,
isSavedCreditCard: boolean
) {
try {
sessionStorage.setItem(
glaStorageName,
JSON.stringify({ lateArrivalGuarantee, hotelId })
JSON.stringify({
lateArrivalGuarantee,
hotelId,
paymentMethod,
isSavedCreditCard,
})
)
} catch (error) {
console.error("Error writing to session storage:", error)