mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
cda678476a
commit
1e09f5590a
23
composer.lock
generated
23
composer.lock
generated
@ -909,12 +909,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670"
|
"reference": "56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d",
|
||||||
"reference": "7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670",
|
"reference": "56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -958,20 +958,20 @@
|
|||||||
],
|
],
|
||||||
"description": "ThinkPHP v6.0 Development Library",
|
"description": "ThinkPHP v6.0 Development Library",
|
||||||
"homepage": "http://framework.thinkadmin.top",
|
"homepage": "http://framework.thinkadmin.top",
|
||||||
"time": "2020-03-10T08:17:04+00:00"
|
"time": "2020-03-11T02:14:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
"version": "v1.2.17",
|
"version": "v1.2.19",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/WeChatDeveloper.git",
|
"url": "https://github.com/zoujingli/WeChatDeveloper.git",
|
||||||
"reference": "98f6e82311a364220a677cdfd56dc9f97851ab24"
|
"reference": "c30e880bf70709a50e9b73c9dc574ed6ca2d6156"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/98f6e82311a364220a677cdfd56dc9f97851ab24",
|
"url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/c30e880bf70709a50e9b73c9dc574ed6ca2d6156",
|
||||||
"reference": "98f6e82311a364220a677cdfd56dc9f97851ab24",
|
"reference": "c30e880bf70709a50e9b73c9dc574ed6ca2d6156",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -981,6 +981,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"ext-bcmath": "*",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
@ -996,8 +997,8 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"WePay\\": "WePay",
|
"WePay\\": "WePay",
|
||||||
"WeMini\\": "WeMini",
|
|
||||||
"WeChat\\": "WeChat",
|
"WeChat\\": "WeChat",
|
||||||
|
"WeMini\\": "WeMini",
|
||||||
"AliPay\\": "AliPay"
|
"AliPay\\": "AliPay"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1009,7 +1010,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Anyon",
|
"name": "Anyon",
|
||||||
"email": "zoujingli@qq.com",
|
"email": "zoujingli@qq.com",
|
||||||
"homepage": "http://ctolog.com"
|
"homepage": "https://thinkadmin.top"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "WeChat platform and WeChat payment development tools",
|
"description": "WeChat platform and WeChat payment development tools",
|
||||||
@ -1022,7 +1023,7 @@
|
|||||||
"wechatpay",
|
"wechatpay",
|
||||||
"wepay"
|
"wepay"
|
||||||
],
|
],
|
||||||
"time": "2020-03-02T11:08:34+00:00"
|
"time": "2020-03-11T09:50:03+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -165,14 +165,17 @@ return array(
|
|||||||
'WeChat\\Wifi' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Wifi.php',
|
'WeChat\\Wifi' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Wifi.php',
|
||||||
'WeMini\\Crypt' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Crypt.php',
|
'WeMini\\Crypt' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Crypt.php',
|
||||||
'WeMini\\Delivery' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Delivery.php',
|
'WeMini\\Delivery' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Delivery.php',
|
||||||
|
'WeMini\\Guide' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Guide.php',
|
||||||
'WeMini\\Image' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Image.php',
|
'WeMini\\Image' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Image.php',
|
||||||
'WeMini\\Logistics' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Logistics.php',
|
'WeMini\\Logistics' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Logistics.php',
|
||||||
'WeMini\\Message' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Message.php',
|
'WeMini\\Message' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Message.php',
|
||||||
'WeMini\\Newtmpl' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Newtmpl.php',
|
'WeMini\\Newtmpl' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Newtmpl.php',
|
||||||
'WeMini\\Ocr' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Ocr.php',
|
'WeMini\\Ocr' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Ocr.php',
|
||||||
|
'WeMini\\Operation' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Operation.php',
|
||||||
'WeMini\\Plugs' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Plugs.php',
|
'WeMini\\Plugs' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Plugs.php',
|
||||||
'WeMini\\Poi' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Poi.php',
|
'WeMini\\Poi' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Poi.php',
|
||||||
'WeMini\\Qrcode' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Qrcode.php',
|
'WeMini\\Qrcode' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Qrcode.php',
|
||||||
|
'WeMini\\Search' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Search.php',
|
||||||
'WeMini\\Security' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Security.php',
|
'WeMini\\Security' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Security.php',
|
||||||
'WeMini\\Soter' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Soter.php',
|
'WeMini\\Soter' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Soter.php',
|
||||||
'WeMini\\Template' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Template.php',
|
'WeMini\\Template' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Template.php',
|
||||||
|
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@ -298,14 +298,17 @@ class ComposerStaticInit9eebf462f38fc6a0db482795c8caf813
|
|||||||
'WeChat\\Wifi' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Wifi.php',
|
'WeChat\\Wifi' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Wifi.php',
|
||||||
'WeMini\\Crypt' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Crypt.php',
|
'WeMini\\Crypt' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Crypt.php',
|
||||||
'WeMini\\Delivery' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Delivery.php',
|
'WeMini\\Delivery' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Delivery.php',
|
||||||
|
'WeMini\\Guide' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Guide.php',
|
||||||
'WeMini\\Image' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Image.php',
|
'WeMini\\Image' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Image.php',
|
||||||
'WeMini\\Logistics' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Logistics.php',
|
'WeMini\\Logistics' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Logistics.php',
|
||||||
'WeMini\\Message' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Message.php',
|
'WeMini\\Message' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Message.php',
|
||||||
'WeMini\\Newtmpl' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Newtmpl.php',
|
'WeMini\\Newtmpl' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Newtmpl.php',
|
||||||
'WeMini\\Ocr' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Ocr.php',
|
'WeMini\\Ocr' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Ocr.php',
|
||||||
|
'WeMini\\Operation' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Operation.php',
|
||||||
'WeMini\\Plugs' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Plugs.php',
|
'WeMini\\Plugs' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Plugs.php',
|
||||||
'WeMini\\Poi' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Poi.php',
|
'WeMini\\Poi' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Poi.php',
|
||||||
'WeMini\\Qrcode' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Qrcode.php',
|
'WeMini\\Qrcode' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Qrcode.php',
|
||||||
|
'WeMini\\Search' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Search.php',
|
||||||
'WeMini\\Security' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Security.php',
|
'WeMini\\Security' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Security.php',
|
||||||
'WeMini\\Soter' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Soter.php',
|
'WeMini\\Soter' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Soter.php',
|
||||||
'WeMini\\Template' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Template.php',
|
'WeMini\\Template' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Template.php',
|
||||||
|
25
vendor/composer/installed.json
vendored
25
vendor/composer/installed.json
vendored
@ -935,12 +935,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670"
|
"reference": "56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d",
|
||||||
"reference": "7dc1c9f49f0b5bdc187a29c0e8f4fd9b3af2d670",
|
"reference": "56bec8b70dd7eb4a40c03b59b5a20b85dfb8888d",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -956,7 +956,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-03-10T08:17:04+00:00",
|
"time": "2020-03-11T02:14:54+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
@ -989,17 +989,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
"version": "v1.2.17",
|
"version": "v1.2.19",
|
||||||
"version_normalized": "1.2.17.0",
|
"version_normalized": "1.2.19.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/WeChatDeveloper.git",
|
"url": "https://github.com/zoujingli/WeChatDeveloper.git",
|
||||||
"reference": "98f6e82311a364220a677cdfd56dc9f97851ab24"
|
"reference": "c30e880bf70709a50e9b73c9dc574ed6ca2d6156"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/98f6e82311a364220a677cdfd56dc9f97851ab24",
|
"url": "https://api.github.com/repos/zoujingli/WeChatDeveloper/zipball/c30e880bf70709a50e9b73c9dc574ed6ca2d6156",
|
||||||
"reference": "98f6e82311a364220a677cdfd56dc9f97851ab24",
|
"reference": "c30e880bf70709a50e9b73c9dc574ed6ca2d6156",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -1009,6 +1009,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
"ext-bcmath": "*",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
@ -1017,7 +1018,7 @@
|
|||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"php": ">=5.4"
|
"php": ">=5.4"
|
||||||
},
|
},
|
||||||
"time": "2020-03-02T11:08:34+00:00",
|
"time": "2020-03-11T09:50:03+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -1026,8 +1027,8 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"WePay\\": "WePay",
|
"WePay\\": "WePay",
|
||||||
"WeMini\\": "WeMini",
|
|
||||||
"WeChat\\": "WeChat",
|
"WeChat\\": "WeChat",
|
||||||
|
"WeMini\\": "WeMini",
|
||||||
"AliPay\\": "AliPay"
|
"AliPay\\": "AliPay"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1039,7 +1040,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Anyon",
|
"name": "Anyon",
|
||||||
"email": "zoujingli@qq.com",
|
"email": "zoujingli@qq.com",
|
||||||
"homepage": "http://ctolog.com"
|
"homepage": "https://thinkadmin.top"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "WeChat platform and WeChat payment development tools",
|
"description": "WeChat platform and WeChat payment development tools",
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-03-10 16:20:56
|
// This file is automatically generated at:2020-03-11 17:54:13
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
@ -45,7 +45,7 @@ abstract class Service
|
|||||||
* 初始化服务
|
* 初始化服务
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Service
|
protected function initialize()
|
||||||
{
|
{
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ abstract class Service
|
|||||||
* @param array $args
|
* @param array $args
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public static function instance(...$args): Service
|
public static function instance(...$args)
|
||||||
{
|
{
|
||||||
return Container::getInstance()->make(static::class, $args);
|
return Container::getInstance()->make(static::class, $args);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ abstract class Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Storage
|
protected function initialize()
|
||||||
{
|
{
|
||||||
$this->linkType = sysconf('storage.link_type');
|
$this->linkType = sysconf('storage.link_type');
|
||||||
return $this;
|
return $this;
|
||||||
@ -102,7 +102,7 @@ abstract class Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public static function instance($name = null): Storage
|
public static function instance($name = null)
|
||||||
{
|
{
|
||||||
$class = ucfirst(strtolower(is_null($name) ? sysconf('storage.type') : $name));
|
$class = ucfirst(strtolower(is_null($name) ? sysconf('storage.type') : $name));
|
||||||
if (class_exists($object = "think\\admin\\storage\\{$class}Storage")) {
|
if (class_exists($object = "think\\admin\\storage\\{$class}Storage")) {
|
||||||
@ -120,7 +120,7 @@ abstract class Storage
|
|||||||
* @param string $fun 名称规则方法
|
* @param string $fun 名称规则方法
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function name($url, $ext = '', $pre = '', $fun = 'md5'): string
|
public static function name($url, $ext = '', $pre = '', $fun = 'md5')
|
||||||
{
|
{
|
||||||
if (empty($ext)) $ext = pathinfo($url, 4);
|
if (empty($ext)) $ext = pathinfo($url, 4);
|
||||||
list($xmd, $ext) = [$fun($url), trim($ext, '.\\/')];
|
list($xmd, $ext) = [$fun($url), trim($ext, '.\\/')];
|
||||||
@ -157,7 +157,7 @@ abstract class Storage
|
|||||||
* @param array $mime 文件信息
|
* @param array $mime 文件信息
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function mime($exts, $mime = []): string
|
public static function mime($exts, $mime = [])
|
||||||
{
|
{
|
||||||
$mimes = self::mimes();
|
$mimes = self::mimes();
|
||||||
foreach (is_string($exts) ? explode(',', $exts) : $exts as $ext) {
|
foreach (is_string($exts) ? explode(',', $exts) : $exts as $ext) {
|
||||||
|
@ -205,7 +205,7 @@ if (!function_exists('format_datetime')) {
|
|||||||
* @param string $format 输出格式
|
* @param string $format 输出格式
|
||||||
* @return false|string
|
* @return false|string
|
||||||
*/
|
*/
|
||||||
function format_datetime($datetime, $format = 'Y年m月d日 H:i:s'): string
|
function format_datetime($datetime, $format = 'Y年m月d日 H:i:s')
|
||||||
{
|
{
|
||||||
if (empty($datetime)) return '-';
|
if (empty($datetime)) return '-';
|
||||||
if (is_numeric($datetime)) {
|
if (is_numeric($datetime)) {
|
||||||
@ -221,7 +221,7 @@ if (!function_exists('enbase64url')) {
|
|||||||
* @param string $string
|
* @param string $string
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function enbase64url(string $string): string
|
function enbase64url(string $string)
|
||||||
{
|
{
|
||||||
return rtrim(strtr(base64_encode($string), '+/', '-_'), '=');
|
return rtrim(strtr(base64_encode($string), '+/', '-_'), '=');
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ if (!function_exists('debase64url')) {
|
|||||||
* @param string $string
|
* @param string $string
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function debase64url(string $string): string
|
function debase64url(string $string)
|
||||||
{
|
{
|
||||||
return base64_decode(str_pad(strtr($string, '-_', '+/'), strlen($string) % 4, '=', STR_PAD_RIGHT));
|
return base64_decode(str_pad(strtr($string, '-_', '+/'), strlen($string) % 4, '=', STR_PAD_RIGHT));
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ if (!function_exists('down_file')) {
|
|||||||
* @param integer $expire 强制本地存储时间
|
* @param integer $expire 强制本地存储时间
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function down_file($source, $force = false, $expire = 0): string
|
function down_file($source, $force = false, $expire = 0)
|
||||||
{
|
{
|
||||||
$result = Storage::down($source, $force, $expire);
|
$result = Storage::down($source, $force, $expire);
|
||||||
return isset($result['url']) ? $result['url'] : $source;
|
return isset($result['url']) ? $result['url'] : $source;
|
||||||
|
@ -40,7 +40,7 @@ class CaptchaService extends Service
|
|||||||
* @param array $config
|
* @param array $config
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
protected function initialize($config = []): Service
|
protected function initialize($config = [])
|
||||||
{
|
{
|
||||||
// 动态配置属性
|
// 动态配置属性
|
||||||
foreach ($config as $k => $v) if (isset($this->$k)) $this->$k = $v;
|
foreach ($config as $k => $v) if (isset($this->$k)) $this->$k = $v;
|
||||||
|
@ -39,15 +39,13 @@ class ExpressService extends Service
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 快递服务初始化
|
* 快递服务初始化
|
||||||
* @return Service
|
* @return $this
|
||||||
* @throws \think\Exception
|
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Service
|
protected function initialize()
|
||||||
{
|
{
|
||||||
$id = $this->app->request->ip();
|
|
||||||
$this->options = [
|
$this->options = [
|
||||||
'cookie_file' => $this->app->getRuntimePath() . '_express_kuaidi100_cookie.txt',
|
'cookie_file' => $this->app->getRuntimePath() . '_express_cookie.txt',
|
||||||
'headers' => ['Host' => 'express.baidu.com', 'CLIENT-IP' => $id, 'X-FORWARDED-FOR' => $id],
|
'headers' => ['Host' => 'express.baidu.com', 'X-FORWARDED-FOR' => $this->app->request->ip()],
|
||||||
];
|
];
|
||||||
$this->token = $this->getExpressToken();
|
$this->token = $this->getExpressToken();
|
||||||
return $this;
|
return $this;
|
||||||
@ -75,32 +73,6 @@ class ExpressService extends Service
|
|||||||
return ['message' => 'ok', 'com' => $code, 'nu' => $number, 'data' => $list];
|
return ['message' => 'ok', 'com' => $code, 'nu' => $number, 'data' => $list];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 执行百度快递100应用查询请求
|
|
||||||
* @param string $code 快递公司编号
|
|
||||||
* @param string $number 快递单单号
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
private function doExpress($code, $number)
|
|
||||||
{
|
|
||||||
$url = "https://express.baidu.com/express/api/express?tokenV2={$this->token}&appid=4001&nu={$number}&com={$code}&qid=&new_need_di=1&source_xcx=0&vcode=&token=&sourceId=4155&cb=callback";
|
|
||||||
return json_decode(str_replace('/**/callback(', '', trim(HttpExtend::get($url, [], $this->options), ')')), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取接口请求令牌
|
|
||||||
* @return string
|
|
||||||
* @throws \think\Exception
|
|
||||||
*/
|
|
||||||
public function getExpressToken()
|
|
||||||
{
|
|
||||||
if (preg_match('/express\?tokenV2=(.*?)",/', $this->getWapBaiduHtml(), $matches)) {
|
|
||||||
return $matches[1];
|
|
||||||
} else {
|
|
||||||
throw new \think\Exception('Failed to grab authorization token.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取快递公司列表
|
* 获取快递公司列表
|
||||||
* @return array
|
* @return array
|
||||||
@ -111,21 +83,51 @@ class ExpressService extends Service
|
|||||||
if (preg_match('/"currentData":.*?\[(.*?)\],/', $this->getWapBaiduHtml(), $matches)) {
|
if (preg_match('/"currentData":.*?\[(.*?)\],/', $this->getWapBaiduHtml(), $matches)) {
|
||||||
foreach (json_decode("[{$matches['1']}]") as $item) $data[$item->value] = $item->text;
|
foreach (json_decode("[{$matches['1']}]") as $item) $data[$item->value] = $item->text;
|
||||||
unset($data['_auto']);
|
unset($data['_auto']);
|
||||||
|
return $data;
|
||||||
|
} else {
|
||||||
|
$this->app->cache->delete('express_kuaidi_html');
|
||||||
|
return $this->getExpressList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行百度快递100应用查询请求
|
||||||
|
* @param string $code 快递公司编号
|
||||||
|
* @param string $number 快递单单号
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
private function doExpress($code, $number)
|
||||||
|
{
|
||||||
|
$uniqid = strtr(uniqid(), '.', '');
|
||||||
|
$url = "https://express.baidu.com/express/api/express?tokenV2={$this->token}&appid=4001&nu={$number}&com={$code}&qid={$uniqid}&new_need_di=1&source_xcx=0&vcode=&token=&sourceId=4155&cb=callback";
|
||||||
|
return json_decode(str_replace('/**/callback(', '', trim(HttpExtend::get($url, [], $this->options), ')')), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取接口请求令牌
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function getExpressToken()
|
||||||
|
{
|
||||||
|
if (preg_match('/express\?tokenV2=(.*?)",/', $this->getWapBaiduHtml(), $matches)) {
|
||||||
|
return $matches[1];
|
||||||
|
} else {
|
||||||
|
$this->app->cache->delete('express_kuaidi_html');
|
||||||
|
return $this->getExpressToken();
|
||||||
}
|
}
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取百度WAP快递HTML(用于后面的抓取关键值)
|
* 获取百度WAP快递HTML(用于后面的抓取关键值)
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getWapBaiduHtml()
|
private function getWapBaiduHtml()
|
||||||
{
|
{
|
||||||
$content = $this->app->cache->get('express_baidu_kuaidi_100');
|
$content = $this->app->cache->get('express_kuaidi_html');
|
||||||
while (empty($content) || stristr($content, '百度安全验证') > -1 || stripos($content, 'tokenV2') === -1) {
|
while (empty($content) || stristr($content, '百度安全验证') > -1 || stripos($content, 'tokenV2') === -1) {
|
||||||
$content = HttpExtend::get('https://m.baidu.com/s?word=73124161428372', [], $this->options);
|
$content = HttpExtend::get('https://m.baidu.com/s?word=73124161428372&rnd=' . uniqid(), [], $this->options);
|
||||||
}
|
}
|
||||||
$this->app->cache->set('express_baidu_kuaidi_100', $content, 3600);
|
$this->app->cache->set('express_kuaidi_html', $content, 30);
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class InstallService extends Service
|
|||||||
* 初始化服务
|
* 初始化服务
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Service
|
protected function initialize()
|
||||||
{
|
{
|
||||||
// 应用框架版本
|
// 应用框架版本
|
||||||
$this->version = $this->app->config->get('app.thinkadmin_ver');
|
$this->version = $this->app->config->get('app.thinkadmin_ver');
|
||||||
|
@ -66,7 +66,7 @@ class MessageService extends Service
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Service
|
protected function initialize()
|
||||||
{
|
{
|
||||||
$this->table = 'SystemMessageHistory';
|
$this->table = 'SystemMessageHistory';
|
||||||
$this->china_username = sysconf('sms_zt.china_username');
|
$this->china_username = sysconf('sms_zt.china_username');
|
||||||
@ -119,7 +119,7 @@ class MessageService extends Service
|
|||||||
* @param array $params
|
* @param array $params
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function buildContent($content, array $params = []): string
|
public function buildContent($content, array $params = [])
|
||||||
{
|
{
|
||||||
foreach ($params as $key => $value) {
|
foreach ($params as $key => $value) {
|
||||||
$content = str_replace("{{$key}}", $value, $content);
|
$content = str_replace("{{$key}}", $value, $content);
|
||||||
|
@ -59,7 +59,7 @@ class QueueService extends Service
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public function initialize($code = 0): Service
|
public function initialize($code = 0)
|
||||||
{
|
{
|
||||||
if (!empty($code)) {
|
if (!empty($code)) {
|
||||||
$this->code = $code;
|
$this->code = $code;
|
||||||
|
@ -63,7 +63,7 @@ class AliossStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Storage
|
protected function initialize()
|
||||||
{
|
{
|
||||||
// 读取配置文件
|
// 读取配置文件
|
||||||
$this->point = sysconf('storage.alioss_point');
|
$this->point = sysconf('storage.alioss_point');
|
||||||
@ -90,7 +90,7 @@ class AliossStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public static function instance($name = null): Storage
|
public static function instance($name = null)
|
||||||
{
|
{
|
||||||
return parent::instance('alioss');
|
return parent::instance('alioss');
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class LocalStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Storage
|
protected function initialize()
|
||||||
{
|
{
|
||||||
// 计算链接前缀
|
// 计算链接前缀
|
||||||
$type = strtolower(sysconf('storage.local_http_protocol'));
|
$type = strtolower(sysconf('storage.local_http_protocol'));
|
||||||
@ -59,7 +59,7 @@ class LocalStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public static function instance($name = null): Storage
|
public static function instance($name = null)
|
||||||
{
|
{
|
||||||
return parent::instance('local');
|
return parent::instance('local');
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class QiniuStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
protected function initialize(): Storage
|
protected function initialize()
|
||||||
{
|
{
|
||||||
// 读取配置文件
|
// 读取配置文件
|
||||||
$this->bucket = sysconf('storage.qiniu_bucket');
|
$this->bucket = sysconf('storage.qiniu_bucket');
|
||||||
@ -64,7 +64,7 @@ class QiniuStorage extends Storage
|
|||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public static function instance($name = null): Storage
|
public static function instance($name = null)
|
||||||
{
|
{
|
||||||
return parent::instance('qiniu');
|
return parent::instance('qiniu');
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
namespace AliPay;
|
namespace AliPay;
|
||||||
|
|
||||||
use WeChat\Contracts\BasicAliPay;
|
use WeChat\Contracts\BasicAliPay;
|
||||||
|
use WeChat\Exceptions\InvalidArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝转账到账户
|
* 支付宝转账到账户
|
||||||
@ -24,16 +25,6 @@ use WeChat\Contracts\BasicAliPay;
|
|||||||
class Transfer extends BasicAliPay
|
class Transfer extends BasicAliPay
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Transfer constructor.
|
|
||||||
* @param array $options
|
|
||||||
*/
|
|
||||||
public function __construct(array $options)
|
|
||||||
{
|
|
||||||
parent::__construct($options);
|
|
||||||
$this->options->set('method', 'alipay.fund.trans.toaccount.transfer');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旧版 向指定支付宝账户转账
|
* 旧版 向指定支付宝账户转账
|
||||||
* @param array $options
|
* @param array $options
|
||||||
@ -43,6 +34,7 @@ class Transfer extends BasicAliPay
|
|||||||
*/
|
*/
|
||||||
public function apply($options)
|
public function apply($options)
|
||||||
{
|
{
|
||||||
|
$this->options->set('method', 'alipay.fund.trans.toaccount.transfer');
|
||||||
return $this->getResult($options);
|
return $this->getResult($options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +47,7 @@ class Transfer extends BasicAliPay
|
|||||||
*/
|
*/
|
||||||
public function create($options = [])
|
public function create($options = [])
|
||||||
{
|
{
|
||||||
|
$this->setAppCertSnAndRootCertSn();
|
||||||
$this->options->set('method', 'alipay.fund.trans.uni.transfer');
|
$this->options->set('method', 'alipay.fund.trans.uni.transfer');
|
||||||
return $this->getResult($options);
|
return $this->getResult($options);
|
||||||
}
|
}
|
||||||
@ -68,6 +61,7 @@ class Transfer extends BasicAliPay
|
|||||||
*/
|
*/
|
||||||
public function queryResult($options = [])
|
public function queryResult($options = [])
|
||||||
{
|
{
|
||||||
|
$this->setAppCertSnAndRootCertSn();
|
||||||
$this->options->set('method', 'alipay.fund.trans.common.query');
|
$this->options->set('method', 'alipay.fund.trans.common.query');
|
||||||
return $this->getResult($options);
|
return $this->getResult($options);
|
||||||
|
|
||||||
@ -82,7 +76,29 @@ class Transfer extends BasicAliPay
|
|||||||
*/
|
*/
|
||||||
public function queryAccount($options = [])
|
public function queryAccount($options = [])
|
||||||
{
|
{
|
||||||
|
$this->setAppCertSnAndRootCertSn();
|
||||||
$this->options->set('method', 'alipay.fund.account.query');
|
$this->options->set('method', 'alipay.fund.account.query');
|
||||||
return $this->getResult($options);
|
return $this->getResult($options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版 设置网关应用公钥证书SN、支付宝根证书SN
|
||||||
|
*/
|
||||||
|
protected function setAppCertSnAndRootCertSn()
|
||||||
|
{
|
||||||
|
if (!$this->config->get('app_cert')) {
|
||||||
|
throw new InvalidArgumentException("Missing Config -- [app_cert]");
|
||||||
|
}
|
||||||
|
if (!$this->config->get('root_cert')) {
|
||||||
|
throw new InvalidArgumentException("Missing Config -- [root_cert]");
|
||||||
|
}
|
||||||
|
$this->options->set('app_cert_sn', $this->getCertSN($this->config->get('app_cert')));
|
||||||
|
$this->options->set('alipay_root_cert_sn', $this->getRootCertSN($this->config->get('root_cert')));
|
||||||
|
if (!$this->options->get('app_cert_sn')) {
|
||||||
|
throw new InvalidArgumentException("Missing options -- [app_cert_sn]");
|
||||||
|
}
|
||||||
|
if (!$this->options->get('alipay_root_cert_sn')) {
|
||||||
|
throw new InvalidArgumentException("Missing options -- [alipay_root_cert_sn]");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
26
vendor/zoujingli/wechat-developer/We.php
vendored
26
vendor/zoujingli/wechat-developer/We.php
vendored
@ -23,6 +23,15 @@ use WeChat\Exceptions\InvalidInstanceException;
|
|||||||
* @author Anyon<zoujingli@qq.com>
|
* @author Anyon<zoujingli@qq.com>
|
||||||
* @date 2018/05/24 13:23
|
* @date 2018/05/24 13:23
|
||||||
*
|
*
|
||||||
|
* ----- AliPay ----
|
||||||
|
* @method \AliPay\App AliPayApp($options) static 支付宝App支付网关
|
||||||
|
* @method \AliPay\Bill AliPayBill($options) static 支付宝电子面单下载
|
||||||
|
* @method \AliPay\Pos AliPayPos($options) static 支付宝刷卡支付
|
||||||
|
* @method \AliPay\Scan AliPayScan($options) static 支付宝扫码支付
|
||||||
|
* @method \AliPay\Transfer AliPayTransfer($options) static 支付宝转账到账户
|
||||||
|
* @method \AliPay\Wap AliPayWap($options) static 支付宝手机网站支付
|
||||||
|
* @method \AliPay\Web AliPayWeb($options) static 支付宝网站支付
|
||||||
|
*
|
||||||
* ----- WeChat -----
|
* ----- WeChat -----
|
||||||
* @method \WeChat\Card WeChatCard($options = []) static 微信卡券管理
|
* @method \WeChat\Card WeChatCard($options = []) static 微信卡券管理
|
||||||
* @method \WeChat\Custom WeChatCustom($options = []) static 微信客服消息
|
* @method \WeChat\Custom WeChatCustom($options = []) static 微信客服消息
|
||||||
@ -45,13 +54,17 @@ use WeChat\Exceptions\InvalidInstanceException;
|
|||||||
* ----- WeMini -----
|
* ----- WeMini -----
|
||||||
* @method \WeMini\Crypt WeMiniCrypt($options = []) static 小程序数据加密处理
|
* @method \WeMini\Crypt WeMiniCrypt($options = []) static 小程序数据加密处理
|
||||||
* @method \WeMini\Delivery WeMiniDelivery($options = []) static 小程序即时配送
|
* @method \WeMini\Delivery WeMiniDelivery($options = []) static 小程序即时配送
|
||||||
|
* @method \WeMini\Guide WeMiniGuide($options = []) static 小程序导购助手
|
||||||
* @method \WeMini\Image WeMiniImage($options = []) static 小程序图像处理
|
* @method \WeMini\Image WeMiniImage($options = []) static 小程序图像处理
|
||||||
* @method \WeMini\Logistics WeMiniLogistics($options = []) static 小程序物流助手
|
* @method \WeMini\Logistics WeMiniLogistics($options = []) static 小程序物流助手
|
||||||
* @method \WeMini\Message WeMiniMessage($options = []) static 小程序动态消息
|
* @method \WeMini\Message WeMiniMessage($options = []) static 小程序动态消息
|
||||||
|
* @method \WeMini\Newtmpl WeMiniNewtmpl($options = []) static 小程序订阅消息
|
||||||
* @method \WeMini\Ocr WeMiniOcr($options = []) static 小程序ORC服务
|
* @method \WeMini\Ocr WeMiniOcr($options = []) static 小程序ORC服务
|
||||||
|
* @method \WeMini\Operation WeMiniOperation($options = []) static 小程序运维中心
|
||||||
* @method \WeMini\Plugs WeMiniPlugs($options = []) static 小程序插件管理
|
* @method \WeMini\Plugs WeMiniPlugs($options = []) static 小程序插件管理
|
||||||
* @method \WeMini\Poi WeMiniPoi($options = []) static 小程序地址管理
|
* @method \WeMini\Poi WeMiniPoi($options = []) static 小程序地址管理
|
||||||
* @method \WeMini\Qrcode WeMiniQrcode($options = []) static 小程序二维码管理
|
* @method \WeMini\Qrcode WeMiniQrcode($options = []) static 小程序二维码管理
|
||||||
|
* @method \WeMini\Search WeMiniSearch($options = []) static 小程序搜索
|
||||||
* @method \WeMini\Security WeMiniSecurity($options = []) static 小程序内容安全
|
* @method \WeMini\Security WeMiniSecurity($options = []) static 小程序内容安全
|
||||||
* @method \WeMini\Soter WeMiniSoter($options = []) static 小程序生物认证
|
* @method \WeMini\Soter WeMiniSoter($options = []) static 小程序生物认证
|
||||||
* @method \WeMini\Template WeMiniTemplate($options = []) static 小程序模板消息支持
|
* @method \WeMini\Template WeMiniTemplate($options = []) static 小程序模板消息支持
|
||||||
@ -59,21 +72,12 @@ use WeChat\Exceptions\InvalidInstanceException;
|
|||||||
*
|
*
|
||||||
* ----- WePay -----
|
* ----- WePay -----
|
||||||
* @method \WePay\Bill WePayBill($options = []) static 微信商户账单及评论
|
* @method \WePay\Bill WePayBill($options = []) static 微信商户账单及评论
|
||||||
|
* @method \WePay\Coupon WePayCoupon($options = []) static 微信商户代金券
|
||||||
* @method \WePay\Order WePayOrder($options = []) static 微信商户订单
|
* @method \WePay\Order WePayOrder($options = []) static 微信商户订单
|
||||||
* @method \WePay\Refund WePayRefund($options = []) static 微信商户退款
|
* @method \WePay\Refund WePayRefund($options = []) static 微信商户退款
|
||||||
* @method \WePay\Coupon WePayCoupon($options = []) static 微信商户代金券
|
|
||||||
* @method \WePay\Redpack WePayRedpack($options = []) static 微信红包支持
|
* @method \WePay\Redpack WePayRedpack($options = []) static 微信红包支持
|
||||||
* @method \WePay\Transfers WePayTransfers($options = []) static 微信商户打款到零钱
|
* @method \WePay\Transfers WePayTransfers($options = []) static 微信商户打款到零钱
|
||||||
* @method \WePay\TransfersBank WePayTransfersBank($options = []) static 微信商户打款到银行卡
|
* @method \WePay\TransfersBank WePayTransfersBank($options = []) static 微信商户打款到银行卡
|
||||||
*
|
|
||||||
* ----- AliPay ----
|
|
||||||
* @method \AliPay\App AliPayApp($options) static 支付宝App支付网关
|
|
||||||
* @method \AliPay\Bill AliPayBill($options) static 支付宝电子面单下载
|
|
||||||
* @method \AliPay\Pos AliPayPos($options) static 支付宝刷卡支付
|
|
||||||
* @method \AliPay\Scan AliPayScan($options) static 支付宝扫码支付
|
|
||||||
* @method \AliPay\Transfer AliPayTransfer($options) static 支付宝转账到账户
|
|
||||||
* @method \AliPay\Wap AliPayWap($options) static 支付宝手机网站支付
|
|
||||||
* @method \AliPay\Web AliPayWeb($options) static 支付宝网站支付
|
|
||||||
*/
|
*/
|
||||||
class We
|
class We
|
||||||
{
|
{
|
||||||
@ -81,7 +85,7 @@ class We
|
|||||||
* 定义当前版本
|
* 定义当前版本
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '1.2.17';
|
const VERSION = '1.2.19';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 静态配置
|
* 静态配置
|
||||||
|
@ -198,7 +198,7 @@ abstract class BasicAliPay
|
|||||||
*/
|
*/
|
||||||
protected function getSign()
|
protected function getSign()
|
||||||
{
|
{
|
||||||
$content = wordwrap($this->config->get('private_key'), 64, "\n", true);
|
$content = wordwrap($this->trimCert($this->config->get('private_key')), 64, "\n", true);
|
||||||
$string = "-----BEGIN RSA PRIVATE KEY-----\n{$content}\n-----END RSA PRIVATE KEY-----";
|
$string = "-----BEGIN RSA PRIVATE KEY-----\n{$content}\n-----END RSA PRIVATE KEY-----";
|
||||||
if ($this->options->get('sign_type') === 'RSA2') {
|
if ($this->options->get('sign_type') === 'RSA2') {
|
||||||
openssl_sign($this->getSignContent($this->options->get(), true), $sign, $string, OPENSSL_ALGO_SHA256);
|
openssl_sign($this->getSignContent($this->options->get(), true), $sign, $string, OPENSSL_ALGO_SHA256);
|
||||||
@ -208,6 +208,17 @@ abstract class BasicAliPay
|
|||||||
return base64_encode($sign);
|
return base64_encode($sign);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去除证书前后内容及空白
|
||||||
|
* @param string $sign
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function trimCert($sign)
|
||||||
|
{
|
||||||
|
// if (file_exists($sign)) $sign = file_get_contents($sign);
|
||||||
|
return preg_replace(['/\s+/', '/\-{5}.*?\-{5}/'], '', $sign);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据签名处理
|
* 数据签名处理
|
||||||
* @param array $data 需要进行签名数据
|
* @param array $data 需要进行签名数据
|
||||||
@ -276,6 +287,75 @@ abstract class BasicAliPay
|
|||||||
return "{$html}<script>document.forms['alipaysubmit'].submit();</script>";
|
return "{$html}<script>document.forms['alipaysubmit'].submit();</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版 从证书中提取序列号
|
||||||
|
* @param string $sign
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCertSN($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']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版 提取根证书序列号
|
||||||
|
* @param string $sign
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getRootCertSN($sign)
|
||||||
|
{
|
||||||
|
$sn = null;
|
||||||
|
// 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-----");
|
||||||
|
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']);
|
||||||
|
} else {
|
||||||
|
$sn = $sn . "_" . md5($this->_arr2str(array_reverse($ssl[$i]['issuer'])) . $ssl[$i]['serialNumber']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版 数组转字符串
|
||||||
|
* @param array $array
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function _arr2str($array)
|
||||||
|
{
|
||||||
|
$string = [];
|
||||||
|
if ($array && is_array($array)) {
|
||||||
|
foreach ($array as $key => $value) {
|
||||||
|
$string[] = $key . '=' . $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return implode(',', $string);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版 0x转高精度数字
|
||||||
|
* @param string $hex
|
||||||
|
* @return int|string
|
||||||
|
*/
|
||||||
|
private function _hex2dec($hex)
|
||||||
|
{
|
||||||
|
list($dec, $len) = [0, strlen($hex)];
|
||||||
|
for ($i = 1; $i <= $len; $i++) {
|
||||||
|
$dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
|
||||||
|
}
|
||||||
|
return $dec;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用数据操作
|
* 应用数据操作
|
||||||
* @param array $options
|
* @param array $options
|
||||||
|
547
vendor/zoujingli/wechat-developer/WeMini/Guide.php
vendored
Normal file
547
vendor/zoujingli/wechat-developer/WeMini/Guide.php
vendored
Normal file
@ -0,0 +1,547 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 官方网站: http://think.ctolog.com
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 开源协议 ( https://mit-license.org )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace WeMini;
|
||||||
|
|
||||||
|
use WeChat\Contracts\BasicWeChat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序导购助手
|
||||||
|
* Class Guide
|
||||||
|
* @package WeMini
|
||||||
|
*/
|
||||||
|
class Guide extends BasicWeChat
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 服务号添加导购
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGuideAcct($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguideacct?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务号删除导购
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideAcct($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguideacct?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务号获取导购信息
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideAcct($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取服务号的敏感词信息与自动回复信息
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideAcctConfig()
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacctconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, [], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务号拉取导购列表
|
||||||
|
* @param integer $page
|
||||||
|
* @param integer $num
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideAcctList($page = 0, $num = 10)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacctconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['page' => $page, 'num' => $num], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导购聊天记录
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerChatRecord($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导购快捷回复信息
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideConfig($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成导购二维码
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function guideCreateQrCode($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/guidecreateqrcode?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function pushShowWxaPathMenu($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/pushshowwxapathmenu?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为服务号设置敏感词与自动回复
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function setGuideAcctConfig($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideacctconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置导购快捷回复信息
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function setGuideConfig($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新导购昵称或者头像
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function updateGuideAcct($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideconfig?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加展示标签信息
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGuideBuyerDisplayTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidebuyerdisplaytag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为粉丝添加可查询标签
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGuideBuyerTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidebuyertag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加标签可选值
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGuideTagOption($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidetagoption?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除粉丝标签
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideBuyerTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguidebuyertag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询展示标签信息
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerDisplayTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerdisplaytag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询粉丝标签
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyertag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签可选值信息
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideTagOption()
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidetagoption?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, [], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新建可查询标签类型,支持新建4类可查询标签
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function newGuideTagOption($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/newguidetagoption?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据标签值筛选粉丝
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function queryGuideBuyerByTag($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/queryguidebuyerbytag?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为服务号导购添加粉丝
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGuideBuyerRelation($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/addguidebuyerrelation?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除导购的粉丝
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideBuyerRelation($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguidebuyerrelation?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询某一个粉丝与导购的绑定关系
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerRelation($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelation?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过粉丝信息查询该粉丝与导购的绑定关系
|
||||||
|
* @param string $openid
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerRelationByBuyer($openid)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelation?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['openid' => $openid], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉取导购的粉丝列表
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideBuyerRelationList($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidebuyerrelationlist?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将粉丝从一个导购迁移到另外一个导购下
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function rebindGuideAcctForBuyer($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/rebindguideacctforbuyer?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新粉丝昵称
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function updateGuideBuyerRelation($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/updateguidebuyerrelation?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除小程序卡片素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideCardMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguidecardmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除图片素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideImageMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguideimagematerial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文字素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function delGuideWordMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/delguidewordmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取小程序卡片素材信息
|
||||||
|
* @param integer $type
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideCardMaterial($type = 0)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidecardmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['type' => $type], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片素材信息
|
||||||
|
* @param integer $type 操作类型
|
||||||
|
* @param integer $start 分页查询,起始位置
|
||||||
|
* @param integer $num 分页查询,查询个数
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideImageMaterial($type = 0, $start = 0, $num = 10)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideimagematerial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['type' => $type, 'start' => $start, 'num' => $num], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文字素材信息
|
||||||
|
* @param integer $type 操作类型
|
||||||
|
* @param integer $start 分页查询,起始位置
|
||||||
|
* @param integer $num 分页查询,查询个数
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGuideWordMaterial($type = 0, $start = 0, $num = 10)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguidewordmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['type' => $type, 'start' => $start, 'num' => $num], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加小程序卡片素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function setGuideCardMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguidecardmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加图片素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function setGuideImageMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguideimagematerial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为服务号添加文字素材
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function setGuideWordMaterial($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/setguidewordmaterial?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -74,7 +74,7 @@ class Newtmpl extends BasicWeChat
|
|||||||
{
|
{
|
||||||
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatetitles?access_token=ACCESS_TOKEN';
|
$url = 'https://api.weixin.qq.com/wxaapi/newtmpl/getpubtemplatetitles?access_token=ACCESS_TOKEN';
|
||||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
return $this->callPostApi($url, ['ids'=>$ids,'start' => '0', 'limit' => '30'], true);
|
return $this->callPostApi($url, ['ids' => $ids, 'start' => '0', 'limit' => '30'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
41
vendor/zoujingli/wechat-developer/WeMini/Operation.php
vendored
Normal file
41
vendor/zoujingli/wechat-developer/WeMini/Operation.php
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 官方网站: http://think.ctolog.com
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 开源协议 ( https://mit-license.org )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace WeMini;
|
||||||
|
|
||||||
|
use WeChat\Contracts\BasicWeChat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序运维中心
|
||||||
|
* Class Operation
|
||||||
|
* @package WeMini
|
||||||
|
*/
|
||||||
|
class Operation extends BasicWeChat
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时日志查询
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function realtimelogSearch($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
40
vendor/zoujingli/wechat-developer/WeMini/Search.php
vendored
Normal file
40
vendor/zoujingli/wechat-developer/WeMini/Search.php
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 官方网站: http://think.ctolog.com
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | 开源协议 ( https://mit-license.org )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace WeMini;
|
||||||
|
|
||||||
|
use WeChat\Contracts\BasicWeChat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序搜索
|
||||||
|
* Class Search
|
||||||
|
* @package WeMini
|
||||||
|
*/
|
||||||
|
class Search extends BasicWeChat
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 提交小程序页面url及参数信息
|
||||||
|
* @param array $pages
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function submitPages($pages)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/cgi-bin/guide/getguideacct?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, ['pages' => $pages], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -31,7 +31,7 @@ try {
|
|||||||
|
|
||||||
// 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.refund
|
// 参考链接:https://docs.open.alipay.com/api_1/alipay.trade.refund
|
||||||
$result = $pay->refund($out_trade_no, $refund_fee);
|
$result = $pay->refund($out_trade_no, $refund_fee);
|
||||||
|
|
||||||
echo '<pre>';
|
echo '<pre>';
|
||||||
var_export($result);
|
var_export($result);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -19,10 +19,14 @@ return [
|
|||||||
'sign_type' => "RSA2",
|
'sign_type' => "RSA2",
|
||||||
// 应用ID
|
// 应用ID
|
||||||
'appid' => '2016090900468879',
|
'appid' => '2016090900468879',
|
||||||
// 支付宝公钥(1行填写,特别注意,这里是支付宝公钥,不是应用公钥,最好从开发者中心的网页上去复制)
|
// 支付宝公钥 (1行填写,特别注意,这里是支付宝公钥,不是应用公钥,最好从开发者中心的网页上去复制)
|
||||||
'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtU71NY53UDGY7JNvLYAhsNa+taTF6KthIHJmGgdio9bkqeJGhHk6ttkTKkLqFgwIfgAkHpdKiOv1uZw6gVGZ7TCu5LfHTqKrCd6Uz+N7hxhY+4IwicLgprcV1flXQLmbkJYzFMZqkXGkSgOsR2yXh4LyQZczgk9N456uuzGtRy7MoB4zQy34PLUkkxR6W1B2ftNbLRGXv6tc7p/cmDcrY6K1bSxnGmfRxFSb8lRfhe0V0UM6pKq2SGGSeovrKHN0OLp+Nn5wcULVnFgATXGCENshRlp96piPEBFwneXs19n+sX1jx60FTR7/rME3sW3AHug0fhZ9mSqW4x401WjdnwIDAQAB',
|
'public_key' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtU71NY53UDGY7JNvLYAhsNa+taTF6KthIHJmGgdio9bkqeJGhHk6ttkTKkLqFgwIfgAkHpdKiOv1uZw6gVGZ7TCu5LfHTqKrCd6Uz+N7hxhY+4IwicLgprcV1flXQLmbkJYzFMZqkXGkSgOsR2yXh4LyQZczgk9N456uuzGtRy7MoB4zQy34PLUkkxR6W1B2ftNbLRGXv6tc7p/cmDcrY6K1bSxnGmfRxFSb8lRfhe0V0UM6pKq2SGGSeovrKHN0OLp+Nn5wcULVnFgATXGCENshRlp96piPEBFwneXs19n+sX1jx60FTR7/rME3sW3AHug0fhZ9mSqW4x401WjdnwIDAQAB',
|
||||||
// 支付宝私钥(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=',
|
'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=',
|
||||||
|
// 应用公钥证书(新版资金类接口转 app_cert_sn)
|
||||||
|
'app_cert' => '',
|
||||||
|
// 支付宝根证书(新版资金类接口转 alipay_root_cert_sn)
|
||||||
|
'root_cert' => '',
|
||||||
// 支付成功通知地址
|
// 支付成功通知地址
|
||||||
'notify_url' => '',
|
'notify_url' => '',
|
||||||
// 网页支付回跳地址
|
// 网页支付回跳地址
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Anyon",
|
"name": "Anyon",
|
||||||
"email": "zoujingli@qq.com",
|
"email": "zoujingli@qq.com",
|
||||||
"homepage": "http://ctolog.com"
|
"homepage": "https://thinkadmin.top"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -23,6 +23,7 @@
|
|||||||
"php": ">=5.4",
|
"php": ">=5.4",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
"ext-bcmath": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
@ -34,8 +35,8 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"WePay\\": "WePay",
|
"WePay\\": "WePay",
|
||||||
"WeMini\\": "WeMini",
|
|
||||||
"WeChat\\": "WeChat",
|
"WeChat\\": "WeChat",
|
||||||
|
"WeMini\\": "WeMini",
|
||||||
"AliPay\\": "AliPay"
|
"AliPay\\": "AliPay"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ spl_autoload_register(function ($classname) {
|
|||||||
$pathname = __DIR__ . DIRECTORY_SEPARATOR;
|
$pathname = __DIR__ . DIRECTORY_SEPARATOR;
|
||||||
$filename = str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.php';
|
$filename = str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.php';
|
||||||
if (file_exists($pathname . $filename)) {
|
if (file_exists($pathname . $filename)) {
|
||||||
foreach (['WeChat', 'WeMini', 'AliPay', 'WePay', 'We'] as $prefix) {
|
foreach (['AliPay', 'WeChat', 'WeMini', 'WePay', 'We'] as $prefix) {
|
||||||
if (stripos($classname, $prefix) === 0) {
|
if (stripos($classname, $prefix) === 0) {
|
||||||
include $pathname . $filename;
|
include $pathname . $filename;
|
||||||
return true;
|
return true;
|
||||||
|
2
vendor/zoujingli/wechat-developer/readme.md
vendored
2
vendor/zoujingli/wechat-developer/readme.md
vendored
@ -40,7 +40,7 @@ WeChatDeveloper 为开源项目,允许把它用于任何地方,不受任何
|
|||||||
* Gitee 托管地址:https://gitee.com/zoujingli/WeChatDeveloper
|
* Gitee 托管地址:https://gitee.com/zoujingli/WeChatDeveloper
|
||||||
* GitHub 托管地址:https://github.com/zoujingli/WeChatDeveloper
|
* GitHub 托管地址:https://github.com/zoujingli/WeChatDeveloper
|
||||||
|
|
||||||
文件说明
|
文件说明(后缀会根据官方文档增加文件)
|
||||||
----
|
----
|
||||||
|
|
||||||
|文件名|类名|描述|类型|加载 ①|
|
|文件名|类名|描述|类型|加载 ①|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user