Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
bceba8cf
Commit
bceba8cf
authored
Jul 06, 2020
by
汪睦雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复下单计价千分号的问题
parent
e89debdc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
18 deletions
+19
-18
application/admin/controller/Order.php
+15
-15
application/admin/view/order/refund.html
+1
-0
application/api/controller/Order.php
+3
-3
No files found.
application/admin/controller/Order.php
View file @
bceba8cf
...
@@ -306,25 +306,25 @@ class Order extends AuthBase
...
@@ -306,25 +306,25 @@ class Order extends AuthBase
$input
->
SetOut_refund_no
(
"sdkphp"
.
date
(
"YmdHis"
));
$input
->
SetOut_refund_no
(
"sdkphp"
.
date
(
"YmdHis"
));
$input
->
SetOp_user_id
(
$config
->
GetMerchantId
());
$input
->
SetOp_user_id
(
$config
->
GetMerchantId
());
$result
=
\WxPayApi
::
refund
(
$config
,
$input
);
$result
=
\WxPayApi
::
refund
(
$config
,
$input
);
if
(
$result
[
'return_code'
]
==
'SUCCESS'
)
{
if
(
$result
[
'return_code'
]
==
'SUCCESS'
&&
$result
[
'result_code'
]
==
'SUCCESS'
)
{
Db
::
commit
();
Db
::
commit
();
//发送消息模板
//发送消息模板
$openId
=
\app\common\model\User
::
get
(
$order
->
uid
)[
'openid'
];
//
$openId = \app\common\model\User::get($order->uid)['openid'];
$template_id
=
config
(
'wxapp.template_id_refund'
);
//
$template_id = config('wxapp.template_id_refund');
$page
=
config
(
'wxapp.page'
);
//
$page = config('wxapp.page');
$form_id
=
$order
->
prepay_id
;
//
$form_id = $order->prepay_id;
$param
=
[
//
$param = [
$order
->
out_trade_no
,
//
$order->out_trade_no,
$order
->
title
,
//
$order->title,
$order
->
total_fee
,
//
$order->total_fee,
date
(
'Y-m-d H:i:s'
)
//
date('Y-m-d H:i:s')
];
//
];
WXSendMessage
::
send_template_notice
(
$openId
,
$template_id
,
$page
,
$form_id
,
$param
);
//
WXSendMessage::send_template_notice($openId, $template_id, $page, $form_id, $param);
return
json
([
'code'
=>
0
,
'msg'
=>
'退款成功'
]);
return
json
([
'code'
=>
0
,
'msg'
=>
'退款成功'
,
'data'
=>
$result
]);
}
else
{
}
else
{
throw
new
Exception
(
$result
[
'
return_msg
'
]);
throw
new
Exception
(
$result
[
'
err_code_des
'
]);
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
Db
::
rollback
();
...
...
application/admin/view/order/refund.html
View file @
bceba8cf
...
@@ -188,6 +188,7 @@
...
@@ -188,6 +188,7 @@
layer
.
msg
(
res
.
msg
);
layer
.
msg
(
res
.
msg
);
$
(
that
).
attr
(
'disabled'
,
'disabled'
);
$
(
that
).
attr
(
'disabled'
,
'disabled'
);
$
(
that
).
next
().
attr
(
'disabled'
,
'disabled'
);
$
(
that
).
next
().
attr
(
'disabled'
,
'disabled'
);
window
.
location
.
reload
();
}
else
{
}
else
{
layer
.
msg
(
res
.
msg
);
layer
.
msg
(
res
.
msg
);
}
}
...
...
application/api/controller/Order.php
View file @
bceba8cf
...
@@ -65,9 +65,9 @@ class Order extends Base
...
@@ -65,9 +65,9 @@ class Order extends Base
}
}
return
[
return
[
'buyed_num'
=>
$buyed_num
,
'buyed_num'
=>
$buyed_num
,
'vip_price'
=>
number_format
(
$vip_price
,
2
),
'vip_price'
=>
number_format
(
$vip_price
,
2
,
'.'
,
''
),
'novip_price'
=>
number_format
(
$novip_price
,
2
),
'novip_price'
=>
number_format
(
$novip_price
,
2
,
'.'
,
''
),
'total_price'
=>
number_format
(
$total_price
,
2
)
'total_price'
=>
number_format
(
$total_price
,
2
,
'.'
,
''
)
];
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment