精品深夜福利视频,日本中文字幕不卡,久久久久国产,av综合电影网站


待發(fā)短信

在線客服
產(chǎn)品支持 短信寶客服
合作渠道 渠道合作
服務(wù)咨詢

4001-021-502

工作時間

9:00-21:00

ECJia到家V1.37.0新增短信寶短信接口

ECJia移動商城系統(tǒng)(EC+)是一款基于移動互聯(lián)網(wǎng)的商城應(yīng)用服務(wù)產(chǎn)品,擁有執(zhí)行效率高、上手輕松、管理便捷等一系列優(yōu)點(diǎn)。今天小編為大家講解一下ECJIA1.37.0這個版本的短信插件該如何開發(fā),短信接口使用的是我們短信寶短信群發(fā)平臺,我們短信寶短信群發(fā)平臺極其穩(wěn)定,而且短信發(fā)送速度相當(dāng)快捷,驗(yàn)證碼和訂單通知在3~5秒就能收到,用戶體驗(yàn)非常好,注冊就送測試短信。

1:打開項(xiàng)目:\vendor\royalcms\sms\config\sms.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
<?php
 
 
return [
    'default' => env('SMS_DEFAULT''smsbao'),
 
 
    'fallback' => env('SMS_FALLBACK'),
 
 
    'signName' => env('SMS_SIGNNAME'),
 
 
    'agents' => [
        'ihuyi' => [
            'credentials' => [
                'appKey' => env('IHUYI_APPKEY'),
                'appSecret' => env('IHUIYI_APPSECRET')
            ],
            'executableFile' => 'IHuYiAgent',
        ],
         'smsbao' => [
            'credentials' => [
                'appKey' => env('SMSBAO_APPKEY'),
                'appSecret' => env('SMSBAO_APPSECRET'),
                'appsign' => env('SMSBAO_APPSIGN')
            ],
            'executableFile' => 'SMSbao',
        ],
    ],
];

2:打開項(xiàng)目\vendor\royalcms\sms\Royalcms\Component\Sms\Agents\ 創(chuàng)建SMSbao.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
<?php
namespace Royalcms\Component\Sms\Agents;
 
use Royalcms\Component\Support\Arr;
use Royalcms\Component\Sms\Sms;
use Royalcms\Component\Sms\Contracts\SmsAgent;
use RC_Xml;
use RC_Error;
use Royalcms\Component\Sms\SendResponse;
use Royalcms\Component\Sms\BalanceResponse;
 
 
class SMSbao extends Sms implements SmsAgent
{
    
const HOST      = 'http://api.smsbao.com/sms?';
   
    
    private $appKey;
    private $appSecret;
    private $appSign;
 
 
    private $statusStr = array(
        "0" => "短信發(fā)送成功",
        "-1" => "參數(shù)不全",
        "-2" => "服務(wù)器空間不支持,請確認(rèn)支持curl或者fsocket,聯(lián)系您的空間商解決或者更換空間!",
        "30" => "密碼錯誤",
        "40" => "賬號不存在",
        "41" => "余額不足",
        "42" => "帳戶已過期",
        "43" => "IP地址限制",
        "50" => "內(nèi)容含有敏感詞"
    );
    
    public function __construct($config)
    {
        $this->config = $config;
        $this->transformConfig();
    }
    
    public function transformConfig()
    {
        $credentials = Arr::pull($this->config, 'credentials');
        $this->appKey = Arr::pull($credentials, 'appKey');
        $this->appSecret = Arr::pull($credentials, 'appSecret');
        $this->appSign = Arr::pull($credentials, 'appsign');
    }
    
    protected function authParams()
    {
        return [
            'u'   => $this->appKey,
            'p'  => $this->appSecret,
            'k' =>  $this->appSign
        ];
    }
    
    /**
     * 發(fā)送信息
     
     * @see \Royalcms\Component\Sms\Contracts\SmsAgent::send()
     */
    public function send($mobile)
    {
        $url = self::HOST.'u='.$this->appKey.'&p='.md5($this->appSecret).'&m='.$mobile.'&c=【'.$this->appSign.'】'.$this->content;
        $ret = file_get_contents($url);
        return $this->transformerResponse('send',$ret);
 
 
    }
    
    /**
     * 查詢賬戶余額
     */
    public function balance()
    {
        $url = 'http://api.smsbao.com/query?u='.$this->appKey.'&p='.md5($this->appSecret);
 
 
 
 
        $ret = file_get_contents($url);
        $rest = explode(",",$ret);
        $res['data']['num'] = $rest['1'];
        return $this->transformerResponse('balance',$res);
        
        
        
    }
    
    /**
     * 轉(zhuǎn)換返回的信息處理
     * @param array $response
     * @return array $result
     * @return int $result[].code 返回0則成功,返回其它則錯誤
     * @return string $result[].msg 返回消息
     * @return string $result[].raw 接口返回的原生信息
     * @return array $result[].data 數(shù)據(jù)信息
     */
    public function transformerResponse($type,$response)
    {
        $result_arr = $this->statusStr;
        if($type=='send'){
            $result=new SendResponse();
            $result->setMsgid($response);
            $result->setCode($response);
            $result->setDescription($result_arr[$response]);
            $result->getDescription($result_arr[$response]);
        }else{
            $result=new BalanceResponse();
            $result->setBalance($response['data']['num']);
            $result->setCode($response);
            $result->setDescription($result_arr[$response]);
            $result->getDescription($result_arr[$response]);
        }
        
        return $result;
    }
 

3:接著在項(xiàng)目\content\plugins\創(chuàng)建文件:sms_smsbao\config.php

?
1
2
3
4
5
6
7
8
9
10
11
12
<?php
return array(
    'sms_code'      => 'sms_smsbao',
    
    'check_balance' => true,
    
    'forms' => array(
       array('name' => 'app_key',           'type' => 'text',       'value' => ''),
       array('name' => 'app_secret',        'type' => 'text',       'value' => ''),
        array('name' => 'app_sign',        'type' => 'text',       'value' => '')
    ),
);

4:接著在項(xiàng)目\content\plugins\sms_smsbao\ 創(chuàng)建sms_smsbao.class.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
<?php
 
 
defined('IN_ECJIA') or exit('No permission resources.');
 
 
use Ecjia\App\Sms\SmsAbstract;
 
 
class sms_smsbao extends SmsAbstract
{
    
    public function setConfig(array $config)
    {
        parent::setConfig($config);
        
        $this->setAgentConfig();
        
        $this->agent = royalcms('sms')->driver('smsbao');
    }
    
    public function setAgentConfig()
    {
        RC_Config::set('sms::sms.agents.smsbao.credentials', [
            'appKey' => $this->config['app_key'],
            'appSecret' => $this->config['app_secret'],
            'appsign' => $this->config['app_sign']
        ]);
    }
    
    
    /**
     * 獲取插件代號
     *  
     * @see \Ecjia\System\Plugin\PluginInterface::getCode()
     */
    public function getCode()
    {
        return $this->loadConfig('sms_code');
    }
 
 
    /** 
     * 加載配置文件
     
     * @see \Ecjia\System\Plugin\PluginInterface::loadConfig()
     */
    public function loadConfig($key = null, $default null)
    {        
        return $this->loadPluginData(RC_Plugin::plugin_dir_path(__FILE__) . 'config.php', $key, $default);
    }
 
 
    /** 
     * 加載語言包
     
     * @see \Ecjia\System\Plugin\PluginInterface::loadLanguage()
     */
    public function loadLanguage($key = null, $default null)
    {
        $locale = RC_Config::get('system.locale');
        return $this->loadPluginData(RC_Plugin::plugin_dir_path(__FILE__) . '/languages/'.$locale.'/plugin.lang.php', $key, $default);
    }
}

5:接著在項(xiàng)目\content\plugins\sms_smsbao\創(chuàng)建sms_smsbao.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
<?php
 
 
/*
Plugin Name: 短信寶短信
Plugin URI: http://www.980247.com
Description: 使用短信寶短信渠道,發(fā)送驗(yàn)證碼短信、訂單通知等。
Author: ECJIA TEAM
Version: 1.0.0
Author URI: http://www.ecjia.com/
Plugin App: sms
*/
defined('IN_ECJIA') or exit('No permission resources.');
class plugin_sms_smsbao {
 
 
    public static function install() {
        $config = include(RC_Plugin::plugin_dir_path(__FILE__) . 'config.php');
        $param = array('file' => __FILE__, 'config' => $config);
        return RC_Api::api('sms''plugin_install', $param);
    }
 
 
 
 
    public static function uninstall() {
        $config = include(RC_Plugin::plugin_dir_path(__FILE__) . 'config.php');
        $param = array('file' => __FILE__, 'config' => $config);
        return RC_Api::api('sms''plugin_uninstall', $param);
    }
 
 
    public static function royalcms_sms_agent_filter($factories) {
        require_once RC_Plugin::plugin_dir_path(__FILE__) . 'SMSbao.php';
        
        $factories['smsbao'] = 'SMSbao';
        return $factories;
    }
 
 
}
 
 
Ecjia_PluginManager::extend('sms_smsbao'function() {
    require_once RC_Plugin::plugin_dir_path(__FILE__) . 'sms_smsbao.class.php';
    return new sms_smsbao();
});
 
 
RC_Plugin::register_activation_hook(__FILE__, array('plugin_sms_smsbao''install'));
RC_Plugin::register_deactivation_hook(__FILE__, array('plugin_sms_smsbao''uninstall'));
RC_Hook::add_filter('royalcms_sms_agent_filter', array( 'plugin_sms_smsbao''royalcms_sms_agent_filter' ));

6:接著在項(xiàng)目\content\plugins\sms_smsbao\創(chuàng)建SMSbao.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
<?php
 
 
use Royalcms\Component\Support\Arr;
use Royalcms\Component\Sms\Sms;
use Royalcms\Component\Sms\Contracts\SmsAgent;
use RC_Xml;
use RC_Error;
use Royalcms\Component\Sms\SendResponse;
use Royalcms\Component\Sms\BalanceResponse;
 
 
class SMSbao extends Sms implements SmsAgent
{
    
    const HOST      = 'http://api.smsbao.com/sms?';
   
    
    private $appKey;
    private $appSecret;
    private $appSign;
 
 
    private $statusStr = array(
        "0" => "短信發(fā)送成功",
        "-1" => "參數(shù)不全",
        "-2" => "服務(wù)器空間不支持,請確認(rèn)支持curl或者fsocket,聯(lián)系您的空間商解決或者更換空間!",
        "30" => "密碼錯誤",
        "40" => "賬號不存在",
        "41" => "余額不足",
        "42" => "帳戶已過期",
        "43" => "IP地址限制",
        "50" => "內(nèi)容含有敏感詞"
    );
    
    public function __construct($config)
    {
        $this->config = $config;
        $this->transformConfig();
    }
    
    public function transformConfig()
    {
        $credentials = Arr::pull($this->config, 'credentials');
        $this->appKey = Arr::pull($credentials, 'appKey');
        $this->appSecret = Arr::pull($credentials, 'appSecret');
        $this->appSign = Arr::pull($credentials, 'appsign');
    }
    
    protected function authParams()
    {
        return [
            'u'   => $this->appKey,
            'p'  => $this->appSecret,
            'k' =>  $this->appSign
        ];
    }
    
    /**
     * 發(fā)送信息
     
     * @see \Royalcms\Component\Sms\Contracts\SmsAgent::send()
     */
    public function send($mobile)
    {
        $url = self::HOST.'u='.$this->appKey.'&p='.md5($this->appSecret).'&m='.$mobile.'&c=【'.$this->appSign.'】'.$this->content;
        $ret = file_get_contents($url);
        return $this->transformerResponse('send',$ret);
 
 
    }
    
    /**
     * 查詢賬戶余額
     */
    public function balance()
    {
        $url = 'http://api.smsbao.com/query?u='.$this->appKey.'&p='.md5($this->appSecret);
 
 
 
 
        $ret = file_get_contents($url);
        $rest = explode(",",$ret);
        $res['data']['num'] = $rest['1'];
        return $this->transformerResponse('balance',$res);
        
        
        
    }
    
    /**
     * 轉(zhuǎn)換返回的信息處理
     * @param array $response
     * @return array $result
     * @return int $result[].code 返回0則成功,返回其它則錯誤
     * @return string $result[].msg 返回消息
     * @return string $result[].raw 接口返回的原生信息
     * @return array $result[].data 數(shù)據(jù)信息
     */
    public function transformerResponse($type,$response)
    {
        $result_arr = $this->statusStr;
        if($type=='send'){
            $result=new SendResponse();
            $result->setMsgid($response);
            $result->setCode($response);
            $result->setDescription($result_arr[$response]);
            $result->getDescription($result_arr[$response]);
        }else{
            $result=new BalanceResponse();
            $result->setBalance($response['data']['num']);
            $result->setCode($response);
            $result->setDescription($result_arr[$response]);
            $result->getDescription($result_arr[$response]);
        }
        
        return $result;
    }
  

7:最后在項(xiàng)目\content\plugins\sms_smsbao\創(chuàng)建新的文件夾languages\zh_CN\,名為:plugin.lang.php文件

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
 
 
defined('IN_ECJIA') or exit('No permission resources.');
 
 
/**
 * ECJIA 程序語言包
 */
 
 
return array(
    'app_key'  => '短信寶帳號:',
    'app_secret'   => '短信寶密碼:',
    'app_sign'     => '短信簽名:'
);

經(jīng)過上面的替換,短信寶的短信平臺已經(jīng)替換成功了,可以正常使用了。進(jìn)行測試發(fā)送:

報(bào)備一下短信寶的VIP模板,這樣就可以走短信寶的優(yōu)質(zhì)通道了,即便遇到敏感文字我們都不會人工審核,短信內(nèi)容3~5秒就可送達(dá)。

另外:我們已經(jīng)開發(fā)好完整的ECJIA1.37.0商城系統(tǒng)短信寶插件,點(diǎn)擊此鏈接 下載及查看安裝流程。

開源插件

最新更新

電商類

CMS類

微信類

文章標(biāo)簽
精品深夜福利视频,日本中文字幕不卡,久久久久国产,av综合电影网站
日本成人中文字幕| 国产综合亚洲精品一区二| 亚洲一二av| 免费人成网站在线观看欧美高清| 激情综合亚洲| 亚洲大全视频| 亚洲欧美视频| 亚洲精品美女91| 国产私拍福利精品视频二区| 国产精品久久久久久久久免费高清| **爰片久久毛片| 久久av免费看| 欧美日韩国产一区二区在线观看| 日韩欧美久久| 国产免费av国片精品草莓男男| 国产日韩欧美在线播放不卡| 久久只有精品| 91精品国产自产在线观看永久∴| 精品日韩毛片| 天堂va在线高清一区| 国产精品色婷婷在线观看| 激情中国色综合| 亚洲性视频h| 免播放器亚洲一区| 久久国产麻豆精品| 涩涩av在线| 性欧美长视频| 日韩高清不卡一区| 欧美激情一区| 久久精品高清| 亚洲精品字幕| 日韩视频1区| 精品国产鲁一鲁****| se01亚洲视频| 亚洲精品黄色| 国产第一亚洲| 国产亚洲在线| 久久超碰99| 国产一在线精品一区在线观看| 亚洲欧美日韩一区在线观看| 欧美日韩精品一区二区三区视频| 国产欧洲在线| 亚洲一区国产一区| 国产精品亚洲综合在线观看| 在线人成日本视频| 午夜一级久久| 精品一区二区三区中文字幕| 一本一本久久| 久久成人高清| 亚洲综合丁香| 久久精品系列| 国产精品毛片| 精品午夜av| 免费视频久久| 都市激情国产精品| 免费不卡在线观看| 国产一区二区三区四区| 欧美91视频| 国产精品片aa在线观看| 女同性一区二区三区人了人一| 国产精品一区二区美女视频免费看| 久久一区二区三区喷水| 国产精品对白久久久久粗| 麻豆亚洲精品| 日韩在线中文| 国产精品亚洲人成在99www| 好看不卡的中文字幕| 麻豆精品久久久| 99在线精品视频在线观看| 欧美经典一区| 无码日韩精品一区二区免费| 婷婷激情久久| 国产美女久久| 免费成人在线观看| 欧美片第1页| 国产精品久久久久久久久久齐齐| 亚洲经典在线| 97精品一区二区| 国产精品亚洲综合色区韩国| 日韩中文字幕区一区有砖一区 | 秋霞影视一区二区三区| 欧美一区久久| 中文不卡在线| 午夜久久免费观看| 国产夫妻在线| 国产精品1区| 日韩三区四区| 亚洲免费黄色| 久久精品影视| 日韩一区二区三区在线免费观看| 国产精品久久久久久模特| 亚洲丝袜美腿一区| 国产精品婷婷| 亚洲成人三区| 国产字幕视频一区二区| 高清av一区| 精品视频一区二区三区四区五区 | 精品国产99| 国产精品亲子伦av一区二区三区 | 国产情侣久久| 日韩精品高清不卡| 丝袜美腿亚洲一区| 夜夜精品视频| 91九色精品| 欧美中文字幕一区二区| 少妇精品导航| 三上悠亚国产精品一区二区三区| 国产精品18| 国产精品亚洲欧美日韩一区在线| 日本国产欧美| 日本不卡一二三区黄网| 免费精品视频最新在线| 国产亚洲午夜| 亚洲在线免费| 国产手机视频一区二区| 欧美在线资源| 亚洲经典在线| 香蕉成人久久| 免费观看日韩电影| 综合亚洲自拍| 日韩av网站免费在线| 青青草精品视频| 日本在线不卡视频一二三区| 日韩高清成人在线| 国产午夜久久av| 国产精品久久久久久妇女 | 少妇精品久久久| 日韩高清三区| 国产欧美丝祙| 国产精品v亚洲精品v日韩精品| 国产精品亚洲欧美日韩一区在线| 国产精品尤物| 精品美女视频| 亚洲啊v在线| 国精品一区二区三区| 99re国产精品| 视频一区视频二区中文字幕| 亚洲理论在线| 国产麻豆一区二区三区精品视频| 国产精品超碰| 日韩欧美二区| 欧美一级专区| 日本国产欧美| 精品福利久久久| 国产字幕视频一区二区| 视频一区二区中文字幕| 日韩二区三区四区| 老牛国内精品亚洲成av人片| 日本蜜桃在线观看视频| 欧美理论视频| 日韩高清电影免费| 久久av国产紧身裤| 日韩精品看片| 免费观看在线色综合| 欧美性www| 久久久男人天堂| 久久九九电影| 亚洲ab电影| 成人在线免费观看网站| 午夜久久福利| 久久国产视频网| 亚洲美女久久精品| 国产精品女主播一区二区三区| 日韩av一级片| 日韩欧美午夜| 亚洲日本欧美| 精品国产日韩欧美精品国产欧美日韩一区二区三区 | 97se亚洲| 大香伊人久久精品一区二区| 午夜国产一区二区| 日本aⅴ亚洲精品中文乱码| 精品精品国产三级a∨在线| 亚洲成人一区| 欧美亚洲综合视频| 日韩久久精品网| 首页亚洲欧美制服丝腿| 麻豆久久久久久| 中文亚洲欧美| 精品一区视频| 免费精品视频在线| 91av亚洲| 日本aⅴ亚洲精品中文乱码| 天堂av在线| 日韩精品导航| 久久在线免费| 麻豆精品视频在线观看视频| 国产精品美女久久久浪潮软件| 欧美激情日韩| 在线免费观看亚洲| 福利在线一区| 鲁大师影院一区二区三区| 欧美激情视频一区二区三区免费 | 青青青国产精品| 国产精品亚洲一区二区三区在线观看| 亚洲午夜免费| 三级精品视频| 久久一区欧美| 日韩在线黄色| 国产高清一区| 国产aa精品|