amabnl / amadeus-ws-client Goto Github PK
View Code? Open in Web Editor NEWPHP Amadeus SOAP Web Service client library
License: Apache License 2.0
PHP Amadeus SOAP Web Service client library
License: Apache License 2.0
Hey, I just wonder because I see some basic implementation of Fare Families but as I understand it is only for response right?
If I would like to send parameterized Fare Families with request, it is not yet possible right? :)
Hello Sir,
Could you kindly share me the example of special service request(SSR) (eg wheel chair request, Spacial meal request) with PNR_AddMultiElements request?
Thanks in Advance
s ratheepan
Hello,
How do I add FM with PNR_AddMultiElements to PNR?
I think it is already implemented. Any example will be appreciated.
Thanks
Hello Friend,
Thank you very much for amadeus library.
I am using this library for my Project. My client have some additional features on Flight search (Fare_MasterPricerTravelBoardSearch) i need some information on following scenario
Thanks in Advance
S Ratheepan
In FareMasterPricerTbSearch I can use:
'requestedFlightTypes' => [Client\RequestOptions\FareMasterPricerTbSearch::FLIGHTTYPE_NONSTOP,];
if I don't want any stops at all.
Is it possible to search for example maximum 2 stops?
Hello Sir,\
i have created a round trip search( from CMB to MAA and MAA to CMB).
i
am confusing with relationship between pricing and flight segments.
[segmentFlightRef] => stdClass Object
(
[referencingDetail] => Array
(
[0] => stdClass Object
(
[refQualifier] => S
[refNumber] => 1
)[1] => stdClass Object
(
[refQualifier] => S
[refNumber] => 1
)
[2] => stdClass Object
(
[refQualifier] => B
[refNumber] => 1
)
)
)`
Above scenario relate with flight segments?
And
Could you kind explain the logic and relationship between pricing and proposed flight segments.?
Here i attached Full sample response
https://docs.google.com/document/d/1IAFxEA-TLZ_SQiD7HQQJEeKPfnaPuO58AGMlkdaS1gI/edit
Thanks in Advance
The one part that takes a lot of time when implementing a new message in the amadeus-ws-client
is manually having to create all the classes of the request object in the Amadeus\Client\Struct
namespace.
It would be ideal - both for our own development as well as for contributors or people who use and extend this client to their own needs - is we could provide an easy way to convert a request XML XSD to a set of PHP classes in the correct namespace which could then be used to generate the correct request message based on the options that were provided.
Hello all,
I need to get the outgoing XML message for every request that is send to the Amadeus API. I am able to gather the incoming XML message from the aforementioned API (using $response->responseXml
) but I wasn't able to locate a similar functionality for getting the request XML. Is it possible to get that XML without using a workaround with loggers?
Hello Sir
i am getting different sessionid or Air_SellFromRecommendation and pnr_addmultielements
Both request i send with following params
$params = new Params([
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V4, //This is the default value, can be omitted.
'wsdl' => 'custom/include/Amadeus/Amadeus/1ASIWTNCHED_PDT_20161024_055327.wsdl',
'stateful' => true,
// 'logger' => new Psr\Log\NullLogger(),
'authParams' => [
'officeId' => 'MAAVSSS',
'userId' => 'AAAAAAA',
'passwordData' => base64_encode('AMADEUS')
]
],
'requestCreatorParams' => [
'receivedFrom' => 'my test project' // The "Received From" string that will be visible in PNR History
]
]);
$client = new Client($params);
Do i need add sessionid with second request. ?
Could you kindly check that?
Thanks in Advance
We need to implement a session handler for Soap Header V2 WSAP's to support legacy applications.
This will have to include a way to restore a previously existing session in order to support an application-provided session pooling system.
Hey, any plans to support ATC flow?
There are few new endpoints required, the hardest one being Ticket_ATCShopperMasterPricerCalendar
and Ticket_ATCShopperMasterPricerTravelBoard
.
We are in process of getting access to the second round of Amadeus certification for ATC and I was wondering if you could help us with it. :)
New information from Amadeus, they now provide WSAP's with multiple WSDL's:
There are multiple WSDL files inside a WSAP and this is actually one of the new things to handle. Because what happened is the new native XML web services within Amadeus have been created as “interfaces” and split in several WSDL files by area (one per interfaces).
We will have to find an easy way to handle multiple WSDL files (multiple \SoapClient
objects?) and select the correct SoapClient depending on which message is being sent.
Output of php -v
:
PHP 7.0.10 (cli) (built: Aug 31 2016 00:26:56) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies
Output of cat /etc/*release*
:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Environment details:
Docker container (Dockerfile)
composer.json
{
"require": {
"amabnl/amadeus-ws-client": "dev-develop",
"symfony/var-dumper": "^3.1"
}
}
index.php
<?php
require 'vendor/autoload.php';
use Amadeus\Client;
use Amadeus\Client\Params;
use Amadeus\Client\Params\AuthParams;
use Amadeus\Client\RequestOptions\CommandCrypticOptions;
use Amadeus\Client\Result;
$authParams = new AuthParams(
[
'officeId' => 'OFFICE_HERE', //The Amadeus Office Id you want to sign in to - must be open on your WSAP.
'userId' => 'USER_ID_HERE', //Also known as 'Originator' for Soap Header 1 & 2 WSDL's
'passwordData' => 'PASSWORD_HERE', // **base 64 encoded** password
'passwordLength' => N,
'dutyCode' => 'SU',
'organizationId' => 'NMC-RUSSIA',
]
);
$params = new Params(
[
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V2,
//Points to the location of the WSDL file for your WSAP. Make sure the associated XSD's are also available.
'wsdl' => __DIR__ . '/WSDL_FOLDER/WSDL_NAME.wsdl',
'logger' => new Psr\Log\NullLogger()
],
'authParams' => $authParams,
'requestCreatorParams' => [
'receivedFrom' => 'ws client test project' // The "Received From" string that will be visible in PNR History
],
]
);
$client = new Client($params);
$authResult = $client->securityAuthenticate();
if ($authResult->status === Result::STATUS_OK) {
$opt = new CommandCrypticOptions(
[
'entry' => 'DAC LON'
]
);
$crypticResponse = $client->commandCryptic($opt);
dump($crypticResponse);
}
Steps to reproduce the issue:
composer install
php index.php
Results i have received:
Amadeus\Client\Result {#16
+status: "FATAL"
+messages: array:1 [
0 => Amadeus\Client\Result\NotOk {#13
+code: "SOAP-ERROR: Encoding: object has no 'SessionId' property"
+text: null
+level: null
}
]
+response: null
+responseXml: null
}
Hello Sir,
Thank you very for your support.
i needsome help for "PNR_AddMultiElements with one adult and one child".
i am getting following errors " [text] => Array
(
[0] => ERROR AT END OF TRANSACTION TIME
[1] => ERROR AT EOT TIME
[2] => NEED PASSENGER/SEGMENT ASSOC.
Could you kindly help me sir?
Here i included search object
Thanks in Advanced.
Amadeus\Client\RequestOptions\PnrCreatePnrOptions Object
(
[travellerGroup] =>
[travellers] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 1
[withInfant] =>
[travellerType] => ADT
[firstName] => madhavan
[lastName] => Jayje
[dateOfBirth] => DateTime Object
(
[date] => 1986-10-08 16:09:25
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] =>
)
[1] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 2
[withInfant] =>
[travellerType] => CHD
[firstName] => sivagjhdnd
[lastName] => jkekejnfefkf
[dateOfBirth] => DateTime Object
(
[date] => 2010-10-01 16:09:25
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] =>
)
)
[tripSegments] => Array
(
)
[itineraries] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Itinerary Object
(
[origin] => CMB
[destination] => MAA
[segments] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Segment\Air Object
(
[status] => NN
[flightNumber] => 274
[date] => DateTime Object
(
[date] => 2016-11-28 17:05:00
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[origin] => CMB
[destination] => MAA
[bookingClass] => S
[sellType] => 0
[quantity] => 1
[company] => AI
[references] => Array
(
)
)
)
)
)
[elements] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Element\FormOfPayment Object
(
[type] => CA
[creditCardType] =>
[creditCardNumber] =>
[creditCardExpiry] =>
[creditCardCvcCode] =>
[freeText] =>
[references] => Array
(
)
)
[1] => Amadeus\Client\RequestOptions\Pnr\Element\Ticketing Object
(
[ticketMode] => OK
[date] => DateTime Object
(
[date] => 2016-10-20 10:39:25
[timezone_type] => 3
[timezone] => UTC
)
[ticketQueue] =>
[references] => Array
(
)
)
[2] => Amadeus\Client\RequestOptions\Pnr\Element\Contact Object
(
[type] => 7
[value] => 001111111111
[references] => Array
(
)
)
)
[actionCode] => 11
[receivedFrom] => AmaduesAIrproject
)
Hey,
I just checked Ticket_Checkeligiblity
and it works, slowly going to implement rest of the endpoints in our system. Thanks a lot for your work!
I only realized now, there are 2 endpoints missing to be able to support ATC Refunds:
DocRefund_InitRefund
DocRefund_UpdateRefund
There is also last endpoint that process the refund, but we are not IATA licensed so our consolidator will be taking care of it. (thus, we dont need it)
Thanks. 👍
I have an issue adding SR DOCS for multiple passengers. It works fine for a single passenger.
When I add DOCS for more than 1 passenger, PNR_AddMultiElements response shows SR DOCS entries for all passengers. But when PNR_Retrieve is called again, it shows SR DOCS is added for only one passenger. I checked the logs for PNR_AddMultiElements call, it shows the XML schema with only one passenger.
Is there an issue adding SR DOCS for multiple passenger?
Hi,
I get the following error when I made fareInformativePricingWithoutPnr call.
Notice: Undefined property: Amadeus\Client\RequestOptions\Air\SellFromRecommendation\Segment::$marketingCompany in /vendor/amabnl/amadeus-ws-client/src/Amadeus/Client/Struct/Fare/InformativePricing13/SegmentGroup.php on line 63
Notice: Undefined property: Amadeus\Client\RequestOptions\Air\SellFromRecommendation\Segment::$arrivalDate in /vendor/amabnl/amadeus-ws-client/src/Amadeus/Client/Struct/Fare/InformativePricing13/SegmentGroup.php on line 84
Notice: Undefined property: Amadeus\Client\RequestOptions\Air\SellFromRecommendation\Segment::$airplaneCode in /vendor/amabnl/amadeus-ws-client/src/Amadeus/Client/Struct/Fare/InformativePricing13/SegmentGroup.php on line 92
Notice: Undefined property: Amadeus\Client\RequestOptions\Air\SellFromRecommendation\Segment::$nrOfStops in /vendor/amabnl/amadeus-ws-client/src/Amadeus/Client/Struct/Fare/InformativePricing13/SegmentGroup.php on line 92
Notice: Undefined property: Amadeus\Client\RequestOptions\Air\SellFromRecommendation\Segment::$inventory in /vendor/amabnl/amadeus-ws-client/src/Amadeus/Client/Struct/Fare/InformativePricing13/SegmentGroup.php on line 70
if I specify use Amadeus\Client\RequestOptions\Fare\InformativePricing\Segment;
I get the following error Cannot use Amadeus\Client\RequestOptions\Fare\InformativePricing\Segment as Segment because the name is already in use
I'm sure I didn't specify it any other place in my code.
hi ,
I have a problem when I want to add a fare to an existing pnr that I just created. This is the code I'm using. I do not know if I'm doing something wrong
private function ticketCreateTST($pnr,$client)
{
$pnrResult = $client->pnrRetrieve(
new PnrRetrieveOptions(['recordLocator' => $pnr]),
['endSession' => true]
);
$pricingResponse = $client->farePricePnrWithBookingClass(
new FarePricePnrWithBookingClassOptions([
'overrideOptions' => [
FarePricePnrWithBookingClassOptions::OVERRIDE_RETURN_ALL
]
])
);
$createTstResponse = $client->ticketCreateTSTFromPricing(
new TicketCreateTstFromPricingOptions([
'pricings' => [
new Pricing([
'tstNumber' =>1
])
]
])
);
$client->pnrAddMultiElements(
new PnrAddMultiElementsOptions([
'actionCode' => PnrAddMultiElementsOptions::ACTION_END_TRANSACT //ET: END AND RETRIEVE
])
);
}
Hello Friend, can i send Fare_CheckRules request after "Fare_InformativePricingWithoutPNR"?
Can you please confirm following request flow?
$informativePricingResponse = $client->fareInformativePricingWithoutPnr(
new FareInformativePricingWithoutPnrOptions([
'passengers' => [
new Passenger([
'tattoos' => [1, 2],
'type' => Passenger::TYPE_ADULT
])
],
'segments' => [
new Segment([
'departureDate' => \DateTime::createFromFormat('Y-m-d H:i:s', '2016-11-21 09:15:00'),
'from' => 'BRU',
'to' => 'LIS',
'marketingCompany' => 'TP',
'flightNumber' => '4652',
'bookingClass' => 'Y',
'segmentTattoo' => 1,
'groupNumber' => 1
]),
new Segment([
'departureDate' => \DateTime::createFromFormat('Y-m-d H:i:s', '2016-11-28 14:20:00'),
'from' => 'LIS',
'to' => 'BRU',
'marketingCompany' => 'TP',
'flightNumber' => '3581',
'bookingClass' => 'C',
'segmentTattoo' => 2,
'groupNumber' => 2
])
]
])
);
After that can i send following request? And "recommendations" is return from Fare_InformativePricingWithoutPNRReply?
use Amadeus\Client\RequestOptions\FareCheckRulesOptions;
$rulesResponse = $client->fareCheckRules(
new FareCheckRulesOptions([
'recommendations' => [1]
])
);
I have a doubt on how to get fare components and to check fare rules for FC.
Would be great if you can give an example.
Is it possible to use consolidator method with DocIssuance_IssueTicket?
Amadeus suggest our DocIssuance request must be in this format as we are issuing ticket directly on airline stock.
<DocIssuance_IssueTicket>
<optionGroup>
<switches>
<statusDetails>
<indicator>ET</indicator>
</statusDetails>
</switches>
</optionGroup>
<otherCompoundOptions>
<attributeDetails>
<attributeType>ETC</attributeType>
<attributeDescription>1A</attributeDescription>
</attributeDetails>
</otherCompoundOptions>
</DocIssuance_IssueTicket>
When using a large WSDL which contains for example the OTA imports, there will be other XSD types with the name UserID
in all the XSD imports of the WSDL.
This can cause the classmap Amadeus\Client\Session\Handler\Classmap::$soapheader4map
to point the UserID
type to a UserID element in an OTA import instead of the intended Amadeus Security XSD.
Hi!
For our team needs we make a console emulator based on amadeus-ws-client implementation. Maybe it would be interesting to show in docs as example? :)
Hello guys!
Could someone help me with this situation?
Its necessary another step to create session?
$msgLog = new Logger('RequestResponseLogs');
$msgLog->pushHandler(new StreamHandler('C:/requestresponse.log', Logger::INFO));
$params = new Params([
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V2,
'wsdl' => 'C:\wsdl\AmadeusWebServices.wsdl', //Points to the location of the WSDL file for your WSAP. Make sure the associated XSD's are also available.
'logger' => $msgLog,
'authParams' => [
'officeId' => 'xxxx', //The Amadeus Office Id you want to sign in to - must be open on your WSAP.
'userId' => 'xx', //Also known as 'Originator' for Soap Header 1 & 2 WSDL's
'passwordData' => base64_decode('xxxxxx'), // **base 64 encoded** password
'passwordLength' => 8,
'dutyCode' => 'xx',
'organizationId' => 'xx',
]
],
'requestCreatorParams' => [
'receivedFrom' => 'my test project' // The "Received From" string that will be visible in PNR History
]
]);
$client = new Client($params);
dump($msgLog, $client->getSessionData());
$pnrResult = $client->pnrRetrieve(
new PnrRetrieveOptions(['recordLocator' => '3MHKL2'])
);
InvalidSessionException in SoapHeader2.php line 68:
No active session
in SoapHeader2.php line 68
at SoapHeader2->prepareForNextMessage('PNR_Retrieve', array('endSession' => false)) in Base.php line 251
at Base->sendMessage('PNR_Retrieve', object(Retrieve), array('endSession' => false)) in Client.php line 912
at Client->callMessage('PNR_Retrieve', object(PnrRetrieveOptions), array('endSession' => false)) in Client.php line 258
Trying to follow your example but I'm getting the following error message when trying the queueList function call:
12|Presentation|soap message header incorrect
Happy to provide more information upon request (I'm not sure what you'll need from me to investigate further,)
I was curious if you had an example payload of how to make a Security Authenticate call. I am getting this error about my headers for the SOAP call: '12|Presentation|soap message header incorrect'. I am attempting to implement this call with python and need an example payload. I understand that for all other calls headers required are: SequenceNumber, Session, and SequenceNumber but cannot find documentation on headers/payload for Security_Authenticate. Here is an example payload with errors. Any help would be greatly appreciated.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://xml.amadeus.com/VLSSLQ_06_1_1A" xmlns:ns2="http://webservices.amadeus.com/definitions">
<SOAP-ENV:Header>
<ns2:SessionId></ns2:SessionId>
<ns2:SequenceNumber></ns2:SequenceNumber>
<ns2:SecurityToken></ns2:SecurityToken>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<Security_Authenticate>
<userIdentifier>
<originIdentification>
<sourceOffice>{{office_id}}</sourceOffice>
</originIdentification>
<originatorTypeCode>{{originator_type_code}}<originatorTypeCode>
<originator>{{user}}<originator>
</userIdentifier>
<passwordInfo>
<binaryData>{{password}}</binaryData>
<dataLength>{{password_length}}</dataLength>
<dataType>{{data_type}}</dataType>
</passwordInfo>
<dutyCode>
<dutyCodeDetails>
<referenceQualifier>{{ref_qualifier}}</referenceQualifier>
<referenceIdentifier>{{ref_identifier}}</referenceIdentifier>
</dutyCodeDetails>
</dutyCode>
<systemDetails>
<organizationDetails>
<organizationId>{{organization}}</organizationId>
</organizationDetails>
</systemDetails>
</Security_Authenticate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Would appreciate if you can include Fare_InformativePricingWithoutPNR function as this is pretty useful.
With the changes done in #1 (Replace 'tatoo' by 'tattoo') we mistakenly changed some instances of 'tatoo' that should not have changed.
The Offer_ConfirmAirOffer
and Offer_VerifyOffer
messages have a property in their XSD's offerTatoo
that should have remained like that.
Hello Sir,
is it possible to create ticket from PNR (or alter pnrRetrieve message)?
Thanks in Advance
I'd like to implement the TicketDisplayTSMP service but I'm not sure how to "get" a PNR context with this library. I can't see any option in my PNR_Retrieve WSDL that indicates to "keep" a retrieved PNR in context. I can retrieve a PNR, works fine, but how to keep in context? Any help appreciated.
Any way to a request as XML for debugging purposes?
For responses it's easy via the responseXml (this should be optional btw?).
Hi Dieter, for pnrRetrieve (and others) there is the option to receive the response "asString". Would it be difficult to to have an option "asXML" so that we can store the PNR_reply body as raw XML? Thanks.
Hey, I see that you can only pass 1 action code to PnrCreatePnrOptions
.
Can you tell me if it is possible to pass many options?
Via Amadeus TechRef for AddMultiElements you are able to pass up to 40 action codes, and my amadeus manager asked us to pass 3 codes :(
I have a problem when I want to add a sr docs to a passenger since when I query it in amadeus it does not appear I am using this to add it
$Elements=array();
array_push($Elements,new Ticketing([
'ticketMode' => Ticketing::TICKETMODE_OK
]));
array_push($Elements,new Contact([
'type' => Contact::TYPE_PHONE_GENERAL,
'value' => $numerocelular
]));
array_push($Elements,new FormOfPayment([
'type' => FormOfPayment::TYPE_CASH
]));
$index=0;
foreach($pasajeros as $pasajero){
array_push($Elements,
new ServiceRequest([
'type' => 'DOCS',
'status' => ServiceRequest::STATUS_HOLD_CONFIRMED,
'quantity' => 1,
'freeText' => [
'-----'.str_pad($dianacimiento[$index], 2, "0", STR_PAD_LEFT).''.$this->returnMonths($mesnacimiento[$index]).''.substr($anonacimiento[$index], -2).'-'.$generoPasjeros[$index].'--'.$pasajero.'-'.$pasajerosApellidos[$index].''
],
'references' => [
new Reference([
'type' => Reference::TYPE_PASSENGER_REQUEST,
'id' => ($index+1)
])
]
])
);
$index++;
}
//dd($Elements);
return $Elements;
Hello Sir,
i have some issues with Adult and infant association on pnr_addmultielements
in th fare_PricePnrWithBookingClasse Response i could not see infant pricing information But MPTB search is returned price for infant ?
Could you please kinly Check that?
i have added one infant associated with one adult like this
new Traveller([
'number' => 1,
'withInfant' => true,
'travellerType'=> Passenger::TYPE_ADULT,
'dateOfBirth' => \DateTime::createFromFormat('Y-m-d', '1985-12-10'),
'lastName' => 'Jaymady',
'firstName' => 'Mathu',
'infant' => new Traveller(['firstName' => 'Junior'])
]);
Here i attached pnr_addmultielements xml request
<ns1:pnr_addmultielements>
<ns1:pnractions>
<ns1:optioncode>0</ns1:optioncode>
</ns1:pnractions>
<ns1:travellerinfo>
<ns1:elementmanagementpassenger>
<ns1:reference>
<ns1:qualifier>PR</ns1:qualifier>
<ns1:number>1</ns1:number>
</ns1:reference>
<ns1:segmentname>NM</ns1:segmentname>
</ns1:elementmanagementpassenger>
<ns1:passengerdata>
<ns1:travellerinformation>
<ns1:traveller>
<ns1:surname>Jaymady</ns1:surname>
<ns1:quantity>2</ns1:quantity>
</ns1:traveller>
<ns1:passenger>
<ns1:firstname>Mathu</ns1:firstname>
<ns1:type>ADT</ns1:type>
<ns1:infantindicator>2</ns1:infantindicator>
</ns1:passenger>
<ns1:passenger>
<ns1:firstname>Junior</ns1:firstname>
<ns1:type>INF</ns1:type>
</ns1:passenger>
</ns1:travellerinformation>
<ns1:dateofbirth>
<ns1:dateandtimedetails>
<ns1:qualifier>706</ns1:qualifier>
<ns1:date>10121985</ns1:date>
</ns1:dateandtimedetails>
</ns1:dateofbirth>
</ns1:passengerdata>
</ns1:travellerinfo>
<ns1:dataelementsmaster>
<ns1:marker1>
<ns1:dataelementsindiv>
<ns1:elementmanagementdata>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>1</ns1:number>
</ns1:reference>
<ns1:segmentname>FP</ns1:segmentname>
</ns1:elementmanagementdata>
<ns1:formofpayment>
<ns1:fop>
<ns1:identification>CA</ns1:identification>
</ns1:fop>
</ns1:formofpayment>
</ns1:dataelementsindiv>
<ns1:dataelementsindiv>
<ns1:elementmanagementdata>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>2</ns1:number>
</ns1:reference>
<ns1:segmentname>TK</ns1:segmentname>
</ns1:elementmanagementdata>
<ns1:ticketelement>
<ns1:passengertype>PAX</ns1:passengertype>
<ns1:ticket>
<ns1:indicator>OK</ns1:indicator>
</ns1:ticket>
</ns1:ticketelement>
</ns1:dataelementsindiv>
<ns1:dataelementsindiv>
<ns1:elementmanagementdata>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>3</ns1:number>
</ns1:reference>
<ns1:segmentname>AP</ns1:segmentname>
</ns1:elementmanagementdata>
<ns1:freetextdata>
<ns1:freetextdetail>
<ns1:subjectqualifier>3</ns1:subjectqualifier>
<ns1:type>7</ns1:type>
</ns1:freetextdetail>
</ns1:freetextdata>
</ns1:dataelementsindiv>
<ns1:dataelementsindiv>
<ns1:elementmanagementdata>
<ns1:reference>
<ns1:qualifier>OT</ns1:qualifier>
<ns1:number>4</ns1:number>
</ns1:reference>
<ns1:segmentname>RF</ns1:segmentname>
</ns1:elementmanagementdata>
<ns1:freetextdata>
<ns1:freetextdetail>
<ns1:subjectqualifier>3</ns1:subjectqualifier>
<ns1:type>P22</ns1:type>
</ns1:freetextdetail>
<ns1:longfreetext> amabnl-amadeus-ws-client-1.2.0-dev</ns1:longfreetext>
</ns1:freetextdata>
</ns1:dataelementsindiv>
</ns1:marker1>
</ns1:dataelementsmaster>
</ns1:pnr_addmultielements>
</soap-env:body>
</soap-env:envelope>
here ii attached pricing response.
[0] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 2
[withInfant] =>
[travellerType] => INF
[firstName] => ratheepan
[lastName] => ratheepan
[dateOfBirth] => DateTime Object
(
[date] => 2016-08-01 19:17:57
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] =>
)
[1] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 1
[withInfant] => 1
[travellerType] => ADT
[firstName] => sivaguru
[lastName] => ratheepan
[dateOfBirth] => DateTime Object
(
[date] => 1856-11-02 19:17:57
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 2
[withInfant] =>
[travellerType] => INF
[firstName] => ratheepan
[lastName] => ratheepan
[dateOfBirth] => DateTime Object
(
[date] => 2016-08-01 19:17:57
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] =>
)
)
)
)
Amadeus\Client\Result Object
(
[status] => ERR
[messages] => Array
(
[0] => Amadeus\Client\Result\NotOk Object
(
[code] => 11228
[text] => ENTRY NOT ALLOWED IN NHP CONDITIONS
[level] =>
)
)
(
[0] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] => 1
[withInfant] => 1
[travellerType] => ADT
[firstName] => Mathu
[lastName] => Jaymady
[dateOfBirth] => DateTime Object
(
[date] => 1985-12-10 19:50:00
[timezone_type] => 3
[timezone] => Asia/Colombo
)
[infant] => Amadeus\Client\RequestOptions\Pnr\Traveller Object
(
[number] =>
[withInfant] =>
[travellerType] => ADT
[firstName] => Junior
[lastName] =>
[dateOfBirth] =>
[infant] =>
)
)
)
Amadeus\Client\Result Object
(
[status] => OK
[messages] => Array
(
)
[response] => stdClass Object
(
[fareList] => stdClass Object
(
[pricingInformation] => stdClass Object
(
[tstInformation] => stdClass Object
(
[tstIndicator] => I
)
[fcmi] => 0
)
[fareReference] => stdClass Object
(
[referenceType] => TST
[uniqueReference] => 1
)
[lastTktDate] => stdClass Object
(
[businessSemantic] => LT
[dateTime] => stdClass Object
(
[year] => 2016
[month] => 12
[day] => 20
)
)
[validatingCarrier] => stdClass Object
(
[carrierInformation] => stdClass Object
(
[carrierCode] => UL
)
)
[paxSegReference] => stdClass Object
(
[refDetails] => stdClass Object
(
[refQualifier] => PA
[refNumber] => 1
)
)
[fareDataInformation] => stdClass Object
(
[fareDataMainInformation] => stdClass Object
(
[fareDataQualifier] => F
)
[fareDataSupInformation] => Array
(
[0] => stdClass Object
(
[fareDataQualifier] => B
[fareAmount] => 11200
[fareCurrency] => LKR
)
[1] => stdClass Object
(
[fareDataQualifier] => 712
[fareAmount] => 16070
[fareCurrency] => LKR
)
)
)
[taxInformation] => Array
(
[0] => stdClass Object
(
[taxDetails] => stdClass Object
(
[taxQualifier] => 7
[taxIdentification] => stdClass Object
(
[taxIdentifier] => X
)
[taxType] => stdClass Object
(
[isoCountry] => YQ
)
[taxNature] => AC
)
[amountDetails] => stdClass Object
(
[fareDataMainInformation] => stdClass Object
(
[fareDataQualifier] => TAX
[fareAmount] => 670
[fareCurrency] => LKR
)
)
)
[1] => stdClass Object
(
[taxDetails] => stdClass Object
(
[taxQualifier] => 7
[taxIdentification] => stdClass Object
(
[taxIdentifier] => X
)
[taxType] => stdClass Object
(
[isoCountry] => LK
)
[taxNature] => EM
)
[amountDetails] => stdClass Object
(
[fareDataMainInformation] => stdClass Object
(
[fareDataQualifier] => TAX
[fareAmount] => 4200
[fareCurrency] => LKR
)
)
)
)
[originDestination] => stdClass Object
(
[cityCode] => Array
(
[0] => CMB
[1] => MAA
)
)
[segmentInformation] => stdClass Object
(
[connexInformation] => stdClass Object
(
[connecDetails] => stdClass Object
(
[connexType] => O
)
)
[segDetails] => stdClass Object
(
[segmentDetail] => stdClass Object
(
[identification] => AIR
[classOfService] => N
)
)
[fareQualifier] => stdClass Object
(
[fareBasisDetails] => stdClass Object
(
[primaryCode] => NOW
[fareBasisCode] => LK
[discTktDesignator] => ADT
)
)
[bagAllowanceInformation] => stdClass Object
(
[bagAllowanceDetails] => stdClass Object
(
[baggageWeight] => 30
[baggageType] => W
[measureUnit] => K
)
)
[segmentReference] => stdClass Object
(
[refDetails] => stdClass Object
(
[refQualifier] => S
[refNumber] => 1
)
)
[sequenceInformation] => stdClass Object
(
[sequenceSection] => stdClass Object
(
[sequenceNumber] => 1
)
)
)
[otherPricingInfo] => stdClass Object
(
[attributeDetails] => Array
(
[0] => stdClass Object
(
[attributeType] => END
[attributeDescription] => VALID ON UL ONLY CHANGE FEE MAY APPLY
)
[1] => stdClass Object
(
[attributeType] => FCA
[attributeDescription] => CMB UL MAA77.10NUC77.10END ROE145.260000
)
)
)
[warningInformation] => Array
(
[0] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => PEN
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => PENALTY APPLIES
)
)
[1] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => LTD
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => - DATE OF ORIGIN
)
)
[2] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => 0
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => BAG/SEAT/MEAL/SERVICES AT A CHARGE MAY BE AVAIL.-ENTER FXK
)
)
[3] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => 0
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => TICKET STOCK RESTRICTION
)
)
[4] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => 0
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => BG CXR: UL
)
)
[5] => stdClass Object
(
[warningCode] => stdClass Object
(
[applicationErrorDetail] => stdClass Object
(
[applicationErrorCode] => 0
[codeListQualifier] => WEC
[codeListResponsibleAgency] => 1A
)
)
[warningText] => stdClass Object
(
[errorFreeText] => PRICED WITH VALIDATING CARRIER UL - REPRICE IF DIFFERENT VC
)
)
)
[fareComponentDetailsGroup] => stdClass Object
(
[fareComponentID] => stdClass Object
(
[itemNumberDetails] => stdClass Object
(
[number] => 1
[type] => FC
)
)
[marketFareComponent] => stdClass Object
(
[boardPointDetails] => stdClass Object
(
[trueLocationId] => CMB
)
[offpointDetails] => stdClass Object
(
[trueLocationId] => MAA
)
)
[monetaryInformation] => stdClass Object
(
[monetaryDetails] => stdClass Object
(
[typeQualifier] => TFC
[amount] => 77.10
[currency] => NUC
)
)
[componentClassInfo] => stdClass Object
(
[fareBasisDetails] => stdClass Object
(
[rateTariffClass] => NOWLK
)
)
[fareQualifiersDetail] => stdClass Object
(
[discountDetails] => stdClass Object
(
[fareQualifier] => 756
)
)
[couponDetailsGroup] => stdClass Object
(
[productId] => stdClass Object
(
[referenceDetails] => stdClass Object
(
[type] => ST
[value] => 1
)
)
)
)
[endFareList] => stdClass Object
(
)
)
)
[responseXml] => I0TST1LT20161220ULPA1FB11200LKR71216070LKR7XYQACTAX670LKR7XLKEMTAX4200LKRCMBMAAOAIRNNOWLKADT30WKS11ENDVALID ON UL ONLY CHANGE FEE MAY APPLYFCACMB UL MAA77.10NUC77.10END ROE145.260000PENWEC1APENALTY APPLIESLTDWEC1A - DATE OF ORIGIN0WEC1ABAG/SEAT/MEAL/SERVICES AT A CHARGE MAY BE AVAIL.-ENTER FXK0WEC1ATICKET STOCK RESTRICTION0WEC1ABG CXR: UL0WEC1APRICED WITH VALIDATING CARRIER UL - REPRICE IF DIFFERENT VC1FCCMBMAATFC77.10NUCNOWLK756ST1
)
Array
(
[0] => Array
(
[type] => DOCS
[status] => HK
[company] => UL
[quantity] => 1
[freeText] => Array
(
[0] => P-LKA-32w33333-LKA-12Dec84--01Jan70-shivam-mathura
)
[references] => Array
(
[0] => Amadeus\Client\RequestOptions\Pnr\Reference Object
(
[type] => PT
[id] => 1
)
)
)
)
One
)
)
[responseXml] => 11228EC1AENTRY NOT ALLOWED IN NHP CONDITIONS
)
Thanks in Advance
There is a typo in some request options calls, we use 'tatoo' where the Amadeus documentation mentions 'tattoo'.
For consistency's sake, we'll have to correct that.
i get XML response from Fare_MasterPricerTravelBoardSearch but how can i get fare price for each flight?
So i can display all flights with fare price into my webpage
As requested by @tommiehansen, we'll add a parameter on client instantiation to determine if we want to fill the responseXml
property of the message result object Amadeus\Client\Result
.
Here's the proposal:
responseXml
by default$messageOptions
parameter when calling a message that can override the default behaviour above for an individual message.That gives you the ability to enable or disable the behaviour by default, but still activate (or deactivate) the behaviour for a specific call when needed.
Received a request from a user to expose the native \SoapClient::__getLastRequestHeaders()
and \SoapClient::__getLastResponseHeaders()
functions.
We have to make it easier to check if a call was successful, or if a warning or an error occurred.
We'll implement this by returning a Result object which has properties like
We should also re-think the asString
property so that it's consistent with this Result object.
How do one enable compression? Can't see or find any references to it in any headers within any of the classes?
I need add an infant associated to another passenger. I need generate the following XML's structure, where the infant is in the same travellerInfo block:
<travellerInfo> <elementManagementPassenger> <reference> <qualifier>PR</qualifier> <number>2</number> </reference> <segmentName>NM</segmentName> </elementManagementPassenger> <passengerData> <travellerInformation> <traveller> <surname>SMITH</surname> <quantity>2</quantity> </traveller> <passenger> <firstName>A MRS</firstName> <type>ADT</type> <infantIndicator>3</infantIndicator> </passenger> </travellerInformation> </passengerData> <passengerData> <travellerInformation> <traveller> <surname>BROWN</surname> </traveller> <passenger> <firstName>JIMMY</firstName> <type>INF</type> </passenger> </travellerInformation> <dateOfBirth> <dateAndTimeDetails> <date>10JAN08</date> </dateAndTimeDetails> </dateOfBirth> </passengerData> </travellerInfo>
In the code say that this is not supported. Do you have plans to add this?
Thanks
Hey,
I am looking into a way how to send currency conversion option in master pricer.
Is there a way to do this?
From docs:
5.38 Operation: 04.01 Fare Option - Currency Conversion
The currency conversion option may be combined with any other option.
It is mandatory that the ticketing price type be set to "CUC" to indicate a currency conversion request. It is mandatory for any query including the currency conversion option.
It is mandatory that a currency code be specified for the conversion. All price amounts for recommendations are converted in the requested Currency. There is no default currency for conversion, it must be specified.
The example below illustrates a low fare search including an optional Currency Conversion element specified with the following information.
Example:
<fareOptions>
<pricingTickInfo>
<pricingTicketing>
<priceType>CUC</priceType>
</pricingTicketing>
</pricingTickInfo>
<conversionRate>
<conversionRateDetail>
<currency>EUR</currency>
</conversionRateDetail>
</conversionRate>
</fareOptions>
Hi Dieter, I found a small issue in Amadeus\Client\Util\MsgBodyExtractor.php
I haven't seen this before but in one PNR that I retrieved I got a single Line Feed char near the start of a node. This caused the regex in the body extraction function to not match and the function returns a null messageBody. By applying the 's' modifier to the regex it works. As I said, I haven't seen anything like that before, normally I don't get any newlines or other control chars in the responses.
In MsgBodyExtractor.php I changed line 38 from:
const REGEXP_SOAP_ENVELOPE_CONTENTS = "|\\<SOAP-ENV:Body\\>(.*?)\\<\\/SOAP-ENV:Body\\>|";
To:
const REGEXP_SOAP_ENVELOPE_CONTENTS = "|\\<SOAP-ENV:Body\\>(.*?)\\<\\/SOAP-ENV:Body\\>|s";
I don't see any particular restriction in the WSDL on the return type for longFreeText so maybe this should be handled by the regex. If it's a bad char and shouldn't be in the response then I guess that would up to the application to trap.
Dieter: Have you plans to develop the DocIssuance_IssueTicket message? Thanks.
WHCR
should be WCHR
I can make PR for it later.
Cheers, Mike.
I get this with DocIssuance_IssueTicket. Received From not adding automatically?
Amadeus\Client\Result Object
(
[status] => ERR
[messages] => Array
(
[0] => Amadeus\Client\Result\NotOk Object
(
[code] => 96
[text] => NEED RECEIVED FROM
[level] =>
)
)
In order to check for secure flights in MasterPricer Amadeus should return a value of 'S' if it is true that a current flight requires what is commonly called 'Secure Flight data'.
However it doesn't seem this library returns this data?
It's usually found within the array flightInformation;
flightInformation->addProductDetail->flightCharacteristic.
Is there some extra key/val one need to make in the request to get that data in the response?
Response arr example, STO-NYC: http://pasted.co/a4748626
Received a request to implement Fare_PricePnrWithBookingClass version 14.1. Currently only version 12.x and lower is implemented (version 13 and higher have a completely different request XML structure)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.