Logo Lanfrica

Donzo24/orange-sms

Domain:

digital infrastructure

Record type:

software
Creator:
Don
Host:
A php library to interact with the orange sms api for MiddleEast and Africa. # orange-sms ## Description A php library to interact with the orange sms api for MiddleEast and Africa. ## Installation Using composer: ``` $ composer require donzo24/orange-sms ``` ## Usage First you need to resolve a `SMSClient` instance: ```php use Donzo24\Orange\SMS\SMS; use Donzo24\Orange\SMS\Http\SMSClient; /** * if you already have a valid access token * */ $client = SMSClient::getInstance(' '); // OR /** * directly using and * */ $client = SMSClient::getInstance(' ', ' '); ``` next step, create an `SMS` object passing it the `$client` : ```php $sms = new SMS($client); ``` and you're good to go: ```php // prepare and send an sms in a fluent way $sms->message('Hello, my dear...') ->from('+237690000000') ->to('+237670000000') ->send(); ``` You now have access to the full orange sms api through the `$sms` object : ```php // sending SMS. $response = $sms->to('+237670000000') ->from('+237690000000', ') ->message('Hello, world!') ->send(); // checking your balance(remaining sms units) // with optional country code filter ie: CIV $response = $sms->balance(' '); // checking SMS orders history // with optional country code filter ie: CMR $response = $sms->ordersHistory(' '); // checking SMS statistics // with optional country code filter // and optional appID filter $response = $sms->statistics(' ', ' '); // setting the SMS DR notification endpoint // ' ' $url // ' ' $sender = '+237690000000' $response = $sms->setDeliveryReceiptNotificationUrl($url, $sender); // checking the SMS DR notification endpoint // ' ' $id $response = $sms->checkDeliveryReceiptNotificationUrl($id); // delete the SMS DR notification endpoint // ' ' $id // ' ' $sender = '+237690000000' $response = $sms->deleteDeliveryReceiptNotificationUrl($id, $sender); ``` All `json` responses will automatically be converted to `array`. Be sure to lookup the official documentation, to see what to expect as a `response` to each call. ## Access Token When you resolve the `SMSClient` …

Licenses