regionId($aliSms['regionid']) ->asDefaultClient(); $result = AlibabaCloud::rpc() ->product($aliSms['product']) ->version('2017-05-25') ->action('SendSms') ->method('POST') ->host($aliSms['host']) ->options([ 'query' => [ 'RegionId' => $aliSms['regionid'], 'PhoneNumbers' => $tel, 'SignName' => $aliSms['sign_name'], 'TemplateCode' => $template, 'TemplateParam' => $templateParams, ], ]) ->request(); return $result->toArray(); } catch (ClientException $e) { $this->log->event('alisms', ['alisms_error_ClientException' => $e->getErrorMessage()]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } catch (ServerException $e) { $this->log->event('alisms', ['alisms_error_ServerException' => $e->getErrorMessage()]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } catch (Exception $e) { $this->log->event('alisms', ['alisms_error_Exception' => $e->getErrorMessage()]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } } public function check() { // TODO: Implement check() method. } public function undo() { // TODO: Implement undo() method. } public function doVerifyCode($tel, $code) { $params = ['code' => $code]; return $this->do($tel, SmsTemplateCode::ALI_VERIFY_CODE, json_encode($params)); } public function checkVerifyCode($tel, $code) { // TODO: Implement checkVerifyCode() method. } public function undoVerifyCode($tel, $code) { // TODO: Implement removeVerifyCode() method. } }