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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user