Payam Resan and Kave Negar services implemented.
- php >= 5.6
- laravel ^4.2.0
composer require puzzley/sms:dev-master
Puzzley\SMS\SMSServiceProvider
'SMS' => 'Puzzley\SMS\SMS',
php artisan migrate --path=vendor/puzzley/sms/src/Database/migrations
return [
//[Payam Resan](https://www.payam-resan.com/) account information
'PayamResan' => [
'username' => '...',
'password' => '...',
'service_numbers' => [
'default' => '123456',
'primary' => '654321',
]
]
];
// Puzzley\SMS\ServiceInterface
$service = SMS::PayamResan();
$smsId = $service->send('09013620901', 'Hi I'm MZM.');
$error = $service->error($smsId);
// bool: true means success and false means failure
$status = $service->status($smsId);
// service_id was set in config
$service->useNumber('number_id');
// instead of number_id you can set a number directly
$service->useNumber(8000xxx, true);
// this will send a verification code to this number (Payam Resan)
$service->sendVerifyCode('09013620901', 'text that you want to send with the verification code');
// this will send a verification code to this number or will call (Kaveh Negar)
$service->sendVerifyCode('09013620901', 'text that you want to send with the verification code', 'sms', []);
$service->sendVerifyCode('09013620901', 'text that you want to send with the verification code', 'call', []);
// this will return true or false
$service->verify($code);