Skip to content

Commit

Permalink
兼容旧版本 (#219)
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 12, 2019
1 parent e7a56e2 commit b3c16de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "library",
"require": {
"guzzlehttp/guzzle": "^6.2",
"php": ">=5.6"
"php": ">=5.6",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^7.5",
Expand Down
4 changes: 2 additions & 2 deletions src/Gateways/ChuanglanGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +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');
$params['account'] = $config->get('intel_account') ?: $config->get('account');
$params['password'] = $config->get('intel_password') ?: $config->get('password');
}

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

0 comments on commit b3c16de

Please sign in to comment.