聚乐云支付系统是一款开源的php+mysql系统,便于二次开发。小编对于这款软件还是比较了解的,我们今天讲的是聚乐云支付系统_3.6版本。使用的短信接口是我们短信宝短信群发平台的接口,我们短信宝短信群发平台非常稳定,发送速度快,注册还送测试短信,推荐大家使用。
首先我们修改系统后台配置页面,打开项目\admin\v_set.php文件,替换成以下代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<?php /** * 系统设置 **/ $title = '管理中心' ; include ( "../includes/common.php" ); include './head.php' ; include 'nav.php' ; ?> <div class = "container" style= "padding-top:70px;" > <div class = "col-xs-12 col-sm-10 col-lg-8 center-block" style= "float: none;" > <?php if (isset( $_POST [ 'submit' ])) { foreach ( $_POST as $k => $value ) { if ( $k == 'pwd' ) continue ; $value =daddslashes( $value ); $DB ->query( "insert into zz_pay_config set `k`='{$k}',`v`='{$value}' on duplicate key update `v`='{$value}'" ); } showmsg( '修改成功!' ,1); exit (); } ?> <div class = "panel panel-primary" > <div class = "panel-heading" ><h3 class = "panel-title" >网站配置</h3></div> <div class = "panel-body" > <form action= "" method= "post" class = "form-horizontal" role= "form" > <h3>发信邮箱配置</h3> <hr> <div class = "form-group" > <label class = "col-sm-2 control-label" >邮箱类型选择:</label> <div class = "col-sm-10" > <select class = "form-control" name= "mail_cloud" > <option value= "1" <?= $conf [ 'mail_cloud' ]==1? "selected" : "" ?> >sendcloud</option> <option value= "0" <?= $conf [ 'mail_cloud' ]==0? "selected" : "" ?> >SMTP发信</option> </select> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >SMTP地址:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_smtp" value= "<?php echo $conf['mail_smtp']; ?>" class = "form-control" / </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >SMTP端口:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_port" value= "<?php echo $conf['mail_port']; ?>" class = "form-control" /> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >邮箱账号:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_name" value= "<?php echo $conf['mail_name']; ?>" class = "form-control" /> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >邮箱密码:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_pwd" value= "<?php echo $conf['mail_pwd']; ?>" class = "form-control" /> <small>*(授权码)</small> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >sendcloud API_USER:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_apiuser" value= "<?php echo $conf['mail_apiuser']; ?>" class = "form-control" /> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >sendcloud API_KEY:</label> <div class = "col-sm-10" > <input type= "text" name= "mail_apikey" value= "<?php echo $conf['mail_apikey']; ?>" class = "form-control" /> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >短信宝签名:</label> <div class = "col-sm-10" > <input type= "text" name= "sms_appkey" value= "<?php echo $conf['sms_appkey']; ?>" class = "form-control" /> <small>* 短信宝签名配置</small> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >短信宝账号:</label> <div class = "col-sm-10" > <input type= "text" name= "CAPTCHA_ID" value= "<?php echo $conf['CAPTCHA_ID']; ?>" class = "form-control" /> </div> </div><br/> <div class = "form-group" > <label class = "col-sm-2 control-label" >短信宝密码:</label> <div class = "col-sm-10" > <input type= "text" name= "PRIVATE_KEY" value= "<?php echo $conf['PRIVATE_KEY']; ?>" class = "form-control" /> <small>* 密码配置</small> </div> </div><br/> <div class = "form-group" > <div class = "col-sm-offset-2 col-sm-10" ><input type= "submit" name= "submit" value= "保存修改" class = "btn btn-primary form-control" /><br/> </div> </div> </form> </div> </div> </div> </div> |
接着我们替换短信接口文件,打开项目\includes\function.php文件,将send_sms方法替换为以下代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function send_sms( $phone , $code , $moban = '1' ){ global $conf ; $sms_appkey = $conf [ 'sms_appkey' ]; $sms_user = $conf [ 'CAPTCHA_ID' ]; $sms_pwd =md5( $conf [ 'PRIVATE_KEY' ]); $url = 'http://api.smsbao.com/sms?u=' . $sms_user . '&p=' . $sms_pwd . '&m=' . $phone . '&c=' . '【' . $sms_appkey . '】您的验证码为:' . $code ; $data =get_curl( $url ); // $arr=json_decode($data,true); if (! $data ){ return true; } else { return $arr [ 'error_msg_zh' ]; } } |
好了,经过以上的替换,短信宝的短信平台已经替换成功了,可以正常使用了。进行发送测试:
报备一下短信宝的VIP模板,这样就可以走短信宝的优质通道了,即便遇到敏感文字我们都不会人工审核,短信内容3~5秒就可送达。
另外:我们已经开发好完整的聚乐云支付系统短信宝插件,点击此链接 下载及查看安装流程。
最新更新
电商类
CMS类
微信类