12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\common\library\wechat;
- use xzncit\Factory as WechatFactory;
- use app\common\models\Setting as SettingModel;
- class Factory {
-
- public static function wechat(array $config = []){
- if(empty($config)){
- $config = SettingModel::getArrayData("wechat");
- }
- return WechatFactory::Wechat([
- "token" => trim($config["token"]),
- "appid" => trim($config["appid"]),
- "appsecret" => trim($config["appsecret"]),
- "enaeskey" => trim($config["enaes_key"])
- ]);
- }
- }
|