mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-29 10:29:27 +08:00
细节优化
This commit is contained in:
parent
7a6689da89
commit
1b42b5361e
@ -74,11 +74,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 近15日订单交易走势 -->
|
||||
<!-- 近30日订单交易走势 -->
|
||||
<div class="echarts-container">
|
||||
<div class="echarts-title">
|
||||
<span class="icon"></span>
|
||||
<span class="title">近15日订单交易走势</span>
|
||||
<span class="title">近30日订单交易走势</span>
|
||||
</div>
|
||||
<div id="echarts-order-trading"></div>
|
||||
</div>
|
||||
@ -86,19 +86,19 @@
|
||||
<!-- 组合 -->
|
||||
<ul class="am-avg-sm-1 am-avg-sm-2 am-avg-lg-2 echarts-combination-container-2">
|
||||
<li>
|
||||
<!-- 近15日热销商品 -->
|
||||
<!-- 近30日热销商品 -->
|
||||
<div class="echarts-title">
|
||||
<span class="icon"></span>
|
||||
<span class="title">近15日热销商品</span>
|
||||
<span class="title">近30日热销商品</span>
|
||||
</div>
|
||||
<div id="echarts-goods-hot"></div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<!-- 近15日订单支付方式 -->
|
||||
<!-- 近30日订单支付方式 -->
|
||||
<div class="echarts-title">
|
||||
<span class="icon"></span>
|
||||
<span class="title">近15日订单支付方式</span>
|
||||
<span class="title">近30日订单支付方式</span>
|
||||
</div>
|
||||
<div id="echarts-order-pay-type"></div>
|
||||
</li>
|
||||
@ -159,7 +159,7 @@
|
||||
<script type="text/javascript">
|
||||
$(function()
|
||||
{
|
||||
// 近15日订单交易走势
|
||||
// 近30日订单交易走势
|
||||
var order_trading_chart = echarts.init(document.getElementById('echarts-order-trading'), 'macarons');
|
||||
var option = {
|
||||
tooltip : {
|
||||
@ -181,7 +181,7 @@ $(function()
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name:'近15日订单交易走势', show: true}
|
||||
saveAsImage : {name:'近30日订单交易走势', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -207,7 +207,7 @@ $(function()
|
||||
order_trading_chart.setOption(option);
|
||||
|
||||
|
||||
// 近15日热销商品
|
||||
// 近30日热销商品
|
||||
var goods_hot_chart = echarts.init(document.getElementById('echarts-goods-hot'), 'macarons');
|
||||
var option = {
|
||||
title : {
|
||||
@ -236,7 +236,7 @@ $(function()
|
||||
}
|
||||
},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name:'近15日热销商品', show: true}
|
||||
saveAsImage : {name:'近30日热销商品', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
@ -251,7 +251,7 @@ $(function()
|
||||
};
|
||||
goods_hot_chart.setOption(option);
|
||||
|
||||
// 近15日订单支付方式
|
||||
// 近30日订单支付方式
|
||||
var order_pay_type_chart = echarts.init(document.getElementById('echarts-order-pay-type'), 'macarons');
|
||||
var option = {
|
||||
tooltip : {
|
||||
@ -267,7 +267,7 @@ $(function()
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name:'近15日订单支付方式', show: true}
|
||||
saveAsImage : {name:'近30日订单支付方式', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
|
@ -69,7 +69,7 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-hide-sm-only td-desc">
|
||||
{{if empty($v['desc'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.desc||raw}}{{/if}}
|
||||
{{if empty($v['desc'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.desc|raw}}{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $v['is_install'] eq 1}}
|
||||
|
@ -42,7 +42,9 @@
|
||||
<label class="am-text-sm am-text-warning">该区域为插件配置填写项,请按照插件文档填写相应的值</label>
|
||||
{{foreach $data.element as $element}}
|
||||
<div class="am-form-group">
|
||||
<label class="block">{{$element.title}}{{if !empty($element['desc'])}}<span class="am-form-group-label-tips">{{$element.desc}}</span>{{/if}}</label>
|
||||
{{if !empty($element['title'])}}
|
||||
<label class="block">{{$element.title}}{{if !empty($element['desc'])}}<span class="am-form-group-label-tips">{{$element.desc}}</span>{{/if}}</label>
|
||||
{{/if}}
|
||||
{{switch element.element}}
|
||||
{{case input}}
|
||||
{{if in_array($element['type'], ['radio', 'checkbox']) and !empty($element['element_data']) and is_array($element['element_data'])}}
|
||||
@ -129,6 +131,11 @@
|
||||
{{/if}}
|
||||
>{{if isset($data['config'][$element['name']])}}{{$data['config'][$element['name']]}}{{else /}}{{if isset($element['default'])}}{{$element.default}}{{/if}}{{/if}}</textarea>
|
||||
{{/case}}
|
||||
{{case message}}
|
||||
<div class="am-alert am-alert-danger" data-am-alert>
|
||||
{{$element.message|raw}}
|
||||
</div>
|
||||
{{/case}}
|
||||
{{/switch}}
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
@ -229,6 +229,20 @@ class ArticleService
|
||||
'seo_desc' => empty($params['seo_desc']) ? '' : $params['seo_desc'],
|
||||
];
|
||||
|
||||
// 文章保存处理钩子
|
||||
$hook_name = 'plugins_service_article_save_handle';
|
||||
$ret = Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'data' => &$data,
|
||||
'article_id' => isset($params['id']) ? intval($params['id']) : 0,
|
||||
]);
|
||||
if(isset($ret['code']) && $ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if(empty($params['id']))
|
||||
{
|
||||
$data['add_time'] = time();
|
||||
|
@ -321,6 +321,20 @@ class BrandService
|
||||
'seo_desc' => empty($params['seo_desc']) ? '' : $params['seo_desc'],
|
||||
];
|
||||
|
||||
// 品牌保存处理钩子
|
||||
$hook_name = 'plugins_service_brand_save_handle';
|
||||
$ret = Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'data' => &$data,
|
||||
'brand_id' => isset($params['id']) ? intval($params['id']) : 0,
|
||||
]);
|
||||
if(isset($ret['code']) && $ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if(empty($params['id']))
|
||||
{
|
||||
$data['add_time'] = time();
|
||||
|
@ -27,6 +27,10 @@ class StatisticalService
|
||||
private static $nearly_fifteen_days;
|
||||
private static $nearly_thirty_days;
|
||||
|
||||
// 近30天日期
|
||||
private static $thirty_time_start;
|
||||
private static $thirty_time_end;
|
||||
|
||||
// 近15天日期
|
||||
private static $fifteen_time_start;
|
||||
private static $fifteen_time_end;
|
||||
@ -60,7 +64,11 @@ class StatisticalService
|
||||
// 初始化标记对象,避免重复初始化
|
||||
$object = (object) [];
|
||||
|
||||
// 近7天日期
|
||||
// 近30天日期
|
||||
self::$thirty_time_start = strtotime(date('Y-m-d 00:00:00', strtotime('-30 day')));
|
||||
self::$thirty_time_end = time();
|
||||
|
||||
// 近15天日期
|
||||
self::$fifteen_time_start = strtotime(date('Y-m-d 00:00:00', strtotime('-15 day')));
|
||||
self::$fifteen_time_end = time();
|
||||
|
||||
@ -281,7 +289,7 @@ class StatisticalService
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单交易趋势, 7天数据
|
||||
* 订单交易趋势, 30天数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -303,7 +311,7 @@ class StatisticalService
|
||||
$name_arr = [];
|
||||
if(!empty($status_arr))
|
||||
{
|
||||
foreach(self::$nearly_fifteen_days as $day)
|
||||
foreach(self::$nearly_thirty_days as $day)
|
||||
{
|
||||
// 当前日期名称
|
||||
$name_arr[] = $day['name'];
|
||||
@ -343,7 +351,7 @@ class StatisticalService
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单支付方式, 7天数据
|
||||
* 订单支付方式, 30天数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -368,7 +376,7 @@ class StatisticalService
|
||||
$name_arr = [];
|
||||
if(!empty($pay_name_arr))
|
||||
{
|
||||
foreach(self::$nearly_fifteen_days as $day)
|
||||
foreach(self::$nearly_thirty_days as $day)
|
||||
{
|
||||
// 当前日期名称
|
||||
$name_arr[] = date('m-d', strtotime($day['name']));
|
||||
@ -409,7 +417,7 @@ class StatisticalService
|
||||
}
|
||||
|
||||
/**
|
||||
* 热销商品, 7天数据
|
||||
* 热销商品, 30天数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
@ -424,8 +432,8 @@ class StatisticalService
|
||||
// 获取订单id
|
||||
$where = [
|
||||
['status', '<=', 4],
|
||||
['add_time', '>=', self::$fifteen_time_start],
|
||||
['add_time', '<=', self::$fifteen_time_end],
|
||||
['add_time', '>=', self::$thirty_time_start],
|
||||
['add_time', '<=', self::$thirty_time_end],
|
||||
];
|
||||
$order_ids = Db::name('Order')->where($where)->column('id');
|
||||
|
||||
|
@ -48,5 +48,21 @@ return array (
|
||||
array (
|
||||
0 => 'app\\plugins\\distribution\\Hook',
|
||||
),
|
||||
'plugins_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_view_common_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_photo_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
File diff suppressed because one or more lines are too long
@ -50,7 +50,7 @@ class Alipay
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '支付宝', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.1.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc','h5'], // 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '2.0版本,适用PC+H5,即时到帐支付方式,买家的交易资金直接打入卖家支付宝账户,快速回笼交易资金。 <a href="http://www.alipay.com/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
@ -75,6 +75,7 @@ class Alipay
|
||||
'name' => 'rsa_public',
|
||||
'placeholder' => '应用公钥',
|
||||
'title' => '应用公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用公钥',
|
||||
@ -84,6 +85,7 @@ class Alipay
|
||||
'name' => 'rsa_private',
|
||||
'placeholder' => '应用私钥',
|
||||
'title' => '应用私钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用私钥',
|
||||
@ -93,6 +95,7 @@ class Alipay
|
||||
'name' => 'out_rsa_public',
|
||||
'placeholder' => '支付宝公钥',
|
||||
'title' => '支付宝公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写支付宝公钥',
|
||||
|
@ -50,7 +50,7 @@ class AlipayMini
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '支付宝', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.1.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['alipay'], // 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用支付宝小程序,即时到帐支付方式,买家的交易资金直接打入卖家支付宝账户,快速回笼交易资金。 <a href="http://www.alipay.com/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
@ -75,6 +75,7 @@ class AlipayMini
|
||||
'name' => 'rsa_public',
|
||||
'placeholder' => '应用公钥',
|
||||
'title' => '应用公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用公钥',
|
||||
@ -84,6 +85,7 @@ class AlipayMini
|
||||
'name' => 'rsa_private',
|
||||
'placeholder' => '应用私钥',
|
||||
'title' => '应用私钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用私钥',
|
||||
@ -93,6 +95,7 @@ class AlipayMini
|
||||
'name' => 'out_rsa_public',
|
||||
'placeholder' => '支付宝公钥',
|
||||
'title' => '支付宝公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写支付宝公钥',
|
||||
|
@ -50,7 +50,7 @@ class BaiduMini
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '百度', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['baidu'], // 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用百度小程序,百度收银台已集成度小满、支付宝、微信支付,即时到帐支付方式,买家的交易资金直接打入卖家百度账户,快速回笼交易资金。 <a href="https://smartprogram.baidu.com/docs/introduction/pay/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
@ -85,6 +85,7 @@ class BaiduMini
|
||||
'name' => 'rsa_public',
|
||||
'placeholder' => '应用公钥',
|
||||
'title' => '应用公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用公钥',
|
||||
@ -94,6 +95,7 @@ class BaiduMini
|
||||
'name' => 'rsa_private',
|
||||
'placeholder' => '应用私钥',
|
||||
'title' => '应用私钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用私钥',
|
||||
@ -103,10 +105,21 @@ class BaiduMini
|
||||
'name' => 'out_rsa_public',
|
||||
'placeholder' => '平台公钥',
|
||||
'title' => '平台公钥',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写平台公钥',
|
||||
],
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'default' => __MY_URL__.'payment_order_'.strtolower(str_replace(['payment', '\\'], '', get_class($this))).'_notify.php',
|
||||
'name' => 'notify_url',
|
||||
'placeholder' => '异步通知地址',
|
||||
'title' => '异步通知地址',
|
||||
'desc' => '将该地址配置到百度小程序支付后台异步通知',
|
||||
'is_required' => 0,
|
||||
],
|
||||
];
|
||||
|
||||
return [
|
||||
|
@ -50,7 +50,7 @@ class CashPayment
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '现金支付', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'desc' => '现金方式支付货款', // 插件描述(支持html)
|
||||
'author' => 'Devil', // 开发者
|
||||
|
@ -50,7 +50,7 @@ class DeliveryPayment
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '货到付款', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'desc' => '送货上门后收取货款', // 插件描述(支持html)
|
||||
'author' => 'Devil', // 开发者
|
||||
|
@ -50,7 +50,7 @@ class MafubaoAlipay
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '码付宝-支付宝', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc','h5'], // 适用终端 默认全部 ['pc', 'h5', 'ios', 'android', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用PC+H5,即时到帐支付方式,个人免签实现支付后立即通知。 <a href="http://pay.shopxo.net/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
|
@ -50,7 +50,7 @@ class MafubaoWeixin
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '码付宝-微信', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc','h5'], // 适用终端 默认全部 ['pc', 'h5', 'ios', 'android', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用PC+H5,即时到帐支付方式,个人免签实现支付后立即通知。 <a href="http://pay.shopxo.net/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
|
@ -23,6 +23,11 @@ class PayEase
|
||||
// 插件配置参数
|
||||
private $config;
|
||||
|
||||
// 证书,应用私钥,应用公钥,平台公钥
|
||||
private $private_key = ROOT.'rsakeys/client.pfx';
|
||||
private $public_key = ROOT.'rsakeys/server.cer';
|
||||
private $out_public_key = ROOT.'rsakeys/out_server.cer';
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
@ -50,7 +55,7 @@ class PayEase
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '首信易支付', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc','h5'], // 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用PC+H5,致力于打造汇通全球的、领先的国际支付平台,为商家提供更优质、更安全的支付清算服务。<a href="https://www.beijing.com.cn/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
@ -81,31 +86,8 @@ class PayEase
|
||||
'message' => '请填写密码',
|
||||
],
|
||||
[
|
||||
'element' => 'textarea',
|
||||
'name' => 'public_key',
|
||||
'placeholder' => '应用公钥',
|
||||
'title' => '应用公钥',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用公钥',
|
||||
],
|
||||
[
|
||||
'element' => 'textarea',
|
||||
'name' => 'private_key',
|
||||
'placeholder' => '应用私钥',
|
||||
'title' => '应用私钥',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写应用私钥',
|
||||
],
|
||||
[
|
||||
'element' => 'textarea',
|
||||
'name' => 'out_rsa_public',
|
||||
'placeholder' => '首信易公钥',
|
||||
'title' => '首信易公钥',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写首信易公钥',
|
||||
'element' => 'message',
|
||||
'message' => '请按照相应路径、将密钥证书对应放入文件夹中。<br /> 应用公钥:'.$this->public_key.' <br /> 应用私钥:'.$this->private_key.' <br /> 平台公钥:'.$this->out_public_key,
|
||||
],
|
||||
];
|
||||
|
||||
@ -159,16 +141,14 @@ class PayEase
|
||||
];
|
||||
$data['productDetails'] = $detail;
|
||||
|
||||
$private_key = ROOT.'rsakeys/client.pfx';
|
||||
$public_key = ROOT.'rsakeys/server.cer';
|
||||
$str = $this->buildJson($private_key, $this->config['password'], $data);
|
||||
$date = $this->creatdate($str, $public_key);
|
||||
$str = $this->buildJson($this->private_key, $this->config['password'], $data);
|
||||
$date = $this->creatdate($str, $this->public_key);
|
||||
|
||||
$url = 'https://apis.5upay.com/onlinePay/order';
|
||||
return $this->execute(
|
||||
$private_key,
|
||||
$this->private_key,
|
||||
$this->config['password'],
|
||||
$public_key,
|
||||
$this->public_key,
|
||||
$url,
|
||||
$date
|
||||
);
|
||||
@ -192,11 +172,9 @@ class PayEase
|
||||
}
|
||||
|
||||
// 异步处理
|
||||
$private_key = ROOT.'rsakeys/client.pfx';
|
||||
$public_key = ROOT.'rsakeys/test.cer';
|
||||
$params['encryptKey'] = isset($_SERVER['HTTP_ENCRYPTKEY']) ? $_SERVER['HTTP_ENCRYPTKEY'] : '';
|
||||
$params['merchantId'] = isset($_SERVER['HTTP_MERCHANTID']) ? $_SERVER['HTTP_MERCHANTID'] : '';
|
||||
$ret = $this->NotifyCheckHmac($private_key, $params, $public_key, $this->config['password']);
|
||||
$ret = $this->NotifyCheckHmac($this->private_key, $params, $this->out_public_key, $this->config['password']);
|
||||
|
||||
// 支付状态
|
||||
if(isset($ret['code']) && $ret['code'] == 0 && isset($ret['data']['status']) && $ret['data']['status'] == 'SUCCESS')
|
||||
@ -272,8 +250,6 @@ class PayEase
|
||||
// 退款原因
|
||||
$refund_reason = empty($params['refund_reason']) ? $params['order_no'].'订单退款'.$params['refund_price'].'元' : $params['refund_reason'];
|
||||
|
||||
$private_key = ROOT.'rsakeys/client.pfx';
|
||||
$public_key = ROOT.'rsakeys/server.cer';
|
||||
$data = [
|
||||
'merchantId' => $this->config['merchantId'],
|
||||
'requestId' => $params['order_no'].GetNumberCode(6),
|
||||
@ -281,14 +257,14 @@ class PayEase
|
||||
'orderId' => $params['trade_no'],
|
||||
'remark' => $refund_reason,
|
||||
];
|
||||
$str = $this->buildJson($private_key, $this->config['password'], $data);
|
||||
$date = $this->creatdate($str, $public_key);
|
||||
$str = $this->buildJson($this->private_key, $this->config['password'], $data);
|
||||
$date = $this->creatdate($str, $this->public_key);
|
||||
|
||||
$url = 'https://apis.5upay.com/onlinePay/refund';
|
||||
$ret = $this->execute(
|
||||
$private_key,
|
||||
$this->private_key,
|
||||
$this->config['password'],
|
||||
$public_key,
|
||||
$this->public_key,
|
||||
$url,
|
||||
$date
|
||||
);
|
||||
|
@ -50,7 +50,7 @@ class Weixin
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '微信', // 插件名称
|
||||
'version' => '0.0.1', // 插件版本
|
||||
'version' => '1.1.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc', 'h5', 'weixin'], // 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
|
||||
'desc' => '适用微信公众号/PC/H5/小程序,即时到帐支付方式,买家的交易资金直接打入卖家账户,快速回笼交易资金。 <a href="https://pay.weixin.qq.com/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
@ -97,6 +97,7 @@ class Weixin
|
||||
'name' => 'key',
|
||||
'placeholder' => '密钥',
|
||||
'title' => '密钥',
|
||||
'desc' => '微信支付商户平台API配置的密钥',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写密钥',
|
||||
],
|
||||
@ -105,6 +106,7 @@ class Weixin
|
||||
'name' => 'apiclient_cert',
|
||||
'placeholder' => '证书(apiclient_cert.pem)',
|
||||
'title' => '证书(apiclient_cert.pem)',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写证书(apiclient_cert.pem)',
|
||||
@ -114,6 +116,7 @@ class Weixin
|
||||
'name' => 'apiclient_key',
|
||||
'placeholder' => '证书密钥(apiclient_key.pem)',
|
||||
'title' => '证书密钥(apiclient_key.pem)',
|
||||
'desc' => '去除以 -- 开头结尾的字符和换行',
|
||||
'is_required' => 0,
|
||||
'rows' => 6,
|
||||
'message' => '请填写证书密钥(apiclient_key.pem)',
|
||||
|
2
rsakeys/.gitignore
vendored
Normal file
2
rsakeys/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
Binary file not shown.
Binary file not shown.
BIN
rsakeys/test.cer
BIN
rsakeys/test.cer
Binary file not shown.
Loading…
Reference in New Issue
Block a user