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


待發短信

在線客服
產品支持 短信寶客服
合作渠道 渠道合作
服務咨詢

4001-021-502

工作時間

9:00-21:00

ECJIA商城系統新增短信寶短信接口

今天小編為大家講解一下ECJIA1.20版本的商城系統短信寶短信插件,短信接口使用的是我們短信寶短信群發平臺,我們短信寶短信群發平臺極其穩定,而且短信發送速度相當快捷,驗證碼和訂單通知在3~5秒就能收到,用戶體驗非常好,注冊就送測試短信。

1.20這個版本我們只需要修改項目\vendor\royalcms\sms\config\sms.php文件就可以了,這個文件是ecjia短信發送配置文件,我們修改如下代碼:

?
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
<?php
 
return [
 
    /*
    |--------------------------------------------------------------------------
    | 第三方短信服務商
    |--------------------------------------------------------------------------
    |
    | 支持:互億無線
    |
    | 其它短信服務商,如需要可自行擴展。
    | IHuYiAgent 可提供開發參考。
    |
    */
    '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',
        ],
 
    ],
 
];

接著在項目\vendor\royalcms\sms\Royalcms\Component\Sms\Agents\創建名為: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
<?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" => "短信發送成功",
        "-1" => "參數不全",
        "-2" => "服務器空間不支持,請確認支持curl或者fsocket,聯系您的空間商解決或者更換空間!",
        "30" => "密碼錯誤",
        "40" => "賬號不存在",
        "41" => "余額不足",
        "42" => "帳戶已過期",
        "43" => "IP地址限制",
        "50" => "內容含有敏感詞"
    );
    
    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
        ];
    }
    
    /**
     * 發送信息
     
     * @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);             
    }
    
    /**
     * 轉換返回的信息處理
     * @param array $response
     * @return array $result
     * @return int $result[].code 返回0則成功,返回其它則錯誤
     * @return string $result[].msg 返回消息
     * @return string $result[].raw 接口返回的原生信息
     * @return array $result[].data 數據信息
     */
    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;
    }
    
}

接著在項目\content\plugins\創建新的文件,名為:sms_smsbao\config.php

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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' => '')
 ),
);

接著在項目\content\plugins\sms_smsbao\創建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
<?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);
    }
 
}
 
// end

接著在項目\content\plugins\sms_smsbao\創建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
<?php
 
/*
Plugin Name: 短信寶短信
Plugin URI: http://www.980247.com
Description: 使用短信寶短信渠道,發送驗證碼短信、訂單通知等。
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' ));
 
// end

接著在項目\content\plugins\sms_smsbao\創建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
<?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" => "短信發送成功",
        "-1" => "參數不全",
        "-2" => "服務器空間不支持,請確認支持curl或者fsocket,聯系您的空間商解決或者更換空間!",
        "30" => "密碼錯誤",
        "40" => "賬號不存在",
        "41" => "余額不足",
        "42" => "帳戶已過期",
        "43" => "IP地址限制",
        "50" => "內容含有敏感詞"
    );
    
    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
        ];
    }
    
    /**
     * 發送信息
     
     * @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);
        
        
        
    }
    
    /**
     * 轉換返回的信息處理
     * @param array $response
     * @return array $result
     * @return int $result[].code 返回0則成功,返回其它則錯誤
     * @return string $result[].msg 返回消息
     * @return string $result[].raw 接口返回的原生信息
     * @return array $result[].data 數據信息
     */
    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;
    }
    
}

最后在項目\content\plugins\sms_smsbao\創建新的文件夾languages\zh_CN\,名為:plugin.lang.php文件

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

經過上面的替換,短信寶的短信平臺已經替換成功了,可以正常使用了。進行測試發送:

報備一下短信寶的VIP模板,這樣就可以走短信寶的優質通道了,即便遇到敏感文字我們都不會人工審核,短信內容3~5秒就可送達。

另外:我們已經開發好完整的ecjia商城系統短信寶插件,點擊此鏈接 下載及查看安裝流程。

開源插件

最新更新

電商類

CMS類

微信類

文章標簽
精品深夜福利视频,日本中文字幕不卡,久久久久国产,av综合电影网站
日韩在线麻豆| 成人黄色av| 国产一区二区高清| 久久亚洲国产精品一区二区| 亚洲午夜久久| 亚洲一区二区av| 国产一卡不卡| 美女av在线免费看| 国产亚洲精品v| 日韩国产在线一| 国产传媒在线观看| 国产精品免费看| 国产精品欧美三级在线观看| 福利视频一区| 视频一区二区三区入口| 国产精品久久| 91精品福利| 国产日韩一区二区三区在线播放| 福利欧美精品在线| 视频在线观看国产精品| 日韩精品视频在线看| 不卡专区在线| 亚洲精品动态| 久久国产直播| 久久精品国产亚洲一区二区三区| 亚洲欧美一区在线| 久久久国产精品网站| 国产麻豆综合| 国产成人精品一区二区三区免费| 合欧美一区二区三区| 国产精品v日韩精品v欧美精品网站| 欧美日韩国产高清电影| 美女视频黄 久久| 亚洲精选成人| 亚洲成人免费| 麻豆中文一区二区| 欧美在线91| 综合激情一区| 亚洲在线国产日韩欧美| 一区二区精品伦理...| 国产精品手机在线播放| 一区二区国产精品| 亚洲欧美日韩精品一区二区 | 亚洲精品麻豆| 欧美精品激情| 不卡av一区二区| 国产麻豆久久| 成人精品国产亚洲| 久久国产精品美女| 国产麻豆一区| 国产精品第一国产精品| 国产欧美啪啪| 久久不见久久见中文字幕免费| 久久激五月天综合精品| 日本午夜免费一区二区| 日韩av一区二| 国产伦理一区| 精品网站999| 性欧美videohd高精| 青青青免费在线视频| 亚洲91视频| 国产农村妇女精品一区二区| 欧美va亚洲va日韩∨a综合色| 亚洲调教视频在线观看| 好看的av在线不卡观看| 石原莉奈一区二区三区在线观看 | 成人免费网站www网站高清| 九色porny丨国产首页在线| 亚洲欧美综合| 日韩一区二区三区在线看| 国产精品丝袜在线播放| 福利一区二区三区视频在线观看| 中文字幕在线视频网站| 国产精品毛片| 国产免费av一区二区三区| 国产h片在线观看| 亚洲综合在线电影| 丝袜亚洲精品中文字幕一区| 日韩二区在线观看| 免费一二一二在线视频| 中文字幕一区二区三区日韩精品 | 麻豆精品视频在线| 日韩电影二区| 日本大胆欧美人术艺术动态| 日韩精品亚洲专区| av资源中文在线天堂| 首页国产欧美日韩丝袜| 视频一区日韩精品| 久久九九国产| 91精品啪在线观看国产爱臀| 亚洲成人va| 国产精品探花在线观看| 久久在线视频免费观看| 国产伦理一区| 蜜臀久久久久久久| 福利精品一区| 国产精品网址| 免费在线视频一区| 狠狠久久伊人| 久久国产三级| 一本色道精品久久一区二区三区| 欧美日韩亚洲一区在线观看| 久久亚洲精品中文字幕| 亚洲性视频在线| 久久一级电影| 91嫩草亚洲精品| 91综合久久爱com| 蜜桃av一区二区在线观看| 日本免费久久| 国产精品99在线观看| 国产精品嫩模av在线| 蜜桃免费网站一区二区三区| 欧美日韩激情| 欧美精品日日操| 在线中文字幕播放| 精品资源在线| 九九久久国产| 青草国产精品久久久久久| 亚洲久久一区| 一区二区精彩视频| 欧美专区18| 免费国产亚洲视频| 免费在线看一区| 天堂久久一区| 蜜臀精品一区二区三区在线观看 | 精品国内亚洲2022精品成人| 日韩一区二区中文| 精品欠久久久中文字幕加勒比| 久久福利精品| 麻豆精品视频在线| 亚洲综合福利| 91成人超碰| 成人国产精品| 欧美日韩免费观看视频| 久久精品三级| 精品日韩一区| 国产精品啊啊啊| 久久99久久久精品欧美| 久久精品国产亚洲一区二区三区| 日产欧产美韩系列久久99| 亚洲精品日本| 91综合久久爱com| 日日夜夜免费精品| 国产伦精品一区二区三区视频 | 麻豆极品一区二区三区| 另类欧美日韩国产在线| 神马午夜在线视频| 欧美精品高清| 亚洲国产一区二区三区在线播放| 久久久影院免费| 爽爽淫人综合网网站| 午夜电影一区| 在线精品观看| 国产黄色精品| 九色porny丨国产首页在线| 久久久久国产精品一区三寸 | 欧美韩日一区| 欧美69视频| 六月婷婷一区| 欧美日韩一区自拍| 日韩精品第一区| 色综合视频一区二区三区日韩 | 国产一区导航| 久久中文字幕二区| 国产亚洲综合精品| 亚洲精品日本| 久久青草久久| 欧美久久香蕉| 欧美va天堂在线| 久久亚洲美女| 国语精品一区| 天堂精品久久久久| 久久久夜夜夜| 国产另类在线| 欧美午夜不卡| 视频在线不卡免费观看| 日韩在线一区二区| 在线看片国产福利你懂的| 自拍自偷一区二区三区| 国产精品日韩精品中文字幕| 午夜日本精品| 色综合五月天| 欧美精品第一区| 亚洲字幕久久| 综合激情网...| 国产精品婷婷| 亚洲精品一区二区妖精| 精品无人区麻豆乱码久久久| 日本午夜精品一区二区三区电影| 亚洲少妇在线| 在线亚洲欧美| 性欧美69xoxoxoxo| 国产日产精品_国产精品毛片| 蜜臀久久久99精品久久久久久| 日韩av自拍| 国产福利片在线观看| 精品久久视频| 国产精选在线| 国产精品毛片一区二区在线看| 九九九精品视频|