Travelport / travelport-uapi-tutorial-c-sharp

The travelport-uapi-tutorial-c-sharp is a C# project for Universal API that will help you connect and code a standard Air availablity call and Hotel search, details, and booking flow.
34 stars 30 forks source link

Unsuccessful primary host transaction causing reservation failure #221

Open YousifALF opened 3 years ago

YousifALF commented 3 years ago

Hello, I am trying to book a ticket with "AirCreateReservation" after "AirPriceRsp", but I am getting different errors with "FormOfPayment" If I am using the Type as cash, then I am getting this:- Invalid data for a form of payment type:: If formOfPayment type is cash, you cannot specify other form of payment element If I am using the Type as Credit, then I am getting this:- "Unsuccessful primary host transaction causing reservation failure." Note: I am using Test Credit Card from my bank as I understand travelport doesn't provide the testing card.

AlbinaAziz commented 3 years ago

While making request of AirCreateReservation, you have to set all the attributes of AirSegment of AirPriceRsp in AirCreateReservation.

RicOsiro commented 3 years ago

hi,

the FOP - FormOfPayment is not a mandatory parameter to create a booking. So, my first recommendation is to create the booking without FOP, if it is OK, add the element of FOP. Then the error could be isolated. The FOP is a simple element with few parameters. The AirPricingSolution element is most important parameter and it must be filled with all required values.

If you add the request and response I could check some it.

YousifALF commented 3 years ago

@RicOsiro I Removed the FOP from my request, but still getting the same error now (even when tried with a different API ) Error Message is (Unsuccessful primary host transaction causing reservation failure.), I made changes to my code to look exactly like the sample code to avoid any development issue from my side, but still getting the same error result I used this function to generate the XML Code
GitFunctions.txt you can find the XML Code for my Booking Request In the File Below : BookingXMLGit.txt

I even tried with generated XML From the Demo site in the Travelport Test Tool , i got the same error same error. DemoXML.txt

image

FYI : Also iam getting some erros in the demo site as well like this image

Will b so grateful if u helped me out

RicOsiro commented 3 years ago

hi,

the demo site is working, the 13DWU4 was created, you could retrieve it. Please, check which environment are you calling, production or pre-prod? production is not allowed to book flights. The xml request from demo site should work on test tool also, the difference here is the credentials and/or the environment. Maybe the credentials was expired, exclusive credentials for demo site expires in 30 days. If you have signed the contract you could also open a ticket to support to verify the credentials and request.

Also, in the file "BookingXMLGit.txt" there is a soapenv:Header,

http://localhost:8080/kestrel/AirService

is the SOAPAction sent on http header too?

YousifALF commented 2 years ago

@RicOsiro I am using 30 Days Trail API access only. and abut the XML Sample it generated from "BeforeSendRequest" Fcuntion From the WSDL Files

RicOsiro commented 2 years ago

Hi,

the method BeforeSendRequest it not enough to make sure that all headers was sent, these http headers is not saved on the file and the method depends of context variables to fill the headers. Compare the 2 XMLs you sent, only the BookingXMLGit.txt has the soapheader, it is different the http header. A suggestion is to use a neutral tool the test your credential and XML, you can use the SoapUI(http://www.soapui.org) or Postman(https://go.postman.co/home), the similar way the test tool do it.

I've just create another booking 13IPRU, please try another origin-destination and date to have a valid XMLs, not only the structure but also the values inside the XMLs, remember this is not a production environment, so some flights is not available to book even in the test tool.

YousifALF commented 2 years ago

Hello @RicOsiro

for now even the Air Pricing function stopped working, as previously it was working as expected now I am getting this error "000002 INVALID INPUT", I have used the postman for the air pricing and got the same error (you can check my request below ). and I got the same error when using the custom credentials from the Demo site. AirPricingDemp

so I am getting this error from our app, from PostMan request and the same as the demo site. so as you, mentioned if the demo site working as you can do booking then it something in the environment or my Testing credentials, taking the fact that I tested each function in three different environments (Our app, PostMan, test tool APP, Demo Site ) and getting the same error it's mean there is something wrong with the credential and FYI we changed these credentials before Couple of weeks ago. Please suggest.
Regards.

XML Samples used in Post Man in the attached file.

AirPricingXML.txt

RicOsiro commented 2 years ago

Hi,

the xml is working, but I've just tested it, also on test tool. But, again it has the SOAP Action inside of Envelope, make sure to send it on Http header, it is not mandatory on Soap envelope. Maybe that moment the environment was unavailable or even that route. But the XML is ok

About you credential, I suggest to contact a Travelport commercial representative to request a permanent credential. You can also fill the Sale Inquiry form at https://www.travelport.com/contact to request a contact.