diff --git a/src/admin/ad_add.php b/src/admin/ad_add.php
index 44096aba..abc1149e 100644
--- a/src/admin/ad_add.php
+++ b/src/admin/ad_add.php
@@ -1,6 +1,6 @@
{$configfile}不支持写入,无法修改系统配置参数";
exit();
}
$fp = fopen($configfile, 'w');
@@ -61,7 +61,7 @@ if ($dopost == "save") {
else if ($dopost == 'add') {
CheckCSRF();
if ($vartype == 'bool' && ($nvarvalue != 'Y' && $nvarvalue != 'N')) {
- ShowMsg("布尔变量值必须为'Y'或'N'", "-1");
+ ShowMsg("布尔变量值必须为Y或N", "-1");
exit();
}
if ($valtype == 'number') {
diff --git a/src/admin/sys_safetest.php b/src/admin/sys_safetest.php
index 89f438c6..7d956526 100644
--- a/src/admin/sys_safetest.php
+++ b/src/admin/sys_safetest.php
@@ -1,6 +1,6 @@
-
发布商品
+ 发布自定义文档模型
diff --git a/src/admin/templets/archives_edit.htm b/src/admin/templets/archives_edit.htm
index 68e6d79e..d4461eea 100644
--- a/src/admin/templets/archives_edit.htm
+++ b/src/admin/templets/archives_edit.htm
@@ -3,7 +3,7 @@
- 修改商品
+ 修改自定义文档模型
diff --git a/src/admin/templets_main.php b/src/admin/templets_main.php
index ce46acbe..7cd22dec 100644
--- a/src/admin/templets_main.php
+++ b/src/admin/templets_main.php
@@ -1,6 +1,6 @@
SaveToHtml();
$i++;
}
- ShowMsg("成功更新 $i 个页面", '-1');
+ ShowMsg("成功更新$i个页面", '-1');
exit();
} else if ($dopost == "mksel") {
if (empty($ids)) {
@@ -84,7 +84,7 @@ if ($dopost == "saveedit") {
$sg->SaveToHtml();
$i++;
}
- ShowMsg("成功更新 $i 个页面", '-1');
+ ShowMsg("成功更新$i个页面", '-1');
exit();
}
} else if ($dopost == "view") {
diff --git a/src/admin/vote_add.php b/src/admin/vote_add.php
index 7c34ce00..f51cb576 100644
--- a/src/admin/vote_add.php
+++ b/src/admin/vote_add.php
@@ -1,6 +1,6 @@
";
fhtml += "";
- fhtml += "
图片"+startNum+":选择
";
+ fhtml += "
图片"+startNum+":
";
fhtml += "
图片简介:
";
fhtml += "
";
upfield.innerHTML += fhtml;
diff --git a/src/system/common.func.php b/src/system/common.func.php
index 5bc0972c..75c3a238 100755
--- a/src/system/common.func.php
+++ b/src/system/common.func.php
@@ -673,7 +673,7 @@ function HideEmail($email)
$em = explode("@",$email);
$name = implode('@', array_slice($em, 0, count($em)-1));
$len = floor(strlen($name)/2);
- return substr($name,0, $len) . str_repeat('*', $len) . "@" . end($em);
+ return substr($name,0, $len).str_repeat('*', $len)."@".end($em);
}
//自定义函数接口
if (file_exists(DEDEINC.'/extend.func.php')) {
diff --git a/src/system/libraries/imageresize.class.php b/src/system/libraries/imageresize.class.php
index e9c8d58b..57f6d9ad 100644
--- a/src/system/libraries/imageresize.class.php
+++ b/src/system/libraries/imageresize.class.php
@@ -72,7 +72,7 @@ class ImageResize
if (empty($image_data) || $image_data === null) {
throw new ImageResizeException('image_data must not be empty');
}
- $resize = new self('data://application/octet-stream;base64,' . base64_encode($image_data));
+ $resize = new self('data://application/octet-stream;base64,'.base64_encode($image_data));
return $resize;
}
@@ -458,7 +458,7 @@ class ImageResize
{
$image_type = $image_type ?: $this->source_type;
- header('Content-Type: ' . image_type_to_mime_type($image_type));
+ header('Content-Type: '.image_type_to_mime_type($image_type));
$this->save(null, $image_type, $quality);
}
diff --git a/src/system/sdks/AliPay/App.php b/src/system/sdks/AliPay/App.php
index f761f326..2d1693bb 100644
--- a/src/system/sdks/AliPay/App.php
+++ b/src/system/sdks/AliPay/App.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝App支付网关
* Class App
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicAliPay;
*/
class App extends BasicAliPay
{
-
/**
* App constructor.
* @param array $options
@@ -21,7 +19,6 @@ class App extends BasicAliPay
$this->options->set('method', 'alipay.trade.app.pay');
$this->params->set('product_code', 'QUICK_MSECURITY_PAY');
}
-
/**
* 创建数据操作
* @param array $options
@@ -32,4 +29,5 @@ class App extends BasicAliPay
$this->applyData($options);
return http_build_query($this->options->get());
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Bill.php b/src/system/sdks/AliPay/Bill.php
index b80246e9..78823afd 100644
--- a/src/system/sdks/AliPay/Bill.php
+++ b/src/system/sdks/AliPay/Bill.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝电子面单下载
* Class Bill
@@ -19,7 +18,6 @@ class Bill extends BasicAliPay
parent::__construct($options);
$this->options->set('method', 'alipay.data.dataservice.bill.downloadurl.query');
}
-
/**
* 创建数据操作
* @param array $options
@@ -31,4 +29,5 @@ class Bill extends BasicAliPay
{
return $this->getResult($options);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Pos.php b/src/system/sdks/AliPay/Pos.php
index 31047f73..6a550c70 100644
--- a/src/system/sdks/AliPay/Pos.php
+++ b/src/system/sdks/AliPay/Pos.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝刷卡支付
* Class Pos
@@ -20,7 +19,6 @@ class Pos extends BasicAliPay
$this->options->set('method', 'alipay.trade.pay');
$this->params->set('product_code', 'FACE_TO_FACE_PAYMENT');
}
-
/**
* 创建数据操作
* @param array $options
@@ -32,4 +30,5 @@ class Pos extends BasicAliPay
{
return $this->getResult($options);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Scan.php b/src/system/sdks/AliPay/Scan.php
index 5d251faa..388e430a 100644
--- a/src/system/sdks/AliPay/Scan.php
+++ b/src/system/sdks/AliPay/Scan.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝扫码支付
* Class Scan
@@ -19,7 +18,6 @@ class Scan extends BasicAliPay
parent::__construct($options);
$this->options->set('method', 'alipay.trade.precreate');
}
-
/**
* 创建数据操作
* @param array $options
@@ -31,4 +29,5 @@ class Scan extends BasicAliPay
{
return $this->getResult($options);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Trade.php b/src/system/sdks/AliPay/Trade.php
index 7d8fbe66..12e22cb1 100644
--- a/src/system/sdks/AliPay/Trade.php
+++ b/src/system/sdks/AliPay/Trade.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝标准接口
* Class Trade
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicAliPay;
*/
class Trade extends BasicAliPay
{
-
/**
* 设置交易接口地址
* @param string $method
@@ -21,7 +19,6 @@ class Trade extends BasicAliPay
$this->options->set('method', $method);
return $this;
}
-
/**
* 获取交易接口地址
* @return string
@@ -30,7 +27,6 @@ class Trade extends BasicAliPay
{
return $this->options->get('method');
}
-
/**
* 设置接口公共参数
* @param array $option
@@ -43,7 +39,6 @@ class Trade extends BasicAliPay
}
return $this;
}
-
/**
* 获取接口公共参数
* @return array|string|null
@@ -52,7 +47,6 @@ class Trade extends BasicAliPay
{
return $this->options->get();
}
-
/**
* 执行通过接口
* @param array $options
@@ -64,4 +58,5 @@ class Trade extends BasicAliPay
{
return $this->getResult($options);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Transfer.php b/src/system/sdks/AliPay/Transfer.php
index 4f9d3dba..fbf85123 100644
--- a/src/system/sdks/AliPay/Transfer.php
+++ b/src/system/sdks/AliPay/Transfer.php
@@ -3,7 +3,6 @@ namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
use WeChat\Exceptions\InvalidArgumentException;
-
/**
* 支付宝转账到账户
* Class Transfer
@@ -11,7 +10,6 @@ use WeChat\Exceptions\InvalidArgumentException;
*/
class Transfer extends BasicAliPay
{
-
/**
* 旧版 向指定支付宝账户转账
* @param array $options
@@ -24,7 +22,6 @@ class Transfer extends BasicAliPay
$this->options->set('method', 'alipay.fund.trans.toaccount.transfer');
return $this->getResult($options);
}
-
/**
* 新版 向指定支付宝账户转账
* @param array $options
@@ -38,7 +35,6 @@ class Transfer extends BasicAliPay
$this->options->set('method', 'alipay.fund.trans.uni.transfer');
return $this->getResult($options);
}
-
/**
* 新版 转账业务单据查询接口
* @param array $options
@@ -53,7 +49,6 @@ class Transfer extends BasicAliPay
return $this->getResult($options);
}
-
/**
* 新版 支付宝资金账户资产查询接口
* @param array $options
@@ -67,7 +62,6 @@ class Transfer extends BasicAliPay
$this->options->set('method', 'alipay.fund.account.query');
return $this->getResult($options);
}
-
/**
* 新版 设置网关应用公钥证书SN、支付宝根证书SN
*/
@@ -88,4 +82,5 @@ class Transfer extends BasicAliPay
throw new InvalidArgumentException("Missing options -- [alipay_root_cert_sn]");
}
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Wap.php b/src/system/sdks/AliPay/Wap.php
index 5a62b240..0ed83666 100644
--- a/src/system/sdks/AliPay/Wap.php
+++ b/src/system/sdks/AliPay/Wap.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 手机WAP网站支付支持
* Class Wap
@@ -20,7 +19,6 @@ class Wap extends BasicAliPay
$this->options->set('method', 'alipay.trade.wap.pay');
$this->params->set('product_code', 'QUICK_WAP_WAY');
}
-
/**
* 创建数据操作
* @param array $options
@@ -31,4 +29,5 @@ class Wap extends BasicAliPay
parent::applyData($options);
return $this->buildPayHtml();
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/AliPay/Web.php b/src/system/sdks/AliPay/Web.php
index cb5a11a8..f6d5f5a5 100644
--- a/src/system/sdks/AliPay/Web.php
+++ b/src/system/sdks/AliPay/Web.php
@@ -2,7 +2,6 @@
namespace AliPay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicAliPay;
-
/**
* 支付宝网站支付
* Class Web
@@ -20,7 +19,6 @@ class Web extends BasicAliPay
$this->options->set('method', 'alipay.trade.page.pay');
$this->params->set('product_code', 'FAST_INSTANT_TRADE_PAY');
}
-
/**
* 创建数据操作
* @param array $options
@@ -31,4 +29,5 @@ class Web extends BasicAliPay
parent::applyData($options);
return $this->buildPayHtml();
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/We.php b/src/system/sdks/We.php
index 99359161..41df9453 100644
--- a/src/system/sdks/We.php
+++ b/src/system/sdks/We.php
@@ -2,7 +2,6 @@
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\DataArray;
use WeChat\Exceptions\InvalidInstanceException;
-
/**
* 加载缓存器
*
@@ -80,13 +79,11 @@ class We
* @var string
*/
const VERSION = '1.2.37';
-
/**
* 静态配置
* @var DataArray
*/
private static $config;
-
/**
* 设置及获取参数
* @param array $option
@@ -102,7 +99,6 @@ class We
}
return [];
}
-
/**
* 静态魔术加载方法
* @param string $name 静态类名
@@ -113,15 +109,15 @@ class We
public static function __callStatic($name, $arguments)
{
if (substr($name, 0, 6) === 'WeChat') {
- $class = 'WeChat\\' . substr($name, 6);
+ $class = 'WeChat\\'.substr($name, 6);
} elseif (substr($name, 0, 6) === 'WeMini') {
- $class = 'WeMini\\' . substr($name, 6);
+ $class = 'WeMini\\'.substr($name, 6);
} elseif (substr($name, 0, 6) === 'AliPay') {
- $class = 'AliPay\\' . substr($name, 6);
+ $class = 'AliPay\\'.substr($name, 6);
} elseif (substr($name, 0, 7) === 'WePayV3') {
- $class = 'WePayV3\\' . substr($name, 7);
+ $class = 'WePayV3\\'.substr($name, 7);
} elseif (substr($name, 0, 5) === 'WePay') {
- $class = 'WePay\\' . substr($name, 5);
+ $class = 'WePay\\'.substr($name, 5);
}
if (!empty($class) && class_exists($class)) {
$option = array_shift($arguments);
@@ -130,5 +126,5 @@ class We
}
throw new InvalidInstanceException("class {$name} not found");
}
-
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Card.php b/src/system/sdks/WeChat/Card.php
index b411070c..1d55730a 100644
--- a/src/system/sdks/WeChat/Card.php
+++ b/src/system/sdks/WeChat/Card.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 卡券管理
* Class Card
@@ -23,7 +22,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 设置买单接口
* @param string $card_id
@@ -38,7 +36,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'is_open' => $is_open]);
}
-
/**
* 设置自助核销接口
* @param string $card_id
@@ -53,7 +50,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'is_open' => $is_open]);
}
-
/**
* 创建二维码接口
* @param array $data
@@ -67,7 +63,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 创建货架接口
* @param array $data
@@ -81,7 +76,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 导入自定义code
* @param string $card_id
@@ -96,7 +90,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'code' => $code]);
}
-
/**
* 查询导入code数目
* @param string $card_id
@@ -110,7 +103,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id]);
}
-
/**
* 核查code接口
* @param string $card_id 进行导入code的卡券ID
@@ -125,7 +117,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'code' => $code]);
}
-
/**
* 图文消息群发卡券
* @param string $card_id
@@ -139,7 +130,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id]);
}
-
/**
* 设置测试白名单
* @param array $openids
@@ -154,7 +144,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid' => $openids, 'username' => $usernames]);
}
-
/**
* 线下核销查询Code
* @param string $code 单张卡券的唯一标准
@@ -173,7 +162,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 线下核销核销Code
* @param string $code 需核销的Code码
@@ -190,7 +178,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* Code解码接口
* @param string $encrypt_code
@@ -204,7 +191,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['encrypt_code' => $encrypt_code]);
}
-
/**
* 获取用户已领取卡券接口
* @param string $openid
@@ -221,7 +207,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查看卡券详情
* @param string $card_id
@@ -235,7 +220,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id]);
}
-
/**
* 批量查询卡券列表
* @param int $offset 查询卡列表的起始偏移量,从0开始,即offset: 5是指从从列表里的第六个开始读取
@@ -253,7 +237,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 更改卡券信息接口
* @param string $card_id
@@ -268,7 +251,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'member_card' => $member_card]);
}
-
/**
* 修改库存接口
* @param string $card_id 卡券ID
@@ -287,7 +269,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 更改Code接口
* @param string $code 需变更的Code码
@@ -305,7 +286,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除卡券接口
* @param string $card_id
@@ -319,7 +299,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id]);
}
-
/**
* 设置卡券失效接口
* @param string $code
@@ -337,7 +316,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 拉取卡券概况数据接口
* @param string $begin_date 查询数据的起始时间
@@ -354,7 +332,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取免费券数据接口
* @param string $begin_date 查询数据的起始时间
@@ -373,8 +350,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
-
/**
* 激活会员卡
* @param array $data
@@ -388,7 +363,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 设置开卡字段接口
* 用户激活时需要填写的选项
@@ -403,7 +377,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取用户提交资料
* 根据activate_ticket获取到用户填写的信息
@@ -418,7 +391,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['activate_ticket' => $activate_ticket]);
}
-
/**
* 更新会员信息
* @param array $data
@@ -432,7 +404,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 拉取会员卡概况数据接口
* @param string $begin_date 查询数据的起始时间
@@ -449,7 +420,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 拉取单张会员卡数据接口
* @param string $begin_date 查询数据的起始时间
@@ -466,7 +436,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 拉取会员信息(积分查询)接口
* @param string $card_id 查询会员卡的cardid
@@ -482,7 +451,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 设置支付后投放卡券接口
* @param array $data
@@ -496,7 +464,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除支付后投放卡券规则
* @param integer $rule_id 支付即会员的规则名称
@@ -510,7 +477,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['rule_id' => $rule_id]);
}
-
/**
* 查询支付后投放卡券规则详情
* @param integer $rule_id 要查询规则id
@@ -524,7 +490,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['rule_id' => $rule_id]);
}
-
/**
* 批量查询支付后投放卡券规则
* @param integer $offset 起始偏移量
@@ -541,7 +506,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 创建支付后领取立减金活动
* @param array $data
@@ -555,7 +519,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 开通券点账户接口
* @return array
@@ -568,7 +531,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 对优惠券批价
* @param string $card_id 需要来配置库存的card_id
@@ -583,7 +545,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['card_id' => $card_id, 'quantity' => $quantity]);
}
-
/**
* 查询券点余额接口
* @return array
@@ -596,7 +557,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 确认兑换库存接口
* @param string $card_id 需要来兑换库存的card_id
@@ -613,7 +573,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 充值券点接口
* @param integer $coin_count
@@ -627,7 +586,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['coin_count' => $coin_count]);
}
-
/**
* 查询订单详情接口
* @param string $order_id
@@ -641,7 +599,6 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['order_id' => $order_id]);
}
-
/**
* 查询券点流水详情接口
* @param array $data
@@ -655,5 +612,5 @@ class Card extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/BasicAliPay.php b/src/system/sdks/WeChat/Contracts/BasicAliPay.php
index 57960c21..0af33bba 100644
--- a/src/system/sdks/WeChat/Contracts/BasicAliPay.php
+++ b/src/system/sdks/WeChat/Contracts/BasicAliPay.php
@@ -3,7 +3,6 @@ namespace WeChat\Contracts;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 支付宝支付基类
* Class AliPay
@@ -17,31 +16,26 @@ abstract class BasicAliPay
* @var DataArray
*/
protected $config;
-
/**
* 当前请求数据
* @var DataArray
*/
protected $options;
-
/**
* DzContent数据
* @var DataArray
*/
protected $params;
-
/**
* 静态缓存
* @var static
*/
protected static $cache;
-
/**
* 正常请求网关
* @var string
*/
protected $gateway = 'https://openapi.alipay.com/gateway.do?charset=utf-8';
-
/**
* AliPay constructor.
* @param array $options
@@ -80,7 +74,6 @@ abstract class BasicAliPay
$this->options->set('app_auth_token', $options['app_auth_token']);
}
}
-
/**
* 静态创建对象
* @param array $config
@@ -88,11 +81,10 @@ abstract class BasicAliPay
*/
public static function instance(array $config)
{
- $key = md5(get_called_class() . serialize($config));
+ $key = md5(get_called_class().serialize($config));
if (isset(self::$cache[$key])) return self::$cache[$key];
return self::$cache[$key] = new static($config);
}
-
/**
* 查询支付宝订单状态
* @param string $out_trade_no
@@ -105,7 +97,6 @@ abstract class BasicAliPay
$this->options->set('method', 'alipay.trade.query');
return $this->getResult(['out_trade_no' => $out_trade_no]);
}
-
/**
* 支付宝订单退款操作
* @param array|string $options 退款参数或退款商户订单号
@@ -120,7 +111,6 @@ abstract class BasicAliPay
$this->options->set('method', 'alipay.trade.refund');
return $this->getResult($options);
}
-
/**
* 关闭支付宝进行中的订单
* @param array|string $options
@@ -134,7 +124,6 @@ abstract class BasicAliPay
$this->options->set('method', 'alipay.trade.close');
return $this->getResult($options);
}
-
/**
* 获取通知数据
*
@@ -158,7 +147,6 @@ abstract class BasicAliPay
}
return $data;
}
-
/**
* 验证接口返回的数据签名
* @param array $data 通知数据
@@ -181,7 +169,6 @@ abstract class BasicAliPay
}
return $data;
}
-
/**
* 获取数据签名
* @return string
@@ -197,7 +184,6 @@ abstract class BasicAliPay
}
return base64_encode($sign);
}
-
/**
* 去除证书前后内容及空白
* @param string $sign
@@ -205,10 +191,9 @@ abstract class BasicAliPay
*/
protected function trimCert($sign)
{
- // if (file_exists($sign)) $sign = file_get_contents($sign);
+ //if (file_exists($sign)) $sign = file_get_contents($sign);
return preg_replace(['/\s+/', '/\-{5}.*?\-{5}/'], '', $sign);
}
-
/**
* 数据签名处理
* @param array $data 需要进行签名数据
@@ -226,7 +211,6 @@ abstract class BasicAliPay
}
return join('&', $attrs);
}
-
/**
* 数据包生成及数据签名
* @param array $options
@@ -236,7 +220,6 @@ abstract class BasicAliPay
$this->options->set('biz_content', json_encode($this->params->merge($options), 256));
$this->options->set('sign', $this->getSign());
}
-
/**
* 请求接口并验证访问数据
* @param array $options
@@ -247,7 +230,7 @@ abstract class BasicAliPay
protected function getResult($options)
{
$this->applyData($options);
- $method = str_replace('.', '_', $this->options['method']) . '_response';
+ $method = str_replace('.', '_', $this->options['method']).'_response';
$data = json_decode(Tools::get($this->gateway, $this->options->get()), true);
if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {
throw new InvalidResponseException(
@@ -258,10 +241,9 @@ abstract class BasicAliPay
);
}
return $data[$method];
- // 去除返回结果签名检查
- // return $this->verify($data[$method], $data['sign']);
+ //去除返回结果签名检查
+ //return $this->verify($data[$method], $data['sign']);
}
-
/**
* 生成支付HTML代码
* @return string
@@ -276,7 +258,6 @@ abstract class BasicAliPay
$html .= "";
return "{$html}";
}
-
/**
* 新版 从证书中提取序列号
* @param string $sign
@@ -284,11 +265,10 @@ abstract class BasicAliPay
*/
public function getCertSN($sign)
{
- // if (file_exists($sign)) $sign = file_get_contents($sign);
+ //if (file_exists($sign)) $sign = file_get_contents($sign);
$ssl = openssl_x509_parse($sign);
- return md5($this->_arr2str(array_reverse($ssl['issuer'])) . $ssl['serialNumber']);
+ return md5($this->_arr2str(array_reverse($ssl['issuer'])).$ssl['serialNumber']);
}
-
/**
* 新版 提取根证书序列号
* @param string $sign
@@ -297,24 +277,23 @@ abstract class BasicAliPay
public function getRootCertSN($sign)
{
$sn = null;
- // if (file_exists($sign)) $sign = file_get_contents($sign);
+ //if (file_exists($sign)) $sign = file_get_contents($sign);
$array = explode("-----END CERTIFICATE-----", $sign);
for ($i = 0; $i < count($array) - 1; $i++) {
- $ssl[$i] = openssl_x509_parse($array[$i] . "-----END CERTIFICATE-----");
+ $ssl[$i] = openssl_x509_parse($array[$i]."-----END CERTIFICATE-----");
if (strpos($ssl[$i]['serialNumber'], '0x') === 0) {
$ssl[$i]['serialNumber'] = $this->_hex2dec($ssl[$i]['serialNumber']);
}
if ($ssl[$i]['signatureTypeLN'] == "sha1WithRSAEncryption" || $ssl[$i]['signatureTypeLN'] == "sha256WithRSAEncryption") {
if ($sn == null) {
- $sn = md5($this->_arr2str(array_reverse($ssl[$i]['issuer'])) . $ssl[$i]['serialNumber']);
+ $sn = md5($this->_arr2str(array_reverse($ssl[$i]['issuer'])).$ssl[$i]['serialNumber']);
} else {
- $sn = $sn . "_" . md5($this->_arr2str(array_reverse($ssl[$i]['issuer'])) . $ssl[$i]['serialNumber']);
+ $sn = $sn."_".md5($this->_arr2str(array_reverse($ssl[$i]['issuer'])).$ssl[$i]['serialNumber']);
}
}
}
return $sn;
}
-
/**
* 新版 数组转字符串
* @param array $array
@@ -325,13 +304,11 @@ abstract class BasicAliPay
$string = [];
if ($array && is_array($array)) {
foreach ($array as $key => $value) {
- $string[] = $key . '=' . $value;
+ $string[] = $key.'='.$value;
}
}
return implode(',', $string);
}
-
-
/**
* 新版 0x转高精度数字
* @param string $hex
@@ -345,12 +322,11 @@ abstract class BasicAliPay
}
return $dec;
}
-
/**
* 应用数据操作
* @param array $options
* @return mixed
*/
abstract public function apply($options);
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/BasicPushEvent.php b/src/system/sdks/WeChat/Contracts/BasicPushEvent.php
index b02e6fdc..ccbbdd70 100644
--- a/src/system/sdks/WeChat/Contracts/BasicPushEvent.php
+++ b/src/system/sdks/WeChat/Contracts/BasicPushEvent.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidDecryptException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信通知处理基本类
* Class BasicPushEvent
@@ -17,43 +16,36 @@ class BasicPushEvent
* @var string
*/
protected $appid;
-
/**
* 公众号推送XML内容
* @var string
*/
protected $postxml;
-
/**
* 公众号推送加密类型
* @var string
*/
protected $encryptType;
-
/**
* 公众号的推送请求参数
* @var DataArray
*/
protected $input;
-
/**
* 当前公众号配置对象
* @var DataArray
*/
protected $config;
-
/**
* 公众号推送内容对象
* @var DataArray
*/
protected $receive;
-
/**
* 准备回复的消息内容
* @var array
*/
protected $message;
-
/**
* BasicPushEvent constructor.
* @param array $options
@@ -70,11 +62,11 @@ class BasicPushEvent
if (empty($options['token'])) {
throw new InvalidArgumentException("Missing Config -- [token]");
}
- // 参数初始化
+ //参数初始化
$this->config = new DataArray($options);
$this->input = new DataArray($_REQUEST);
$this->appid = $this->config->get('appid');
- // 推送消息处理
+ //推送消息处理
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$this->postxml = file_get_contents("php://input");
$this->encryptType = $this->input->get('encrypt_type');
@@ -83,7 +75,7 @@ class BasicPushEvent
throw new InvalidArgumentException("Missing Config -- [encodingaeskey]");
}
if (!class_exists('Prpcrypt', false)) {
- require __DIR__ . '/Prpcrypt.php';
+ require __DIR__.'/Prpcrypt.php';
}
$prpcrypt = new \Prpcrypt($this->config->get('encodingaeskey'));
$result = Tools::xml2arr($this->postxml);
@@ -101,7 +93,6 @@ class BasicPushEvent
throw new InvalidResponseException('Invalid interface request.', '0');
}
}
-
/**
* 消息是否需要加密
* @return boolean
@@ -110,7 +101,6 @@ class BasicPushEvent
{
return $this->encryptType === 'aes';
}
-
/**
* 回复消息
* @param array $data 消息内容
@@ -124,10 +114,10 @@ class BasicPushEvent
$xml = Tools::arr2xml(empty($data) ? $this->message : $data);
if ($this->isEncrypt() || $isEncrypt) {
if (!class_exists('Prpcrypt', false)) {
- require __DIR__ . '/Prpcrypt.php';
+ require __DIR__.'/Prpcrypt.php';
}
$prpcrypt = new \Prpcrypt($this->config->get('encodingaeskey'));
- // 如果是第三方平台,加密得使用 component_appid
+ //如果是第三方平台,加密得使用 component_appid
$component_appid = $this->config->get('component_appid');
$appid = empty($component_appid) ? $this->appid : $component_appid;
$array = $prpcrypt->encrypt($xml, $appid);
@@ -144,7 +134,6 @@ class BasicPushEvent
@ob_clean();
echo $xml;
}
-
/**
* 验证来自微信服务器
* @param string $str
@@ -160,7 +149,6 @@ class BasicPushEvent
sort($tmpArr, SORT_STRING);
return sha1(implode($tmpArr)) === $signature;
}
-
/**
* 获取公众号推送对象
* @param null|string $field 指定获取字段
@@ -170,7 +158,6 @@ class BasicPushEvent
{
return $this->receive->get($field);
}
-
/**
* 获取当前微信OPENID
* @return string
@@ -179,7 +166,6 @@ class BasicPushEvent
{
return $this->receive->get('FromUserName');
}
-
/**
* 获取当前推送消息类型
* @return string
@@ -188,7 +174,6 @@ class BasicPushEvent
{
return $this->receive->get('MsgType');
}
-
/**
* 获取当前推送消息ID
* @return string
@@ -197,7 +182,6 @@ class BasicPushEvent
{
return $this->receive->get('MsgId');
}
-
/**
* 获取当前推送时间
* @return integer
@@ -206,7 +190,6 @@ class BasicPushEvent
{
return $this->receive->get('CreateTime');
}
-
/**
* 获取当前推送公众号
* @return string
@@ -215,4 +198,5 @@ class BasicPushEvent
{
return $this->receive->get('ToUserName');
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/BasicWeChat.php b/src/system/sdks/WeChat/Contracts/BasicWeChat.php
index 6a056d62..e2e7e524 100644
--- a/src/system/sdks/WeChat/Contracts/BasicWeChat.php
+++ b/src/system/sdks/WeChat/Contracts/BasicWeChat.php
@@ -3,50 +3,42 @@ namespace WeChat\Contracts;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* Class BasicWeChat
* @package WeChat\Contracts
*/
class BasicWeChat
{
-
/**
* 当前微信配置
* @var DataArray
*/
public $config;
-
/**
* 访问AccessToken
* @var string
*/
public $access_token = '';
-
/**
* 当前请求方法参数
* @var array
*/
protected $currentMethod = [];
-
/**
* 当前模式
* @var bool
*/
protected $isTry = false;
-
/**
* 静态缓存
* @var static
*/
protected static $cache;
-
/**
* 注册代替函数
* @var string
*/
protected $GetAccessTokenCallback;
-
/**
* BasicWeChat constructor.
* @param array $options
@@ -67,7 +59,6 @@ class BasicWeChat
}
$this->config = new DataArray($options);
}
-
/**
* 静态创建对象
* @param array $config
@@ -75,11 +66,10 @@ class BasicWeChat
*/
public static function instance(array $config)
{
- $key = md5(get_called_class() . serialize($config));
+ $key = md5(get_called_class().serialize($config));
if (isset(self::$cache[$key])) return self::$cache[$key];
return self::$cache[$key] = new static($config);
}
-
/**
* 获取访问 AccessToken
* @return string
@@ -91,12 +81,12 @@ class BasicWeChat
if (!empty($this->access_token)) {
return $this->access_token;
}
- $cache = $this->config->get('appid') . '_access_token';
+ $cache = $this->config->get('appid').'_access_token';
$this->access_token = Tools::getCache($cache);
if (!empty($this->access_token)) {
return $this->access_token;
}
- // 处理开放平台授权公众号获取AccessToken
+ //处理开放平台授权公众号获取AccessToken
if (!empty($this->GetAccessTokenCallback) && is_callable($this->GetAccessTokenCallback)) {
$this->access_token = call_user_func_array($this->GetAccessTokenCallback, [$this->config->get('appid'), $this]);
if (!empty($this->access_token)) {
@@ -112,7 +102,6 @@ class BasicWeChat
}
return $this->access_token = $result['access_token'];
}
-
/**
* 设置外部接口 AccessToken
* @param string $accessToken
@@ -128,10 +117,9 @@ class BasicWeChat
if (!is_string($accessToken)) {
throw new InvalidArgumentException("Invalid AccessToken type, need string.");
}
- $cache = $this->config->get('appid') . '_access_token';
+ $cache = $this->config->get('appid').'_access_token';
Tools::setCache($cache, $this->access_token = $accessToken);
}
-
/**
* 清理删除 AccessToken
* @return bool
@@ -139,9 +127,8 @@ class BasicWeChat
public function delAccessToken()
{
$this->access_token = '';
- return Tools::delCache($this->config->get('appid') . '_access_token');
+ return Tools::delCache($this->config->get('appid').'_access_token');
}
-
/**
* 以GET获取接口数据并转为数组
* @param string $url 接口地址
@@ -163,7 +150,6 @@ class BasicWeChat
throw new InvalidResponseException($exception->getMessage(), $exception->getCode());
}
}
-
/**
* 以POST获取接口数据并转为数组
* @param string $url 接口地址
@@ -187,7 +173,6 @@ class BasicWeChat
throw new InvalidResponseException($exception->getMessage(), $exception->getCode());
}
}
-
/**
* 注册当前请求接口
* @param string $url 接口地址
@@ -203,7 +188,6 @@ class BasicWeChat
if (empty($this->access_token)) $this->access_token = $this->getAccessToken();
return $url = str_replace('ACCESS_TOKEN', urlencode($this->access_token), $url);
}
-
/**
* 接口通用POST请求方法
* @param string $url 接口URL
@@ -218,7 +202,6 @@ class BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data, $isBuildJson);
}
-
/**
* 接口通用GET请求方法
* @param string $url 接口URL
@@ -231,5 +214,5 @@ class BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/BasicWePay.php b/src/system/sdks/WeChat/Contracts/BasicWePay.php
index 3f5ae4c3..6d3afd17 100644
--- a/src/system/sdks/WeChat/Contracts/BasicWePay.php
+++ b/src/system/sdks/WeChat/Contracts/BasicWePay.php
@@ -3,7 +3,6 @@ namespace WeChat\Contracts;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信支付基础类
* Class BasicPay
@@ -16,19 +15,16 @@ class BasicWePay
* @var DataArray
*/
protected $config;
-
/**
* 当前请求数据
* @var DataArray
*/
protected $params;
-
/**
* 静态缓存
* @var static
*/
protected static $cache;
-
/**
* WeChat constructor.
* @param array $options
@@ -48,13 +44,13 @@ class BasicWePay
Tools::$cache_path = $options['cache_path'];
}
$this->config = new DataArray($options);
- // 商户基础参数
+ //商户基础参数
$this->params = new DataArray([
'appid' => $this->config->get('appid'),
'mch_id' => $this->config->get('mch_id'),
'nonce_str' => Tools::createNoncestr(),
]);
- // 商户参数支持
+ //商户参数支持
if ($this->config->get('sub_appid')) {
$this->params->set('sub_appid', $this->config->get('sub_appid'));
}
@@ -62,7 +58,6 @@ class BasicWePay
$this->params->set('sub_mch_id', $this->config->get('sub_mch_id'));
}
}
-
/**
* 静态创建对象
* @param array $config
@@ -70,11 +65,10 @@ class BasicWePay
*/
public static function instance(array $config)
{
- $key = md5(get_called_class() . serialize($config));
+ $key = md5(get_called_class().serialize($config));
if (isset(self::$cache[$key])) return self::$cache[$key];
return self::$cache[$key] = new static($config);
}
-
/**
* 获取微信支付通知
* @return array
@@ -88,7 +82,6 @@ class BasicWePay
}
throw new InvalidResponseException('Invalid Notify.', '0');
}
-
/**
* 获取微信支付通知回复内容
* @return string
@@ -97,7 +90,6 @@ class BasicWePay
{
return Tools::arr2xml(['return_code' => 'SUCCESS', 'return_msg' => 'OK']);
}
-
/**
* 生成支付签名
* @param array $data 参与签名的数据
@@ -113,13 +105,12 @@ class BasicWePay
if ('' === $v || null === $v) continue;
$buff .= "{$k}={$v}&";
}
- $buff .= ("key=" . $this->config->get('mch_key'));
+ $buff .= ("key=".$this->config->get('mch_key'));
if (strtoupper($signType) === 'MD5') {
return strtoupper(md5($buff));
}
return strtoupper(hash_hmac('SHA256', $buff, $this->config->get('mch_key')));
}
-
/**
* 转换短链接
* @param string $longUrl 需要转换的URL,签名用原串,传输需URLencode
@@ -132,7 +123,6 @@ class BasicWePay
$url = 'https://api.mch.weixin.qq.com/tools/shorturl';
return $this->callPostApi($url, ['long_url' => $longUrl]);
}
-
/**
* 数组直接转xml数据输出
* @param array $data
@@ -147,7 +137,6 @@ class BasicWePay
}
echo $xml;
}
-
/**
* 以 Post 请求接口
* @param string $url 请求
@@ -170,8 +159,8 @@ class BasicWePay
if (is_string($option['ssl_p12']) && file_exists($option['ssl_p12'])) {
$content = file_get_contents($option['ssl_p12']);
if (openssl_pkcs12_read($content, $certs, $this->config->get('mch_id'))) {
- $option['ssl_key'] = Tools::pushFile(md5($certs['pkey']) . '.pem', $certs['pkey']);
- $option['ssl_cer'] = Tools::pushFile(md5($certs['cert']) . '.pem', $certs['cert']);
+ $option['ssl_key'] = Tools::pushFile(md5($certs['pkey']).'.pem', $certs['pkey']);
+ $option['ssl_cer'] = Tools::pushFile(md5($certs['cert']).'.pem', $certs['cert']);
} else throw new InvalidArgumentException("P12 certificate does not match MCH_ID --- ssl_p12");
}
if (empty($option['ssl_cer']) || !file_exists($option['ssl_cer'])) {
@@ -192,3 +181,4 @@ class BasicWePay
return $result;
}
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/BasicWeWork.php b/src/system/sdks/WeChat/Contracts/BasicWeWork.php
index 3c4e6717..288a159f 100644
--- a/src/system/sdks/WeChat/Contracts/BasicWeWork.php
+++ b/src/system/sdks/WeChat/Contracts/BasicWeWork.php
@@ -17,12 +17,12 @@ class BasicWeWork extends BasicWeChat
public function getAccessToken()
{
if ($this->access_token) return $this->access_token;
- $ckey = $this->config->get('appid') . '_access_token';
+ $ckey = $this->config->get('appid').'_access_token';
if ($this->access_token = Tools::getCache($ckey)) return $this->access_token;
list($appid, $secret) = [$this->config->get('appid'), $this->config->get('appsecret')];
$result = Tools::json2arr(Tools::get("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={$appid}&corpsecret={$secret}"));
if (isset($result['access_token']) && $result['access_token']) Tools::setCache($ckey, $result['access_token'], 7000);
return $this->access_token = $result['access_token'];
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/DataArray.php b/src/system/sdks/WeChat/Contracts/DataArray.php
index ea83b1b0..4ceee995 100644
--- a/src/system/sdks/WeChat/Contracts/DataArray.php
+++ b/src/system/sdks/WeChat/Contracts/DataArray.php
@@ -2,20 +2,17 @@
namespace WeChat\Contracts;
if (!defined('DEDEINC')) exit('dedebiz');
use ArrayAccess;
-
/**
* Class DataArray
* @package WeChat
*/
class DataArray implements ArrayAccess
{
-
/**
* 当前配置值
* @var array
*/
private $config = [];
-
/**
* Config constructor.
* @param array $options
@@ -24,7 +21,6 @@ class DataArray implements ArrayAccess
{
$this->config = $options;
}
-
/**
* 设置配置项值
* @param string $offset
@@ -34,7 +30,6 @@ class DataArray implements ArrayAccess
{
$this->offsetSet($offset, $value);
}
-
/**
* 获取配置项参数
* @param string|null $offset
@@ -44,7 +39,6 @@ class DataArray implements ArrayAccess
{
return $this->offsetGet($offset);
}
-
/**
* 合并数据到对象
* @param array $data 需要合并的数据
@@ -58,7 +52,6 @@ class DataArray implements ArrayAccess
}
return array_merge($this->config, $data);
}
-
/**
* 设置配置项值
* @param string $offset
@@ -73,7 +66,6 @@ class DataArray implements ArrayAccess
$this->config[$offset] = $value;
}
}
-
/**
* 判断配置Key是否存在
* @param string $offset
@@ -84,7 +76,6 @@ class DataArray implements ArrayAccess
{
return isset($this->config[$offset]);
}
-
/**
* 清理配置项
* @param string|null $offset
@@ -98,7 +89,6 @@ class DataArray implements ArrayAccess
unset($this->config[$offset]);
}
}
-
/**
* 获取配置项参数
* @param string|null $offset
@@ -112,4 +102,5 @@ class DataArray implements ArrayAccess
}
return isset($this->config[$offset]) ? $this->config[$offset] : null;
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/DataError.php b/src/system/sdks/WeChat/Contracts/DataError.php
index 354e70b8..94757297 100644
--- a/src/system/sdks/WeChat/Contracts/DataError.php
+++ b/src/system/sdks/WeChat/Contracts/DataError.php
@@ -167,7 +167,6 @@ class DataError
9001035 => '设备申请参数不合法',
9001036 => '查询起始值 begin 不合法',
];
-
/**
* 异常代码解析描述
* @param string $code
@@ -177,5 +176,5 @@ class DataError
{
return isset(self::$message[$code]) ? self::$message[$code] : $code;
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/MyCurlFile.php b/src/system/sdks/WeChat/Contracts/MyCurlFile.php
index 6380fdae..5b8c9218 100644
--- a/src/system/sdks/WeChat/Contracts/MyCurlFile.php
+++ b/src/system/sdks/WeChat/Contracts/MyCurlFile.php
@@ -1,7 +1,6 @@
mimetype)) $this->mimetype = Tools::getExtMine($this->extension);
if (empty($this->postname)) $this->postname = pathinfo($filename, PATHINFO_BASENAME);
$this->content = base64_encode(file_get_contents($filename));
- $this->tempname = md5($this->content) . ".{$this->extension}";
+ $this->tempname = md5($this->content).".{$this->extension}";
}
}
-
/**
* 获取文件上传信息
* @return \CURLFile|string
@@ -52,14 +49,13 @@ class MyCurlFile extends \stdClass
return "@{$this->tempname};filename={$this->postname};type={$this->mimetype}";
}
}
-
/**
* 通用销毁函数清理缓存文件
* 提前删除过期因此放到了网络请求之后
*/
public function __destruct()
{
- // Tools::delCache($this->tempname);
+ //Tools::delCache($this->tempname);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/Prpcrypt.php b/src/system/sdks/WeChat/Contracts/Prpcrypt.php
index 51d42cba..73214861 100644
--- a/src/system/sdks/WeChat/Contracts/Prpcrypt.php
+++ b/src/system/sdks/WeChat/Contracts/Prpcrypt.php
@@ -6,9 +6,7 @@ if (!defined('DEDEINC')) exit('dedebiz');
*/
class PKCS7Encoder
{
-
public static $blockSize = 32;
-
/**
* 对需要加密的明文进行填充补位
* @param string $text 需要进行填充补位操作的明文
@@ -24,9 +22,8 @@ class PKCS7Encoder
for ($index = 0; $index < $amount_to_pad; $index++) {
$tmp .= $pad_chr;
}
- return $text . $tmp;
+ return $text.$tmp;
}
-
/**
* 对解密后的明文进行补位删除
* @param string $text 解密后的明文
@@ -40,18 +37,14 @@ class PKCS7Encoder
}
return substr($text, 0, strlen($text) - $pad);
}
-
}
-
/**
* 公众号消息 - 加解密
* Class Prpcrypt
*/
class Prpcrypt
{
-
public $key;
-
/**
* Prpcrypt constructor.
* @param $key
@@ -60,7 +53,6 @@ class Prpcrypt
{
$this->key = base64_decode("{$key}=");
}
-
/**
* 对明文进行加密
* @param string $text 需要加密的明文
@@ -73,14 +65,13 @@ class Prpcrypt
$random = $this->getRandomStr();
$iv = substr($this->key, 0, 16);
$pkcEncoder = new PKCS7Encoder();
- $text = $pkcEncoder->encode($random . pack("N", strlen($text)) . $text . $appid);
+ $text = $pkcEncoder->encode($random.pack("N", strlen($text)).$text.$appid);
$encrypted = openssl_encrypt($text, 'AES-256-CBC', substr($this->key, 0, 32), OPENSSL_ZERO_PADDING, $iv);
return [ErrorCode::$OK, $encrypted];
} catch (Exception $e) {
return [ErrorCode::$EncryptAESError, null];
}
}
-
/**
* 对密文进行解密
* @param string $encrypted 需要解密的密文
@@ -108,7 +99,6 @@ class Prpcrypt
return [ErrorCode::$IllegalBuffer, null];
}
}
-
/**
* 随机生成16位字符串
* @param string $str
@@ -123,9 +113,7 @@ class Prpcrypt
}
return $str;
}
-
}
-
/**
* 仅用作类内部使用
* 不用于官方API接口的errCode码
@@ -160,7 +148,6 @@ class ErrorCode
'40010' => 'Base64解码失败',
'40011' => '公众帐号生成回包xml失败',
];
-
/**
* 获取错误消息内容
* @param string $code 错误代码
@@ -173,5 +160,5 @@ class ErrorCode
}
return false;
}
-
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Contracts/Tools.php b/src/system/sdks/WeChat/Contracts/Tools.php
index 772b5b29..e776b80f 100644
--- a/src/system/sdks/WeChat/Contracts/Tools.php
+++ b/src/system/sdks/WeChat/Contracts/Tools.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidResponseException;
use WeChat\Exceptions\LocalCacheException;
-
/**
* 网络请求支持
* Class Tools
@@ -17,24 +16,21 @@ class Tools
* @var null
*/
public static $cache_path = null;
-
/**
* 缓存写入操作
* @var array
*/
public static $cache_callable = [
- 'set' => null, // 写入缓存
- 'get' => null, // 获取缓存
- 'del' => null, // 删除缓存
- 'put' => null, // 写入文件
+ 'set' => null,//写入缓存
+ 'get' => null,//获取缓存
+ 'del' => null,//删除缓存
+ 'put' => null,//写入文件
];
-
/**
* 网络缓存
* @var array
*/
private static $cache_curl = [];
-
/**
* 产生随机字符串
* @param int $length 指定字符长度
@@ -49,8 +45,6 @@ class Tools
}
return $str;
}
-
-
/**
* 根据文件后缀获取文件类型
* @param string|array $ext 文件后缀
@@ -66,7 +60,6 @@ class Tools
}
return join(',', array_unique($mine));
}
-
/**
* 获取所有文件扩展的类型
* @return array
@@ -83,7 +76,6 @@ class Tools
}
return $mines;
}
-
/**
* 创建CURL文件对象
* @param mixed $filename
@@ -105,7 +97,6 @@ class Tools
}
return $filename;
}
-
/**
* 数组转XML内容
* @param array $data
@@ -113,9 +104,8 @@ class Tools
*/
public static function arr2xml($data)
{
- return "" . self::_arr2xml($data) . "";
+ return "".self::_arr2xml($data)."";
}
-
/**
* XML内容生成
* @param array $data 数据
@@ -130,7 +120,7 @@ class Tools
if (is_array($val) || is_object($val)) {
$content .= self::_arr2xml($val);
} elseif (is_string($val)) {
- $content .= '';
+ $content .= '';
} else {
$content .= $val;
}
@@ -138,7 +128,6 @@ class Tools
}
return $content;
}
-
/**
* 解析XML内容到数组
* @param string $xml
@@ -155,7 +144,6 @@ class Tools
}
return json_decode(json_encode($data), true);
}
-
/**
* 解析XML文本内容
* @param string $xml
@@ -166,7 +154,6 @@ class Tools
$state = xml_parse($parser = xml_parser_create(), $xml, true);
return xml_parser_free($parser) && $state ? self::xml2arr($xml) : false;
}
-
/**
* 数组转xml内容
* @param array $data
@@ -177,7 +164,6 @@ class Tools
$json = json_encode($data, JSON_UNESCAPED_UNICODE);
return $json === '[]' ? '{}' : $json;
}
-
/**
* 数组对象Emoji编译处理
* @param array $data
@@ -196,7 +182,6 @@ class Tools
}
return $data;
}
-
/**
* 数组对象Emoji反解析处理
* @param array $data
@@ -215,7 +200,6 @@ class Tools
}
return $data;
}
-
/**
* Emoji原形转换为String
* @param string $content
@@ -227,7 +211,6 @@ class Tools
return addslashes($string[0]);
}, json_encode($content)));
}
-
/**
* Emoji字符串转换为原形
* @param string $content
@@ -239,7 +222,6 @@ class Tools
return '\\';
}, json_encode($content)));
}
-
/**
* 解析JSON内容到数组
* @param string $json
@@ -257,7 +239,6 @@ class Tools
}
return $result;
}
-
/**
* 以get访问模拟访问
* @param string $url 访问URL
@@ -271,7 +252,6 @@ class Tools
$options['query'] = $query;
return self::doRequest('get', $url, $options);
}
-
/**
* 以post访问模拟访问
* @param string $url 访问URL
@@ -285,7 +265,6 @@ class Tools
$options['data'] = $data;
return self::doRequest('post', $url, $options);
}
-
/**
* CURL模拟网络请求
* @param string $method 请求方法
@@ -297,25 +276,25 @@ class Tools
public static function doRequest($method, $url, $options = [])
{
$curl = curl_init();
- // GET参数设置
+ //GET参数设置
if (!empty($options['query'])) {
- $url .= (stripos($url, '?') !== false ? '&' : '?') . http_build_query($options['query']);
+ $url .= (stripos($url, '?') !== false ? '&' : '?').http_build_query($options['query']);
}
- // CURL头信息设置
+ //CURL头信息设置
if (!empty($options['headers'])) {
curl_setopt($curl, CURLOPT_HTTPHEADER, $options['headers']);
}
- // POST数据设置
+ //POST数据设置
if (strtolower($method) === 'post') {
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, self::_buildHttpData($options['data']));
}
- // 证书文件设置
+ //证书文件设置
if (!empty($options['ssl_cer'])) if (file_exists($options['ssl_cer'])) {
curl_setopt($curl, CURLOPT_SSLCERTTYPE, 'PEM');
curl_setopt($curl, CURLOPT_SSLCERT, $options['ssl_cer']);
} else throw new InvalidArgumentException("Certificate files that do not exist. --- [ssl_cer]");
- // 证书文件设置
+ //证书文件设置
if (!empty($options['ssl_key'])) if (file_exists($options['ssl_key'])) {
curl_setopt($curl, CURLOPT_SSLKEYTYPE, 'PEM');
curl_setopt($curl, CURLOPT_SSLKEY, $options['ssl_key']);
@@ -327,14 +306,13 @@ class Tools
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
list($content) = [curl_exec($curl), curl_close($curl)];
- // 清理 CURL 缓存文件
+ //清理 CURL 缓存文件
if (!empty(self::$cache_curl)) foreach (self::$cache_curl as $key => $file) {
Tools::delCache($file);
unset(self::$cache_curl[$key]);
}
return $content;
}
-
/**
* POST数据过滤处理
* @param array $data 需要处理的数据
@@ -365,7 +343,6 @@ class Tools
}
return $build ? http_build_query($data) : $data;
}
-
/**
* 写入文件
* @param string $name 文件名称
@@ -384,7 +361,6 @@ class Tools
}
return $file;
}
-
/**
* 缓存配置与存储
* @param string $name 缓存名称
@@ -405,7 +381,6 @@ class Tools
}
return $file;
}
-
/**
* 获取缓存内容
* @param string $name 缓存名称
@@ -426,7 +401,6 @@ class Tools
}
return null;
}
-
/**
* 移除缓存文件
* @param string $name 缓存名称
@@ -440,7 +414,6 @@ class Tools
$file = self::_getCacheName($name);
return !file_exists($file) || @unlink($file);
}
-
/**
* 应用缓存目录
* @param string $name
@@ -449,10 +422,11 @@ class Tools
private static function _getCacheName($name)
{
if (empty(self::$cache_path)) {
- self::$cache_path = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR;
+ self::$cache_path = dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.'Cache'.DIRECTORY_SEPARATOR;
}
- self::$cache_path = rtrim(self::$cache_path, '/\\') . DIRECTORY_SEPARATOR;
+ self::$cache_path = rtrim(self::$cache_path, '/\\').DIRECTORY_SEPARATOR;
file_exists(self::$cache_path) || mkdir(self::$cache_path, 0755, true);
- return self::$cache_path . $name;
+ return self::$cache_path.$name;
}
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Custom.php b/src/system/sdks/WeChat/Custom.php
index 9c9145cb..b29e9375 100644
--- a/src/system/sdks/WeChat/Custom.php
+++ b/src/system/sdks/WeChat/Custom.php
@@ -3,7 +3,6 @@ namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
-
/**
* 客服消息处理
* Class Custom
@@ -26,7 +25,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 修改客服帐号
* @param string $kf_account 客服账号
@@ -42,7 +40,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除客服帐号
* @param string $kf_account 客服账号
@@ -57,7 +54,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 邀请绑定客服帐号
* @param string $kf_account 完整客服帐号,格式为:帐号前缀@公众号微信号
@@ -71,7 +67,6 @@ class Custom extends BasicWeChat
$url = 'https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['kf_account' => $kf_account, 'invite_wx' => $invite_wx]);
}
-
/**
* 获取所有客服账号
* @return array
@@ -84,7 +79,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 设置客服帐号的头像
* @param string $kf_account 客户账号
@@ -99,7 +93,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media' => Tools::createCurlFile($image)]);
}
-
/**
* 客服接口-发消息
* @param array $data
@@ -113,7 +106,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 客服输入状态
* @param string $openid 普通用户(openid)
@@ -128,7 +120,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['touser' => $openid, 'command' => $command]);
}
-
/**
* 根据标签进行群发【订阅号与服务号认证后均可用】
* @param array $data
@@ -142,7 +133,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 根据OpenID列表群发【订阅号不可用,服务号认证后可用】
* @param array $data
@@ -156,7 +146,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除群发【订阅号与服务号认证后均可用】
* @param integer $msg_id 发送出去的消息ID
@@ -173,7 +162,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 预览接口【订阅号与服务号认证后均可用】
* @param array $data
@@ -187,7 +175,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询群发消息发送状态【订阅号与服务号认证后均可用】
* @param integer $msg_id 群发消息后返回的消息id
@@ -201,7 +188,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['msg_id' => $msg_id]);
}
-
/**
* 获取群发速度
* @return array
@@ -214,7 +200,6 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, []);
}
-
/**
* 设置群发速度
* @param integer $speed 群发速度的级别
@@ -228,6 +213,5 @@ class Custom extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['speed' => $speed]);
}
-
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Draft.php b/src/system/sdks/WeChat/Draft.php
index 9ff31e58..625e3d15 100644
--- a/src/system/sdks/WeChat/Draft.php
+++ b/src/system/sdks/WeChat/Draft.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信草稿箱管理
* Class Draft
@@ -24,7 +23,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['articles' => $articles]);
}
-
/**
* 获取草稿
* @param string $media_id
@@ -39,8 +37,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media_id' => $media_id]);
}
-
-
/**
* 删除草稿
* @param string $media_id
@@ -54,7 +50,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media_id' => $media_id]);
}
-
/**
* 新增图文素材
* @param array $data 文件名称
@@ -68,7 +63,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 修改草稿
* @param string $media_id 要修改的图文消息的id
@@ -85,7 +79,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取草稿总数
* @return array
@@ -98,7 +91,6 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 获取草稿列表
* @param int $offset 从全部素材的该偏移位置开始返回,0表示从第一个素材返回
@@ -114,5 +106,5 @@ class Draft extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['no_content' => $no_content, 'offset' => $offset, 'count' => $count]);
}
-
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Exceptions/InvalidArgumentException.php b/src/system/sdks/WeChat/Exceptions/InvalidArgumentException.php
index 1e45e5f5..6c865580 100644
--- a/src/system/sdks/WeChat/Exceptions/InvalidArgumentException.php
+++ b/src/system/sdks/WeChat/Exceptions/InvalidArgumentException.php
@@ -12,7 +12,6 @@ class InvalidArgumentException extends \InvalidArgumentException
* @var array
*/
public $raw = [];
-
/**
* InvalidArgumentException constructor.
* @param string $message
@@ -24,4 +23,5 @@ class InvalidArgumentException extends \InvalidArgumentException
parent::__construct($message, intval($code));
$this->raw = $raw;
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Exceptions/InvalidDecryptException.php b/src/system/sdks/WeChat/Exceptions/InvalidDecryptException.php
index 056d0aa7..a5bf2bed 100644
--- a/src/system/sdks/WeChat/Exceptions/InvalidDecryptException.php
+++ b/src/system/sdks/WeChat/Exceptions/InvalidDecryptException.php
@@ -12,7 +12,6 @@ class InvalidDecryptException extends \Exception
* @var array
*/
public $raw = [];
-
/**
* InvalidDecryptException constructor.
* @param string $message
@@ -24,4 +23,5 @@ class InvalidDecryptException extends \Exception
parent::__construct($message, intval($code));
$this->raw = $raw;
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Exceptions/InvalidInstanceException.php b/src/system/sdks/WeChat/Exceptions/InvalidInstanceException.php
index 538d9dc3..46a99d08 100644
--- a/src/system/sdks/WeChat/Exceptions/InvalidInstanceException.php
+++ b/src/system/sdks/WeChat/Exceptions/InvalidInstanceException.php
@@ -12,7 +12,6 @@ class InvalidInstanceException extends \Exception
* @var array
*/
public $raw = [];
-
/**
* InvalidResponseException constructor.
* @param string $message
@@ -24,4 +23,5 @@ class InvalidInstanceException extends \Exception
parent::__construct($message, intval($code));
$this->raw = $raw;
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Exceptions/InvalidResponseException.php b/src/system/sdks/WeChat/Exceptions/InvalidResponseException.php
index 8f1a6b98..b9c00418 100644
--- a/src/system/sdks/WeChat/Exceptions/InvalidResponseException.php
+++ b/src/system/sdks/WeChat/Exceptions/InvalidResponseException.php
@@ -12,7 +12,6 @@ class InvalidResponseException extends \Exception
* @var array
*/
public $raw = [];
-
/**
* InvalidResponseException constructor.
* @param string $message
@@ -24,5 +23,5 @@ class InvalidResponseException extends \Exception
parent::__construct($message, intval($code));
$this->raw = $raw;
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Exceptions/LocalCacheException.php b/src/system/sdks/WeChat/Exceptions/LocalCacheException.php
index e294cded..7f4fcfa1 100644
--- a/src/system/sdks/WeChat/Exceptions/LocalCacheException.php
+++ b/src/system/sdks/WeChat/Exceptions/LocalCacheException.php
@@ -8,12 +8,10 @@ if (!defined('DEDEINC')) exit('dedebiz');
*/
class LocalCacheException extends \Exception
{
-
/**
* @var array
*/
public $raw = [];
-
/**
* LocalCacheException constructor.
* @param string $message
@@ -25,5 +23,5 @@ class LocalCacheException extends \Exception
parent::__construct($message, intval($code));
$this->raw = $raw;
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Freepublish.php b/src/system/sdks/WeChat/Freepublish.php
index 03dee9e2..a8ecdf67 100644
--- a/src/system/sdks/WeChat/Freepublish.php
+++ b/src/system/sdks/WeChat/Freepublish.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 发布能力
* Class Freepublish
@@ -25,7 +24,6 @@ class Freepublish extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media_id' => $media_id]);
}
-
/**
* 发布状态轮询接口
* @param mixed $publish_id
@@ -39,7 +37,6 @@ class Freepublish extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['publish_id' => $publish_id]);
}
-
/**
* 删除发布
* 发布成功之后,随时可以通过该接口删除。此操作不可逆,请谨慎操作。
@@ -55,7 +52,6 @@ class Freepublish extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['article_id' => $article_id, 'index' => $index]);
}
-
/**
* 通过 article_id 获取已发布文章
* @param mixed $article_id 要获取的草稿的article_id
@@ -69,7 +65,6 @@ class Freepublish extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['article_id' => $article_id]);
}
-
/**
* 获取成功发布列表
* @param int $offset 从全部素材的该偏移位置开始返回,0表示从第一个素材返回
@@ -85,4 +80,5 @@ class Freepublish extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['no_content' => $no_content, 'offset' => $offset, 'count' => $count]);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Limit.php b/src/system/sdks/WeChat/Limit.php
index bc164694..06b82358 100644
--- a/src/system/sdks/WeChat/Limit.php
+++ b/src/system/sdks/WeChat/Limit.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 接口调用频次限制
* Class Limit
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Limit extends BasicWeChat
{
-
/**
* 公众号调用或第三方平台帮公众号调用对公众号的所有api调用(包括第三方帮其调用)次数进行清零
* @return array
@@ -22,7 +20,6 @@ class Limit extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/clear_quota?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['appid' => $this->config->get('appid')]);
}
-
/**
* 网络检测
* @param string $action 执行的检测动作
@@ -36,7 +33,6 @@ class Limit extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/callback/check?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['action' => $action, 'check_operator' => $operator]);
}
-
/**
* 获取微信服务器IP地址
* @return array
@@ -49,4 +45,5 @@ class Limit extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Media.php b/src/system/sdks/WeChat/Media.php
index 155d264b..7bbf6420 100644
--- a/src/system/sdks/WeChat/Media.php
+++ b/src/system/sdks/WeChat/Media.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信素材管理
* Class Media
@@ -29,7 +28,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media' => Tools::createCurlFile($filename)], false);
}
-
/**
* 获取临时素材
* @param string $media_id
@@ -52,7 +50,6 @@ class Media extends BasicWeChat
}
return is_null($outType) ? $result : $outType($result);
}
-
/**
* 新增图文素材
* @param array $data 文件名称
@@ -66,7 +63,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 更新图文素材
* @param string $media_id 要修改的图文消息的id
@@ -83,7 +79,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 上传图文消息内的图片获取URL
* @param mixed $filename
@@ -97,7 +92,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media' => Tools::createCurlFile($filename)], false);
}
-
/**
* 新增其他类型永久素材
* @param mixed $filename 文件名称
@@ -116,7 +110,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media' => Tools::createCurlFile($filename), 'description' => Tools::arr2json($description)], false);
}
-
/**
* 获取永久素材
* @param string $media_id
@@ -139,7 +132,6 @@ class Media extends BasicWeChat
}
return is_null($outType) ? $result : $outType($result);
}
-
/**
* 删除永久素材
* @param string $media_id
@@ -153,7 +145,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media_id' => $media_id]);
}
-
/**
* 获取素材总数
* @return array
@@ -166,7 +157,6 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 获取素材列表
* @param string $type
@@ -185,4 +175,5 @@ class Media extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['type' => $type, 'offset' => $offset, 'count' => $count]);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Menu.php b/src/system/sdks/WeChat/Menu.php
index a86ae03e..071671c2 100644
--- a/src/system/sdks/WeChat/Menu.php
+++ b/src/system/sdks/WeChat/Menu.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信菜单管理
* Class Menu
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Menu extends BasicWeChat
{
-
/**
* 自定义菜单查询接口
* @return array
@@ -23,7 +21,6 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 自定义菜单删除接口
* @return array
@@ -36,7 +33,6 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 自定义菜单创建
* @param array $data
@@ -50,7 +46,6 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 创建个性化菜单
* @param array $data
@@ -64,7 +59,6 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除个性化菜单
* @param string $menuid
@@ -78,7 +72,6 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['menuid' => $menuid]);
}
-
/**
* 测试个性化菜单匹配结果
* @param string $openid
@@ -92,4 +85,5 @@ class Menu extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['user_id' => $openid]);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Oauth.php b/src/system/sdks/WeChat/Oauth.php
index 31f4ad7c..8c6b73e5 100644
--- a/src/system/sdks/WeChat/Oauth.php
+++ b/src/system/sdks/WeChat/Oauth.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信网页授权
* Class Oauth
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Oauth extends BasicWeChat
{
-
/**
* Oauth 授权跳转接口
* @param string $redirect_url 授权回跳地址
@@ -24,7 +22,6 @@ class Oauth extends BasicWeChat
$redirect_uri = urlencode($redirect_url);
return "https://open.weixin.qq.com/connect/oauth2/authorize?appid={$appid}&redirect_uri={$redirect_uri}&response_type=code&scope={$scope}&state={$state}#wechat_redirect";
}
-
/**
* 通过 code 获取 AccessToken 和 openid
* @param string $code 授权Code值,不传则取GET参数
@@ -40,7 +37,6 @@ class Oauth extends BasicWeChat
$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appsecret}&code={$code}&grant_type=authorization_code";
return $this->httpGetForJson($url);
}
-
/**
* 刷新AccessToken并续期
* @param string $refresh_token
@@ -54,7 +50,6 @@ class Oauth extends BasicWeChat
$url = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid={$appid}&grant_type=refresh_token&refresh_token={$refresh_token}";
return $this->httpGetForJson($url);
}
-
/**
* 检验授权凭证(access_token)是否有效
* @param string $access_token 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
@@ -68,7 +63,6 @@ class Oauth extends BasicWeChat
$url = "https://api.weixin.qq.com/sns/auth?access_token={$access_token}&openid={$openid}";
return $this->httpGetForJson($url);
}
-
/**
* 拉取用户信息(需scope为 snsapi_userinfo)
* @param string $access_token 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
@@ -84,3 +78,4 @@ class Oauth extends BasicWeChat
return $this->httpGetForJson($url);
}
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Pay.php b/src/system/sdks/WeChat/Pay.php
index 5f7340b4..0e58f607 100644
--- a/src/system/sdks/WeChat/Pay.php
+++ b/src/system/sdks/WeChat/Pay.php
@@ -7,7 +7,6 @@ use WePay\Order;
use WePay\Refund;
use WePay\Transfers;
use WePay\TransfersBank;
-
/**
* 微信支付商户
* Class Pay
@@ -15,7 +14,6 @@ use WePay\TransfersBank;
*/
class Pay extends BasicWePay
{
-
/**
* 统一下单
* @param array $options
@@ -27,7 +25,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->create($options);
}
-
/**
* 刷卡支付
* @param array $options
@@ -39,7 +36,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->micropay($options);
}
-
/**
* 创建JsApi及H5支付参数
* @param string $prepay_id 统一下单预支付码
@@ -49,7 +45,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->jsapiParams($prepay_id);
}
-
/**
* 获取APP支付参数
* @param string $prepay_id 统一下单预支付码
@@ -59,7 +54,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->appParams($prepay_id);
}
-
/**
* 获取支付规则二维码
* @param string $product_id 商户定义的商品id 或者订单号
@@ -69,7 +63,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->qrcParams($product_id);
}
-
/**
* 查询订单
* @param array $options
@@ -81,7 +74,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->query($options);
}
-
/**
* 关闭订单
* @param string $out_trade_no 商户订单号
@@ -93,7 +85,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->close($out_trade_no);
}
-
/**
* 申请退款
* @param array $options
@@ -105,7 +96,6 @@ class Pay extends BasicWePay
{
return Refund::instance($this->config->get())->create($options);
}
-
/**
* 查询退款
* @param array $options
@@ -117,7 +107,6 @@ class Pay extends BasicWePay
{
return Refund::instance($this->config->get())->query($options);
}
-
/**
* 交易保障
* @param array $options
@@ -129,7 +118,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->report($options);
}
-
/**
* 授权码查询openid
* @param string $authCode 扫码支付授权码,设备读取用户微信中的条码或者二维码信息
@@ -141,7 +129,6 @@ class Pay extends BasicWePay
{
return Order::instance($this->config->get())->queryAuthCode($authCode);
}
-
/**
* 下载对账单
* @param array $options 静音参数
@@ -154,7 +141,6 @@ class Pay extends BasicWePay
{
return Bill::instance($this->config->get())->download($options, $outType);
}
-
/**
* 拉取订单评价数据
* @param array $options
@@ -166,7 +152,6 @@ class Pay extends BasicWePay
{
return Bill::instance($this->config->get())->comment($options);
}
-
/**
* 企业付款到零钱
* @param array $options
@@ -178,7 +163,6 @@ class Pay extends BasicWePay
{
return Transfers::instance($this->config->get())->create($options);
}
-
/**
* 查询企业付款到零钱
* @param string $partner_trade_no 商户调用企业付款API时使用的商户订单号
@@ -190,7 +174,6 @@ class Pay extends BasicWePay
{
return Transfers::instance($this->config->get())->query($partner_trade_no);
}
-
/**
* 企业付款到银行卡
* @param array $options
@@ -203,7 +186,6 @@ class Pay extends BasicWePay
{
return TransfersBank::instance($this->config->get())->create($options);
}
-
/**
* 商户企业付款到银行卡操作进行结果查询
* @param string $partner_trade_no 商户订单号,需保持唯一
@@ -215,4 +197,5 @@ class Pay extends BasicWePay
{
return TransfersBank::instance($this->config->get())->query($partner_trade_no);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Product.php b/src/system/sdks/WeChat/Product.php
index ec4e3738..ce06dea0 100644
--- a/src/system/sdks/WeChat/Product.php
+++ b/src/system/sdks/WeChat/Product.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 商店管理
* Class Product
@@ -26,7 +25,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 设置测试人员白名单
* @param array $openids 测试人员的openid列表
@@ -42,7 +40,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取商品二维码
* @param string $keystandard 商品编码标准
@@ -61,7 +58,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询商品信息
* @param string $keystandard 商品编码标准
@@ -78,7 +74,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 批量查询商品信息
* @param integer $offset 批量查询的起始位置,从0开始,包含该起始位置
@@ -98,7 +93,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 更新商品信息
* @param array $data
@@ -112,7 +106,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 清除商品信息
* @param string $keystandard 商品编码标准
@@ -127,7 +120,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['keystandard' => $keystandard, 'keystr' => $keystr]);
}
-
/**
* 检查wxticket参数
* @param string $ticket
@@ -141,7 +133,6 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['ticket' => $ticket]);
}
-
/**
* 清除扫码记录
* @param string $keystandard 商品编码标准
@@ -158,5 +149,5 @@ class Product extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Qrcode.php b/src/system/sdks/WeChat/Qrcode.php
index 61ceb2f6..14fe20ed 100644
--- a/src/system/sdks/WeChat/Qrcode.php
+++ b/src/system/sdks/WeChat/Qrcode.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 二维码管理
* Class Qrcode
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Qrcode extends BasicWeChat
{
-
/**
* 创建二维码ticket
* @param string|integer $scene 场景
@@ -21,22 +19,21 @@ class Qrcode extends BasicWeChat
*/
public function create($scene, $expire_seconds = 0)
{
- if (is_integer($scene)) { // 二维码场景类型
+ if (is_integer($scene)) { //二维码场景类型
$data = ['action_info' => ['scene' => ['scene_id' => $scene]]];
} else {
$data = ['action_info' => ['scene' => ['scene_str' => $scene]]];
}
- if ($expire_seconds > 0) { // 临时二维码
+ if ($expire_seconds > 0) { //临时二维码
$data['expire_seconds'] = $expire_seconds;
$data['action_name'] = is_integer($scene) ? 'QR_SCENE' : 'QR_STR_SCENE';
- } else { // 永久二维码
+ } else { //永久二维码
$data['action_name'] = is_integer($scene) ? 'QR_LIMIT_SCENE' : 'QR_LIMIT_STR_SCENE';
}
$url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=ACCESS_TOKEN";
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 通过ticket换取二维码
* @param string $ticket 获取的二维码ticket,凭借此ticket可以在有效时间内换取二维码。
@@ -44,9 +41,8 @@ class Qrcode extends BasicWeChat
*/
public function url($ticket)
{
- return "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" . urlencode($ticket);
+ return "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=".urlencode($ticket);
}
-
/**
* 长链接转短链接接口
* @param string $longUrl 需要转换的长链接
@@ -60,4 +56,5 @@ class Qrcode extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['action' => 'long2short', 'long_url' => $longUrl]);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Receive.php b/src/system/sdks/WeChat/Receive.php
index 372a14a2..29d0fd02 100644
--- a/src/system/sdks/WeChat/Receive.php
+++ b/src/system/sdks/WeChat/Receive.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicPushEvent;
-
/**
* 公众号推送管理
* Class Receive
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicPushEvent;
*/
class Receive extends BasicPushEvent
{
-
/**
* 转发多客服消息
* @param string $account
@@ -27,7 +25,6 @@ class Receive extends BasicPushEvent
empty($account) || $this->message['TransInfo'] = ['KfAccount' => $account];
return $this;
}
-
/**
* 设置文本消息
* @param string $content 文本内容
@@ -44,7 +41,6 @@ class Receive extends BasicPushEvent
];
return $this;
}
-
/**
* 设置回复图文
* @param array $newsData
@@ -62,7 +58,6 @@ class Receive extends BasicPushEvent
];
return $this;
}
-
/**
* 设置图片消息
* @param string $mediaId 图片媒体ID
@@ -79,7 +74,6 @@ class Receive extends BasicPushEvent
];
return $this;
}
-
/**
* 设置语音回复消息
* @param string $mediaid 语音媒体ID
@@ -96,7 +90,6 @@ class Receive extends BasicPushEvent
];
return $this;
}
-
/**
* 设置视频回复消息
* @param string $mediaid 视频媒体ID
@@ -119,7 +112,6 @@ class Receive extends BasicPushEvent
];
return $this;
}
-
/**
* 设置音乐回复消息
* @param string $title 音乐标题
@@ -148,4 +140,5 @@ class Receive extends BasicPushEvent
}
return $this;
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Scan.php b/src/system/sdks/WeChat/Scan.php
index 52ec7eab..648009cb 100644
--- a/src/system/sdks/WeChat/Scan.php
+++ b/src/system/sdks/WeChat/Scan.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 扫一扫接入管理
* Class Scan
@@ -22,7 +21,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 创建商品
* @param array $data
@@ -36,7 +34,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 商品发布
* @param string $keystandard 商品编码标准
@@ -53,7 +50,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 设置测试人员白名单
* @param array $openids 测试人员的openid列表
@@ -69,7 +65,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取商品二维码
* @param string $keystandard
@@ -88,7 +83,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询商品信息
* @param string $keystandard 商品编码标准
@@ -103,7 +97,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['keystandard' => $keystandard, 'keystr' => $keystr]);
}
-
/**
* 批量查询商品信息
* @param integer $offset 批量查询的起始位置,从0开始,包含该起始位置。
@@ -123,7 +116,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 更新商品信息
* @param array $data
@@ -137,7 +129,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 清除商品信息
* @param string $keystandard 商品编码标准
@@ -152,7 +143,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['keystandard' => $keystandard, 'keystr' => $keystr]);
}
-
/**
* 检查wxticket参数
* @param string $ticket
@@ -166,7 +156,6 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['ticket' => $ticket]);
}
-
/**
* 清除扫码记录
* @param string $keystandard 商品编码标准
@@ -182,5 +171,5 @@ class Scan extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['keystandard' => $keystandard, 'keystr' => $keystr, 'extinfo' => $extinfo]);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Script.php b/src/system/sdks/WeChat/Script.php
index eafab05c..37c23007 100644
--- a/src/system/sdks/WeChat/Script.php
+++ b/src/system/sdks/WeChat/Script.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信前端支持
* Class Script
@@ -12,7 +11,6 @@ use WeChat\Exceptions\InvalidResponseException;
*/
class Script extends BasicWeChat
{
-
/**
* 删除JSAPI授权TICKET
* @param string $type TICKET类型(wx_card|jsapi)
@@ -25,7 +23,6 @@ class Script extends BasicWeChat
$cache_name = "{$appid}_ticket_{$type}";
Tools::delCache($cache_name);
}
-
/**
* 获取JSAPI_TICKET接口
* @param string $type TICKET类型(wx_card|jsapi)
@@ -51,7 +48,6 @@ class Script extends BasicWeChat
}
return $ticket;
}
-
/**
* 获取JsApi使用签名
* @param string $url 网页的URL
@@ -74,7 +70,7 @@ class Script extends BasicWeChat
'hideOptionMenu', 'showOptionMenu', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem',
'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard',
];
- $data = ["url" => $url, "timestamp" => '' . time(), "jsapi_ticket" => $ticket, "noncestr" => Tools::createNoncestr(16)];
+ $data = ["url" => $url, "timestamp" => ''.time(), "jsapi_ticket" => $ticket, "noncestr" => Tools::createNoncestr(16)];
return [
'debug' => false,
"appId" => $appid,
@@ -84,7 +80,6 @@ class Script extends BasicWeChat
'jsApiList' => $jsApiList,
];
}
-
/**
* 数据生成签名
* @param array $data 签名数组
@@ -99,4 +94,5 @@ class Script extends BasicWeChat
foreach ($data as $k => $v) $params[] = "{$k}={$v}";
return $method(join('&', $params));
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Shake.php b/src/system/sdks/WeChat/Shake.php
index a9a648c9..232312dd 100644
--- a/src/system/sdks/WeChat/Shake.php
+++ b/src/system/sdks/WeChat/Shake.php
@@ -3,7 +3,6 @@ namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
-
/**
* 揺一揺周边
* Class Shake
@@ -24,7 +23,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询审核状态
* @return array
@@ -37,7 +35,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 申请设备ID
* @param string $quantity 申请的设备ID的数量,单次新增设备超过500个,需走人工审核流程
@@ -57,7 +54,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询设备ID申请审核状态
* @param integer $applyId 批次ID,申请设备ID时所返回的批次ID
@@ -71,7 +67,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['apply_id' => $applyId]);
}
-
/**
* 编辑设备信息
* @param array $data
@@ -85,7 +80,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 配置设备与门店的关联关系
* @param array $data
@@ -99,7 +93,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询设备列表
* @param array $data
@@ -113,7 +106,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 页面管理
* @param array $data
@@ -127,7 +119,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 编辑页面信息
* @param array $data
@@ -141,7 +132,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询页面列表
* @param array $data
@@ -155,7 +145,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除页面
* @param integer $page_id 指定页面的id
@@ -169,7 +158,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['page_id' => $page_id]);
}
-
/**
* 上传图片素材
* @param string $filename 图片名字
@@ -184,7 +172,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media' => Tools::createCurlFile($filename)]);
}
-
/**
* 配置设备与页面的关联关系
* @param array $data
@@ -198,7 +185,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询设备与页面的关联关系
* @param array $data
@@ -212,7 +198,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 以设备为维度的数据统计接口
* @param array $data
@@ -226,7 +211,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 批量查询设备统计数据接口
* @param integer $date 指定查询日期时间戳,单位为秒
@@ -241,7 +225,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['date' => $date, 'page_index' => $page_index]);
}
-
/**
* 以页面为维度的数据统计接口
* @param integer $page_id 指定页面的设备ID
@@ -257,7 +240,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['page_id' => $page_id, 'begin_date' => $begin_date, 'end_date' => $end_date]);
}
-
/**
* 编辑分组信息
* @param integer $group_id 分组唯一标识,全局唯一
@@ -272,7 +254,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['group_id' => $group_id, 'group_name' => $group_name]);
}
-
/**
* 删除分组
* @param integer $group_id 分组唯一标识,全局唯一
@@ -286,7 +267,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['group_id' => $group_id]);
}
-
/**
* 查询分组列表
* @param integer $begin 分组列表的起始索引值
@@ -301,8 +281,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['begin' => $begin, 'count' => $count]);
}
-
-
/**
* 查询分组详情
* @param integer $group_id 分组唯一标识,全局唯一
@@ -318,7 +296,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['group_id' => $group_id, 'begin' => $begin, 'count' => $count]);
}
-
/**
* 添加设备到分组
* @param array $data
@@ -332,7 +309,6 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 从分组中移除设备
* @param array $data
@@ -346,5 +322,5 @@ class Shake extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Tags.php b/src/system/sdks/WeChat/Tags.php
index 0fa302da..418aa271 100644
--- a/src/system/sdks/WeChat/Tags.php
+++ b/src/system/sdks/WeChat/Tags.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 用户标签管理
* Class Tags
@@ -21,7 +20,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 创建粉丝标签
* @param string $name
@@ -35,7 +33,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['tag' => ['name' => $name]]);
}
-
/**
* 更新粉丝标签
* @param integer $id 标签ID
@@ -50,7 +47,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['tag' => ['name' => $name, 'id' => $id]]);
}
-
/**
* 删除粉丝标签
* @param int $tagId
@@ -64,7 +60,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['tag' => ['id' => $tagId]]);
}
-
/**
* 批量为用户打标签
* @param array $openids
@@ -79,7 +74,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid_list' => $openids, 'tagid' => $tagId]);
}
-
/**
* 批量为用户取消标签
* @param array $openids
@@ -94,7 +88,6 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid_list' => $openids, 'tagid' => $tagId]);
}
-
/**
* 获取用户身上的标签列表
* @param string $openid
@@ -108,4 +101,5 @@ class Tags extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid' => $openid]);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Template.php b/src/system/sdks/WeChat/Template.php
index 5722ae0d..821c8f36 100644
--- a/src/system/sdks/WeChat/Template.php
+++ b/src/system/sdks/WeChat/Template.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 模板消息
* Class Template
@@ -24,7 +23,6 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['industry_id1' => $industry_id1, 'industry_id2' => $industry_id2]);
}
-
/**
* 获取设置的行业信息
* @return array
@@ -37,7 +35,6 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 获得模板ID
* @param string $tpl_id 板库中模板的编号,有“TM**”和“OPENTMTM**”等形式
@@ -51,7 +48,6 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['template_id_short' => $tpl_id]);
}
-
/**
* 获取模板列表
* @return array
@@ -64,7 +60,6 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 删除模板ID
* @param string $tpl_id 公众帐号下模板消息ID
@@ -78,7 +73,6 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['template_id' => $tpl_id]);
}
-
/**
* 发送模板消息
* @param array $data
@@ -92,6 +86,5 @@ class Template extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/User.php b/src/system/sdks/WeChat/User.php
index cf2dd10e..a209c944 100644
--- a/src/system/sdks/WeChat/User.php
+++ b/src/system/sdks/WeChat/User.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信粉丝管理
* Class User
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class User extends BasicWeChat
{
-
/**
* 设置用户备注名
* @param string $openid
@@ -25,7 +23,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid' => $openid, 'remark' => $remark]);
}
-
/**
* 获取用户基本信息(包括UnionID机制)
* @param string $openid
@@ -40,7 +37,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 批量获取用户基本信息
* @param array $openids
@@ -59,7 +55,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 获取用户列表
* @param string $next_openid
@@ -73,7 +68,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}
-
/**
* 获取标签下粉丝列表
* @param integer $tagid 标签ID
@@ -88,7 +82,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['tagid' => $tagid, 'next_openid' => $next_openid]);
}
-
/**
* 获取公众号的黑名单列表
* @param string $begin_openid
@@ -102,7 +95,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['begin_openid' => $begin_openid]);
}
-
/**
* 批量拉黑用户
* @param array $openids
@@ -116,7 +108,6 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid_list' => $openids]);
}
-
/**
* 批量取消拉黑用户
* @param array $openids
@@ -130,5 +121,5 @@ class User extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['openid_list' => $openids]);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeChat/Wifi.php b/src/system/sdks/WeChat/Wifi.php
index 4d23c9a8..47eb1a95 100644
--- a/src/system/sdks/WeChat/Wifi.php
+++ b/src/system/sdks/WeChat/Wifi.php
@@ -2,7 +2,6 @@
namespace WeChat;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 门店 WIFI 管理
* Class Wifi
@@ -25,7 +24,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['pageindex' => $pageindex, 'pagesize' => $pagesize]);
}
-
/**
* 查询门店Wi-Fi信息
* @param integer $shop_id 门店ID
@@ -39,7 +37,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id]);
}
-
/**
* 修改门店网络信息
* @param integer $shop_id 门店ID
@@ -58,7 +55,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 清空门店网络及设备
* @param integer $shop_id
@@ -72,7 +68,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id]);
}
-
/**
* 添加密码型设备
* @param integer $shop_id 门店ID
@@ -89,7 +84,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 添加portal型设备
* @param integer $shop_id 门店ID
@@ -106,7 +100,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询设备
* @param null|integer $shop_id 根据门店id查询
@@ -126,7 +119,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 删除设备
* @param string $bssid 需要删除的无线网络设备无线mac地址,格式冒号分隔,字符长度17个,并且字母小写,例如:00:1f:7a:ad:5c:a8
@@ -140,7 +132,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['bssid' => $bssid]);
}
-
/**
* 获取物料二维码
* @param integer $shop_id 门店ID
@@ -156,7 +147,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id, 'ssid' => $ssid, 'img_id' => $img_id]);
}
-
/**
* 设置商家主页
* @param integer $shop_id 门店ID
@@ -174,7 +164,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询商家主页
* @param integer $shop_id 查询的门店id
@@ -188,7 +177,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id]);
}
-
/**
* 设置微信首页欢迎语
* @param integer $shop_id 门店ID
@@ -203,7 +191,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id, 'bar_type' => $bar_type]);
}
-
/**
* 设置连网完成页
* @param integer $shop_id 门店ID
@@ -218,7 +205,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id, 'finishpage_url' => $finishpage_url]);
}
-
/**
* Wi-Fi 数据统计
* @param string $begin_date 起始日期时间,格式yyyy-mm-dd,最长时间跨度为30天
@@ -234,7 +220,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id, 'begin_date' => $begin_date, 'end_date' => $end_date]);
}
-
/**
* 设置门店卡券投放信息
* @param integer $shop_id 门店ID,可设置为0,表示所有门店
@@ -253,7 +238,6 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, $data);
}
-
/**
* 查询门店卡券投放信息
* @param integer $shop_id 门店ID,可设置为0,表示所有门店
@@ -267,5 +251,5 @@ class Wifi extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['shop_id' => $shop_id]);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Crypt.php b/src/system/sdks/WeMini/Crypt.php
index 9e6f0fb7..ec793b83 100644
--- a/src/system/sdks/WeMini/Crypt.php
+++ b/src/system/sdks/WeMini/Crypt.php
@@ -6,8 +6,6 @@ use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidDecryptException;
use WeChat\Exceptions\InvalidResponseException;
use WXBizDataCrypt;
-
-
/**
* 数据加密处理
* Class Crypt
@@ -25,7 +23,7 @@ class Crypt extends BasicWeChat
*/
public function decode($iv, $sessionKey, $encryptedData)
{
- require_once __DIR__ . DIRECTORY_SEPARATOR . 'crypt' . DIRECTORY_SEPARATOR . 'wxBizDataCrypt.php';
+ require_once __DIR__.DIRECTORY_SEPARATOR.'crypt'.DIRECTORY_SEPARATOR.'wxBizDataCrypt.php';
$pc = new WXBizDataCrypt($this->config->get('appid'), $sessionKey);
$errCode = $pc->decryptData($encryptedData, $iv, $data);
if ($errCode == 0) {
@@ -33,7 +31,6 @@ class Crypt extends BasicWeChat
}
return false;
}
-
/**
* 登录凭证校验
* @param string $code 登录时获取的 code
@@ -47,7 +44,6 @@ class Crypt extends BasicWeChat
$url = "https://api.weixin.qq.com/sns/jscode2session?appid={$appid}&secret={$secret}&js_code={$code}&grant_type=authorization_code";
return json_decode(Tools::get($url), true);
}
-
/**
* 换取用户信息
* @param string $code 用户登录凭证(有效期五分钟)
@@ -70,7 +66,6 @@ class Crypt extends BasicWeChat
}
return array_merge($result, $userinfo);
}
-
/**
* 通过授权码换取手机号
* @param string $code
@@ -84,7 +79,6 @@ class Crypt extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['code' => $code], true);
}
-
/**
* 用户支付完成后,获取该用户的 UnionId
* @param string $openid 支付用户唯一标识
@@ -104,4 +98,5 @@ class Crypt extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callGetApi($url);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Delivery.php b/src/system/sdks/WeMini/Delivery.php
index a1097134..4673529a 100644
--- a/src/system/sdks/WeMini/Delivery.php
+++ b/src/system/sdks/WeMini/Delivery.php
@@ -1,9 +1,7 @@
callPostApi($url, $data, true);
}
-
/**
* 下配送单接口
* @param array $data
@@ -37,7 +33,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/add?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 可以对待接单状态的订单增加小费
* @param array $data
@@ -50,7 +45,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/addtips?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 取消配送单接口
* @param array $data
@@ -63,7 +57,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/cancel?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取已支持的配送公司列表接口
* @param array $data
@@ -76,7 +69,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/delivery/getall?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 拉取已绑定账号
* @param array $data
@@ -89,7 +81,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/shop/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 拉取配送单信息
* @param array $data
@@ -102,7 +93,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 模拟配送公司更新配送单状态
* @param array $data
@@ -115,7 +105,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/test_update_order?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 预下配送单接口
* @param array $data
@@ -128,7 +117,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/pre_add?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 预取消配送单接口
* @param array $data
@@ -141,7 +129,6 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/precancel?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 重新下单
* @param array $data
@@ -154,5 +141,5 @@ class Delivery extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/local/business/order/readd?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Guide.php b/src/system/sdks/WeMini/Guide.php
index 97233071..dacfd91b 100644
--- a/src/system/sdks/WeMini/Guide.php
+++ b/src/system/sdks/WeMini/Guide.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序导购助手
* Class Guide
@@ -22,7 +21,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguideacct?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 服务号删除导购
* @param array $data
@@ -35,7 +33,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguideacct?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 服务号获取导购信息
* @param array $data
@@ -48,7 +45,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取服务号的敏感词信息与自动回复信息
* @return array
@@ -60,7 +56,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacctconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, [], true);
}
-
/**
* 服务号拉取导购列表
* @param integer $page
@@ -74,7 +69,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacctconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['page' => $page, 'num' => $num], true);
}
-
/**
* 获取导购聊天记录
* @param array $data
@@ -87,7 +81,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取导购快捷回复信息
* @param array $data
@@ -100,7 +93,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 生成导购二维码
* @param array $data
@@ -113,7 +105,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/guidecreateqrcode?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* @param array $data
* @return array
@@ -125,7 +116,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/pushshowwxapathmenu?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 为服务号设置敏感词与自动回复
* @param array $data
@@ -138,7 +128,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideacctconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 设置导购快捷回复信息
* @param array $data
@@ -151,7 +140,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 更新导购昵称或者头像
* @param array $data
@@ -164,7 +152,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideconfig?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 添加展示标签信息
* @param array $data
@@ -177,7 +164,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidebuyerdisplaytag?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 为粉丝添加可查询标签
* @param array $data
@@ -190,7 +176,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidebuyertag?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 添加标签可选值
* @param array $data
@@ -203,7 +188,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidetagoption?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除粉丝标签
* @param array $data
@@ -216,7 +200,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguidebuyertag?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询展示标签信息
* @param array $data
@@ -229,7 +212,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerdisplaytag?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询粉丝标签
* @param array $data
@@ -242,7 +224,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyertag?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询标签可选值信息
* @return array
@@ -254,7 +235,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidetagoption?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, [], true);
}
-
/**
* 新建可查询标签类型,支持新建4类可查询标签
* @param array $data
@@ -267,7 +247,6 @@ class Guide extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/newguidetagoption?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 根据标签值筛选粉丝
* @param array $data
@@ -281,7 +260,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 为服务号导购添加粉丝
* @param array $data
@@ -295,7 +273,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除导购的粉丝
* @param array $data
@@ -309,7 +286,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询某一个粉丝与导购的绑定关系
* @param array $data
@@ -323,7 +299,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 通过粉丝信息查询该粉丝与导购的绑定关系
* @param string $openid
@@ -337,7 +312,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, ['openid' => $openid], true);
}
-
/**
* 拉取导购的粉丝列表
* @param array $data
@@ -351,7 +325,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 将粉丝从一个导购迁移到另外一个导购下
* @param array $data
@@ -365,7 +338,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 更新粉丝昵称
* @param array $data
@@ -379,7 +351,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除小程序卡片素材
* @param array $data
@@ -393,7 +364,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除图片素材
* @param array $data
@@ -407,7 +377,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除文字素材
* @param array $data
@@ -421,7 +390,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取小程序卡片素材信息
* @param integer $type
@@ -435,7 +403,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, ['type' => $type], true);
}
-
/**
* 获取图片素材信息
* @param integer $type 操作类型
@@ -451,7 +418,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, ['type' => $type, 'start' => $start, 'num' => $num], true);
}
-
/**
* 获取文字素材信息
* @param integer $type 操作类型
@@ -467,7 +433,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, ['type' => $type, 'start' => $start, 'num' => $num], true);
}
-
/**
* 添加小程序卡片素材
* @param array $data
@@ -481,7 +446,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 添加图片素材
* @param array $data
@@ -495,7 +459,6 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-
/**
* 为服务号添加文字素材
* @param array $data
@@ -509,4 +472,5 @@ class Guide extends BasicWeChat
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Image.php b/src/system/sdks/WeMini/Image.php
index 2c925e69..b2b0172e 100644
--- a/src/system/sdks/WeMini/Image.php
+++ b/src/system/sdks/WeMini/Image.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序图像处理
* Class Image
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Image extends BasicWeChat
{
-
/**
* 本接口提供基于小程序的图片智能裁剪能力
* @param string $img_url 要检测的图片 url,传这个则不用传 img 参数。
@@ -24,7 +22,6 @@ class Image extends BasicWeChat
$url = "https://api.weixin.qq.com/cv/img/aicrop?access_token=ACCESS_TOCKEN";
return $this->callPostApi($url, ['img_url' => $img_url, 'img' => $img], true);
}
-
/**
* 本接口提供基于小程序的条码/二维码识别的API
* @param string $img_url 要检测的图片 url,传这个则不用传 img 参数。
@@ -38,7 +35,6 @@ class Image extends BasicWeChat
$url = "https://api.weixin.qq.com/cv/img/qrcode?img_url=ENCODE_URL&access_token=ACCESS_TOCKEN";
return $this->callPostApi($url, ['img_url' => $img_url, 'img' => $img], true);
}
-
/**
* 本接口提供基于小程序的图片高清化能力
* @param string $img_url 要检测的图片 url,传这个则不用传 img 参数
@@ -52,4 +48,5 @@ class Image extends BasicWeChat
$url = "https://api.weixin.qq.com/cv/img/qrcode?img_url=ENCODE_URL&access_token=ACCESS_TOCKEN";
return $this->callPostApi($url, ['img_url' => $img_url, 'img' => $img], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Live.php b/src/system/sdks/WeMini/Live.php
index 30bc1609..d8a24392 100644
--- a/src/system/sdks/WeMini/Live.php
+++ b/src/system/sdks/WeMini/Live.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序直播接口
* Class Live
@@ -22,7 +21,6 @@ class Live extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取直播房间列表
* @param integer $start 起始拉取房间
@@ -36,7 +34,6 @@ class Live extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['start' => $start, 'limit' => $limit], true);
}
-
/**
* 获取回放源视频
* @param array $data
@@ -49,7 +46,6 @@ class Live extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 直播间导入商品
* @param array $data
@@ -62,7 +58,6 @@ class Live extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/broadcast/room/addgoods?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 商品添加并提审
* @param array $data
@@ -75,7 +70,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/add?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 商品撤回审核
* @param array $data
@@ -88,7 +82,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/resetaudit?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 重新提交审核
* @param array $data
@@ -101,7 +94,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/audit?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 删除商品
* @param array $data
@@ -114,7 +106,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/delete?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 更新商品
* @param array $data
@@ -127,7 +118,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/update?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取商品状态
* @param array $data
@@ -140,7 +130,6 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxa/business/getgoodswarehouse?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取商品列表
* @param array $data
@@ -153,4 +142,5 @@ class Live extends BasicWeChat
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/getapproved?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Logistics.php b/src/system/sdks/WeMini/Logistics.php
index 80318aa8..59b7029b 100644
--- a/src/system/sdks/WeMini/Logistics.php
+++ b/src/system/sdks/WeMini/Logistics.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序物流助手
* Class Logistics
@@ -22,7 +21,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/order/add?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 取消运单
* @param array $data
@@ -35,7 +33,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/order/cancel?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取支持的快递公司列表
* @return array
@@ -47,7 +44,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/delivery/getall?access_token=ACCESS_TOKEN';
return $this->callGetApi($url);
}
-
/**
* 获取运单数据
* @param array $data
@@ -60,7 +56,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/order/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询运单轨迹
* @param array $data
@@ -73,7 +68,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/path/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取打印员。若需要使用微信打单 PC 软件,才需要调用
* @return array
@@ -85,7 +79,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/printer/getall?access_token=ACCESS_TOKEN';
return $this->callGetApi($url);
}
-
/**
* 获取电子面单余额。仅在使用加盟类快递公司时,才可以调用
* @param array $data
@@ -98,7 +91,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/path/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 模拟快递公司更新订单状态, 该接口只能用户测试
* @param array $data
@@ -111,7 +103,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/test_update_order?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 配置面单打印员,若需要使用微信打单 PC 软件,才需要调用
* @param array $data
@@ -124,7 +115,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/business/printer/update?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取面单联系人信息
* @param array $data
@@ -137,7 +127,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/contact/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 预览面单模板。用于调试面单模板使用
* @param array $data
@@ -150,7 +139,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/template/preview?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 更新商户审核结果
* @param array $data
@@ -163,7 +151,6 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/service/business/update?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 更新运单轨迹
* @param array $data
@@ -176,4 +163,5 @@ class Logistics extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/express/delivery/path/update?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Message.php b/src/system/sdks/WeMini/Message.php
index 3bebf7c3..be903c0d 100644
--- a/src/system/sdks/WeMini/Message.php
+++ b/src/system/sdks/WeMini/Message.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序动态消息
* Class Message
@@ -22,7 +21,6 @@ class Message extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/activityid/create?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 动态消息,修改被分享的动态消息
* @param array $data
@@ -35,7 +33,6 @@ class Message extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/updatablemsg/send?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 下发小程序和公众号统一的服务消息
* @param array $data
@@ -48,4 +45,5 @@ class Message extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Newtmpl.php b/src/system/sdks/WeMini/Newtmpl.php
index 91e7dcb7..b1170b9c 100644
--- a/src/system/sdks/WeMini/Newtmpl.php
+++ b/src/system/sdks/WeMini/Newtmpl.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 公众号小程序订阅消息支持
* Class Mini
@@ -22,7 +21,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/addcategory?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 获取小程序账号的类目
* @return array
@@ -34,7 +32,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getcategory?access_token=ACCESS_TOKEN';
return $this->callGetApi($url);
}
-
/**
* 获取小程序账号的类目
* @return array
@@ -46,7 +43,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/deletecategory?access_token=TOKEN';
return $this->callPostApi($url, [], true);
}
-
/**
* 获取帐号所属类目下的公共模板标题
* @param string $ids 类目 id,多个用逗号隔开
@@ -57,10 +53,9 @@ class Newtmpl extends BasicWeChat
public function getPubTemplateTitleList($ids)
{
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatetitles?access_token=ACCESS_TOKEN';
- $url .= '&' . http_build_query(['ids' => $ids, 'start' => '0', 'limit' => '30']);
+ $url .= '&'.http_build_query(['ids' => $ids, 'start' => '0', 'limit' => '30']);
return $this->callGetApi($url);
}
-
/**
* 获取模板标题下的关键词列表
* @param string $tid 模板标题 id,可通过接口获取
@@ -71,10 +66,9 @@ class Newtmpl extends BasicWeChat
public function getPubTemplateKeyWordsById($tid)
{
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatekeywords?access_token=ACCESS_TOKEN';
- $url .= '&' . http_build_query(['tid' => $tid]);
+ $url .= '&'.http_build_query(['tid' => $tid]);
return $this->callGetApi($url);
}
-
/**
* 组合模板并添加至帐号下的个人模板库
* @param string $tid 模板标题 id,可通过接口获取,也可登录小程序后台查看获取
@@ -89,7 +83,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/addtemplate?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['tid' => $tid, 'kidList' => $kidList, 'sceneDesc' => $sceneDesc], false);
}
-
/**
* 获取当前帐号下的个人模板列表
* @return array
@@ -101,7 +94,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/gettemplate?access_token=ACCESS_TOKEN';
return $this->callGetApi($url);
}
-
/**
* 删除帐号下的个人模板
* @param string $priTmplId 要删除的模板id
@@ -114,7 +106,6 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/deltemplate?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['priTmplId' => $priTmplId], true);
}
-
/**
* 发送订阅消息
* @param array $data 发送的消息对象数组
@@ -127,4 +118,5 @@ class Newtmpl extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Ocr.php b/src/system/sdks/WeMini/Ocr.php
index a0d524ec..c5cfde4a 100644
--- a/src/system/sdks/WeMini/Ocr.php
+++ b/src/system/sdks/WeMini/Ocr.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序ORC服务
* Class Ocr
@@ -22,7 +21,6 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/bankcard?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 本接口提供基于小程序的营业执照 OCR 识别
* @param array $data
@@ -35,7 +33,6 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/bizlicense?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 本接口提供基于小程序的驾驶证 OCR 识别
* @param array $data
@@ -48,7 +45,6 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/drivinglicense?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 本接口提供基于小程序的身份证 OCR 识别
* @param array $data
@@ -61,7 +57,6 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/idcard?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 本接口提供基于小程序的通用印刷体 OCR 识别
* @param array $data
@@ -74,7 +69,6 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/comm?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 本接口提供基于小程序的行驶证 OCR 识别
* @param array $data
@@ -87,4 +81,5 @@ class Ocr extends BasicWeChat
$url = 'https://api.weixin.qq.com/cv/ocr/driving?access_token=ACCESS_TOCKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Operation.php b/src/system/sdks/WeMini/Operation.php
index c73cacb2..bd55635d 100644
--- a/src/system/sdks/WeMini/Operation.php
+++ b/src/system/sdks/WeMini/Operation.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序运维中心
* Class Operation
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Operation extends BasicWeChat
{
-
/**
* 实时日志查询
* @param array $data
@@ -23,4 +21,5 @@ class Operation extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Plugs.php b/src/system/sdks/WeMini/Plugs.php
index be7ef124..6af0aae2 100644
--- a/src/system/sdks/WeMini/Plugs.php
+++ b/src/system/sdks/WeMini/Plugs.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信小程序插件管理
* Class Plugs
@@ -22,7 +21,6 @@ class Plugs extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/plugin?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['action' => 'apply', 'plugin_appid' => $plugin_appid], true);
}
-
/**
* 2.查询已添加的插件
* @return array
@@ -34,7 +32,6 @@ class Plugs extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/plugin?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['action' => 'list'], true);
}
-
/**
* 3.删除已添加的插件
* @param string $plugin_appid 插件appid
@@ -47,7 +44,6 @@ class Plugs extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/plugin?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['action' => 'unbind', 'plugin_appid' => $plugin_appid], true);
}
-
/**
* 获取当前所有插件使用方
* 修改插件使用申请的状态
@@ -61,7 +57,6 @@ class Plugs extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/devplugin?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 4.获取当前所有插件使用方(供插件开发者调用)
* @param integer $page 拉取第page页的数据
@@ -76,7 +71,6 @@ class Plugs extends BasicWeChat
$data = ['action' => 'dev_apply_list', 'page' => $page, 'num' => $num];
return $this->callPostApi($url, $data, true);
}
-
/**
* 5.修改插件使用申请的状态(供插件开发者调用)
* @param string $action dev_agree:同意申请;dev_refuse:拒绝申请;dev_delete:删除已拒绝的申请者
@@ -89,4 +83,5 @@ class Plugs extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/plugin?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['action' => $action], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Poi.php b/src/system/sdks/WeMini/Poi.php
index 80f1bcb5..83497134 100644
--- a/src/system/sdks/WeMini/Poi.php
+++ b/src/system/sdks/WeMini/Poi.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信小程序地址管理
* Class Poi
@@ -29,7 +28,6 @@ class Poi extends BasicWeChat
];
return $this->callPostApi($url, $data, true);
}
-
/**
* 查看地点列表
* @param integer $page 起始页id(从1开始计数)
@@ -43,7 +41,6 @@ class Poi extends BasicWeChat
$url = "https://api.weixin.qq.com/wxa/getnearbypoilist?page={$page}&page_rows={$page_rows}&access_token=ACCESS_TOKEN";
return $this->callGetApi($url);
}
-
/**
* 删除地点
* @param string $poi_id 附近地点ID
@@ -56,7 +53,6 @@ class Poi extends BasicWeChat
$url = "https://api.weixin.qq.com/wxa/delnearbypoi?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['poi_id' => $poi_id], true);
}
-
/**
* 展示/取消展示附近小程序
* @param string $poi_id 附近地点ID
@@ -70,4 +66,5 @@ class Poi extends BasicWeChat
$url = "https://api.weixin.qq.com/wxa/setnearbypoishowstatus?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, ['poi_id' => $poi_id, 'status' => $status], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Qrcode.php b/src/system/sdks/WeMini/Qrcode.php
index fe4d6d78..0420dc7f 100644
--- a/src/system/sdks/WeMini/Qrcode.php
+++ b/src/system/sdks/WeMini/Qrcode.php
@@ -3,7 +3,6 @@ namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
use WeChat\Contracts\Tools;
-
/**
* 微信小程序二维码管理
* Class Qrcode
@@ -11,7 +10,6 @@ use WeChat\Contracts\Tools;
*/
class Qrcode extends BasicWeChat
{
-
/**
* 获取小程序码(永久有效)
* 接口A: 适用于需要的码数量较少的业务场景
@@ -40,7 +38,6 @@ class Qrcode extends BasicWeChat
}
return is_null($outType) ? $result : $outType($result);
}
-
/**
* 获取小程序码(永久有效)
* 接口B:适用于需要的码数量极多的业务场景
@@ -70,7 +67,6 @@ class Qrcode extends BasicWeChat
}
return is_null($outType) ? $result : $outType($result);
}
-
/**
* 获取小程序二维码(永久有效)
* 接口C:适用于需要的码数量较少的业务场景
@@ -95,4 +91,5 @@ class Qrcode extends BasicWeChat
}
return is_null($outType) ? $result : $outType($result);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Scheme.php b/src/system/sdks/WeMini/Scheme.php
index 99689f2e..f7f9d56c 100644
--- a/src/system/sdks/WeMini/Scheme.php
+++ b/src/system/sdks/WeMini/Scheme.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序 URL-Scheme
* Class Scheme
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Scheme extends BasicWeChat
{
-
/**
* 创建 URL-Scheme
* @param array $data
@@ -23,7 +21,6 @@ class Scheme extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/generatescheme?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询 URL-Scheme
* @param string $scheme
@@ -36,7 +33,6 @@ class Scheme extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/queryscheme?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['scheme' => $scheme], true);
}
-
/**
* 创建 URL-Link
* @param array $data
@@ -49,7 +45,6 @@ class Scheme extends BasicWeChat
$url = "https://api.weixin.qq.com/wxa/generate_urllink?access_token=ACCESS_TOKEN";
return $this->callPostApi($url, $data, true);
}
-
/**
* 查询 URL-Link
* @param string $urllink
@@ -62,4 +57,5 @@ class Scheme extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/query_urllink?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['url_link' => $urllink], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Search.php b/src/system/sdks/WeMini/Search.php
index 8467dafb..8450369c 100644
--- a/src/system/sdks/WeMini/Search.php
+++ b/src/system/sdks/WeMini/Search.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序搜索
* Class Search
@@ -22,4 +21,5 @@ class Search extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['pages' => $pages], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Security.php b/src/system/sdks/WeMini/Security.php
index cc1640c2..48dccf0a 100644
--- a/src/system/sdks/WeMini/Security.php
+++ b/src/system/sdks/WeMini/Security.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序内容安全
* Class Security
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Security extends BasicWeChat
{
-
/**
* 校验一张图片是否含有违法违规内容
* @param string $media 要检测的图片文件,格式支持PNG、JPEG、JPG、GIF,图片尺寸不超过 750px x 1334px
@@ -23,7 +21,6 @@ class Security extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/img_sec_check?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['media' => $media], false);
}
-
/**
* 异步校验图片/音频是否含有违法违规内容
* @param string $media_url
@@ -37,7 +34,6 @@ class Security extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/media_check_async?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['media_url' => $media_url, 'media_type' => $media_type], true);
}
-
/**
* 检查一段文本是否含有违法违规内容
* @param string $content
@@ -50,4 +46,5 @@ class Security extends BasicWeChat
$url = 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['content' => $content], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Soter.php b/src/system/sdks/WeMini/Soter.php
index 569fd654..685300fc 100644
--- a/src/system/sdks/WeMini/Soter.php
+++ b/src/system/sdks/WeMini/Soter.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 小程序生物认证
* Class Soter
@@ -22,4 +21,5 @@ class Soter extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/soter/verify_signature?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Template.php b/src/system/sdks/WeMini/Template.php
index 3f112b70..957a2c0c 100644
--- a/src/system/sdks/WeMini/Template.php
+++ b/src/system/sdks/WeMini/Template.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 公众号小程序模板消息支持
* Class Mini
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWeChat;
*/
class Template extends BasicWeChat
{
-
/**
* 获取小程序模板库标题列表
* @return array
@@ -22,7 +20,6 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['offset' => '0', 'count' => '20'], true);
}
-
/**
* 获取模板库某个模板标题下关键词库
* @param string $template_id 模板标题id,可通过接口获取,也可登录小程序后台查看获取
@@ -35,7 +32,6 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/library/get?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['id' => $template_id], true);
}
-
/**
* 组合模板并添加至帐号下的个人模板库
* @param string $template_id 模板标题id,可通过接口获取,也可登录小程序后台查看获取
@@ -49,7 +45,6 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/add?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['id' => $template_id, 'keyword_id_list' => $keyword_id_list], true);
}
-
/**
* 获取帐号下已存在的模板列表
* @return array
@@ -61,7 +56,6 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['offset' => '0', 'count' => '20'], true);
}
-
/**
* 删除模板消息
* @param string $template_id 要删除的模板id
@@ -74,7 +68,6 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/del?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['template_id' => $template_id], true);
}
-
/**
* 发送模板消息
* @param array $data 发送的消息对象数组
@@ -87,4 +80,5 @@ class Template extends BasicWeChat
$url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, $data, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/Total.php b/src/system/sdks/WeMini/Total.php
index b37e743e..a1dcebba 100644
--- a/src/system/sdks/WeMini/Total.php
+++ b/src/system/sdks/WeMini/Total.php
@@ -2,7 +2,6 @@
namespace WeMini;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWeChat;
-
/**
* 微信小程序数据接口
* Class Total
@@ -23,7 +22,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappiddailysummarytrend?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 访问分析
* @param string $begin_date 开始日期
@@ -37,7 +35,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 周趋势
* @param string $begin_date 开始日期,为周一日期
@@ -51,7 +48,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidweeklyvisittrend?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 月趋势
* @param string $begin_date 开始日期,为自然月第一天
@@ -65,7 +61,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyvisittrend?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 访问分布
* @param string $begin_date 开始日期
@@ -79,7 +74,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidvisitdistribution?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 日留存
* @param string $begin_date 开始日期
@@ -93,7 +87,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappiddailyretaininfo?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 周留存
* @param string $begin_date 开始日期,为周一日期
@@ -107,7 +100,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidweeklyretaininfo?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 月留存
* @param string $begin_date 开始日期,为自然月第一天
@@ -121,7 +113,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidmonthlyretaininfo?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 访问页面
* @param string $begin_date 开始日期
@@ -135,7 +126,6 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappidvisitpage?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-
/**
* 用户画像
* @param string $begin_date 开始日期
@@ -149,4 +139,5 @@ class Total extends BasicWeChat
$url = 'https://api.weixin.qq.com/datacube/getweanalysisappiduserportrait?access_token=ACCESS_TOKEN';
return $this->callPostApi($url, ['begin_date' => $begin_date, 'end_date' => $end_date], true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/crypt/errorCode.php b/src/system/sdks/WeMini/crypt/errorCode.php
index 1120d31a..0c91dee1 100644
--- a/src/system/sdks/WeMini/crypt/errorCode.php
+++ b/src/system/sdks/WeMini/crypt/errorCode.php
@@ -1,5 +1,6 @@
* -41001: encodingAesKey 非法
@@ -16,4 +17,5 @@ class ErrorCode
public static $IllegalIv = -41002;
public static $IllegalBuffer = -41003;
public static $DecodeBase64Error = -41004;
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WeMini/crypt/wxBizDataCrypt.php b/src/system/sdks/WeMini/crypt/wxBizDataCrypt.php
index ea80c892..df12c66b 100644
--- a/src/system/sdks/WeMini/crypt/wxBizDataCrypt.php
+++ b/src/system/sdks/WeMini/crypt/wxBizDataCrypt.php
@@ -9,7 +9,6 @@ class WXBizDataCrypt
{
private $appid;
private $sessionKey;
-
/**
* 构造函数
* @param $sessionKey string 用户在小程序登录后获取的会话密钥
@@ -19,9 +18,8 @@ class WXBizDataCrypt
{
$this->appid = $appid;
$this->sessionKey = $sessionKey;
- include_once __DIR__ . DIRECTORY_SEPARATOR . "errorCode.php";
+ include_once __DIR__.DIRECTORY_SEPARATOR."errorCode.php";
}
-
/**
* 检验数据的真实性,并且获取解密后的明文.
* @param $encryptedData string 加密的用户数据
@@ -46,13 +44,12 @@ class WXBizDataCrypt
if ($dataObj == null) {
return ErrorCode::$IllegalBuffer;
}
- // 兼容新版本无 watermark 的情况
+ //兼容新版本无 watermark 的情况
if (isset($dataObj->watermark) && $dataObj->watermark->appid != $this->appid) {
return ErrorCode::$IllegalBuffer;
}
$data = $result;
return ErrorCode::$OK;
}
-
}
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Bill.php b/src/system/sdks/WePay/Bill.php
index 1c8d1a82..12ce8884 100644
--- a/src/system/sdks/WePay/Bill.php
+++ b/src/system/sdks/WePay/Bill.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信商户账单及评论
* Class Bill
@@ -33,8 +32,6 @@ class Bill extends BasicWePay
}
return is_null($outType) ? $result : $outType($result);
}
-
-
/**
* 拉取订单评价数据
* @param array $options
@@ -47,4 +44,5 @@ class Bill extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/billcommentsp/batchquerycomment';
return $this->callPostApi($url, $options, true);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Coupon.php b/src/system/sdks/WePay/Coupon.php
index c8c05088..959831be 100644
--- a/src/system/sdks/WePay/Coupon.php
+++ b/src/system/sdks/WePay/Coupon.php
@@ -2,7 +2,6 @@
namespace WePay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
-
/**
* 微信商户代金券
* Class Coupon
@@ -22,7 +21,6 @@ class Coupon extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/send_coupon";
return $this->callPostApi($url, $options, true, 'MD5');
}
-
/**
* 查询代金券批次
* @param array $options
@@ -35,7 +33,6 @@ class Coupon extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/query_coupon_stock";
return $this->callPostApi($url, $options, false);
}
-
/**
* 查询代金券信息
* @param array $options
@@ -48,5 +45,5 @@ class Coupon extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/query_coupon_stock";
return $this->callPostApi($url, $options, false);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Custom.php b/src/system/sdks/WePay/Custom.php
index c1ac4a83..2a5e3419 100644
--- a/src/system/sdks/WePay/Custom.php
+++ b/src/system/sdks/WePay/Custom.php
@@ -2,7 +2,6 @@
namespace WePay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
-
/**
* 微信扩展上报海关
* Class Custom
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWePay;
*/
class Custom extends BasicWePay
{
-
/**
* 订单附加信息提交接口
* @param array $options
@@ -23,7 +21,6 @@ class Custom extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/cgi-bin/mch/customs/customdeclareorder';
return $this->callPostApi($url, $options, false, 'MD5', false, false);
}
-
/**
* 订单附加信息查询接口
* @param array $options
@@ -36,8 +33,6 @@ class Custom extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/cgi-bin/mch/customs/customdeclarequery';
return $this->callPostApi($url, $options, false, 'MD5', true, false);
}
-
-
/**
* 订单附加信息重推接口
* @param array $options
@@ -50,5 +45,5 @@ class Custom extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/cgi-bin/mch/newcustoms/customdeclareredeclare';
return $this->callPostApi($url, $options, false, 'MD5', true, false);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Order.php b/src/system/sdks/WePay/Order.php
index a4e2538e..844b4661 100644
--- a/src/system/sdks/WePay/Order.php
+++ b/src/system/sdks/WePay/Order.php
@@ -3,7 +3,6 @@ namespace WePay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
use WeChat\Contracts\Tools;
-
/**
* 微信商户订单
* Class Order
@@ -11,7 +10,6 @@ use WeChat\Contracts\Tools;
*/
class Order extends BasicWePay
{
-
/**
* 统一下单
* @param array $options
@@ -24,7 +22,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/pay/unifiedorder';
return $this->callPostApi($url, $options, false, 'MD5');
}
-
/**
* 刷卡支付
* @param array $options
@@ -37,7 +34,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/pay/micropay';
return $this->callPostApi($url, $options, false, 'MD5');
}
-
/**
* 查询订单
* @param array $options
@@ -50,7 +46,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/pay/orderquery';
return $this->callPostApi($url, $options);
}
-
/**
* 关闭订单
* @param string $outTradeNo 商户订单号
@@ -63,7 +58,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/pay/closeorder';
return $this->callPostApi($url, ['out_trade_no' => $outTradeNo]);
}
-
/**
* 创建JsApi及H5支付参数
* @param string $prepayId 统一下单预支付码
@@ -81,7 +75,6 @@ class Order extends BasicWePay
$option['timestamp'] = $option['timeStamp'];
return $option;
}
-
/**
* 获取支付规则二维码
* @param string $productId 商户定义的商品id或者订单号
@@ -97,9 +90,8 @@ class Order extends BasicWePay
'product_id' => (string)$productId,
];
$data['sign'] = $this->getPaySign($data, 'MD5');
- return "weixin://wxpay/bizpayurl?" . http_build_query($data);
+ return "weixin://wxpay/bizpayurl?".http_build_query($data);
}
-
/**
* 获取微信App支付秘需参数
* @param string $prepayId 统一下单预支付码
@@ -118,7 +110,6 @@ class Order extends BasicWePay
$data['sign'] = $this->getPaySign($data, 'MD5');
return $data;
}
-
/**
* 刷卡支付 撤销订单
* @param array $options
@@ -131,7 +122,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/secapi/pay/reverse';
return $this->callPostApi($url, $options, true);
}
-
/**
* 刷卡支付 授权码查询openid
* @param string $authCode 扫码支付授权码,设备读取用户微信中的条码或者二维码信息
@@ -144,7 +134,6 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/tools/authcodetoopenid';
return $this->callPostApi($url, ['auth_code' => $authCode], false, 'MD5', false);
}
-
/**
* 刷卡支付 交易保障
* @param array $options
@@ -157,4 +146,5 @@ class Order extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/payitil/report';
return $this->callPostApi($url, $options);
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Redpack.php b/src/system/sdks/WePay/Redpack.php
index c53e7290..a5d2717d 100644
--- a/src/system/sdks/WePay/Redpack.php
+++ b/src/system/sdks/WePay/Redpack.php
@@ -2,7 +2,6 @@
namespace WePay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
-
/**
* 微信红包支持
* Class Redpack
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWePay;
*/
class Redpack extends BasicWePay
{
-
/**
* 发放普通红包
* @param array $options
@@ -25,7 +23,6 @@ class Redpack extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack";
return $this->callPostApi($url, $options, true, 'MD5', false);
}
-
/**
* 发放裂变红包
* @param array $options
@@ -40,7 +37,6 @@ class Redpack extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack";
return $this->callPostApi($url, $options, true, 'MD5', false);
}
-
/**
* 查询红包记录
* @param string $mchBillno 商户发放红包的商户订单号
@@ -55,5 +51,5 @@ class Redpack extends BasicWePay
$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/gethbinfo";
return $this->callPostApi($url, ['mch_billno' => $mchBillno, 'bill_type' => 'MCHT'], true, 'MD5', false);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Refund.php b/src/system/sdks/WePay/Refund.php
index 25525faf..fe50087e 100644
--- a/src/system/sdks/WePay/Refund.php
+++ b/src/system/sdks/WePay/Refund.php
@@ -5,7 +5,6 @@ use WeChat\Contracts\BasicWePay;
use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidDecryptException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信商户退款
* Class Refund
@@ -13,7 +12,6 @@ use WeChat\Exceptions\InvalidResponseException;
*/
class Refund extends BasicWePay
{
-
/**
* 创建退款订单
* @param array $options
@@ -26,7 +24,6 @@ class Refund extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/secapi/pay/refund';
return $this->callPostApi($url, $options, true);
}
-
/**
* 查询退款
* @param array $options
@@ -39,7 +36,6 @@ class Refund extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/pay/refundquery';
return $this->callPostApi($url, $options);
}
-
/**
* 获取退款通知
* @return array
@@ -62,4 +58,5 @@ class Refund extends BasicWePay
throw new InvalidDecryptException($exception->getMessage(), $exception->getCode());
}
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/Transfers.php b/src/system/sdks/WePay/Transfers.php
index b8a14c47..a262b29c 100644
--- a/src/system/sdks/WePay/Transfers.php
+++ b/src/system/sdks/WePay/Transfers.php
@@ -2,7 +2,6 @@
namespace WePay;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Contracts\BasicWePay;
-
/**
* 微信商户打款到零钱
* Class Transfers
@@ -10,7 +9,6 @@ use WeChat\Contracts\BasicWePay;
*/
class Transfers extends BasicWePay
{
-
/**
* 企业付款到零钱
* @param array $options
@@ -27,7 +25,6 @@ class Transfers extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers';
return $this->callPostApi($url, $options, true, 'MD5', false);
}
-
/**
* 查询企业付款到零钱
* @param string $partnerTradeNo 商户调用企业付款API时使用的商户订单号
@@ -44,5 +41,5 @@ class Transfers extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/gettransferinfo';
return $this->callPostApi($url, ['partner_trade_no' => $partnerTradeNo], true, 'MD5', false);
}
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePay/TransfersBank.php b/src/system/sdks/WePay/TransfersBank.php
index ddff9386..9ce9782e 100644
--- a/src/system/sdks/WePay/TransfersBank.php
+++ b/src/system/sdks/WePay/TransfersBank.php
@@ -6,7 +6,6 @@ use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidDecryptException;
use WeChat\Exceptions\InvalidResponseException;
-
/**
* 微信商户打款到银行卡
* Class TransfersBank
@@ -14,7 +13,6 @@ use WeChat\Exceptions\InvalidResponseException;
*/
class TransfersBank extends BasicWePay
{
-
/**
* 企业付款到银行卡
* @param array $options
@@ -50,7 +48,6 @@ class TransfersBank extends BasicWePay
'desc' => isset($options['desc']) ? $options['desc'] : '',
], true, 'MD5', false);
}
-
/**
* 商户企业付款到银行卡操作进行结果查询
* @param string $partnerTradeNo 商户订单号,需保持唯一
@@ -64,7 +61,6 @@ class TransfersBank extends BasicWePay
$url = 'https://api.mch.weixin.qq.com/mmpaysptrans/query_bank';
return $this->callPostApi($url, ['partner_trade_no' => $partnerTradeNo], true, 'MD5', false);
}
-
/**
* RSA加密处理
* @param string $string
@@ -78,15 +74,14 @@ class TransfersBank extends BasicWePay
{
$search = ['-----BEGIN RSA PUBLIC KEY-----', '-----END RSA PUBLIC KEY-----', "\n", "\r"];
$pkc1 = str_replace($search, '', $this->getRsaContent());
- $publicKey = '-----BEGIN PUBLIC KEY-----' . PHP_EOL .
- wordwrap('MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A' . $pkc1, 64, PHP_EOL, true) . PHP_EOL .
+ $publicKey = '-----BEGIN PUBLIC KEY-----'.PHP_EOL .
+ wordwrap('MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A'.$pkc1, 64, PHP_EOL, true).PHP_EOL .
'-----END PUBLIC KEY-----';
if (!openssl_public_encrypt("{$string}", $encrypted, $publicKey, OPENSSL_PKCS1_OAEP_PADDING)) {
throw new InvalidDecryptException('Rsa Encrypt Error.');
}
return base64_encode($encrypted);
}
-
/**
* 获取签名文件内容
* @return string
@@ -95,17 +90,18 @@ class TransfersBank extends BasicWePay
*/
private function getRsaContent()
{
- $cacheKey = "pub_ras_key_" . $this->config->get('mch_id');
+ $cacheKey = "pub_ras_key_".$this->config->get('mch_id');
if (($pub_key = Tools::getCache($cacheKey))) {
return $pub_key;
}
$data = $this->callPostApi('https://fraud.mch.weixin.qq.com/risk/getpublickey', [], true, 'MD5');
if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
- $error = 'ResultError:' . $data['return_msg'];
- $error .= isset($data['err_code_des']) ? ' - ' . $data['err_code_des'] : '';
+ $error = 'ResultError:'.$data['return_msg'];
+ $error .= isset($data['err_code_des']) ? ' - '.$data['err_code_des'] : '';
throw new InvalidResponseException($error, 20000, $data);
}
Tools::setCache($cacheKey, $data['pub_key'], 600);
return $data['pub_key'];
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePayV3/Cert.php b/src/system/sdks/WePayV3/Cert.php
index 269f8ed6..ac4a9ccd 100644
--- a/src/system/sdks/WePayV3/Cert.php
+++ b/src/system/sdks/WePayV3/Cert.php
@@ -4,7 +4,6 @@ if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidResponseException;
use WePayV3\Contracts\BasicWePay;
use WePayV3\Contracts\DecryptAes;
-
/**
* 平台证书管理
* Class Cert
@@ -33,4 +32,5 @@ class Cert extends BasicWePay
throw new InvalidResponseException($exception->getMessage(), $exception->getCode());
}
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePayV3/Contracts/BasicWePay.php b/src/system/sdks/WePayV3/Contracts/BasicWePay.php
index d2161b08..caba36d7 100644
--- a/src/system/sdks/WePayV3/Contracts/BasicWePay.php
+++ b/src/system/sdks/WePayV3/Contracts/BasicWePay.php
@@ -1,12 +1,10 @@
'', // 微信绑定APPID,需配置
- 'mch_id' => '', // 微信商户编号,需要配置
- 'mch_v3_key' => '', // 微信商户密钥,需要配置
- 'cert_serial' => '', // 商户证书序号,无需配置
- 'cert_public' => '', // 商户公钥内容,需要配置
- 'cert_private' => '', // 商户密钥内容,需要配置
+ 'appid' => '',//微信绑定APPID,需配置
+ 'mch_id' => '',//微信商户编号,需要配置
+ 'mch_v3_key' => '',//微信商户密钥,需要配置
+ 'cert_serial' => '',//商户证书序号,无需配置
+ 'cert_public' => '',//商户公钥内容,需要配置
+ 'cert_private' => '',//商户密钥内容,需要配置
];
-
/**
* BasicWePayV3 constructor.
* @param array $options [mch_id, mch_v3_key, cert_public, cert_private]
@@ -57,7 +52,6 @@ abstract class BasicWePay
if (empty($options['cert_public'])) {
throw new InvalidArgumentException("Missing Config -- [cert_public]");
}
-
if (stripos($options['cert_public'], '-----BEGIN CERTIFICATE-----') === false) {
if (file_exists($options['cert_public'])) {
$options['cert_public'] = file_get_contents($options['cert_public']);
@@ -65,7 +59,6 @@ abstract class BasicWePay
throw new InvalidArgumentException("File Non-Existent -- [cert_public]");
}
}
-
if (stripos($options['cert_private'], '-----BEGIN PRIVATE KEY-----') === false) {
if (file_exists($options['cert_private'])) {
$options['cert_private'] = file_get_contents($options['cert_private']);
@@ -73,19 +66,16 @@ abstract class BasicWePay
throw new InvalidArgumentException("File Non-Existent -- [cert_private]");
}
}
-
$this->config['appid'] = isset($options['appid']) ? $options['appid'] : '';
$this->config['mch_id'] = $options['mch_id'];
$this->config['mch_v3_key'] = $options['mch_v3_key'];
$this->config['cert_public'] = $options['cert_public'];
$this->config['cert_private'] = $options['cert_private'];
$this->config['cert_serial'] = openssl_x509_parse($this->config['cert_public'])['serialNumberHex'];
-
if (empty($this->config['cert_serial'])) {
throw new InvalidArgumentException("Failed to parse certificate public key");
}
}
-
/**
* 静态创建对象
* @param array $config
@@ -93,11 +83,10 @@ abstract class BasicWePay
*/
public static function instance($config)
{
- $key = md5(get_called_class() . serialize($config));
+ $key = md5(get_called_class().serialize($config));
if (isset(self::$cache[$key])) return self::$cache[$key];
return self::$cache[$key] = new static($config);
}
-
/**
* 模拟发起请求
* @param string $method 请求访问
@@ -109,13 +98,13 @@ abstract class BasicWePay
*/
public function doRequest($method, $pathinfo, $jsondata = '', $verify = false)
{
- list($time, $nonce) = [time(), uniqid() . rand(1000, 9999)];
+ list($time, $nonce) = [time(), uniqid().rand(1000, 9999)];
$signstr = join("\n", [$method, $pathinfo, $time, $nonce, $jsondata, '']);
- // 生成数据签名TOKEN
+ //生成数据签名TOKEN
$token = sprintf('mchid="%s",nonce_str="%s",timestamp="%d",serial_no="%s",signature="%s"',
$this->config['mch_id'], $nonce, $time, $this->config['cert_serial'], $this->signBuild($signstr)
);
- list($header, $content) = $this->_doRequestCurl($method, $this->base . $pathinfo, [
+ list($header, $content) = $this->_doRequestCurl($method, $this->base.$pathinfo, [
'data' => $jsondata, 'header' => [
"Accept: application/json", "Content-Type: application/json",
'User-Agent: https://thinkadmin.top', "Authorization: WECHATPAY2-SHA256-RSA2048 {$token}",
@@ -141,7 +130,6 @@ abstract class BasicWePay
}
return json_decode($content, true);
}
-
/**
* 通过CURL模拟网络请求
* @param string $method 请求方法
@@ -152,12 +140,12 @@ abstract class BasicWePay
private function _doRequestCurl($method, $location, $options = [])
{
$curl = curl_init();
- // POST数据设置
+ //POST数据设置
if (strtolower($method) === 'post') {
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $options['data']);
}
- // CURL头信息设置
+ //CURL头信息设置
if (!empty($options['header'])) {
curl_setopt($curl, CURLOPT_HTTPHEADER, $options['header']);
}
@@ -172,7 +160,6 @@ abstract class BasicWePay
curl_close($curl);
return [substr($content, 0, $headerSize), substr($content, $headerSize)];
}
-
/**
* 生成数据签名
* @param string $data 签名内容
@@ -184,7 +171,6 @@ abstract class BasicWePay
openssl_sign($data, $signature, $pkeyid, 'sha256WithRSAEncryption');
return base64_encode($signature);
}
-
/**
* 验证内容签名
* @param string $data 签名内容
@@ -203,7 +189,6 @@ abstract class BasicWePay
}
return @openssl_verify($data, base64_decode($sign), openssl_x509_read($cert), 'sha256WithRSAEncryption');
}
-
/**
* 写入或读取临时文件
* @param string $name
@@ -219,4 +204,5 @@ abstract class BasicWePay
return Tools::setCache($name, base64_encode($content), 7200);
}
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePayV3/Contracts/DecryptAes.php b/src/system/sdks/WePayV3/Contracts/DecryptAes.php
index 458731db..7d744661 100644
--- a/src/system/sdks/WePayV3/Contracts/DecryptAes.php
+++ b/src/system/sdks/WePayV3/Contracts/DecryptAes.php
@@ -3,7 +3,6 @@ namespace WePayV3\Contracts;
if (!defined('DEDEINC')) exit('dedebiz');
use WeChat\Exceptions\InvalidArgumentException;
use WeChat\Exceptions\InvalidDecryptException;
-
/**
* Aes 解密工具类
* Class DecryptAes
@@ -13,10 +12,8 @@ class DecryptAes
{
private $aesKey;
-
const KEY_LENGTH_BYTE = 32;
const AUTH_TAG_LENGTH_BYTE = 16;
-
/**
* Constructor
* @param string $aesKey
@@ -28,7 +25,6 @@ class DecryptAes
}
$this->aesKey = $aesKey;
}
-
/**
* Decrypt AEAD_AES_256_GCM ciphertext
* @param string $associatedData AES GCM additional authentication data
@@ -44,15 +40,15 @@ class DecryptAes
return false;
}
try {
- // ext-sodium (default installed on >= PHP 7.2)
+ //ext-sodium (default installed on >= PHP 7.2)
if (function_exists('\sodium_crypto_aead_aes256gcm_is_available') && \sodium_crypto_aead_aes256gcm_is_available()) {
return \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $associatedData, $nonceStr, $this->aesKey);
}
- // ext-libsodium (need install libsodium-php 1.x via pecl)
+ //ext-libsodium (need install libsodium-php 1.x via pecl)
if (function_exists('\Sodium\crypto_aead_aes256gcm_is_available') && \Sodium\crypto_aead_aes256gcm_is_available()) {
return \Sodium\crypto_aead_aes256gcm_decrypt($ciphertext, $associatedData, $nonceStr, $this->aesKey);
}
- // openssl (PHP >= 7.1 support AEAD)
+ //openssl (PHP >= 7.1 support AEAD)
if (PHP_VERSION_ID >= 70100 && in_array('aes-256-gcm', \openssl_get_cipher_methods())) {
$ctext = substr($ciphertext, 0, -self::AUTH_TAG_LENGTH_BYTE);
$authTag = substr($ciphertext, -self::AUTH_TAG_LENGTH_BYTE);
@@ -65,4 +61,5 @@ class DecryptAes
}
throw new InvalidDecryptException('AEAD_AES_256_GCM 需要 PHP 7.1 以上或者安装 libsodium-php');
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePayV3/Order.php b/src/system/sdks/WePayV3/Order.php
index 649ea0d9..7322ee4f 100644
--- a/src/system/sdks/WePayV3/Order.php
+++ b/src/system/sdks/WePayV3/Order.php
@@ -5,7 +5,6 @@ use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidArgumentException;
use WePayV3\Contracts\BasicWePay;
use WePayV3\Contracts\DecryptAes;
-
/**
* 订单支付接口
* Class Order
@@ -17,7 +16,6 @@ class Order extends BasicWePay
const WXPAY_APP = 'app';
const WXPAY_JSAPI = 'jsapi';
const WXPAY_NATIVE = 'native';
-
/**
* 创建支付订单
* @param string $type 支付类型
@@ -36,10 +34,10 @@ class Order extends BasicWePay
if (empty($types[$type])) {
throw new InvalidArgumentException("Payment {$type} not defined.");
} else {
- // 创建预支付码
+ //创建预支付码
$result = $this->doRequest('POST', $types[$type], json_encode($data, JSON_UNESCAPED_UNICODE), true);
if (empty($result['prepay_id'])) return $result;
- // 支付参数签名
+ //支付参数签名
$time = (string)time();
$appid = $this->config['appid'];
$prepayId = $result['prepay_id'];
@@ -55,7 +53,6 @@ class Order extends BasicWePay
}
}
}
-
/**
* 支付订单查询
* @param string $orderNo 订单单号
@@ -67,7 +64,6 @@ class Order extends BasicWePay
$pathinfo = "/v3/pay/transactions/out-trade-no/{$orderNo}";
return $this->doRequest('GET', "{$pathinfo}?mchid={$this->config['mch_id']}", '', true);
}
-
/**
* 支付通知
* @return array
@@ -81,7 +77,6 @@ class Order extends BasicWePay
} else {
$data = $parameters;
}
-
if (isset($data['resource'])) {
$aes = new DecryptAes($this->config['mch_v3_key']);
$data['result'] = $aes->decryptToString(
@@ -93,3 +88,4 @@ class Order extends BasicWePay
return $data;
}
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/WePayV3/Refund.php b/src/system/sdks/WePayV3/Refund.php
index 0b9e7fac..5ece3f66 100644
--- a/src/system/sdks/WePayV3/Refund.php
+++ b/src/system/sdks/WePayV3/Refund.php
@@ -5,7 +5,6 @@ use WeChat\Contracts\Tools;
use WeChat\Exceptions\InvalidDecryptException;
use WeChat\Exceptions\InvalidResponseException;
use WePayV3\Contracts\BasicWePay;
-
/**
* 订单退款接口
* Class Refund
@@ -23,7 +22,6 @@ class Refund extends BasicWePay
{
return $this->doRequest('POST', '/v3/ecommerce/refunds/apply', json_encode($data, JSON_UNESCAPED_UNICODE), true);
}
-
/**
* 退款订单查询
* @param string $refundNo 退款单号
@@ -35,7 +33,6 @@ class Refund extends BasicWePay
$pathinfo = "/v3/ecommerce/refunds/out-refund-no/{$refundNo}";
return $this->doRequest('GET', "{$pathinfo}?sub_mchid={$this->config['mch_id']}", '', true);
}
-
/**
* 获取退款通知
* @return array
@@ -58,4 +55,5 @@ class Refund extends BasicWePay
throw new InvalidDecryptException($exception->getMessage(), $exception->getCode());
}
}
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-app.php b/src/system/sdks/_test/alipay-app.php
index ea6b61af..05bc89e8 100644
--- a/src/system/sdks/_test/alipay-app.php
+++ b/src/system/sdks/_test/alipay-app.php
@@ -1,26 +1,22 @@
apply([
- 'out_trade_no' => time(), // 商户订单号
- 'total_amount' => '1', // 支付金额
- 'subject' => '支付宝订单标题', // 支付订单描述
+ 'out_trade_no' => time(),//商户订单号
+ 'total_amount' => '1',//支付金额
+ 'subject' => '支付宝订单标题',//支付订单描述
]);
echo $result;
} catch (\Exception $e) {
echo $e->getMessage();
}
-
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-bill.php b/src/system/sdks/_test/alipay-bill.php
index e01fa026..fa3992a2 100644
--- a/src/system/sdks/_test/alipay-bill.php
+++ b/src/system/sdks/_test/alipay-bill.php
@@ -1,24 +1,22 @@
apply([
- 'bill_date' => '2020-07-03', // 账单时间(日账单yyyy-MM-dd,月账单 yyyy-MM)
- 'bill_type' => 'signcustomer', // 账单类型(trade指商户基于支付宝交易收单的业务账单,signcustomer是指基于商户支付宝余额收入及支出等资金变动的帐务账单)
+ 'bill_date' => '2020-07-03',//账单时间(日账单yyyy-MM-dd,月账单 yyyy-MM)
+ 'bill_type' => 'signcustomer',//账单类型(trade指商户基于支付宝交易收单的业务账单,signcustomer是指基于商户支付宝余额收入及支出等资金变动的帐务账单)
]);
echo '';
var_export($result);
} catch (Exception $e) {
echo $e->getMessage();
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-notify.php b/src/system/sdks/_test/alipay-notify.php
index 40ccb9a1..33db0ecc 100644
--- a/src/system/sdks/_test/alipay-notify.php
+++ b/src/system/sdks/_test/alipay-notify.php
@@ -1,27 +1,25 @@
notify();
if (in_array($data['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED'])) {
- // @todo 更新订单状态,支付完成
+ //@todo 更新订单状态,支付完成
file_put_contents('notify.txt', "收到来自支付宝的异步通知\r\n", FILE_APPEND);
- file_put_contents('notify.txt', '订单号:' . $data['out_trade_no'] . "\r\n", FILE_APPEND);
- file_put_contents('notify.txt', '订单金额:' . $data['total_amount'] . "\r\n\r\n", FILE_APPEND);
+ file_put_contents('notify.txt', '订单号:'.$data['out_trade_no']."\r\n", FILE_APPEND);
+ file_put_contents('notify.txt', '订单金额:'.$data['total_amount']."\r\n\r\n", FILE_APPEND);
} else {
file_put_contents('notify.txt', "收到异步通知\r\n", FILE_APPEND);
}
} catch (\Exception $e) {
- // 异常处理
+ //异常处理
echo $e->getMessage();
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-pos.php b/src/system/sdks/_test/alipay-pos.php
index 41a2f598..d7e770f3 100644
--- a/src/system/sdks/_test/alipay-pos.php
+++ b/src/system/sdks/_test/alipay-pos.php
@@ -1,29 +1,24 @@
apply([
- 'out_trade_no' => '4312412343', // 订单号
- 'total_amount' => '13', // 订单金额,单位:元
- 'subject' => '订单商品标题', // 订单商品标题
- 'auth_code' => '123456', // 授权码
+ 'out_trade_no' => '4312412343',//订单号
+ 'total_amount' => '13',//订单金额,单位:元
+ 'subject' => '订单商品标题',//订单商品标题
+ 'auth_code' => '123456',//授权码
]);
-
echo '';
var_export($result);
} catch (Exception $e) {
echo $e->getMessage();
}
-
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-refund.php b/src/system/sdks/_test/alipay-refund.php
index bf6de6e5..6c048c2b 100644
--- a/src/system/sdks/_test/alipay-refund.php
+++ b/src/system/sdks/_test/alipay-refund.php
@@ -1,27 +1,23 @@
refund($out_trade_no, $refund_fee);
-
echo '';
var_export($result);
} catch (Exception $e) {
echo $e->getMessage();
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-scan.php b/src/system/sdks/_test/alipay-scan.php
index ef9ba859..34b06c55 100644
--- a/src/system/sdks/_test/alipay-scan.php
+++ b/src/system/sdks/_test/alipay-scan.php
@@ -1,28 +1,23 @@
apply([
- 'out_trade_no' => '14321412', // 订单号
- 'total_amount' => '13', // 订单金额,单位:元
- 'subject' => '订单商品标题', // 订单商品标题
+ 'out_trade_no' => '14321412',//订单号
+ 'total_amount' => '13',//订单金额,单位:元
+ 'subject' => '订单商品标题',//订单商品标题
]);
-
echo '';
var_export($result);
} catch (Exception $e) {
echo $e->getMessage();
}
-
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-transfer-account.php b/src/system/sdks/_test/alipay-transfer-account.php
index 78776c49..c390b073 100644
--- a/src/system/sdks/_test/alipay-transfer-account.php
+++ b/src/system/sdks/_test/alipay-transfer-account.php
@@ -1,20 +1,17 @@
queryAccount([
- 'alipay_user_id' => $config['appid'], // 订单号
+ 'alipay_user_id' => $config['appid'],//订单号
'account_scene_code' => 'SCENE_000_000_000',
]);
echo '';
@@ -22,4 +19,4 @@ try {
} catch (Exception $e) {
echo $e->getMessage();
}
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-transfer-create.php b/src/system/sdks/_test/alipay-transfer-create.php
index 6f711126..34db9c43 100644
--- a/src/system/sdks/_test/alipay-transfer-create.php
+++ b/src/system/sdks/_test/alipay-transfer-create.php
@@ -1,27 +1,24 @@
create([
- 'out_biz_no' => time(), // 订单号
- 'trans_amount' => '10', // 转账金额
+ 'out_biz_no' => time(),//订单号
+ 'trans_amount' => '10',//转账金额
'product_code' => 'TRANS_ACCOUNT_NO_PWD',
'biz_scene' => 'DIRECT_TRANSFER',
'payee_info' => [
- 'identity' => 'zoujingli@qq.com',
+ 'identity' => 'dedebiz@qq.com',
'identity_type' => 'ALIPAY_LOGON_ID',
- 'name' => '邹景立',
+ 'name' => '天涯',
],
]);
echo '';
@@ -29,4 +26,4 @@ try {
} catch (Exception $e) {
echo $e->getMessage();
}
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-transfer-query.php b/src/system/sdks/_test/alipay-transfer-query.php
index 9ef855a9..27bfefd8 100644
--- a/src/system/sdks/_test/alipay-transfer-query.php
+++ b/src/system/sdks/_test/alipay-transfer-query.php
@@ -1,20 +1,17 @@
queryResult([
- 'out_biz_no' => '201808080001', // 订单号
+ 'out_biz_no' => '201808080001',//订单号
'product_code' => 'TRANS_ACCOUNT_NO_PWD',
'biz_scene' => 'DIRECT_TRANSFER',
]);
@@ -23,4 +20,4 @@ try {
} catch (Exception $e) {
echo $e->getMessage();
}
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-transfer.php b/src/system/sdks/_test/alipay-transfer.php
index f753a5ee..9d145e84 100644
--- a/src/system/sdks/_test/alipay-transfer.php
+++ b/src/system/sdks/_test/alipay-transfer.php
@@ -1,31 +1,27 @@
apply([
- 'out_biz_no' => time(), // 订单号
- 'payee_type' => 'ALIPAY_LOGONID', // 收款方账户类型(ALIPAY_LOGONID | ALIPAY_USERID)
- 'payee_account' => 'demo@sandbox.com', // 收款方账户
- 'amount' => '10', // 转账金额
- 'payer_show_name' => '未寒', // 付款方姓名
- 'payee_real_name' => '张三', // 收款方真实姓名
- 'remark' => '张三', // 转账备注
+ 'out_biz_no' => time(),//订单号
+ 'payee_type' => 'ALIPAY_LOGONID',//收款方账户类型(ALIPAY_LOGONID | ALIPAY_USERID)
+ 'payee_account' => 'demo@sandbox.com',//收款方账户
+ 'amount' => '10',//转账金额
+ 'payer_show_name' => '未寒',//付款方姓名
+ 'payee_real_name' => '张三',//收款方真实姓名
+ 'remark' => '张三',//转账备注
]);
-
echo '';
var_export($result);
} catch (Exception $e) {
echo $e->getMessage();
}
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-wap.php b/src/system/sdks/_test/alipay-wap.php
index 289d0131..786d6804 100644
--- a/src/system/sdks/_test/alipay-wap.php
+++ b/src/system/sdks/_test/alipay-wap.php
@@ -1,30 +1,25 @@
apply([
- 'out_trade_no' => time(), // 商户订单号
- 'total_amount' => '1', // 支付金额
- 'subject' => '支付订单描述', // 支付订单描述
+ 'out_trade_no' => time(),//商户订单号
+ 'total_amount' => '1',//支付金额
+ 'subject' => '支付订单描述',//支付订单描述
]);
-
echo $result;
} catch (Exception $e) {
echo $e->getMessage();
}
-
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay-web.php b/src/system/sdks/_test/alipay-web.php
index 5db3bc38..c272992d 100644
--- a/src/system/sdks/_test/alipay-web.php
+++ b/src/system/sdks/_test/alipay-web.php
@@ -1,31 +1,25 @@
apply([
- 'out_trade_no' => time(), // 商户订单号
- 'total_amount' => '1', // 支付金额
- 'subject' => '支付订单描述', // 支付订单描述
+ 'out_trade_no' => time(),//商户订单号
+ 'total_amount' => '1',//支付金额
+ 'subject' => '支付订单描述',//支付订单描述
]);
-
echo $result;
} catch (Exception $e) {
echo $e->getMessage();
}
-
-
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/alipay.php b/src/system/sdks/_test/alipay.php
index 87a7d6fd..0ce1de4d 100644
--- a/src/system/sdks/_test/alipay.php
+++ b/src/system/sdks/_test/alipay.php
@@ -1,23 +1,23 @@
true,
- // 签名类型(RSA|RSA2)
+ //签名类型(RSA|RSA2)
'sign_type' => "RSA2",
- // 应用ID
+ //应用ID
'appid' => '2016090900468879',
- // 应用私钥的内容 (1行填写,特别注意:这里的应用私钥通常由支付宝密钥管理工具生成)
+ //应用私钥的内容 (1行填写,特别注意:这里的应用私钥通常由支付宝密钥管理工具生成)
'private_key' => 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC3pbN7esinxgjE8uxXAsccgGNKIq+PR1LteNTFOy0fsete43ObQCrzd9DO0zaUeBUzpIOnxrKxez7QoZROZMYrinttFZ/V5rbObEM9E5AR5Tv/Fr4IBywoS8ZtN16Xb+fZmibfU91yq9O2RYSvscncU2qEYmmaTenM0QlUO80ZKqPsM5JkgCNdcYZTUeHclWeyER3dSImNtlSKiSBSSTHthb11fkudjzdiUXua0NKVWyYuAOoDMcpXbD6NJmYqEA/iZ/AxtQt08pv0Mow581GPB0Uop5+qA2hCV85DpagE94a067sKcRui0rtkJzHem9k7xVL+2RoFm1fv3RnUkMwhAgMBAAECggEAAetkddzxrfc+7jgPylUIGb8pyoOUTC4Vqs/BgZI9xYAJksNT2QKRsFvHPfItNt4Ocqy8h4tnIL3GCU43C564B4p6AcjhE85GiN/O0BudPOKlfuQQ9mqExqMMHuYeQfz0cmzPDTSGMwWiv9v4KBH2pyvkCCAzNF6uG+rvawb4/NNVuiI7C8Ku/wYsamtbgjMZVOFFdScYgIw1BgA99RUU/fWBLMnTQkoyowSRb9eSmEUHjt/WQt+/QgKAT2WmuX4RhaGy0qcQLbNaJNKXdJ+PVhQrSiasINNtqYMa8GsQuuKsk3X8TCg9K6/lowivt5ruhyWcP2sx93zY/LGzIHgHcQKBgQDoZlcs9RWxTdGDdtH8kk0J/r+QtMijNzWI0a+t+ZsWOyd3rw+uM/8O4JTNP4Y98TvvxhJXewITbfiuOIbW1mxh8bnO/fcz7+RXZKgPDeoTeNo717tZFZGBEyUdH9M9Inqvht7+hjVDIMCYBDomYebdk3Xqo4mDBjLRdVNGrhGmVQKBgQDKS/MgTMK8Ktfnu1KzwCbn/FfHTOrp1a1t1wWPv9AW0rJPYeaP6lOkgIoO/1odG9qDDhdB6njqM+mKY5Yr3N94PHamHbwJUCmbkqEunCWpGzgcQZ1Q254xk9D7UKq/XUqW2WDqDq80GQeNial+fBc46yelQzokwdA+JdIFKoyinQKBgQCBems9V/rTAtkk1nFdt6EGXZEbLS3PiXXhGXo4gqV+OEzf6H/i/YMwJb2hsK+5GQrcps0XQihA7PctEb9GOMa/tu5fva0ZmaDtc94SLR1p5d4okyQFGPgtIp594HpPSEN0Qb9BrUJFeRz0VP6U3dzDPGHo7V4yyqRLgIN6EIcy1QKBgAqdh6mHPaTAHspDMyjJiYEc5cJIj/8rPkmIQft0FkhMUB0IRyAALNlyAUyeK61hW8sKvz+vPR8VEEk5xpSQp41YpuU6pDZc5YILZLfca8F+8yfQbZ/jll6Foi694efezl4yE/rUQG9cbOAJfEJt4o4TEOaEK5XoMbRBKc8pl22lAoGARTq0qOr9SStihRAy9a+8wi2WEwL4QHcmOjH7iAuJxy5b5TRDSjlk6h+0dnTItiFlTXdfpO8KhWA8EoSJVBZ1kcACQDFgMIA+VM+yXydtzMotOn21W4stfZ4I6dHFiujMsnKpNYVpQh3oCrJf4SeXiQDdiSCodqb1HlKkEc6naHQ=',
- // 支付宝公钥内容 (1行填写,特别注意:这里不是应用公钥而是支付宝公钥,通常是上传应用公钥换取支付宝公钥,在网页可以复制)
+ //支付宝公钥内容 (1行填写,特别注意:这里不是应用公钥而是支付宝公钥,通常是上传应用公钥换取支付宝公钥,在网页可以复制)
'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtU71NY53UDGY7JNvLYAhsNa+taTF6KthIHJmGgdio9bkqeJGhHk6ttkTKkLqFgwIfgAkHpdKiOv1uZw6gVGZ7TCu5LfHTqKrCd6Uz+N7hxhY+4IwicLgprcV1flXQLmbkJYzFMZqkXGkSgOsR2yXh4LyQZczgk9N456uuzGtRy7MoB4zQy34PLUkkxR6W1B2ftNbLRGXv6tc7p/cmDcrY6K1bSxnGmfRxFSb8lRfhe0V0UM6pKq2SGGSeovrKHN0OLp+Nn5wcULVnFgATXGCENshRlp96piPEBFwneXs19n+sX1jx60FTR7/rME3sW3AHug0fhZ9mSqW4x401WjdnwIDAQAB',
- // 应用公钥的内容(新版资金类接口转 app_cert_sn)
+ //应用公钥的内容(新版资金类接口转 app_cert_sn)
'app_cert' => '',
- // 支付宝根证书内容(新版资金类接口转 alipay_root_cert_sn)
+ //支付宝根证书内容(新版资金类接口转 alipay_root_cert_sn)
'root_cert' => '',
- // 支付成功通知地址
+ //支付成功通知地址
'notify_url' => '',
- // 网页支付回跳地址
+ //网页支付回跳地址
'return_url' => '',
-];
\ No newline at end of file
+];
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/config.php b/src/system/sdks/_test/config.php
index dea012fa..7497d241 100644
--- a/src/system/sdks/_test/config.php
+++ b/src/system/sdks/_test/config.php
@@ -1,34 +1,33 @@
function ($name, $value, $expired = 360) {
-// var_dump(func_get_args());
-// },
-// 'get' => function ($name) {
-// var_dump(func_get_args());
-// },
-// 'del' => function ($name) {
-// var_dump(func_get_args());
-// },
-// 'put' => function ($name) {
-// var_dump(func_get_args());
-// },
+// 'set' => function ($name, $value, $expired = 360) {
+// var_dump(func_get_args());
+// },
+// 'get' => function ($name) {
+// var_dump(func_get_args());
+// },
+// 'del' => function ($name) {
+// var_dump(func_get_args());
+// },
+// 'put' => function ($name) {
+// var_dump(func_get_args());
+// },
//];
-
return [
'token' => 'test',
'appid' => 'wx60a43dd8161666d4',
'appsecret' => 'b4e28746f1bd73b5c6684f5e01883c36',
'encodingaeskey' => 'BJIUzE0gqlWy0GxfPp4J1oPTBmOrNDIGPNav1YFH5Z5',
- // 配置商户支付参数
+ //配置商户支付参数
'mch_id' => "1332187001",
'mch_key' => 'A82DC5BD1F3359081049C568D8502BC5',
- // 配置商户支付双向证书目录 (p12 | key,cert 二选一,两者都配置时p12优先)
- 'ssl_p12' => __DIR__ . DIRECTORY_SEPARATOR . 'cert' . DIRECTORY_SEPARATOR . '1332187001_20181030_cert.p12',
- // 'ssl_key' => __DIR__ . DIRECTORY_SEPARATOR . 'cert' . DIRECTORY_SEPARATOR . '1332187001_20181030_key.pem',
- // 'ssl_cer' => __DIR__ . DIRECTORY_SEPARATOR . 'cert' . DIRECTORY_SEPARATOR . '1332187001_20181030_cert.pem',
- // 配置缓存目录,需要拥有写权限
+ //配置商户支付双向证书目录 (p12 | key,cert 二选一,两者都配置时p12优先)
+ 'ssl_p12' => __DIR__.DIRECTORY_SEPARATOR.'cert'.DIRECTORY_SEPARATOR.'1332187001_20181030_cert.p12',
+ //'ssl_key' => __DIR__.DIRECTORY_SEPARATOR.'cert'.DIRECTORY_SEPARATOR.'1332187001_20181030_key.pem',
+ //'ssl_cer' => __DIR__.DIRECTORY_SEPARATOR.'cert'.DIRECTORY_SEPARATOR.'1332187001_20181030_cert.pem',
+ //配置缓存目录,需要拥有写权限
'cache_path' => '',
-];
\ No newline at end of file
+];
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/mini-login.php b/src/system/sdks/_test/mini-login.php
index 39adc432..4e60b9ac 100644
--- a/src/system/sdks/_test/mini-login.php
+++ b/src/system/sdks/_test/mini-login.php
@@ -1,23 +1,21 @@
'wx6bb7b70258da09c6',
'appsecret' => '78b7b8d65bd67b078babf951d4342b42',
];
-
-// 解码数据
+//解码数据
$iv = 'ltM/wT7hsAl0TijEBI4v/g==';
$code = '013LyiTR0TwjC92QjJRR0mEsTR0LyiT3';
$decode = 'eIoVtIC2YzLCnrwiIs1IBbXMvC0vyL8bo1IhD38fUQIRbk3lgTWa0Hdw/Ty7NTs3iu7YlqqZBti+cxd6dCfeXBUQwTO2QpbHg0WTeDAdrihsHRHm4dCWdfTx8rzDloGbNOIsKdRElIhUH5YFdiTr5AYiufUDb34cwJ4GNWLAUq4bR0dmFeVEi+3nfwe2MAjGYDl4aq719VLsHodOggK6lXZvM5wjoDyuZsK2dPqJr3/Ji30Z0mdyFq32R4uR3rtJH/h+Rj0+/QmE9QYG7Y6Z48hgPE8cpnhRQNwH49jnC/zKZ9wtDkQ/J8J3Ed2i58zcuY01v8IV+pZ8oBUKXfO5ha+APOxtBSTzyHraU/2RGo8UWtOF6h64OQZhd/UQQy362eyc/qoq8sF9JnEFRP0mRmTDJ+u9oyDhxswCu6x8V73ERWaJeEGSCyjiGpep7/DxZ6eSSBq36OB0BWBkJqsq9Q==';
$sessionKey = 'OetNxl86B/yMpbwG6wtMEw==';
-
-// $mini = \We::WeMiniCrypt($config);
-// $mini = new WeMini\Crypt($config);
+//$mini = \We::WeMiniCrypt($config);
+//$mini = new WeMini\Crypt($config);
$mini = \WeMini\Crypt::instance($config);
-
echo '';
//print_r($mini->session($code));
print_r($mini->decode($iv, $sessionKey, $decode));
-//print_r($mini->userInfo($code, $iv, $decode));
\ No newline at end of file
+//print_r($mini->userInfo($code, $iv, $decode));
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/mini-qrc.php b/src/system/sdks/_test/mini-qrc.php
index 7301ead5..847a76dd 100644
--- a/src/system/sdks/_test/mini-qrc.php
+++ b/src/system/sdks/_test/mini-qrc.php
@@ -1,24 +1,22 @@
'wx6bb7b70258da09c6',
'appsecret' => '78b7b8d65bd67b078babf951d4342b42',
];
-
//We::config($config);
-
-// $mini = We::WeMiniQrcode($config);
-// $mini = new WeMini\Qrcode($config);
+//$mini = We::WeMiniQrcode($config);
+//$mini = new WeMini\Qrcode($config);
$mini = \WeMini\Qrcode::instance($config);
-
//echo '';
try {
- header('Content-type:image/jpeg'); //输出的类型
-// echo $mini->createDefault('pages/index?query=1');
-// echo $mini->createMiniScene('432432', 'pages/index/index');
+ header('Content-type:image/jpeg');//输出的类型
+ //echo $mini->createDefault('pages/index?query=1');
+ //echo $mini->createMiniScene('432432', 'pages/index/index');
echo $mini->createMiniPath('pages/index?query=1');
} catch (Exception $e) {
var_dump($e->getMessage());
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-download-bill.php b/src/system/sdks/_test/pay-download-bill.php
index 7dcc2734..9bed4d59 100644
--- a/src/system/sdks/_test/pay-download-bill.php
+++ b/src/system/sdks/_test/pay-download-bill.php
@@ -1,30 +1,23 @@
'20171001',
'bill_type' => 'ALL',
];
$result = $wechat->billDownload($options);
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-order-close.php b/src/system/sdks/_test/pay-order-close.php
index 1d6500a4..a36f3dfc 100644
--- a/src/system/sdks/_test/pay-order-close.php
+++ b/src/system/sdks/_test/pay-order-close.php
@@ -1,27 +1,20 @@
closeOrder($options);
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-order-create.php b/src/system/sdks/_test/pay-order-create.php
index bc848693..2c88411a 100644
--- a/src/system/sdks/_test/pay-order-create.php
+++ b/src/system/sdks/_test/pay-order-create.php
@@ -1,19 +1,16 @@
'测试商品',
'out_trade_no' => time(),
@@ -23,21 +20,17 @@ try {
'notify_url' => 'http://a.com/text.html',
'spbill_create_ip' => '127.0.0.1',
];
- // 生成预支付码
+ //生成预支付码
$result = $wechat->createOrder($options);
- // 创建JSAPI参数签名
+ //创建JSAPI参数签名
$options = $wechat->createParamsForJsApi($result['prepay_id']);
-
echo '';
echo "\n--- 创建预支付码 ---\n";
var_export($result);
-
echo "\n\n--- JSAPI 及 H5 参数 ---\n";
var_export($options);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-order-notify.php b/src/system/sdks/_test/pay-order-notify.php
index f32ce667..9cf71d90 100644
--- a/src/system/sdks/_test/pay-order-notify.php
+++ b/src/system/sdks/_test/pay-order-notify.php
@@ -1,32 +1,25 @@
getNotify();
if ($data['return_code'] === 'SUCCESS' && $data['result_code'] === 'SUCCESS') {
- // @todo 去更新下原订单的支付状态
+ //@todo 去更新下原订单的支付状态
$order_no = $data['out_trade_no'];
-
- // 返回接收成功的回复
+ //返回接收成功的回复
ob_clean();
echo $wechat->getNotifySuccessReply();
}
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-order-query.php b/src/system/sdks/_test/pay-order-query.php
index 9e96c3c8..4cbb6115 100644
--- a/src/system/sdks/_test/pay-order-query.php
+++ b/src/system/sdks/_test/pay-order-query.php
@@ -1,30 +1,23 @@
'1008450740201411110005820873',
-// 'out_trade_no' => '商户订单号',
+ //'out_trade_no' => '商户订单号',
];
$result = $wechat->queryOrder($options);
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-redpack-create.php b/src/system/sdks/_test/pay-redpack-create.php
index 1997ed20..34fbeaa0 100644
--- a/src/system/sdks/_test/pay-redpack-create.php
+++ b/src/system/sdks/_test/pay-redpack-create.php
@@ -1,19 +1,15 @@
time(),
're_openid' => 'o38gps3vNdCqaggFfrBRCRikwlWY',
@@ -25,17 +21,15 @@ try {
'remark' => '猜越多得越多,快来抢!',
'client_ip' => '127.0.0.1',
];
- // 发送红包记录
+ //发送红包记录
$result = $wechat->create($options);
echo '';
var_export($result);
- // 查询红包记录
+ //查询红包记录
$result = $wechat->query($options['mch_billno']);
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-refund-create.php b/src/system/sdks/_test/pay-refund-create.php
index 03ebb0bf..13d32240 100644
--- a/src/system/sdks/_test/pay-refund-create.php
+++ b/src/system/sdks/_test/pay-refund-create.php
@@ -1,19 +1,15 @@
'1008450740201411110005820873',
'out_refund_no' => '商户退款单号',
@@ -21,12 +17,9 @@ try {
'refund_fee' => '1',
];
$result = $wechat->createRefund($options);
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-refund-query.php b/src/system/sdks/_test/pay-refund-query.php
index 03f302de..57b9aad9 100644
--- a/src/system/sdks/_test/pay-refund-query.php
+++ b/src/system/sdks/_test/pay-refund-query.php
@@ -1,32 +1,25 @@
'1008450740201411110005820873',
- // 'out_trade_no' => '商户订单号',
- // 'out_refund_no' => '商户退款单号'
- // 'refund_id' => '微信退款单号',
+ //'out_trade_no' => '商户订单号',
+ //'out_refund_no' => '商户退款单号'
+ //'refund_id' => '微信退款单号',
];
$result = $wechat->queryRefund($options);
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-transfers-create.php b/src/system/sdks/_test/pay-transfers-create.php
index 0ebe0ca1..50c12a25 100644
--- a/src/system/sdks/_test/pay-transfers-create.php
+++ b/src/system/sdks/_test/pay-transfers-create.php
@@ -1,19 +1,15 @@
time(),
'openid' => 'o38gps3vNdCqaggFfrBRCRikwlWY',
@@ -27,10 +23,8 @@ try {
var_export($result);
$result = $wechat->queryTransfers($options['partner_trade_no']);
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-transfersbank-create.php b/src/system/sdks/_test/pay-transfersbank-create.php
index d2145979..cc232754 100644
--- a/src/system/sdks/_test/pay-transfersbank-create.php
+++ b/src/system/sdks/_test/pay-transfersbank-create.php
@@ -1,19 +1,15 @@
time(),
'enc_bank_no' => '6212263602037318102',
@@ -25,10 +21,9 @@ try {
echo '';
$result = $wechat->createTransfersBank($options);
var_export($result);
-
} catch (Exception $e) {
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-v3-config-cert.php b/src/system/sdks/_test/pay-v3-config-cert.php
index 47883d13..f79174cc 100644
--- a/src/system/sdks/_test/pay-v3-config-cert.php
+++ b/src/system/sdks/_test/pay-v3-config-cert.php
@@ -1,16 +1,14 @@
download();
-
} catch (\Exception $exception) {
- // 出错啦,处理下吧
- echo $exception->getMessage() . PHP_EOL;
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $exception->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-v3-config.php b/src/system/sdks/_test/pay-v3-config.php
index fcbaebe1..248832d1 100644
--- a/src/system/sdks/_test/pay-v3-config.php
+++ b/src/system/sdks/_test/pay-v3-config.php
@@ -1,25 +1,25 @@
'',
- // 微信商户编号ID
+ //微信商户编号ID
'mch_id' => '',
- // 微信商户V3接口密钥
+ //微信商户V3接口密钥
'mch_v3_key' => '',
- // 微信商户证书公钥,支持证书内容或文件路径
+ //微信商户证书公钥,支持证书内容或文件路径
'cert_public' => $certPublic,
- // 微信商户证书私钥,支持证书内容或文件路径
+ //微信商户证书私钥,支持证书内容或文件路径
'cert_private' => $certPrivate,
-];
\ No newline at end of file
+];
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/pay-v3-order-create.php b/src/system/sdks/_test/pay-v3-order-create.php
index 5448b6af..b8202aa8 100644
--- a/src/system/sdks/_test/pay-v3-order-create.php
+++ b/src/system/sdks/_test/pay-v3-order-create.php
@@ -1,15 +1,13 @@
create('jsapi', [
'appid' => 'wx60a43dd8161666d4',
'mchid' => $config['mch_id'],
@@ -19,12 +17,11 @@ try {
'payer' => ['openid' => 'o38gps3vNdCqaggFfrBRCRikwlWY'],
'amount' => ['total' => 2, 'currency' => 'CNY'],
]);
-
echo '';
echo "\n--- 创建支付参数 ---\n";
var_export($result);
-
} catch (\Exception $exception) {
- // 出错啦,处理下吧
- echo $exception->getMessage() . PHP_EOL;
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $exception->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/wechat-jssdk-sign.php b/src/system/sdks/_test/wechat-jssdk-sign.php
index cf48f9ac..accaf2de 100644
--- a/src/system/sdks/_test/wechat-jssdk-sign.php
+++ b/src/system/sdks/_test/wechat-jssdk-sign.php
@@ -1,26 +1,19 @@
getJsSign('http://a.com/test.php');
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/wechat-menu-get.php b/src/system/sdks/_test/wechat-menu-get.php
index e2a9e4a3..0a37ef03 100644
--- a/src/system/sdks/_test/wechat-menu-get.php
+++ b/src/system/sdks/_test/wechat-menu-get.php
@@ -1,26 +1,19 @@
get();
-
var_export($result);
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/wechat-qrcode-create.php b/src/system/sdks/_test/wechat-qrcode-create.php
index c33cb7e7..a43df704 100644
--- a/src/system/sdks/_test/wechat-qrcode-create.php
+++ b/src/system/sdks/_test/wechat-qrcode-create.php
@@ -1,30 +1,22 @@
create('场景内容');
- echo var_export($result, true) . PHP_EOL;
-
- // 5. 创建二维码链接
+ echo var_export($result, true).PHP_EOL;
+ //创建二维码链接
$url = $wechat->url($result['ticket']);
echo var_export($url, true);
-
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/wechat-user-get.php b/src/system/sdks/_test/wechat-user-get.php
index e945e6f7..5cce0f3a 100644
--- a/src/system/sdks/_test/wechat-user-get.php
+++ b/src/system/sdks/_test/wechat-user-get.php
@@ -1,33 +1,25 @@
getUserList();
-
echo '';
var_export($result);
-
- // 5. 批量获取用户资料
+ //批量获取用户资料
foreach (array_chunk($result['data']['openid'], 100) as $item) {
$userList = $wechat->getBatchUserInfo($item);
var_export($userList);
}
-
} catch (Exception $e) {
-
- // 出错啦,处理下吧
- echo $e->getMessage() . PHP_EOL;
-
-}
\ No newline at end of file
+ //出错啦,处理下吧
+ echo $e->getMessage().PHP_EOL;
+}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/work-config.php b/src/system/sdks/_test/work-config.php
index de3e19b7..88e6c5ae 100644
--- a/src/system/sdks/_test/work-config.php
+++ b/src/system/sdks/_test/work-config.php
@@ -1,6 +1,7 @@
'', // 企业ID
- 'appsecret' => '', // 应用的凭证密钥
-];
\ No newline at end of file
+ 'appid' => '',//企业id
+ 'appsecret' => '',//应用的凭证密钥
+];
+?>
\ No newline at end of file
diff --git a/src/system/sdks/_test/work-department.php b/src/system/sdks/_test/work-department.php
index 41593d03..58e57122 100644
--- a/src/system/sdks/_test/work-department.php
+++ b/src/system/sdks/_test/work-department.php
@@ -1,11 +1,8 @@
callGetApi($url);
@@ -14,5 +11,6 @@ try {
print_r($result);
echo '
';
} catch (Exception $exception) {
- echo $exception->getMessage() . PHP_EOL;
+ echo $exception->getMessage().PHP_EOL;
}
+?>
\ No newline at end of file
diff --git a/src/system/sdks/include.php b/src/system/sdks/include.php
index d4ed6eab..b1f9d2b8 100644
--- a/src/system/sdks/include.php
+++ b/src/system/sdks/include.php
@@ -1,15 +1,16 @@
\ No newline at end of file
diff --git a/src/user/album_add.php b/src/user/album_add.php
index 9781db5e..fac559c9 100755
--- a/src/user/album_add.php
+++ b/src/user/album_add.php
@@ -160,7 +160,7 @@ else if ($dopost == 'save') {
if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$arcID";
ClearMyAddon($arcID, $title);
//返回成功信息
- $msg = "请选择您的后续操作:查看图片修改图片已发布图片管理";
+ $msg = "请选择您的后续操作:继续发布图片查看图片修改图片已发布图片管理";
$wintitle = "成功发布图片";
$wecome_info = "图片管理::发布图片";
$win = new OxWindow();
diff --git a/src/user/api.php b/src/user/api.php
index 222cffcc..3ca2d6e4 100755
--- a/src/user/api.php
+++ b/src/user/api.php
@@ -71,9 +71,8 @@ if ($action === 'is_need_check_code') {
}
exit;
}
- $target_dir = "uploads/"; //上传目录
+ $target_dir = "uploads/";//上传目录
$type = isset($type)? $type : '';
-
$allowedTypes = array('image/png', 'image/jpg', 'image/jpeg');
$uploadedFile = $_FILES['file']['tmp_name'];
$fileType = mime_content_type($uploadedFile);
@@ -91,7 +90,7 @@ if ($action === 'is_need_check_code') {
CloseFtp();
}
if ($type === "face") {
- $target_file = $cfg_basedir.$cfg_user_dir."/{$cfg_ml->M_ID}/newface.png"; //上传文件名
+ $target_file = $cfg_basedir.$cfg_user_dir."/{$cfg_ml->M_ID}/newface.png";//上传文件名
$target_url = $cfg_mediasurl.'/userup'."/{$cfg_ml->M_ID}/newface.png";
} else {
$nowtme = time();
@@ -101,21 +100,15 @@ if ($action === 'is_need_check_code') {
$target_url = $cfg_mediasurl.'/userup'."/{$cfg_ml->M_ID}/".$rnd.".png";
$row = $dsql->GetOne("SELECT aid,title,url FROM `#@__uploads` WHERE url LIKE '$target_url' AND mid='".$cfg_ml->M_ID."'; ");
$uptime = time();
- if(is_array($row))
- {
- $query = "UPDATE `#@__uploads` SET mediatype=1,
- width='{$imgSize[0]}',height='{$imgSize[1]}',filesize='{$fsize}',uptime='$uptime'
- WHERE aid='{$row['aid']}'; ";
+ if (is_array($row)) {
+ $query = "UPDATE `#@__uploads` SET mediatype=1, width='{$imgSize[0]}',height='{$imgSize[1]}',filesize='{$fsize}',uptime='$uptime' WHERE aid='{$row['aid']}'; ";
$dsql->ExecuteNoneQuery($query);
- }
- else
- {
+ } else {
$inquery = "INSERT INTO `#@__uploads`(url,mediatype,width,height,playtime,filesize,uptime,mid)
VALUES ('$target_url','1','".$imgSize[0]."','".$imgSize[1]."','0','".$fsize."','$uptime','".$cfg_ml->M_ID."'); ";
$dsql->ExecuteNoneQuery($inquery);
}
}
-
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
require_once DEDEINC."/libraries/imageresize.class.php";
try{
@@ -125,7 +118,6 @@ if ($action === 'is_need_check_code') {
} else {
$image->resize($cfg_ddimg_width, $cfg_ddimg_height);
}
-
$image->save($target_file);
echo json_encode(array(
"code" => 0,
diff --git a/src/user/buy_action.php b/src/user/buy_action.php
index 41b10090..c7ce84e6 100755
--- a/src/user/buy_action.php
+++ b/src/user/buy_action.php
@@ -57,7 +57,6 @@ if ($dopost === "bank_ok") {
ShowMsg("生成微信支付信息失败,请联系网站管理员", "javascript:;");
exit;
}
-
if ($result['return_code'] === "SUCCESS" && $result['trade_state'] === "SUCCESS") {
$row = $dsql->GetOne("SELECT * FROM `#@__moneycard_type` WHERE tid='{$moRow['pid']}'");
$query = "UPDATE `#@__member_operation` SET sta = '2' WHERE buyid = '$buyid'";
@@ -155,7 +154,6 @@ if ($paytype === 0) {
ShowMsg("已完成支付,无需重复付款", "javascript:;");
exit;
}
-
if($paytype === 1) {
//微信支付
include_once(DEDEINC.'/libraries/oxwindow.class.php');
@@ -166,7 +164,6 @@ if ($paytype === 0) {
"mch_id" => $pData['MchID'],
"mch_key" => $pData['APIv2Secret'],
);
-
try {
$wechat = new \WeChat\Pay($config);
$options = array(
@@ -214,11 +211,10 @@ if ($paytype === 0) {
//实例支付对象
$pay = \AliPay\Web::instance($config);
$result = $pay->apply(array(
- 'out_trade_no' => $buyid, // 商户订单号
- 'total_amount' => $row['money'], // 支付金额
- 'subject' => $row['pname'], // 支付订单描述
+ 'out_trade_no' => $buyid,//商户订单号
+ 'total_amount' => $row['money'],//支付金额
+ 'subject' => $row['pname'],//支付订单描述
));
-
echo $result;
} catch (Exception $e) {
ShowMsg("生成微信支付信息失败,请联系网站管理员", "javascript:;");
@@ -261,9 +257,7 @@ if ($paytype === 0) {
}
$memrank = $dsql->GetOne("SELECT money,scores FROM `#@__arcrank` WHERE `rank`='$rank'");
//更新会员信息
- $sqlm = "UPDATE `#@__member` SET `rank`='$rank',`money`=`money`+'{$memrank['money']}',
- scores=scores+'{$memrank['scores']}',exptime='$exptime'+'$mhasDay',uptime='".time()."'
- WHERE mid='".$mid."'";
+ $sqlm = "UPDATE `#@__member` SET `rank`='$rank',`money`=`money`+'{$memrank['money']}',scores=scores+'{$memrank['scores']}',exptime='$exptime'+'$mhasDay',uptime='".time()."' WHERE mid='".$mid."'";
$sqlmo = "UPDATE `#@__member_operation` SET sta='2',oldinfo='会员升级成功' WHERE buyid='$buyid' ";
if(!($dsql->ExecuteNoneQuery($sqlm) && $dsql->ExecuteNoneQuery($sqlmo)))
{
@@ -271,7 +265,6 @@ if ($paytype === 0) {
exit;
}
}
-
ShowMsg("成功使用余额付款", "javascript:;");
exit;
} elseif ($paytype === 5) {
diff --git a/src/user/config.php b/src/user/config.php
index e1734a23..ccd1fb21 100755
--- a/src/user/config.php
+++ b/src/user/config.php
@@ -253,7 +253,6 @@ function GetSafequestion($selid=0,$formname='safequestion')
return $safequestions_form;
}
$enabledChannels = MemberLogin::GetEnabledChannels();
-
function UserInclude($file)
{
return DEDEMEMBER.'/'.$file;
diff --git a/src/user/soft_add.php b/src/user/soft_add.php
index 52bb4ed4..ebc340d5 100755
--- a/src/user/soft_add.php
+++ b/src/user/soft_add.php
@@ -106,7 +106,6 @@ else if ($dopost == 'save') {
}
$body = HtmlReplace($body, -1);
$litpic = isset($litpic)? HtmlReplace($litpic, 1) : '';
-
//保存到主表
$inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,description,keywords) VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','0','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$mid','$description','$keywords'); ";
if (!$dsql->ExecuteNoneQuery($inQuery)) {
diff --git a/src/user/templets/album_add.htm b/src/user/templets/album_add.htm
index 9e9c6ddc..44d123fd 100755
--- a/src/user/templets/album_add.htm
+++ b/src/user/templets/album_add.htm
@@ -8,7 +8,7 @@
-
+
@@ -88,35 +88,6 @@
-
-
- 上传图片(支持多选)
-
-
-
-

-
图片1
-
-
-

-
图片1
-
-
-

-
图片2
-
-
-

-
图片3
-
-
-

-
图片4
-
-
-
-
-
@@ -127,6 +98,6 @@
-
+