Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
aa0b9aba
Commit
aa0b9aba
authored
Aug 06, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付宝支付
parent
9b5b8ba9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+5
-3
OrderRefundBiz.java
.../java/com/xxfc/platform/universal/biz/OrderRefundBiz.java
+1
-2
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
aa0b9aba
...
@@ -428,9 +428,10 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -428,9 +428,10 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
* @param tradNo 流水号
* @param tradNo 流水号
* @param refundAmount 退款金额
* @param refundAmount 退款金额
* @param refundReason 退款原因
* @param refundReason 退款原因
* outRequestNo 退款请求标示 用于分批退款,每笔退款标示不一样,同样标示不会重复退款
* @return
* @return
*/
*/
public
boolean
alipayOrderRefund
(
String
outTradeNo
,
String
tradNo
,
Integer
refundAmount
,
String
refundReason
)
{
public
boolean
alipayOrderRefund
(
String
outTradeNo
,
String
tradNo
,
Integer
refundAmount
,
String
refundReason
,
String
outRequestNo
)
{
AlipayClient
alipayClient
=
getAlipayClient
();
AlipayClient
alipayClient
=
getAlipayClient
();
AlipayTradeRefundRequest
request
=
new
AlipayTradeRefundRequest
();
AlipayTradeRefundRequest
request
=
new
AlipayTradeRefundRequest
();
BigDecimal
realAmount
=
new
BigDecimal
(
refundAmount
.
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
BigDecimal
realAmount
=
new
BigDecimal
(
refundAmount
.
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
...
@@ -438,7 +439,8 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -438,7 +439,8 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
"\"out_trade_no\":\""
+
outTradeNo
+
"\","
+
"\"out_trade_no\":\""
+
outTradeNo
+
"\","
+
"\"trade_no\":\""
+
tradNo
+
"\","
+
"\"trade_no\":\""
+
tradNo
+
"\","
+
"\"refund_amount\":"
+
realAmount
+
","
+
"\"refund_amount\":"
+
realAmount
+
","
+
"\"out_request_no\":\""
+
refundReason
+
"\""
+
"\"refund_reason\":\""
+
refundReason
+
"\","
+
"\"out_request_no\":\""
+
outRequestNo
+
"\""
+
" }"
);
" }"
);
try
{
try
{
log
.
info
(
"支付宝退款中:outTradeNo = {}, tradNo = {}, refundAmount = {}, refundReason = {}"
,
outTradeNo
,
tradNo
,
refundAmount
,
refundReason
);
log
.
info
(
"支付宝退款中:outTradeNo = {}, tradNo = {}, refundAmount = {}, refundReason = {}"
,
outTradeNo
,
tradNo
,
refundAmount
,
refundReason
);
...
@@ -458,6 +460,6 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -458,6 +460,6 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
OrderPayBiz
orderPayBiz
=
new
OrderPayBiz
();
OrderPayBiz
orderPayBiz
=
new
OrderPayBiz
();
orderPayBiz
.
alipayOrderRefund
(
"201908061
40051000001"
,
"2019080622001421530542972689"
,
5
,
"xxxx
"
);
orderPayBiz
.
alipayOrderRefund
(
"201908061
34440000001"
,
"2019080622001421530542309594"
,
3
,
"xxxx"
,
"
"
);
}
}
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderRefundBiz.java
View file @
aa0b9aba
...
@@ -91,8 +91,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper, OrderRefund> {
...
@@ -91,8 +91,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper, OrderRefund> {
boolean
flag
=
false
;
boolean
flag
=
false
;
if
(
orderPay
.
getPayWay
()
==
2
)
{
if
(
orderPay
.
getPayWay
()
==
2
)
{
log
.
info
(
"======支付宝退款中==========="
);
log
.
info
(
"======支付宝退款中==========="
);
flag
=
payBiz
.
alipayOrderRefund
(
out_trade_no
,
orderPay
.
getSerialNumber
(),
refundAmount
,
refundDesc
);
flag
=
payBiz
.
alipayOrderRefund
(
out_trade_no
,
orderPay
.
getSerialNumber
(),
refundAmount
,
refundDesc
,
out_trade_no
+
System
.
currentTimeMillis
());
}
else
if
(
orderPay
.
getPayWay
()
==
1
){
}
else
if
(
orderPay
.
getPayWay
()
==
1
){
log
.
info
(
"======微信退款中==========="
);
log
.
info
(
"======微信退款中==========="
);
flag
=
WxPayRefundUtils
.
refund
(
appid
,
mchId
,
partnerKey
,
out_trade_no
,
out_refund_no
,
payAmount
+
""
,
flag
=
WxPayRefundUtils
.
refund
(
appid
,
mchId
,
partnerKey
,
out_trade_no
,
out_refund_no
,
payAmount
+
""
,
...
...
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