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:
@@ -2,6 +2,7 @@ import { differenceInCalendarDays, format, isWeekend } from "date-fns"
|
||||
|
||||
import { CancellationRuleEnum } from "@/constants/booking"
|
||||
|
||||
import { readPaymentInfoFromSessionStorage } from "@/components/HotelReservation/EnterDetails/Payment/helpers"
|
||||
import { getSpecialRoomType } from "@/utils/specialRoomType"
|
||||
|
||||
import { invertedBedTypeMap } from "../../utils"
|
||||
@@ -66,6 +67,7 @@ export function getTracking(
|
||||
) {
|
||||
const arrivalDate = new Date(booking.checkInDate)
|
||||
const departureDate = new Date(booking.checkOutDate)
|
||||
const paymentInfoSessionData = readPaymentInfoFromSessionStorage()
|
||||
|
||||
const pageTrackingData: TrackingSDKPageData = {
|
||||
channel: TrackingChannelEnum.hotelreservation,
|
||||
@@ -177,9 +179,7 @@ export function getTracking(
|
||||
? "glacardsaveconfirmed"
|
||||
: undefined,
|
||||
type:
|
||||
booking.guaranteeInfo && isFlexBooking
|
||||
? booking.guaranteeInfo.cardType
|
||||
: undefined,
|
||||
booking.guaranteeInfo?.cardType ?? paymentInfoSessionData?.paymentMethod,
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user