Travelport / travelport-uapi-tutorial-php

The travelport-uapi-tutorial-php is a PHP project for Universal API that will help you connect and code a standard workflow including Air, Vehicle, and Hotel.
35 stars 47 forks source link

Fare Changing in CreateReservationRes #37

Closed sivaneshc closed 7 years ago

sivaneshc commented 7 years ago

Hi, In most of the tickets in Pre-Production price changes in "CreateReservationResponse". Will this happen in production too? If so how should we handle this?

Example: $200 in AirPriceRequest but in CreateReservationResponse the price is $300. How do we notifiy the user that price has changed in this case?

vivekjyotipramanik commented 7 years ago

Hi sivaneshc,

Thank you for your interest in Travelport Universal API. It is pretty odd to fare getting changed between AirPriceRsp and AirCreateResrevationRsp. Could you please provide us the complete AirpriceReq/Rsp and AirCreateReservationReq/Rsp and we will analyze on this issue. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

sivaneshc commented 7 years ago

Hi, Thanks for your support. Please find the attached xmls.

In AirCreateResponse we get two pricing info. One is under "airAirPricingInfo" and the other is "airAirPricingSolution". Which one is the exact TotalPrice ?

When i book a ticket and check with the RecordLocator in TravelPort demo, there i get the price from "airAirPricingInfo".

xml.txt

Thanks Sivanesh

vivekjyotipramanik commented 7 years ago

Hi sivaneshc,

We can see from the AirCreateReservationReq/AirPricingSolution you have not provided the currency code and that is the reason it converted to the currency of the PCC listed and changed the approximate price based on that. Please find below the corrected request. Please let me know how it goes.

AirPricingSolution is the complete price of the itinerary. The AirPriceInfo can be more than one and can have price depending on the Type of travelers like ADT, CNN or INF. In this scenario which you are testing with both are same.

Thanks.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header />
    <soapenv:Body>
        <AirCreateReservationReq xmlns="http://www.travelport.com/schema/universal_v33_0" TraceId="c843cc87-e0fb-4489-8e51-fcfaaf86b09f" AuthorizedBy="Travelport" TargetBranch="P7027641" ProviderCode="1G" RetainReservation="Both">
            <BillingPointOfSaleInfo xmlns="http://www.travelport.com/schema/common_v33_0" OriginApplication="UAPI" />
            <BookingTraveler xmlns="http://www.travelport.com/schema/common_v33_0" Key="Q1NCV0JvWjlmclNydVlUOA==1" TravelerType="ADT" Nationality="SG" Age="40" Gender="M">
                <BookingTravelerName Prefix="MR" First="suresh" Last="suresh" />
                <PhoneNumber Number="9854513215" />
                <Email EmailID="sivanehsmca@gmail.com" />
                <Address>
                    <AddressName>singapore</AddressName>
                    <Street>singapore</Street>
                    <City>singapore</City>
                    <State>singapore</State>
                    <PostalCode>654588</PostalCode>
                    <Country>SG</Country>
                </Address>
            </BookingTraveler>
            <FormOfPayment xmlns="http://www.travelport.com/schema/common_v33_0" Type="Cash"></FormOfPayment>
            <AirPricingSolution xmlns="http://www.travelport.com/schema/air_v33_0" Key="07gzsg3R2BKAl1ngBAAAAA==" TotalPrice="SGD111.00" BasePrice="SGD77.00" ApproximateTotalPrice="SGD111.00" ApproximateBasePrice="SGD77.00" Taxes="SGD34.00">
                <AirSegment Key="07gzsg3R2BKAmelgBAAAAA==" OptionalServicesIndicator="false" AvailabilityDisplayType="Fare Shop/Optimal Shop" Group="0" Carrier="MH" FlightNumber="606" Origin="SIN" Destination="KUL" DepartureTime="2016-11-24T13:40:00.000+08:00" ArrivalTime="2016-11-24T14:40:00.000+08:00" FlightTime="60" Distance="196" ProviderCode="1G" ClassOfService="Y"></AirSegment>
                <AirPricingInfo PricingMethod="Guaranteed" Taxes="SGD34.00" Key="07gzsg3R2BKAm1ngBAAAAA==" TotalPrice="SGD111.00" BasePrice="SGD77.00" ApproximateTotalPrice="SGD111.00" ApproximateBasePrice="SGD111.00" ProviderCode="1G">
                    <FareInfo PromotionalFare="false" FareFamily="" Amount="SGD111.00" DepartureDate="2016-11-24" EffectiveDate="2016-11-11T17:04:00.000+08:00" Destination="KUL" Origin="SIN" PassengerTypeCode="ADT" FareBasis="NBCOWSG" Key="07gzsg3R2BKAm1ngBAAAAA==">
                        <FareRuleKey FareInfoRef="07gzsg3R2BKAm1ngBAAAAA==" ProviderCode="1G">6UUVoSldxwhYySTu+cIRR8bKj3F8T9EyxsqPcXxP0TIjSPOlaHfQe5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA/YV25EgQdfMM3ExqSoG051bRiEEv1xWFY0xp+xTZ18oVCulqMwbpNYRHrzWZukgtjv5zQ70aL8jKdnqX0AP5cu3HSk22OACP8siOHFaFMf8hf6E18cRejGVqfCTByZWB/chHlVW+caKIiI34n2+2lvqNbjwzJx7oo0sKBvhNXxa3C5/OJ7khP7qkW2NIZVclfwBShF29N4Sv4Xvb2u1Qx+/he9va7VDH7+F729rtUMfv4Xvb2u1Qx8Qxibp/OJehpo2LrM59tO1jp8ZENljzx72lVAJ3nO/PygeWGwqWZxfcpiDsCTZHcDwRr/XkFZPUqyPRxKVSaGW</FareRuleKey>
                    </FareInfo>
                    <BookingInfo BookingCode="N" CabinClass="Economy" FareInfoRef="" SegmentRef="07gzsg3R2BKAmelgBAAAAA==" />
                    <TaxInfo Key="07gzsg3R2BKAn1ngBAAAAA==" Category="OO" Amount="SGD8.00" />
                    <TaxInfo Key="07gzsg3R2BKAo1ngBAAAAA==" Category="OP" Amount="SGD6.10" />
                    <TaxInfo Key="07gzsg3R2BKAp1ngBAAAAA==" Category="SG" Amount="SGD19.90" />
                    <PassengerType Code="ADT" BookingTravelerRef="Q1NCV0JvWjlmclNydVlUOA==1" Age="40" />
                </AirPricingInfo>
            </AirPricingSolution>
            <ActionStatus xmlns="http://www.travelport.com/schema/common_v33_0" Type="ACTIVE" TicketDate="T*" ProviderCode="1G" />
        </AirCreateReservationReq>
    </soapenv:Body>
</soapenv:Envelope>

Thanks & Regards Vivekjyoti Pramanik

sivaneshc commented 7 years ago

Hi Vivekjyoti,

Thanks for your input and support. I have updated CurrencyCode in AirCreateReservationReq/AirPricingSolution. I have selected only one adult in the scenario. But still i get different price in AirpriceInfo. Why do we get SGD239 in AirPirceInfo where as in AirPriceSolution it is SGD116?

Please find the attached xml.

xml (1).txt

Thanks, Sivanesh

NirandaG commented 7 years ago

Hi Sivanesh,

The reason why you have got different price is, there has been a price changed for your requested itinerary.

You have requested Q class but it has returned Y instead of that.

``xml

6UUVoSldxwi0oUFgJCmlX8bKj3F8T9EyxsqPcXxP0TIjSPOlaHfQe5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA/YV25EgQdfMM3ExqSoG053gTWNdCLRw3Z24yfXgq5YLVCulqMwbpNYRHrzWZukgtopoXkvfvV4+sqYDMF+wPCnq/20RpEmAXlby9IE1rxlSp7GoYpQef1gea99sOQJH0wu/fnH1cxnUhI5gmg6xPweAdcY0m0a4yk4nKb2G5mOFPKjnBcMH+sdTHI/R3tptRb+F729rtUMfv4Xvb2u1Qx+/he9va7VDH7+F729rtUMfv4Xvb2u1Qx80GqQ2wgDK/01BlpTwyo+r9GjARZYw7j/TROTkGAG0MbZIJzF/UjjXz0BjuI54bJTcF7TvWtaxD4qUpHGz1BIJ

``xml That is the reason why it has returned the airAirSolutionChangedInfo ReasonCode="Price"

https://support.travelport.com/webhelp/uapi/uAPI.htm#Air/Air_Booking/Create_Air_Booking/Creating_Air_Bookings.htm?Highlight=AirSolutionChangedInfo

Thank you, B.Rgds, Niranda

sivaneshc commented 7 years ago

Hi Niranda,

Thank you so much for your support. Its working fine.