comsolit/imasys-php
PHP client library for the IMAsys platform by Comsolit. Provides helpers to connect to IMAsys services and work with the API from your PHP application, aiming to simplify integration and common requests.
IMASYS PHP is a PHP wrapper for the IMASYS XML API from Swissphone. Current capabilities are sending SMS messages and checking the message status.
$credentials = new Credentials('<YOUR_IMASYS_USER_ID>', '<YOUR_IMASYS_PASSWORD>');
$portalServers = PortalServers::fetchPortalServers($config['host'], $credentials);
$connection = new Connection($credentials, $portalServers);
$sendMessageRequest = new SendMessageRequest('<THE MESSAGE>', '<PHONE_NUMBER>', '<ORIGINATOR_NAME>');
$sendMessageResponse = $connection->send($sendMessageRequest);
sleep(10);
$batchStatusRequest = new BatchStatusRequest($sendMessageResponse->getBatchId());
$batchStatusResponse = $connection->send($batchStatusRequest);
foreach ($batchStatusResponse->getBatch()->getMessages() as $message) {
print_r($message->getStatus());
}
The reason the sleep function is called is to wait for the message to arrive on the target.
How can I help you explore Laravel packages today?