-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Tour code (FT element) #90
Comments
As you say, the I just put it on my to-do list. I can't give any guarantees, but I'll try to do it this week... |
Thanks, i really appreciate your help. |
Hi, I've implemented Tour Code element support in PNR_AddMultiElements. Check out the sample in the documentation. If you run into any problems using this, don't hesitate to re-open this issue! |
I just wanted to add: it's currently available on the master branch so you can try it by putting the The feature will be included in the upcoming 1.5.0 release. |
Thank you for your help. |
Hi, |
If you're not using composer, you'll need to update all the files I've modified in the commits that are linked above (well, all the php files anyway) but I really recommend you start using Composer ;) |
Sure, and one other thing, if I want to log the XML sent by the API to Amadeus, what should I do is there any option or setting to do that easily? Thanks, |
Hi, $params = new Params([
'sessionHandlerParams' => [
'logger' => $msgsLog
// Other parameters omitted in this example
]
]);
try {
$client = new Client($params);
} catch (Exception $e) {
var_dump($e);
} Result:
Regards, |
Can you give me a snippet of your total code constructing your client object? |
I did solve it, now don't have any error but still, the log file is not created, if I use the example of monolog--> $msgsLog = new Logger('RequestResponseLogs');
$msgsLog->pushHandler(new StreamHandler('C:\....\httpdocs\api\src\Amadeus\Client\requestresponse.log', Logger::INFO));
$params = new Params([
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V4,
'wsdl' => 'wsdl/1ASIWBEYIEB_PDT_20170424_074534.wsdl',
'stateful' => false,
'logger' => $msgsLog,
'authParams' => [
'officeId' => 'xxxxx',
'userId' => 'xxxxx',
'passwordData' => 'xxxxxx'
]
],
'requestCreatorParams' => [
'receivedFrom' => 'xxxxxx'
]
]);
$client = new Client($params);
return $client; |
I think we're going beyond the scope of this library here... I'm not really in a position to provide support for Monolog. |
Yes, I understand, but the thing is that monolog is working fine alone, the log file is created when I call the log command, but when I send it through the client object nothing happens, I tried several booking. Can you please help me with this? |
And what response object are you getting from the library when you try to send the message? If the library is somehow unable to do the call due to incorrect configuration, it will not try to send a message but throw an exception earlier. In that case it won't log anything. |
let's take this example $msgsLog = new Logger('RequestResponseLogs');
$msgsLog->pushHandler(new StreamHandler('C:\...\httpdocs\api\src\Amadeus\Client\requestresponse.log', Logger::INFO));
$params = new Params([
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V4,
'wsdl' => 'wsdl/1ASIWBEYIEB_PDT_20170424_074534.wsdl',
'stateful' => false,
'logger' => $msgsLog,
'authParams' => [
'officeId' => 'xxxxx',
'userId' => 'xxxxx',
'passwordData' => 'xxxxxx'
]
],
'requestCreatorParams' => [
'receivedFrom' => 'xxxxxx'
]
]);
$client = new Client($params);
$pnrResult = $client->pnrRetrieve(
new PnrRetrieveOptions(['recordLocator' => 'ABC123'])
); Is there anything else i should add or any other call i should make to get the log file for the above action. |
Well, I'm not sure if a relative path to your WSDL file will work, so that could be one reason why it fails. Apart from that, you could get an error if you don't have the PNR_Retrieve message in your WSDL. Those are the two main reasons why it's possible that nothing gets logged to the logfile. What do you actually get when you try? |
I'm trying to log my booking request so i could find out if my request contains the FM commission and tourCode nodes, I'm getting a successful booking with a Valid PNR but I'm unable to send the FM and TourCode, that's why I'm trying to log my booking request to see if the "FM / TourCode" XML nodes exist. |
Now I'm able to log $client->getLastRequest() so for this point, i got what I'm looking for but, it seems like my request is missing the FM commission and the TourCode. |
Did you add the Tour Code FT element as shown in the docs? https://github.com/amabnl/amadeus-ws-client/blob/master/docs/samples/pnr-create-modify.rst#tour-code-ft-free-flow-format And did you add the manual commission element as shown in the docs? https://github.com/amabnl/amadeus-ws-client/blob/master/docs/samples/pnr-create-modify.rst#manual-commission-fm |
Yes I did, and I tried to log the create PNR XML of a successful booking I got the following: <ns1:dataElementsIndiv>
<ns1:elementManagementData>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>6</ns1:number>
</ns1:reference>
<ns1:segmentName>FM</ns1:segmentName>
</ns1:elementManagementData>
<ns1:commission>
<ns1:passengerType>PAX</ns1:passengerType>
<ns1:indicator>FM</ns1:indicator>
<ns1:commissionInfo>
<ns1:percentage>5</ns1:percentage>
</ns1:commissionInfo>
</ns1:commission>
</ns1:dataElementsIndiv>
<ns1:dataElementsIndiv>
<ns1:elementManagementData>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>7</ns1:number>
</ns1:reference>
<ns1:segmentName>FT</ns1:segmentName>
</ns1:elementManagementData>
<ns1:tourCode>
<ns1:passengerType>PAX</ns1:passengerType>
<ns1:freeFormatTour>
<ns1:indicator>FF</ns1:indicator>
<ns1:freetext>BEYAGT05</ns1:freetext>
</ns1:freeFormatTour>
</ns1:tourCode>
</ns1:dataElementsIndiv> Booking is successful ticket has been issued TourCode is well received as we checked on the system, but commission still 0 % on the system. is there anything missing in my call / XML. |
|
Hey, sorry I was contacting Amadeus, it seems that commission on our account was set to automatic, they switch it to manual, now everything is working as expected. I'm sorry for wasting your time, and thanks again. |
No problem, good to hear it's solved |
Version 1.5.0 is released now. You can use this feature on a stable release now by |
…dBabyToItinRead to master * commit '007c4fe68b5dc0bb4c9a311e641d23239f487875': add baby to ItinResponse
Hello,
is there any way to add tourCode element to PNR_AddMultiElements.
thanks,
The text was updated successfully, but these errors were encountered: