| @@ 18-30 (lines=13) @@ | ||
| 15 | $this->sendTemplateSms($to, $tempId, $data); |
|
| 16 | } |
|
| 17 | ||
| 18 | public function sendTemplateSms($to, $tempId, array $data) |
|
| 19 | { |
|
| 20 | $url = 'https://api.mysubmail.com/message/xsend.json'; |
|
| 21 | $params = [ |
|
| 22 | 'appid' => $this->appid, |
|
| 23 | 'project' => $tempId, |
|
| 24 | 'to' => $to, |
|
| 25 | 'signature' => $this->signature, |
|
| 26 | 'vars' => json_encode($data), |
|
| 27 | ]; |
|
| 28 | $result = $this->curl($url, $params, true); |
|
| 29 | $this->setResult($result); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function voiceVerify($to, $code, $tempId, array $data) |
|
| 33 | { |
|
| @@ 32-43 (lines=12) @@ | ||
| 29 | $this->setResult($result); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function voiceVerify($to, $code, $tempId, array $data) |
|
| 33 | { |
|
| 34 | $url = 'https://api.mysubmail.com/voice/verify.json'; |
|
| 35 | $params = [ |
|
| 36 | 'appid' => $this->appid, |
|
| 37 | 'to' => $to, |
|
| 38 | 'code' => $code, |
|
| 39 | 'signature' => $this->signature, |
|
| 40 | ]; |
|
| 41 | $result = $this->curl($url, $params, true); |
|
| 42 | $this->setResult($result); |
|
| 43 | } |
|
| 44 | ||
| 45 | public function sendContentSms($to, $content) |
|
| 46 | { |
|