切换导航条
此项目
正在载入...
登录
景龙
/
feifangu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
jinglong
5 years ago
提交
1b26857bee4cc209fa5d91793a9f988e36d38b21
1 个父辈
047888f9
1 个管道 的构建
通过
耗费 6 秒
修改退款为0
变更
2
构建
1
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
11 行增加
和
2 行删除
application/admin/controller/Order.php
application/api/controller/User.php
application/admin/controller/Order.php
查看文件 @
1b26857
...
...
@@ -125,12 +125,18 @@ class Order extends Backend
{
if
(
$ids
)
{
$pk
=
$this
->
model
->
getPk
();
$res
=
Db
::
name
(
'order'
)
->
where
(
$pk
,
$ids
)
->
field
(
'id,pay_order_sn,total_goods_price'
)
->
find
();
$res
=
Db
::
name
(
'order'
)
->
where
(
$pk
,
$ids
)
->
field
(
'id,pay_order_sn,total_expense_price,total_price'
)
->
find
();
if
(
$res
){
if
(
$res
[
'total_price'
]
==
0
){
//支付总金额为0,
$this
->
success
(
'成功'
);
}
$status
=
config
(
'verify.status'
);
//处理退款逻辑
$config
=
config
(
'verify.wx_pay'
);
$app
=
Factory
::
payment
(
$config
);
// $security_price = $res['total_goods_price']*100;
//退款金额 支付金额-运费
// $security_price = ($res['total_price'] - $res['total_expense_price'])*100;
$security_price
=
1
;
$refundNumber
=
$this
->
genPayOrderSn
(
'refund'
);
//商户退款单号
$result
=
$app
->
refund
->
byOutTradeNumber
(
$res
[
'pay_order_sn'
],
$refundNumber
,
$security_price
,
$security_price
,
[
...
...
@@ -168,6 +174,8 @@ class Order extends Backend
}
else
{
$this
->
error
(
'退款失败'
);
}
}
$this
->
error
(
'未查到订单'
);
}
$this
->
error
(
__
(
'Parameter %s can not be empty'
,
'ids'
));
...
...
application/api/controller/User.php
查看文件 @
1b26857
...
...
@@ -6,6 +6,7 @@ use app\admin\model\Collection;
use
app\admin\model\Rcoupon
;
use
app\common\controller\Api
;
use
fast\Http
;
use
think\db\Query
;
use
think\Validate
;
use
think\Db
;
use
think\db\Expression
;
...
...
请
注册
或
登录
后发表评论