当前位置:网站首页>Crmeb second open SMS function tutorial
Crmeb second open SMS function tutorial
2022-06-23 17:56:00 【Crmeb Zhongbang Technology】
The knowledge payment SMS function supports both Alibaba cloud SMS and crmeb SMS , When we use it, we only need to choose one of two .
So how can we turn on the SMS function of Alibaba cloud ?
First step : First, enter the Alibaba cloud console , In Alibaba cloud SMS module , The application requires a new SMS template
The second step : In the general background of knowledge payment -> system maintenance -> Development configuration -> Configuration classification -> Add a new SMS template under SMS configuration id Save configuration

Click on “ SMS configuration ” name , Enter the sub configuration under SMS configuration

Click Add configuration , choice ‘ The text box ’ type , Fill in the configuration below , Submit configuration

After submission , Get into “ System settings -> System settings -> Alicloud configuration -> SMS configuration ”, Here we can see our new SMS template id To configure .

The third step : Call alicloud SMS interface , Send a text message
The root directory of knowledge payment source code ”extend/service/AliMessageService” Under the sendmsg The method is the sending method of Alibaba cloud SMS ;
$tel: Receive phone number
$setTemplateCode : SMS template ID
$setTemplateParam : Content of short message Parameters are arrays
$setOutId : Can be null
/** * Send a text message * @param string $tel SMS number * @param string $setSignName SMS signature * @param string $setTemplateCode SMS template ID * @param array $setTemplateParam Content of short message * @param string $setOutId External pipeline extension field */public static function sendmsg($tel = '', $setTemplateCode = '', $setTemplateParam = [], $setOutId = ''){ try { self::init(); $result = AlibabaCloud::rpc() ->product('Dysmsapi') ->version('2017-05-25') ->action('SendSms') ->method('POST') ->host('dysmsapi.aliyuncs.com') ->options([ 'query' => [ 'RegionId' => "cn-hangzhou", 'PhoneNumbers' => $tel, 'SignName' => SystemConfigService::get('smsSignName'), 'TemplateCode' => $setTemplateCode, 'TemplateParam' => json_encode(is_array($setTemplateParam) ? $setTemplateParam : ['code' => $setTemplateParam]), ], ])->request()->toArray(); return $result; } catch (ClientException $e) { return false; } catch (ServerException $e) { return false; }}What if you send text messages ?
AliMessageService::sendmsg($tel,$setTemplateCode,$setTemplateParam);
For example, the sending of our login verification code

$phone Is the received mobile number ,$smsTemplateCode Is the SMS template ID ,['code' => $code] This is the content of the SMS ; In this way, the transmission is successful .
The source code attachment has been packaged and uploaded to Baidu cloud , You can download it yourself ~
link : https://pan.baidu.com/s/14G-bpVthImHD4eosZUNSFA?pwd=yu27 Extraction code : yu27Baidu cloud link is unstable , It may fail at any time , Let's keep it tight .
If Baidu cloud link fails , Please leave me a message , When I see it, I will update it in time ~
Open source address
Code cloud address :
http://github.crmeb.net/u/defu
Github Address :
http://github.crmeb.net/u/defu
边栏推荐
- Innovative technology leader! Huawei cloud gaussdb won the 2022 authoritative award in the field of cloud native database
- Hapoxy-集群服务搭建
- Android kotlin exception handling
- Reinforcement learning series (I) -- basic concepts
- 数据库 实验二 查询
- [go] calling Alipay to scan code for payment in a sandbox environment
- Petitpotam – NTLM relay to ad CS
- Get first and last days by year
- 手机开户流程是什么?现在网上开户安全么?
- Wechat applet: time selector for the estimated arrival date of the hotel
猜你喜欢
![[network communication -- webrtc] analysis of webrtc source code -- supplement of pacingcontroller related knowledge points](/img/18/dda0c7fa33ee6cdf2bbb2f85099940.png)
[network communication -- webrtc] analysis of webrtc source code -- supplement of pacingcontroller related knowledge points

Practice sharing of chaos engineering in stability management of cloud native Middleware

qYKVEtqdDg

QT布局管理器【QVBoxLayout,QHBoxLayout,QGridLayout】

How to configure MySQL log management

Hands on data analysis unit 2 section 4 data visualization

Ctfshow PHP features

Date selection of hotel check-in time and check-out time

数据库 实验二 查询

C#与数据库连接
随机推荐
ctfshow php的特性
Similarities and differences between Chinese and American electronic signature SaaS
MySQL transaction and its characteristics and locking mechanism
Self supervised learning (SSL)
《AN4190应用笔记 天线选择指南》——天线理论2
Codeforces Round #620 (Div. 2)ABC
How to use SQL window functions
Cross browser common events
What is the mobile account opening process? Is it safe to open an account online now?
Reinforcement learning series (I) -- basic concepts
解答01:Smith圆为什么能“上感下容 左串右并”?
浅谈5类过零检测电路
时间戳90K是什么意思?
[go]沙盒环境下调用支付宝扫码支付
JS regular verification time test() method
【30. 串联所有单词的子串】
微信小程序:酒店预计到店日期的时间选择器
AMQP protocol
Async/await
How to use R language to draw scatter diagram