The Secra request /event/book/ calls the method bookingEvent in the BookingController. The data is validated and a job GetBookingInfo is created. This job is sent to the queue and executed after 30 seconds.
The job Get Booking Info fills the model BookingDataSecra from the data of the soap call SoapClientSecra strong>
$soapClientReturn = $soapClientSecra->soapCall(
'getBookingExtendedInfo',
[
'booking_no_extended' => $this->bookingInfo?->getAttribute('bookingNo'),
'keycode' => $this->bookingInfo?->getAttribute('keycode')
]
);
The job BookingEdom extracts the customer data from the Secra data, formats it according to the requirements $this->customerData = $this->createCustomer($this->secraData); and sends this to the e-domizil web service to receive a customer number. $response = $edif->guzzleGet($customerFields);
The booking is sent to the sendBuchung web service with the e-Domizil customer number and the Secra data $bookingData = $this->createBookingData(); $response = $edif->guzzleGet($bookingData);
protected $fillable = [
'bookingNo',
'keycode',
'eventtype',
'object'
];
The model uses the credentials from the .env to set up a WSDL Soap connection to Secra and fetches the booking data
setCredentials()
initClient()
soapCall()
https://www.optimale-praesentation.de/comm/universal/wsdl/?html&v=1.40 https://de.wikipedia.org/wiki/WS-Security
The response of the soap request is saved in the BookingDataSecra model
protected $table = 'booking_data_secra';
protected $fillable = [
'booking_no',
'category_no',
'category_type',
'object_no',
'unit_no',
'status',
'arrival',
'departure',
....
];
The Logs class offers the possibility to store var dumps in a table
i.e.
$payload = json_encode($request->all());
if ($validator->fails()){
Logs::create([
"label" => "validation fails",
"bookingNo" => $request->get('booking_no'),
"payload"=>$payload
]);
}
The e-Domizil interface class (edif) is intended to establish connections to the e-Dom web service using parameters passed (partner, action, client) and to process the response.