Skip to content

Commit

Permalink
创蓝支持同时存在国内账号与国际账号 (#218)
Browse files Browse the repository at this point in the history
* 修复国际号码 URL 错误

* 创蓝支持同时存在国内账号与国际账号

* Merge branch 'master' of github.com:overtrue/easy-sms

# Conflicts:
#	src/Gateways/ChuanglanGateway.php
  • Loading branch information
Hanson authored and overtrue committed Sep 11, 2019
1 parent 0d1bd89 commit e7a56e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ $easySms->send(13188888888, $message);
'chuanglan' => [
'account' => '',
'password' => '',

// 国际短信时必填
'intel_account' => '',
'intel_password' => '',

// \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE => 验证码通道(默认)
// \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_PROMOTION_CODE => 会员营销通道
Expand Down
2 changes: 2 additions & 0 deletions src/Gateways/ChuanglanGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function send(PhoneNumberInterface $to, MessageInterface $message, Config

if (86 != $IDDCode) {
$params['mobile'] = $to->getIDDCode().$to->getNumber();
$params['account'] = $config->get('intel_account');
$params['password'] = $config->get('intel_password');
}

$result = $this->postJson($this->buildEndpoint($config, $IDDCode), $params);
Expand Down

0 comments on commit e7a56e2

Please sign in to comment.