Comments (9)
I can only imagine that at the moment you do your signout call, you no longer have the session in context.
You should review when the client gets initialized in your code, and what its lifespan is.
I can assure you this is working just fine - this library has been around 5 years now.
from amadeus-ws-client.
Hi,
Thank you for fast reply.
I have edited my questiong by adding a log file.
Also see how I am doing in my code.
I have a trait class with this:
`
public $params;
public function sendPnrRetrieveCall($pnr)
{
$client = new Client($this->params);
$pnrResult = $client->pnrRetrieve(
new PnrRetrieveOptions(['recordLocator' => $pnr])
);
if ($pnrResult->status === Result::STATUS_OK) {
$pnrResult = $this->sendDisplayTstCall($client); // send TSTrequest for price
}else{
$pnrResult = $client->securitySignOut(); //Terminates an active stateful session.
}
}
public function sendDisplayTstCall(Client $client)
{
// $client = new Client($this->params);
return $client->ticketDisplayTST(
new TicketDisplayTstOptions([
'displayMode' => TicketDisplayTstOptions::MODE_ALL
]),
['endSession' => true]
);
}`
from amadeus-ws-client.
You should review when the client gets initialized in your code, and what its lifespan is.
Yes, I checked this too.
I just made a test by calling SecuritySignOut() directly after a PNR retrieve call and having the same issue.
I am maybe doing something wrong.
from amadeus-ws-client.
Hi @DerMika
Please have a look at the below comments.
I have tested in all manner but SecuritySignOut still creates a new session without closing the previous one.
Thank you for your help.
from amadeus-ws-client.
Make sure you validate that your initial call actually succeeds in signing in.
If your initial call fails to sign in, i'm not sure what the result will be.
from amadeus-ws-client.
Thank you for your reply @DerMika .
I just tested when pnr_retrieve call succeed and SecuritySignOut call work perfectly by closing the session.
But when the pnr_retrieve call failed, I mean by sending a wrong PNR, the SecuritySignOut call creates a new session by sending TransactionStatusCode="start".
So my problem is when the previous call failed. I still have session ID and I want to close that session by sending a SecuritySignOut call.
I am dealing with only three messages: pnrRetrieve ,ticketDisplayTST and SecuritySignOut .
from amadeus-ws-client.
Since it's been years i've worked with PHP and no longer have access to Amadeus, I suggest the best course of action is for you to either avoid this problem by checking if you have an active session before sending a signout (check $client->getSessionData();
) or by investigating yourself and providing a PR that fixes the problem.
from amadeus-ws-client.
I suggest the best course of action is for you to either avoid this problem by checking if you have an active session before sending a signout (check
$client->getSessionData();
)
I checked that but it still sending a TransactionStatusCode="start".
I will try to investigate the library.
Thank you @DerMika for your time.
from amadeus-ws-client.
Closing this as you've created a new issue for the same problem
from amadeus-ws-client.
Related Issues (20)
- PNR_DisplayHistory for vendor locator history
- Missing mandatory item HOT 1
- How can I make requests to be stateful? HOT 2
- 11 | Session HOT 5
- Air_MultiAvailability excluded connections question HOT 3
- ADD CONTACT IN SSR CTCM CTCE HOT 1
- Ticket_IgnoreRefund
- Ticket_IgnoreRefund : DOMDocument::loadXML() Empty string supplied as input HOT 2
- How to add Passengers Title
- Create Form of payment after PNR_AddMultiElements
- Ticket_RebookAndRepricePNR
- Booking seat for stops [PNR_AddMultiElements].
- psr/log version conflict with Laravel 10 HOT 2
- 11|Session - Hosting based restrictions HOT 1
- Ticket_CreateTSTFromPricing not group TST by type passenger
- airRetrieveSeatMap error processingLevel 1
- How to add Tax Info in MPTB request HOT 1
- Help for startup
- Processing ERROR for Rail PNR in Amadeus
- PNR status issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amadeus-ws-client.