Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
5879403d
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5879403d
编写于
10月 06, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单
上级
5bcd240c
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
73 addition
and
36 deletion
+73
-36
service/Application/Admin/Controller/CommonController.class.php
...e/Application/Admin/Controller/CommonController.class.php
+6
-1
service/Application/Admin/Controller/OrderController.class.php
...ce/Application/Admin/Controller/OrderController.class.php
+1
-1
service/Application/Admin/Lang/zh-cn/order.php
service/Application/Admin/Lang/zh-cn/order.php
+2
-0
service/Application/Admin/Lang/zh-cn/paylog.php
service/Application/Admin/Lang/zh-cn/paylog.php
+3
-3
service/Application/Admin/View/Default/Admin/LoginInfo.html
service/Application/Admin/View/Default/Admin/LoginInfo.html
+7
-1
service/Application/Admin/View/Default/Order/Index.html
service/Application/Admin/View/Default/Order/Index.html
+9
-5
service/Application/Admin/View/Default/PayLog/Index.html
service/Application/Admin/View/Default/PayLog/Index.html
+9
-9
service/Application/Library/Payment/Alipay.class.php
service/Application/Library/Payment/Alipay.class.php
+25
-1
service/Application/Runtime/Temp/38432eb7369925b9a826f2b9f64e2262.php
...ication/Runtime/Temp/38432eb7369925b9a826f2b9f64e2262.php
+1
-1
service/Application/Service/OrderService.class.php
service/Application/Service/OrderService.class.php
+10
-14
未找到文件。
service/Application/Admin/Controller/CommonController.class.php
浏览文件 @
5879403d
...
...
@@ -92,7 +92,12 @@ class CommonController extends Controller
{
if
(
empty
(
$_SESSION
[
'admin'
]))
{
$this
->
error
(
L
(
'common_login_invalid'
),
U
(
'Admin/Admin/LoginInfo'
));
if
(
IS_AJAX
)
{
$this
->
ajaxReturn
(
L
(
'common_login_invalid'
),
-
400
);
}
else
{
die
(
'<script type="text/javascript">if(self.frameElement && self.frameElement.tagName == "IFRAME"){parent.location.reload();}else{window.location.href="'
.
U
(
'Admin/Admin/LoginInfo'
)
.
'";}</script>'
);
}
}
}
...
...
service/Application/Admin/Controller/OrderController.class.php
浏览文件 @
5879403d
...
...
@@ -330,7 +330,7 @@ class OrderController extends CommonController
{
$params
=
$_POST
;
$params
[
'user'
]
=
$this
->
admin
;
$params
[
'user'
][
'user_name_view'
]
=
L
(
'common_admin_name'
)
.
'
:
'
.
$this
->
admin
[
'username'
];
$params
[
'user'
][
'user_name_view'
]
=
L
(
'common_admin_name'
)
.
'
-
'
.
$this
->
admin
[
'username'
];
$ret
=
OrderService
::
AdminPay
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
...
...
service/Application/Admin/Lang/zh-cn/order.php
浏览文件 @
5879403d
...
...
@@ -40,5 +40,7 @@ return array(
'order_pay_popup_title'
=>
'支付操作'
,
'order_business_pay_title'
=>
'选择支付'
,
'order_payment_not_data_tips'
=>
'没有支付方式'
,
'order_user_is_delete_text'
=>
'用户已删除'
,
);
?>
\ No newline at end of file
service/Application/Admin/Lang/zh-cn/paylog.php
浏览文件 @
5879403d
...
...
@@ -17,9 +17,9 @@ return array(
'paylog_busines_type_name'
=>
'业务类型'
,
'paylog_order_id_name'
=>
'业务订单id'
,
'paylog_trade_no_name'
=>
'支付平台交易号'
,
'paylog_platform_
user_name'
=>
'支付平台用户帐号'
,
'paylog_
total_fe
e_name'
=>
'支付金额'
,
'paylog_
amount
_name'
=>
'订单实际金额'
,
'paylog_platform_
buyer_user_name'
=>
'支付平台用户帐号'
,
'paylog_
pay_pric
e_name'
=>
'支付金额'
,
'paylog_
total_price
_name'
=>
'订单实际金额'
,
'paylog_subject_name'
=>
'订单名称'
,
'paylog_add_time_name'
=>
'支付时间'
,
);
...
...
service/Application/Admin/View/Default/Admin/LoginInfo.html
浏览文件 @
5879403d
...
...
@@ -33,4 +33,10 @@
<!-- footer start -->
<include
file=
"Public/Footer"
/>
<!-- footer end -->
\ No newline at end of file
<!-- footer end -->
<script
type=
"text/javascript"
>
if
(
self
.
frameElement
&&
self
.
frameElement
.
tagName
==
"
IFRAME
"
)
{
parent
.
location
.
reload
();
}
</script>
\ No newline at end of file
service/Application/Admin/View/Default/Order/Index.html
浏览文件 @
5879403d
...
...
@@ -52,7 +52,6 @@
<th
class=
"am-hide-sm-only th-receive-address"
>
{{:L('order_receive_text')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('order_express_text')}}
</th>
<th>
{{:L('common_order_status_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('common_pay_status_name')}}
</th>
<th>
{{:L('order_price_th_text')}}
</th>
<th>
{{:L('common_more_name')}}
</th>
<th>
{{:L('common_operation_name')}}
</th>
...
...
@@ -103,13 +102,18 @@
</td>
<td>
<span
class=
"block"
>
{{$v.status_text}}
</span>
<if
condition=
"$v['pay_status'] eq 1"
>
<span
class=
"block cr-green fs-12"
>
{{$v.pay_status_text}}
</span>
<elseif
condition=
"$v['pay_status'] eq 2"
/>
<span
class=
"block cr-yellow fs-12"
>
{{$v.pay_status_text}}
</span>
<else
/>
<span
class=
"block fs-12"
>
{{$v.pay_status_text}}
</span>
</if>
<if
condition=
"$v['user_is_delete_time'] neq 0"
>
<span
class=
"block cr-red fs-12"
>
用户已删除
</span>
<span
class=
"block cr-red fs-12"
>
{{:L('order_user_is_delete_text')}}
</span>
</if>
</td>
<td
class=
"am-hide-sm-only"
>
<span
class=
"block"
>
{{$v.pay_status_text}}
</span>
</td>
<td>
{{:L('order_price_text')}}:{{$v.price}}
<br
/>
{{:L('order_preferential_price_text')}}:{{$v.preferential_price}}
<br
/>
...
...
service/Application/Admin/View/Default/PayLog/Index.html
浏览文件 @
5879403d
...
...
@@ -54,9 +54,9 @@
<th>
{{:L('paylog_busines_type_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_order_id_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_trade_no_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_platform_user_name')}}
</th>
<th>
{{:L('paylog_
total_fe
e_name')}}
</th>
<th>
{{:L('paylog_
amount
_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_platform_
buyer_
user_name')}}
</th>
<th>
{{:L('paylog_
pay_pric
e_name')}}
</th>
<th>
{{:L('paylog_
total_price
_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_subject_name')}}
</th>
<th
class=
"am-hide-sm-only"
>
{{:L('paylog_add_time_name')}}
</th>
</tr>
...
...
@@ -88,22 +88,22 @@
<if
condition=
"empty($v['order_id'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.order_id}}
</if>
</td>
<td
class=
"am-hide-sm-only"
>
<if
condition=
"empty($v['trade_no'])"
><span
class=
"cr-ddd"
>
{{:L('common_
not_set
_text')}}
</span><else
/>
{{$v.trade_no}}
</if>
<if
condition=
"empty($v['trade_no'])"
><span
class=
"cr-ddd"
>
{{:L('common_
on_fill_in_the
_text')}}
</span><else
/>
{{$v.trade_no}}
</if>
</td>
<td
class=
"am-hide-sm-only"
>
<if
condition=
"empty($v['
user'])"
><span
class=
"cr-ddd"
>
{{:L('common_not_set_text')}}
</span><else
/>
{{$v.
user}}
</if>
<if
condition=
"empty($v['
buyer_user'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.buyer_
user}}
</if>
</td>
<td>
<if
condition=
"empty($v['
total_fee'])"
><span
class=
"cr-ddd"
>
{{:L('common_not_set_text')}}
</span><else
/>
{{$v.total_fe
e}}
</if>
<if
condition=
"empty($v['
pay_price'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.pay_pric
e}}
</if>
</td>
<td>
<if
condition=
"empty($v['
amount'])"
><span
class=
"cr-ddd"
>
{{:L('common_not_set_text')}}
</span><else
/>
{{$v.amount
}}
</if>
<if
condition=
"empty($v['
total_price'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.total_price
}}
</if>
</td>
<td
class=
"am-hide-sm-only"
>
<if
condition=
"empty($v['subject'])"
><span
class=
"cr-ddd"
>
{{:L('common_
not_set
_text')}}
</span><else
/>
{{$v.subject}}
</if>
<if
condition=
"empty($v['subject'])"
><span
class=
"cr-ddd"
>
{{:L('common_
on_fill_in_the
_text')}}
</span><else
/>
{{$v.subject}}
</if>
</td>
<td
class=
"am-hide-sm-only"
>
<if
condition=
"empty($v['add_time'])"
><span
class=
"cr-ddd"
>
{{:L('common_
not_set
_text')}}
</span><else
/>
{{$v.add_time}}
</if>
<if
condition=
"empty($v['add_time'])"
><span
class=
"cr-ddd"
>
{{:L('common_
on_fill_in_the
_text')}}
</span><else
/>
{{$v.add_time}}
</if>
</td>
</tr>
</foreach>
...
...
service/Application/Library/Payment/Alipay.class.php
浏览文件 @
5879403d
...
...
@@ -427,10 +427,34 @@ class Alipay
case
'TRADE_SUCCESS'
:
case
'TRADE_FINISHED'
:
case
'success'
:
return
DataReturn
(
'支付成功'
,
0
,
$
data
);
return
DataReturn
(
'支付成功'
,
0
,
$
this
->
ReturnData
(
$data
)
);
break
;
}
return
DataReturn
(
'处理异常错误'
,
-
100
);
}
/**
* [ReturnData 返回数据统一格式]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-10-06T16:54:24+0800
* @param [array] $data [返回数据]
*/
private
function
ReturnData
(
$data
)
{
// 兼容web版本支付参数
$buyer_user
=
isset
(
$data
[
'buyer_logon_id'
])
?
$data
[
'buyer_logon_id'
]
:
(
isset
(
$data
[
'buyer_email'
])
?
$data
[
'buyer_email'
]
:
''
);
$pay_price
=
isset
(
$data
[
'total_amount'
])
?
$data
[
'total_amount'
]
:
(
isset
(
$data
[
'total_fee'
])
?
$data
[
'total_fee'
]
:
''
);
// 返回数据固定基础参数
$data
[
'trade_no'
]
=
$data
[
'trade_no'
];
// 支付平台 - 订单号
$data
[
'buyer_user'
]
=
$buyer_user
;
// 支付平台 - 用户
$data
[
'out_trade_no'
]
=
$data
[
'out_trade_no'
];
// 本系统发起支付的 - 订单号
$data
[
'subject'
]
=
$data
[
'subject'
];
// 本系统发起支付的 - 商品名称
$data
[
'pay_price'
]
=
$pay_price
;
// 本系统发起支付的 - 总价
return
$data
;
}
}
?>
\ No newline at end of file
service/Application/Runtime/Temp/38432eb7369925b9a826f2b9f64e2262.php
浏览文件 @
5879403d
此差异已折叠。
点击以展开。
service/Application/Service/OrderService.class.php
浏览文件 @
5879403d
...
...
@@ -180,9 +180,9 @@ class OrderService
'payment'
=>
$params
[
'payment'
],
'pay'
=>
[
'trade_no'
=>
''
,
'subject'
=>
isset
(
$params
[
'params'
][
'subject'
])
?
$params
[
'params'
][
'subject'
]
:
''
,
'buyer_
email'
=>
$params
[
'user'
][
'user_name_view'
],
'
total_amount'
=>
$params
[
'order'
][
'total_price'
],
'subject'
=>
isset
(
$params
[
'params'
][
'subject'
])
?
$params
[
'params'
][
'subject'
]
:
'
订单支付
'
,
'buyer_
user'
=>
'用户-'
.
$params
[
'user'
][
'user_name_view'
],
'
pay_price'
=>
$params
[
'order'
][
'total_price'
],
],
];
return
self
::
OrderPayHandle
(
$pay_params
);
...
...
@@ -273,10 +273,6 @@ class OrderService
$where
=
[
'order_no'
=>
$ret
[
'data'
][
'out_trade_no'
],
'is_delete_time'
=>
0
,
'user_is_delete_time'
=>
0
];
$order
=
M
(
'Order'
)
->
where
(
$where
)
->
find
();
// 兼容web版本支付参数
$buyer_email
=
isset
(
$ret
[
'data'
][
'buyer_logon_id'
])
?
$ret
[
'data'
][
'buyer_logon_id'
]
:
(
isset
(
$ret
[
'data'
][
'buyer_email'
])
?
$ret
[
'data'
][
'buyer_email'
]
:
''
);
$total_amount
=
isset
(
$ret
[
'data'
][
'total_amount'
])
?
$ret
[
'data'
][
'total_amount'
]
:
(
isset
(
$ret
[
'data'
][
'total_fee'
])
?
$ret
[
'data'
][
'total_fee'
]
:
''
);
// 支付处理
$pay_params
=
[
'order'
=>
$order
,
...
...
@@ -284,8 +280,8 @@ class OrderService
'pay'
=>
[
'trade_no'
=>
$ret
[
'data'
][
'trade_no'
],
'subject'
=>
$ret
[
'data'
][
'subject'
],
'buyer_
email'
=>
$buyer_email
,
'
total_amount'
=>
$total_amount
,
'buyer_
user'
=>
$ret
[
'data'
][
'buyer_user'
]
,
'
pay_price'
=>
$ret
[
'data'
][
'pay_price'
]
,
],
];
return
self
::
OrderPayHandle
(
$pay_params
);
...
...
@@ -319,16 +315,16 @@ class OrderService
}
// 支付参数
$
total_amount
=
isset
(
$params
[
'pay'
][
'total_amount'
])
?
$params
[
'pay'
][
'total_amount
'
]
:
0
;
$
pay_price
=
isset
(
$params
[
'pay'
][
'pay_price'
])
?
$params
[
'pay'
][
'pay_price
'
]
:
0
;
// 写入支付日志
$pay_log_data
=
[
'user_id'
=>
$params
[
'order'
][
'user_id'
],
'order_id'
=>
$params
[
'order'
][
'id'
],
'
amount'
=>
$params
[
'order'
][
'total_price'
],
'
total_price'
=>
$params
[
'order'
][
'total_price'
],
'trade_no'
=>
isset
(
$params
[
'pay'
][
'trade_no'
])
?
$params
[
'pay'
][
'trade_no'
]
:
''
,
'
user'
=>
isset
(
$params
[
'pay'
][
'buyer_email'
])
?
$params
[
'pay'
][
'buyer_email
'
]
:
''
,
'
total_fee'
=>
$total_amount
,
'
buyer_user'
=>
isset
(
$params
[
'pay'
][
'buyer_user'
])
?
$params
[
'pay'
][
'buyer_user
'
]
:
''
,
'
pay_price'
=>
$pay_price
,
'subject'
=>
isset
(
$params
[
'pay'
][
'subject'
])
?
$params
[
'pay'
][
'subject'
]
:
'订单支付'
,
'payment'
=>
$params
[
'payment'
][
'payment'
],
'payment_name'
=>
$params
[
'payment'
][
'name'
],
...
...
@@ -349,7 +345,7 @@ class OrderService
$upd_data
=
array
(
'status'
=>
2
,
'pay_status'
=>
1
,
'pay_price'
=>
$
total_amount
,
'pay_price'
=>
$
pay_price
,
'payment_id'
=>
$params
[
'payment'
][
'id'
],
'pay_time'
=>
time
(),
'upd_time'
=>
time
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录