|
@@ -61,7 +61,7 @@ class Sms
|
|
|
$params['mobile'] = $mobile;
|
|
|
$params['code'] = $code;
|
|
|
|
|
|
- $result = self::smsSend($params);
|
|
|
+ $result = self::yidong_sms($mobile,$code);
|
|
|
|
|
|
if (!$result) {
|
|
|
$sms->delete();
|
|
@@ -70,6 +70,36 @@ class Sms
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ //移动云短信https://mas.10086.cn/login
|
|
|
+ public static function yidong_sms($mobile,$code){
|
|
|
+
|
|
|
+ $content = '您的短信验证码是'.$code.',本验证码五分钟内有效,请勿泄露';
|
|
|
+ $url = 'https://112.35.10.201:28888/sms/submit';
|
|
|
+ $data = [
|
|
|
+ 'ecName' => '江苏达富居家养老健康管理有限公司',
|
|
|
+ 'apId' => 'dafuhttps',
|
|
|
+ 'secretKey' => '&YY4vrJb',
|
|
|
+ 'mobiles' => $mobile,
|
|
|
+ 'content' => $content,
|
|
|
+ 'sign' => 'YV61594FE',
|
|
|
+ 'addSerial' => '',
|
|
|
+ ];
|
|
|
+
|
|
|
+ $mac = md5(join('',$data));
|
|
|
+ $data['mac'] = $mac;
|
|
|
+ unset($data['secretKey']);
|
|
|
+
|
|
|
+ $header = ["Content-Type:application/json;charset=UTF-8"];
|
|
|
+ $rs = curl_post($url,base64_encode(json_encode($data)),$header);
|
|
|
+
|
|
|
+ $rs = json_decode($rs,true);
|
|
|
+ if(isset($rs['success']) && $rs['success'] == true){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 短信发送行为
|
|
|
* @param array $params 必须包含mobile,event,code
|