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

Form of Payment Required - Error #241

Closed Hayat-Umar closed 4 years ago

Hayat-Umar commented 4 years ago

Hi, My airline reservation request AirCreateReservationReq and then AirTicketingReq requests working fine until now. But AirTicketingReq suddenly start giving "FORM OF PAYMENT REQUIRED". I am already sending Cash as FormOfPayment in AirCreateReservationReq. My Request/Responses are attached:

AirCreateReservationReq

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:common_v42_0="http://www.travelport.com/schema/common_v42_0">
  <soapenv:Header />
  <soapenv:Body>
    <univ:AirCreateReservationReq xmlns:univ="http://www.travelport.com/schema/universal_v42_0" AuthorizedBy="user" RestrictWaitlist="true" RetainReservation="Both" TargetBranch="P3468561" TraceId="trace">
      <com:BillingPointOfSaleInfo xmlns:com="http://www.travelport.com/schema/common_v42_0" OriginApplication="UAPI" />
      <com:BookingTraveler xmlns:com="http://www.travelport.com/schema/common_v42_0" Key="adt0" TravelerType="ADT">
        <com:BookingTravelerName First="Test" Last="test" Prefix="Mr." />
        <com:DeliveryInfo>
          <com:ShippingAddress>
            <com:Country>PK</com:Country>
          </com:ShippingAddress>
        </com:DeliveryInfo>
        <com:PhoneNumber Number="+923311234567" />
        <com:PhoneNumber AreaCode="021" CountryCode="92" Location="KHI" Number="0211234567" Type="Business" />
        <!--Princeton Helpline -->
        <com:Email EmailID="test@dummy.com" Type="Home" />
        <com:NameRemark Category="CNIC">
          <com:RemarkData>10111-1111111-1</com:RemarkData>
        </com:NameRemark>
        <com:Address>
          <com:Country>PK</com:Country>
        </com:Address>
      </com:BookingTraveler>
      <com:ContinuityCheckOverride xmlns:com="http://www.travelport.com/schema/common_v42_0" />
      <com:FormOfPayment xmlns:com="http://www.travelport.com/schema/common_v42_0" Key="jwt2mcK1Qp27I2xfpcCtAw==" Type="Cash" />
      <air:AirPricingSolution xmlns:air="http://www.travelport.com/schema/air_v42_0" ApproximateBasePrice="PKR13870" ApproximateTotalPrice="PKR16160" BasePrice="USD83.00" EquivalentBasePrice="PKR13870" Key="JaqjnFBAAA/BVQq7jCAAAA==" QuoteDate="2020-04-15" Taxes="PKR2290" TotalPrice="PKR16160">
        <air:AirSegment Key="JaqjnFBAAA/BTQq7jCAAAA==" Group="0" Carrier="PK" FlightNumber="315" ProviderCode="1G" Origin="LHE" Destination="KHI" DepartureTime="2020-06-30T16:45:00.000+05:00" ArrivalTime="2020-06-30T18:30:00.000+05:00" FlightTime="105" TravelTime="105" Distance="636" ClassOfService="U" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="true" AvailabilitySource="D" PolledAvailabilityOption="O and D cache or polled status used with different local status" AvailabilityDisplayType="Fare Specific Fare Quote Unbooked">
          <air:CodeshareInfo OperatingCarrier="PK">Pakistan International Airlines</air:CodeshareInfo>
          <air:FlightDetails Key="JaqjnFBAAA/BUQq7jCAAAA==" Origin="LHE" Destination="KHI" DepartureTime="2020-06-30T16:45:00.000+05:00" ArrivalTime="2020-06-30T18:30:00.000+05:00" FlightTime="105" TravelTime="105" Distance="636" />
        </air:AirSegment>
        <air:AirPricingInfo Key="JaqjnFBAAA/BXQq7jCAAAA==" TotalPrice="PKR16160" BasePrice="USD83.00" ApproximateTotalPrice="PKR16160" ApproximateBasePrice="PKR13870" EquivalentBasePrice="PKR13870" ApproximateTaxes="PKR2290" Taxes="PKR2290" LatestTicketingTime="2020-06-30T23:59:00.000+05:00" PricingMethod="Guaranteed" Refundable="true" IncludesVAT="false">
          <air:FareInfo Key="JaqjnFBAAA/BbQq7jCAAAA==" FareBasis="UOW1" PassengerTypeCode="ADT" Origin="LHE" Destination="KHI" EffectiveDate="2020-04-15T22:57:00.000+05:00" DepartureDate="2020-06-30" Amount="PKR13870" NotValidBefore="2020-06-30" NotValidAfter="2020-06-30">
            <air:FareRuleKey FareInfoRef="JaqjnFBAAA/BbQq7jCAAAA==" ProviderCode="1G">6UUVoSldxwi8UvSHCYJ/RMbKj3F8T9EyxsqPcXxP0TLGyo9xfE/RMsuWFfXVd1OAly5qxZ3qLwOXLmrFneovA5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA9PALQF81q3UfTobKkhimR/zd/VTAJtvZfW9QYLKMdlCJJJkSAQvpY50cxnQxWdzR1vsIjtu02LzzYSr0zqX54eF/oTXxxF6MeJYtF79PC3YfoLT9JoAKrPwx9zlz405AudTfBrAWJIW8ww0k2iGxkjg2BMJ0qOmdTyy/Q52QOiIn746GlH2ck2duwz/kYqEh+aeJIc23zoev4Xvb2u1Qx+/he9va7VDH7+F729rtUMfv4Xvb2u1Qx+/he9va7VDH8ONhV50oNexly5qxZ3qLwMUu+QC5Q/Q9pxPze0DbQQdBsYNTAxfiho/nSeV0UNDqEljcImafmlT5GwF8kqQiiA=</air:FareRuleKey>
            <air:Brand Key="JaqjnFBAAA/BbQq7jCAAAA==" BrandFound="false" />
          </air:FareInfo>
          <air:BookingInfo BookingCode="U" CabinClass="Economy" FareInfoRef="JaqjnFBAAA/BbQq7jCAAAA==" SegmentRef="JaqjnFBAAA/BTQq7jCAAAA==" HostTokenRef="JaqjnFBAAA/BWQq7jCAAAA==" />
          <air:TaxInfo Category="PK" Amount="PKR1500" Key="JaqjnFBAAA/BYQq7jCAAAA==" />
          <air:TaxInfo Category="YI" Amount="PKR20" Key="JaqjnFBAAA/BZQq7jCAAAA==" />
          <air:TaxInfo Category="PB" Amount="PKR770" Key="JaqjnFBAAA/BaQq7jCAAAA==" />
          <air:FareCalc>LHE PK KHI 83.00UOW1 USD83.00END</air:FareCalc>
          <air:PassengerType Code="ADT" BookingTravelerRef="adt0" />
          <air:ChangePenalty>
            <air:Amount>PKR4180.0</air:Amount>
          </air:ChangePenalty>
          <air:CancelPenalty>
            <air:Amount>PKR4180.0</air:Amount>
          </air:CancelPenalty>
          <air:BaggageAllowances>
            <air:BaggageAllowanceInfo Origin="LHE" Destination="KHI" Carrier="PK">
              <air:TextInfo>
                <air:Text>20K</air:Text>
                <air:Text>BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC.</air:Text>
              </air:TextInfo>
            </air:BaggageAllowanceInfo>
          </air:BaggageAllowances>
        </air:AirPricingInfo>
        <common_v42_0:HostToken Key="JaqjnFBAAA/BWQq7jCAAAA==">GFB10101ADT00  01UOW1                                  010001#GFB200010101NADTV3302150004800001992J#GFMCER 302N1500 PK ADTUOW1</common_v42_0:HostToken>
      </air:AirPricingSolution>
      <com:ActionStatus xmlns:com="http://www.travelport.com/schema/common_v42_0" ProviderCode="1G" TicketDate="2020-04-15T23:57:41" Type="TAW" />
      <air:AutoSeatAssignment xmlns:air="http://www.travelport.com/schema/air_v42_0" BookingTravelerRef="adt0" SeatType="Any" SegmentRef="JaqjnFBAAA/BTQq7jCAAAA=="></air:AutoSeatAssignment>
    </univ:AirCreateReservationReq>
  </soapenv:Body>
</soapenv:Envelope>

AirCreateReservationRsp

<universal:AirCreateReservationRsp TraceId="trace" TransactionId="7F09779D0A07425EB499A0CBE1A4177D" ResponseTime="3073" xmlns:universal="http://www.travelport.com/schema/universal_v42_0" xmlns:common_v42_0="http://www.travelport.com/schema/common_v42_0" xmlns:air="http://www.travelport.com/schema/air_v42_0">
  <common_v42_0:ResponseMessage Code="0" Type="Warning" ProviderCode="1G">AutoSeatAssignment is applicable for all BookingTravelers for the requested Provider.</common_v42_0:ResponseMessage>
  <common_v42_0:ResponseMessage Code="0" Type="Warning" ProviderCode="1G">Street Address application failed: CHECK SUBFIELD - USE GALILEO FORMAT</common_v42_0:ResponseMessage>
  <common_v42_0:ResponseMessage Code="1" Type="Warning" ProviderCode="1G">Delivery Address application failed: CHECK SUBFIELD - USE GALILEO FORMAT0046EROR000F0001          F CHECK PAYMENT TYPE</common_v42_0:ResponseMessage>
  <universal:UniversalRecord LocatorCode="5IKWHA" Version="0" Status="Active">
    <common_v42_0:BookingTraveler Key="3HrjnFBAAA/BoXgClCAAAA==" TravelerType="ADT" ElStat="A">
      <common_v42_0:BookingTravelerName Prefix="Mr." First="Test" Last="test" />
      <common_v42_0:DeliveryInfo>
        <common_v42_0:ShippingAddress Key="3HrjnFBAAA/BtXgClCAAAA==" ElStat="A">
          <common_v42_0:AddressName>TESTMR TEST</common_v42_0:AddressName>
          <common_v42_0:Country>PK</common_v42_0:Country>
        </common_v42_0:ShippingAddress>
      </common_v42_0:DeliveryInfo>
      <common_v42_0:PhoneNumber Key="3HrjnFBAAA/BpXgClCAAAA==" Type="None" Location="KHI" Number=" 923311234567" ElStat="A">
        <common_v42_0:ProviderReservationInfoRef Key="3HrjnFBAAA/BBbqClCAAAA==" />
      </common_v42_0:PhoneNumber>
      <common_v42_0:PhoneNumber Key="3HrjnFBAAA/BqXgClCAAAA==" Type="Business" Location="KHI" CountryCode="92" Number="0211234567" AreaCode="021" ElStat="A">
        <common_v42_0:ProviderReservationInfoRef Key="3HrjnFBAAA/BBbqClCAAAA==" />
      </common_v42_0:PhoneNumber>
      <common_v42_0:Email Key="3HrjnFBAAA/BrXgClCAAAA==" Type="Home" EmailID="test@dummy.com" ElStat="A">
        <common_v42_0:ProviderReservationInfoRef Key="3HrjnFBAAA/BBbqClCAAAA==" />
      </common_v42_0:Email>
      <common_v42_0:NameRemark Key="3HrjnFBAAA/BsXgClCAAAA==" Category="CNIC" ElStat="A">
        <common_v42_0:RemarkData>10111-1111111-1</common_v42_0:RemarkData>
        <common_v42_0:ProviderReservationInfoRef Key="3HrjnFBAAA/BBbqClCAAAA==" />
      </common_v42_0:NameRemark>
      <common_v42_0:Address Key="3HrjnFBAAA/BuXgClCAAAA==" ElStat="A">
        <common_v42_0:AddressName>TESTMR TEST</common_v42_0:AddressName>
        <common_v42_0:Country>PK</common_v42_0:Country>
      </common_v42_0:Address>
    </common_v42_0:BookingTraveler>
    <common_v42_0:ActionStatus Key="3HrjnFBAAA/BvXgClCAAAA==" Type="TAW" TicketDate="2020-04-15T23:57:00.000+05:00" ProviderReservationInfoRef="3HrjnFBAAA/BBbqClCAAAA==" ProviderCode="1G" ElStat="A" />
    <universal:ProviderReservationInfo Key="3HrjnFBAAA/BBbqClCAAAA==" ProviderCode="1G" LocatorCode="QHB4BO" CreateDate="2020-04-15T18:11:02.136+00:00" ModifiedDate="2020-04-15T18:11:02.136+00:00" HostCreateDate="2020-04-15" OwningPCC="5PE9" />
    <air:AirReservation LocatorCode="5IKWHI" CreateDate="2020-04-15T18:11:01.713+00:00" ModifiedDate="2020-04-15T18:11:02.136+00:00">
      <common_v42_0:BookingTravelerRef Key="3HrjnFBAAA/BoXgClCAAAA==" />
      <common_v42_0:ProviderReservationInfoRef Key="3HrjnFBAAA/BBbqClCAAAA==" />
      <air:AirSegment Key="JaqjnFBAAA/BTQq7jCAAAA==" Group="0" Carrier="PK" CabinClass="Economy" FlightNumber="315" ProviderCode="1G" Origin="LHE" Destination="KHI" DepartureTime="2020-06-30T16:45:00.000+05:00" ArrivalTime="2020-06-30T18:30:00.000+05:00" TravelTime="105" Distance="636" ClassOfService="U" ETicketability="Yes" Equipment="320" Status="NO" ChangeOfPlane="false" GuaranteedPaymentCarrier="No" ProviderReservationInfoRef="3HrjnFBAAA/BBbqClCAAAA==" TravelOrder="1" ProviderSegmentOrder="1" OptionalServicesIndicator="false" ElStat="A">
        <air:FlightDetails Key="JaqjnFBAAA/BUQq7jCAAAA==" Origin="LHE" Destination="KHI" DepartureTime="2020-06-30T16:45:00.000+05:00" ArrivalTime="2020-06-30T18:30:00.000+05:00" FlightTime="105" TravelTime="105" Equipment="320" AutomatedCheckin="false" ElStat="A" />
      </air:AirSegment>
      <air:AirPricingInfo Key="JaqjnFBAAA/BXQq7jCAAAA==" TotalPrice="PKR16160" BasePrice="USD83.00" ApproximateTotalPrice="PKR16160" ApproximateBasePrice="PKR13870" EquivalentBasePrice="PKR13870" Taxes="PKR2290" LatestTicketingTime="2020-04-15T23:59:00.000+05:00" TrueLastDateToTicket="2020-06-30T23:59:00.000+05:00" PricingMethod="Guaranteed" Refundable="true" Exchangeable="true" IncludesVAT="false" ETicketability="Yes" ProviderCode="1G" ProviderReservationInfoRef="3HrjnFBAAA/BBbqClCAAAA==" AirPricingInfoGroup="1" PricingType="StoredFare" ElStat="A" FareCalculationInd="G">
        <air:FareInfo Key="JaqjnFBAAA/BbQq7jCAAAA==" FareBasis="UOW1" PassengerTypeCode="ADT" Origin="LHE" Destination="KHI" EffectiveDate="2020-04-15T00:00:00.000+05:00" Amount="USD83.00" NotValidBefore="2020-06-30" NotValidAfter="2020-06-30" PseudoCityCode="5PE9" ElStat="A">
          <common_v42_0:Endorsement Value="PK ONLY/ NON END" />
          <air:BaggageAllowance>
            <air:MaxWeight Value="20" Unit="Kilograms" />
          </air:BaggageAllowance>
        </air:FareInfo>
        <air:BookingInfo BookingCode="U" CabinClass="Economy" FareInfoRef="JaqjnFBAAA/BbQq7jCAAAA==" SegmentRef="JaqjnFBAAA/BTQq7jCAAAA==" />
        <air:TaxInfo Category="PK" Amount="PKR1500" Key="JaqjnFBAAA/BYQq7jCAAAA==" />
        <air:TaxInfo Category="YI" Amount="PKR20" Key="JaqjnFBAAA/BZQq7jCAAAA==" />
        <air:TaxInfo Category="PB" Amount="PKR770" Key="JaqjnFBAAA/BaQq7jCAAAA==" />
        <air:FareCalc>LHE PK KHI 83.00UOW1 USD83.00END</air:FareCalc>
        <air:PassengerType Code="ADT" BookingTravelerRef="3HrjnFBAAA/BoXgClCAAAA==">
          <air:FareGuaranteeInfo GuaranteeType="Invalid" />
        </air:PassengerType>
        <common_v42_0:BookingTravelerRef Key="3HrjnFBAAA/BoXgClCAAAA==" />
        <air:ChangePenalty>
          <air:Amount>PKR4180.0</air:Amount>
        </air:ChangePenalty>
        <air:CancelPenalty>
          <air:Amount>PKR4180.0</air:Amount>
        </air:CancelPenalty>
        <air:TicketingModifiersRef Key="3HrjnFBAAA/BFbqClCAAAA==" />
      </air:AirPricingInfo>
      <air:TicketingModifiers PlatingCarrier="PK" Key="3HrjnFBAAA/BFbqClCAAAA==" ElStat="A">
        <air:DocumentSelect IssueElectronicTicket="true" />
      </air:TicketingModifiers>
    </air:AirReservation>
    <common_v42_0:GeneralRemark Key="3HrjnFBAAA/B9aqClCAAAA==" Category="Vendor" TypeInGds="Vendor" SupplierType="Air" ProviderReservationInfoRef="3HrjnFBAAA/BBbqClCAAAA==" SupplierCode="PK" Direction="Incoming" CreateDate="2020-04-15T18:11:00.000+00:00" ElStat="C">
      <common_v42_0:RemarkData>FICTIVE NAMES</common_v42_0:RemarkData>
    </common_v42_0:GeneralRemark>
    <common_v42_0:GeneralRemark Key="3HrjnFBAAA/B+aqClCAAAA==" Category="Vendor" TypeInGds="Vendor" SupplierType="Air" ProviderReservationInfoRef="3HrjnFBAAA/BBbqClCAAAA==" SupplierCode="PK" Direction="Incoming" CreateDate="2020-04-15T18:11:00.000+00:00" ElStat="C">
      <common_v42_0:RemarkData>FICTIVE NAMES</common_v42_0:RemarkData>
    </common_v42_0:GeneralRemark>
    <common_v42_0:AgencyInfo>
      <common_v42_0:AgentAction ActionType="Created" AgentCode="uAPI5887624131-353671c4" BranchCode="P3468561" AgencyCode="S3468554" EventTime="2020-04-15T18:10:59.227+00:00" />
    </common_v42_0:AgencyInfo>
  </universal:UniversalRecord>
</universal:AirCreateReservationRsp>

I can see a warning message related to delivery address having something regarding Payment Type as well. Which seems weird to me.

vivekjyotipramanik commented 4 years ago

Hi Hayat-Umar,

The reservation is having issues due to delivery address. Could you please try with proper delivery address. Thanks.

https://support.travelport.com/webhelp/uapi/uapi.htm#SampleWeb/XMLFiles/1G_Air_Vehicle_Hotel/Air%20Book-PASS.txt

Hayat-Umar commented 4 years ago

Hi Hayat-Umar,

The reservation is having issues due to delivery address. Could you please try with proper delivery address. Thanks.

https://support.travelport.com/webhelp/uapi/uapi.htm#SampleWeb/XMLFiles/1G_Air_Vehicle_Hotel/Air%20Book-PASS.txt

Alright let me try again. But it was working fine earlier :( Also i was unable to add FOP using UniversalRecordModifyReq with the following request payload

UniversalRecordModifyReq

<?xml version="1.0" encoding="utf-16"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.travelport.com/schema/common_v49_0" xmlns:ns2="http://www.travelport.com/schema/universal_v49_0">
  <SOAP-ENV:Body>
    <ns2:UniversalRecordModifyReq TargetBranch="P3468561" Version="2">
      <ns1:BillingPointOfSaleInfo OriginApplication="UAPI" />
      <ns2:RecordIdentifier UniversalLocatorCode="5IJL0T" ProviderCode="1G" ProviderLocatorCode="Q32S60" />
      <ns2:UniversalModifyCmd Key="KEY123456xxx1">
        <ns2:UniversalAdd Key="Key3310xxx1">
          <ns1:FormOfPayment Key="KeyPay123456xxx12" Type="Cash" Reusable="false" ProfileKey="KeyPay123456xxx12PK">
            <ns1:ProviderReservationInfoRef Key="DKSqnFQc1BKAmOqDgCAAAA==" />
          </ns1:FormOfPayment>
        </ns2:UniversalAdd>
      </ns2:UniversalModifyCmd>
    </ns2:UniversalRecordModifyReq>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

UniversalRecordModifyRsp

<SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <faultcode>Server.Business</faultcode>
  <faultstring>UR Modify Service Error.</faultstring>
  <detail>
    <universal:UniversalModifyErrorInfo xmlns:universal="http://www.travelport.com/schema/universal_v49_0" xmlns:common_v49_0="http://www.travelport.com/schema/common_v49_0">
      <common_v49_0:Code>3539</common_v49_0:Code>
      <common_v49_0:Service>URSVC</common_v49_0:Service>
      <common_v49_0:Type>Business</common_v49_0:Type>
      <common_v49_0:Description>UR Modify Service Error.</common_v49_0:Description>
      <common_v49_0:TransactionId>8DC87CAB0A0E561CEAF4553F8F2F63A0</common_v49_0:TransactionId>
      <universal:UniversalModifyCommandError UniversalModifyCmdKey="KEY123456xxx1">Indicates FOP application failed: CHECK PAYMENT TYPE</universal:UniversalModifyCommandError>
    </universal:UniversalModifyErrorInfo>
  </detail>
</SOAP:Fault>

Is it was also due to absence of delivery address?

vivekjyotipramanik commented 4 years ago

Hi Hayat-Umar,

It is quite possible that the Airlines does not allow Cash FOP. If that is not the case, it might be an issue and I would recommend create a ticket in My.Travelport.com and we will pick it up from there. Thanks.

Hayat-Umar commented 4 years ago

Hi Hayat-Umar,

It is quite possible that the Airlines does not allow Cash FOP. If that is not the case, it might be an issue and I would recommend create a ticket in My.Travelport.com and we will pick it up from there. Thanks.

Hi, Our major carrier for booking is PK/PIA which was working fine with Cash as FOP earlier. I am going to generate a ticket. One thing i just want to confirm is that our Agency directly pay amount to Airline and we just issue tickets from available quota after successful reservation and payment from customer. So, Is it right FOP for this scenario or i should use something else like AgencyInvoice or something?

Thanks

vivekjyotipramanik commented 4 years ago

Hi Hayat-Umar,

Cash as FOP is fine in this case. Thanks.