SMS Misr - arabnewscms/gateways GitHub Wiki
SMSMISR gateway
in this page As mentioned in this link https://smsmisr.com/Api_SMSMisr.pdf
After installing the package, you must prepare a file config/gateways.php
you must add your configuration from your smsmir panel
/**
* SMS Providers and Configurations multi providers
* default smsmisr
*/
'sms' => [
'smsmisr' => [
'username' => '',
'password' => '',
'sender' => '', // default sender name
'language' => 1, // 1 For English , 2 For Arabic , 3 For Unicode
],
],
send SMS
this is a default method to send a new message
return gateway('smsmisr')
->method('SEND')
->mobile([
'20123456789',
]) // string one mobile or array to multiple mobile // max 500
->message('Test Message') // string value
->send();
if you want send with other sender name you must use sender method Like this a sample code
different sender
return gateway('smsmisr')
->method('SEND')
//->sender('') // string value // if send with other Sender name
->mobile([
'20123456789',
]) // string one mobile or array to multiple mobile // max 500
->message('Test Message') // string value
->send();
different language
if you want to use other language like arabic or unicode set 1 or 2 or 3
return gateway('smsmisr')
->method('SEND')
->language(2) // 1 For English , 2 For Arabic , 3 For Unicode
//->sender('') // string value // if send with other Sender name
->mobile([
'20123456789',
]) // string one mobile or array to multiple mobile // max 500
->message('Test Message') // string value
->send();
schedule
if you want set a date and time to schedule this message
return gateway('smsmisr')
->method('SEND')
->language(2) // 1 For English , 2 For Arabic , 3 For Unicode
//->sender('') // string value // if send with other Sender name
->mobile([
'20123456789',
]) // string one mobile or array to multiple mobile // max 500
->message('Test Message') // string value
//->DelayUntil(date('Y-m-d h:i')) // if set schedule
->send();
Balance
if you want to get your balance status with Sent , Failed request
//get Balance
return gateway('smsmisr')
->method('BALANCE')
->request('Sent') //Sent , Failed
->smsid('xxxxx')
->balance();
That's all about usage