当前位置:网站首页>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
边栏推荐
- Bypass rights
- [qsetting and.Ini configuration files] and [create resources.qrc] in QT
- Explanation of the principle and code implementation analysis of rainbow docking istio
- C. Product 1 Modulo N-Codeforces Round #716 (Div. 2)
- Hapoxy cluster service setup
- Troubleshooting and modification process of easycvr interface dislocation in small screen
- . Net cloud native architect training camp (responsibility chain mode) -- learning notes
- MySQL installation, configuration and uninstall
- MySQL事务提交流程
- Innovative technology leader! Huawei cloud gaussdb won the 2022 authoritative award in the field of cloud native database
猜你喜欢

【网络通信 -- WebRTC】WebRTC 源码分析 -- 接收端带宽估计

《MPLS和VP体系结构》

Alien world, real presentation, how does the alien version of Pokemon go achieve?

美团三面:聊聊你理解的Redis主从复制原理?

Redis cluster operation method

数据库 实验二 查询

Interface ownership dispute

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

hands-on-data-analysis 第二单元 第四节数据可视化

Meituan Sanmian: how do you understand the principle of redis master-slave replication?
随机推荐
Li Kou daily question - day 25 -495 Timo attack
Listen attentively and give back sincerely! Pay tribute to the best product people!
AMQP protocol
Postgresql_根据执行计划优化SQL
Method of copying web page content and automatically adding copyright information (compatible with ie, Firefox and chrome)
如何通过线上股票开户?在线开户安全么?
ERP管理系统的重要性
JS regular verification time test() method
How to choose an account opening broker? Is it safe to open an account online now?
First use of kubernetes cronjob
Drawing black technology - easy to build a "real twin" 2D scene
Explanation of the principle and code implementation analysis of rainbow docking istio
美团三面:聊聊你理解的Redis主从复制原理?
qYKVEtqdDg
Similarities and differences between Chinese and American electronic signature SaaS
一文读懂麦克风典型应用电路
Redis ubuntu18.04.6 intranet deployment
Easygbs playback screen is continuously loading. Troubleshooting
Spdlog logging example - create a logger using sink
How to design a seckill system - geek course notes