tcgunel/asistbt-sms
最新稳定版本:v1.0.0
Composer 安装命令:
composer require tcgunel/asistbt-sms
包简介
Asist BT SMS Service Component
README 文档
README
Asist BT SMS Service Component
Installation
The preferred way to install this extension is through composer.
Run
composer require tcgunel/asistbt-sms
Send Sms
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, 'originator' => 'ORIGINATOR', ]); $response = $asistBtSms->smsProxy() ->addReceiver(['905554443322']) ->setMessage(['Message1 text']) //->setSendDate('150323001020') // ddMMyyHHmmss // For bulk messages parameter is in minutes. Max 3360. // For OTP messages parameter is in seconds. Max 300. //->setValidityPeriod(60) //->setIsCheckBlackList(true) ->sendSms(); } catch (AsistException $e) { $e->getMessage(); }
Get Credit
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->smsProxy()->getCredit(); } catch (AsistException $e) { $e->getMessage(); }
Get Originator
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->smsProxy()->getOriginator(); } catch (AsistException $e) { $e->getMessage(); }
Abort SMS
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->smsProxy()->abortSms((int)$packet_id); // $packet_id returns from sendSms. } catch (AsistException $e) { $e->getMessage(); }
Get Status by Packet Id
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->smsProxy()->getStatusByPacketId((int)$packet_id); // $packet_id returns from sendSms. } catch (AsistException $e) { $e->getMessage(); }
Get Status by Message Id
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->smsProxy()->getStatusByMessageId([1,2,3]); // Message_id returns from sendSms. } catch (AsistException $e) { $e->getMessage(); }
Get Contact
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms->contactService()->getContact((int)5554443322); } catch (AsistException $e) { $e->getMessage(); }
Add Contact
try { $asistBtSms = new \Tcgunel\AsistbtSms\AsistBtSms([ 'user_code' => (int)0000, 'username' => 'username', 'password' => 'password', 'account_id' => (int)0000, ]); $response = $asistBtSms ->contactService() ->addContact( 'Ad', 'Soyad', (int)5554443322, 'GROUPID', false, // isBlackList ); } catch (AsistException $e) { $e->getMessage(); }
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-15