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

Unable to create reservation #246

Open a-fatah opened 4 years ago

a-fatah commented 4 years ago

Hi @vivekjyotipramanik I am unable to create reservation using following xml:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ns3:AirCreateReservationReq xmlns="http://www.travelport.com/schema/common_v49_0" xmlns:ns2="http://www.travelport.com/schema/air_v49_0" xmlns:ns3="http://www.travelport.com/schema/universal_v49_0" xmlns:ns4="http://www.travelport.com/schema/util_v49_0" xmlns:ns5="http://www.travelport.com/schema/hotel_v49_0" xmlns:ns6="http://www.travelport.com/schema/vehicle_v49_0" xmlns:ns7="http://www.travelport.com/schema/passive_v49_0" xmlns:ns8="http://www.travelport.com/schema/rail_v49_0" xmlns:ns9="http://www.travelport.com/schema/cruise_v49_0" xmlns:ns10="http://www.travelport.com/soa/common/security/SessionContext_v1" TraceId="b6198e01-3029-46be-8602-418d640a5d52" TargetBranch="P3090173">
      <BillingPointOfSaleInfo OriginApplication="UAPI"/>
      <BookingTraveler Key="284a6c52-ba2a-4370-9338-7bd952f02622" TravelerType="ADT">
        <BookingTravelerName Prefix="Mr" First="Galileo" Last="Ali"/>
        <DeliveryInfo>
          <PhoneNumber CountryCode="PK" Number="03133491905"/>
        </DeliveryInfo>
      </BookingTraveler>
      <ns2:AirPricingSolution Key="c4amvKeB0BKAweXSxEAAAA==" QuoteDate="2020-06-22" TotalPrice="PKR12789" BasePrice="USD64.00" ApproximateTotalPrice="PKR12789" ApproximateBasePrice="PKR10660" EquivalentBasePrice="PKR10660" Taxes="PKR2129" Fees="PKR0" ApproximateTaxes="PKR2129">
        <ns2:AirSegment Group="0" Carrier="PK" FlightNumber="352" ClassOfService="V" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="false" FlightTime="220" TravelTime="220" Distance="689" AvailabilityDisplayType="Fare Specific Fare Quote Unbooked" Origin="KHI" Destination="ISB" DepartureTime="2020-09-30T16:40:00.000+05:00" ArrivalTime="2020-09-30T20:20:00.000+05:00" ProviderCode="1G" Key="c4amvKeB0BKAueXSxEAAAA==">
          <ns2:CodeshareInfo OperatingCarrier="PK">Pakistan International Airlines</ns2:CodeshareInfo>
          <ns2:FlightDetails Key="c4amvKeB0BKAveXSxEAAAA==" Origin="KHI" Destination="ISB" DepartureTime="2020-09-30T16:40:00.000+05:00" ArrivalTime="2020-09-30T20:20:00.000+05:00" FlightTime="220" TravelTime="220" Distance="689"/>
        </ns2:AirSegment>
        <ns2:AirPricingInfo Key="c4amvKeB0BKAyeXSxEAAAA==" IncludesVAT="false" Refundable="true" LatestTicketingTime="2020-09-30T23:59:00.000+05:00" PricingMethod="Manual" ETicketability="Yes" PlatingCarrier="PK" ProviderCode="1G" TotalPrice="PKR12789" BasePrice="USD64.00" ApproximateTotalPrice="PKR12789" ApproximateBasePrice="PKR10660" EquivalentBasePrice="PKR10660" Taxes="PKR2129" ApproximateTaxes="PKR2129">
          <ns2:FareInfo Key="c4amvKeB0BKA2eXSxEAAAA==" FareBasis="VOW1" PassengerTypeCode="ADT" Origin="KHI" Destination="ISB" EffectiveDate="2020-06-22T22:55:00.000+05:00" DepartureDate="2020-09-30" Amount="PKR10660" NotValidBefore="2020-09-30" NotValidAfter="2020-09-30" TaxAmount="PKR2129.00">
            <Endorsement Value="PK ONLY/ NON END"/>
            <ns2:FareRuleKey FareInfoRef="c4amvKeB0BKA2eXSxEAAAA==" ProviderCode="1G">6UUVoSldxwgsGcF8pDKlv8bKj3F8T9EyxsqPcXxP0TLGyo9xfE/RMsuWFfXVd1OAly5qxZ3qLwOXLmrFneovA5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA9PALQF81q3UfTobKkhimR/zd/VTAJtvZT/OzHG3Rk3YJJJkSAQvpY50cxnQxWdzR/FwJcEQI4iTpJgHFBIT7dKF/oTXxxF6MeJYtF79PC3YfoLT9JoAKrPwx9zlz405AudTfBrAWJIW8ww0k2iGxkjg2BMJ0qOmdTyy/Q52QOiIVnkdwDk3yVRgty0eZKuftOaeJIc23zoev4Xvb2u1Qx+/he9va7VDH7+F729rtUMfv4Xvb2u1Qx+/he9va7VDH8ONhV50oNexly5qxZ3qLwMUu+QC5Q/Q9pxPze0DbQQdBsYNTAxfihrqDZAK5p4OA0ljcImafmlT5GwF8kqQiiA=</ns2:FareRuleKey>
            <ns2:FareRuleFailureInfo>
              <ns2:Reason>DayTimeFailure</ns2:Reason>
            </ns2:FareRuleFailureInfo>
            <ns2:Brand Key="c4amvKeB0BKA2eXSxEAAAA==" BrandFound="false" UpSellBrandFound="false"/>
          </ns2:FareInfo>
          <ns2:BookingInfo BookingCode="V" CabinClass="Economy" FareInfoRef="c4amvKeB0BKA2eXSxEAAAA==" SegmentRef="c4amvKeB0BKAueXSxEAAAA==" HostTokenRef="c4amvKeB0BKAxeXSxEAAAA=="/>
          <ns2:TaxInfo Key="c4amvKeB0BKAzeXSxEAAAA==" Category="PK" Amount="PKR1500"/>
          <ns2:TaxInfo Key="c4amvKeB0BKA0eXSxEAAAA==" Category="YI" Amount="PKR20"/>
          <ns2:TaxInfo Key="c4amvKeB0BKA1eXSxEAAAA==" Category="PB" Amount="PKR609"/>
          <ns2:FareCalc>KHI PK ISB 64.00VOW1 USD64.00END</ns2:FareCalc>
          <ns2:PassengerType Code="ADT"/>
          <ns2:ChangePenalty PenaltyApplies="Before Departure">
            <ns2:Amount>PKR2670.0</ns2:Amount>
          </ns2:ChangePenalty>
          <ns2:ChangePenalty PenaltyApplies="After Departure">
            <ns2:Amount>PKR4170.0</ns2:Amount>
          </ns2:ChangePenalty>
          <ns2:CancelPenalty PenaltyApplies="Before Departure">
            <ns2:Amount>PKR2670.0</ns2:Amount>
          </ns2:CancelPenalty>
          <ns2:CancelPenalty PenaltyApplies="After Departure">
            <ns2:Amount>PKR4170.0</ns2:Amount>
          </ns2:CancelPenalty>
          <ns2:BaggageAllowances>
            <ns2:BaggageAllowanceInfo TravelerType="ADT" Origin="KHI" Destination="ISB" Carrier="PK">
              <ns2:URLInfo>
                <ns2:URL>VIEWTRIP.TRAVELPORT.COM/BAGGAGEPOLICY/PK</ns2:URL>
              </ns2:URLInfo>
              <ns2:TextInfo>
                <ns2:Text>35K</ns2:Text>
                <ns2:Text>BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC.</ns2:Text>
              </ns2:TextInfo>
              <ns2:BagDetails ApplicableBags="1stChecked">
                <ns2:BaggageRestriction>
                  <ns2:TextInfo>
                    <ns2:Text>CHGS MAY APPLY IF BAGS EXCEED TTL WT ALLOWANCE</ns2:Text>
                  </ns2:TextInfo>
                </ns2:BaggageRestriction>
              </ns2:BagDetails>
              <ns2:BagDetails ApplicableBags="2ndChecked">
                <ns2:BaggageRestriction>
                  <ns2:TextInfo>
                    <ns2:Text>CHGS MAY APPLY IF BAGS EXCEED TTL WT ALLOWANCE</ns2:Text>
                  </ns2:TextInfo>
                </ns2:BaggageRestriction>
              </ns2:BagDetails>
            </ns2:BaggageAllowanceInfo>
            <ns2:CarryOnAllowanceInfo Origin="KHI" Destination="ISB" Carrier="PK">
              <ns2:TextInfo>
                <ns2:Text>7K</ns2:Text>
              </ns2:TextInfo>
              <ns2:CarryOnDetails ApplicableCarryOnBags="1">
                <ns2:BaggageRestriction>
                  <ns2:TextInfo>
                    <ns2:Text>CHGS MAY APPLY IF BAGS EXCEED TTL WT ALLOWANCE</ns2:Text>
                  </ns2:TextInfo>
                </ns2:BaggageRestriction>
              </ns2:CarryOnDetails>
              <ns2:CarryOnDetails ApplicableCarryOnBags="2">
                <ns2:BaggageRestriction>
                  <ns2:TextInfo>
                    <ns2:Text>CHGS MAY APPLY IF BAGS EXCEED TTL WT ALLOWANCE</ns2:Text>
                  </ns2:TextInfo>
                </ns2:BaggageRestriction>
              </ns2:CarryOnDetails>
            </ns2:CarryOnAllowanceInfo>
          </ns2:BaggageAllowances>
        </ns2:AirPricingInfo>
        <ns2:FareNote Key="c4amvKeB0BKA5eXSxEAAAA==">RATE USED IN EQU TOTAL IS BSR 1USD - 166.5146PKR</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA6eXSxEAAAA==">LAST DATE TO PURCHASE TICKET: 30SEP20</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA7eXSxEAAAA==">TICKETING AGENCY 5Q1Q</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA8eXSxEAAAA==">DEFAULT PLATING CARRIER PK</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA9eXSxEAAAA==">FARE HAS A PLATING CARRIER RESTRICTION</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA+eXSxEAAAA==">E-TKT REQUIRED</ns2:FareNote>
        <ns2:FareNote Key="c4amvKeB0BKA/eXSxEAAAA==">TICKETING FEES MAY APPLY</ns2:FareNote>
        <HostToken Key="c4amvKeB0BKAxeXSxEAAAA==">GFB10101ADT00  01VOW1                                  010001#GFB200010101NADTV3302150004800001992C#GFMCER 302N1500 PK ADTVOW1</HostToken>
      </ns2:AirPricingSolution>
      <ActionStatus Type="TTL" TicketDate="2020-09-30T23:59:00.000+05:00" ProviderCode="1G"/>
    </ns3:AirCreateReservationReq>
  </soap:Body>
</soap:Envelope>

I am getting Payload: Error 404: SRVE0295E: Error reported: 404 as response. I made request to this endpoint: https://emea.universal-api.travelport.com/B2BGateway/connect/uAPI/UniversalRecordService To make sure I am not using wrong endpoint, I sent invalid request xml and then it returned some validation error message but I don't know why it's giving 404 message on complete request.

Please help. Thanks

a-fatah commented 4 years ago

I was able to get the right endpoint which is AirService in this case. But I am getting CHECK FORMAT error now.

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Body>
      <SOAP:Fault>
         <faultcode>Server.System</faultcode>
         <faultstring>Ticketing application failed: CHECK FORMAT</faultstring>
         <detail>
            <common_v49_0:ErrorInfo xmlns:common_v49_0="http://www.travelport.com/schema/common_v49_0">
               <common_v49_0:Code>-1</common_v49_0:Code>
               <common_v49_0:Service>PROVISIONINGSERVICE</common_v49_0:Service>
               <common_v49_0:Type>System</common_v49_0:Type>
               <common_v49_0:Description>Ticketing application failed: CHECK FORMAT</common_v49_0:Description>
               <common_v49_0:TransactionId>DDE34FB00A07406EDDF020DF6B4D0AA5</common_v49_0:TransactionId>
               <common_v49_0:TraceId>d077493c-d0fb-4e78-968c-a88ca1312d8f</common_v49_0:TraceId>
            </common_v49_0:ErrorInfo>
         </detail>
      </SOAP:Fault>
   </SOAP:Body>
</SOAP:Envelope>

I tried ActionStatus/@TicketDate="2020-09-30" and "2020-09-30T23:59:00.000" as well. Both formats are not working.

Thanks

vivekjyotipramanik commented 4 years ago

Hi a-fatah,

Could you please try with the below. Thanks.

a-fatah commented 4 years ago

Thanks @vivekjyotipramanik It is working but why I am unable to use TTL action status ?

vivekjyotipramanik commented 4 years ago

Hi a-fatah,

I believe the reason is PreProduction system, could you please raise a MyTravelport ticket anyway regarding the TTL status. Thanks.