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

HotelCreateReservation force to return amount in USD #253

Open MasoodRehman opened 4 years ago

MasoodRehman commented 4 years ago

Hi @vivekjyotipramanik ,

I have used the PreferredCurrency parameter in HotelSearchAvailabilityReq and HotelDetailsReq requests and working I can see the amount in USD but when I do reservation neither PrefferedCurrency is supported by Reservation request and niether the response has amoun in USD.

...
...
<hotel:HotelReservation Status="HK" BookingConfirmation="29220729" LocatorCode="00DQBVBF"
                                        CreateDate="2020-09-17T10:19:49.262+00:00"
                                        ModifiedDate="2020-09-17T10:19:49.332+00:00"
                                        ProviderReservationInfoRef="htcfZS8Q2BKAQzEOAAAAAA==" TravelOrder="1"
                                        ProviderSegmentOrder="1">
                    <common_v48_0:BookingTravelerRef Key="htcfZS8Q2BKAGzEOAAAAAA==">
                        <common_v48_0:LoyaltyCardRef Key="htcfZS8Q2BKAMzEOAAAAAA=="/>
                    </common_v48_0:BookingTravelerRef>
                    <common_v48_0:ReservationName>
                        <common_v48_0:NameOverride First="MASOOD" Last="REHMAN"/>
                    </common_v48_0:ReservationName>
                    <hotel:HotelProperty HotelChain="HI" HotelCode="4898" HotelLocation="SYD"
                                         Name="HOLIDAY INN DARLING HARBOUR" Availability="Available">
                        <hotel:PropertyAddress>
                            <hotel:Address>68 HARBOUR ST</hotel:Address>
                            <hotel:Address>SYDNEY NSW 2000</hotel:Address>
                        </hotel:PropertyAddress>
                        <common_v48_0:PhoneNumber Type="Hotel" Number="61-2-92910400"/>
                        <common_v48_0:PhoneNumber Type="Fax" Number="61-2-92811212"/>
                    </hotel:HotelProperty>
                    <hotel:HotelRateDetail RatePlanType="KSUN22AZ" Base="AUD876.00" Total="AUD876.00">
                        <hotel:RoomRateDescription Name="Tax Information">
                            <hotel:Text>Hotel Total Tax is not returned by the Provider</hotel:Text>
                        </hotel:RoomRateDescription>
                        <hotel:RoomRateDescription Name="Room">
                            <hotel:Text>King Superior Unwind In Your Spacious Superior</hotel:Text>
                            <hotel:Text>Room With A King Bed And Flat Screen Tv. You</hotel:Text>
                        </hotel:RoomRateDescription>
                        <hotel:RoomRateDescription Name="Cancellation">
                            <hotel:Text>CXL AFTER 1600 19OCT FORFEIT FIRST NITE STAY</hotel:Text>
                        </hotel:RoomRateDescription>
                        <hotel:RoomRateDescription Name="Late Arrival Guarantee">
                            <hotel:Text>DEPCCCAXXXXXXXXXXXX0474EXP*****</hotel:Text>
                        </hotel:RoomRateDescription>
                        <hotel:RoomRateDescription Name="Rate">
                            <hotel:Text>Best Flexible Rate</hotel:Text>
                        </hotel:RoomRateDescription>
                        <hotel:HotelRateByDate EffectiveDate="2020-10-20" ExpireDate="2020-10-23" Base="AUD229.00"/>
                        <hotel:HotelRateByDate EffectiveDate="2020-10-23" ExpireDate="2020-10-24" Base="AUD189.00"/>
                        <hotel:TaxDetails>
                            <hotel:Tax Code="13" Term="Night" CollectionFreq="Independent">
                                <hotel:Percentage>10.0</hotel:Percentage>
                            </hotel:Tax>
                        </hotel:TaxDetails>
                    </hotel:HotelRateDetail>
                    <hotel:HotelStay>
                        <hotel:CheckinDate>2020-10-20</hotel:CheckinDate>
                        <hotel:CheckoutDate>2020-10-24</hotel:CheckoutDate>
                    </hotel:HotelStay>
                    <common_v48_0:Guarantee Type="Deposit" Key="htcfZS8Q2BKAbzEOAAAAAA==" Reusable="true" ElStat="A">
                        <common_v48_0:CreditCard Type="CA" Number="************0474" ExpDate="2020-12" CVV="***"/>
                    </common_v48_0:Guarantee>
                    <common_v48_0:BookingSource Type="IataNumber" Code="1P"/>
                    <hotel:GuestInformation NumberOfRooms="1">
                        <hotel:NumberOfAdults>1</hotel:NumberOfAdults>
                    </hotel:GuestInformation>
                    <common_v48_0:SellMessage>RG1-EFF 20OCT20 229.00 AUD RG2-EFF 23OCT20 189.00 AUD TTL-876.00 AUD/BAS
                        876.00/TAX 10PCT THANK YOU FOR BOOKING HOLIDAY INN THE GUEST IS CONFIRMED IN A NON-SMOKING ROOM
                        THE PROVIDED IATA NUMBER IS INVALID. INVALID LOYALTY ID 1-HI805489895 *****NOTE-RATE CHANGE
                        APPLIES***** $HI$
                    </common_v48_0:SellMessage>
                    <hotel:HotelCommission>Y</hotel:HotelCommission>
                </hotel:HotelReservation>
...
...

As you can see HotelRateDetail element has an amount in AUD there is no parameter e.g ApproximateBase which hold the amount in preferred currency, I do not want to covert it manually for presentation, I know there is a parameter PreferredCurrency but it only work in HotelSearchAvailabilityReq and HotelDetailsReq

RatePlanType="KSUN22AZ" Base="AUD876.00" Total="AUD876.00"

Any hint will be appreciated.

Thank you.

vivekjyotipramanik commented 4 years ago

Hi MasoodRehman,

The hotelbooking response currency data depends on the PCC/TargetBranch. Each pcc has a preferred rate established in the host and you need to change that by raising a My.Travelport.com to ticket get back rate in your preferred currency. You can try sending ApproximateBase and ApproximateTotal in the booking request to check if it sends back response in your preferred currency. Thanks.