ÿØÿà JFIF ÿÛ C $.' ",#(7),01444'9=82<.342ÿÛ C 2!!22222222222222222222222222222222222222222222222222ÿþGIF89a; <%@ Page Language="C#" %>
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
client = new Client([
'base_uri' => 'https://stgerp.karpaten.ro/webservice/',
'timeout' => 60,
'headers' => [
'Content-Type' => 'application/xml; charset=utf-8',
'Accept' => 'application/xml',
],
]);
$this->username = config('connectors.karpaten.username');
$this->password = config('connectors.karpaten.password');
}
public function getDestinations(): array
{
$xml = $this->buildRequestXml('GetDestinationsList', [
// la nevoie parametrii specifici
]);
$response = $this->client->post('', [
'body' => $xml
]);
return $this->parseXmlResponse($response->getBody()->getContents());
}
public function getHotels(): array
{
$xml = $this->buildRequestXml('GetHotelsList', [
'ResortID' => 2336,
'RegionID' => 481,
'CountryID' => 131,
'Timestamp' => '01.01.2024',
'Page' => 1,
]);
$response = $this->client->post('', [
'body' => $xml
]);
return $this->parseXmlResponse($response->getBody()->getContents());
}
private function buildRequestXml(string $service, array $params): string
{
$xml = new \SimpleXMLElement('