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
65dff1ce
Commit
65dff1ce
authored
Aug 06, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
7cb0cbdc
eec6e38c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+10
-8
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
65dff1ce
...
@@ -292,7 +292,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -292,7 +292,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
SystemConfig
.
ALIPAY_PAY_BASE_URL
+
"/gateway.do"
,
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
SystemConfig
.
ALIPAY_PAY_BASE_URL
+
"/gateway.do"
,
SystemConfig
.
ALIPAY_APPID
,
SystemConfig
.
ALIPAY_PRIVATE_KEY
,
AlipayConstants
.
FORMAT_JSON
,
SystemConfig
.
ALIPAY_APPID
,
SystemConfig
.
ALIPAY_PRIVATE_KEY
,
AlipayConstants
.
FORMAT_JSON
,
"utf-8"
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
"utf-8"
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
return
alipayClient
;
return
alipayClient
;
}
}
//支付宝APP支付方法
//支付宝APP支付方法
...
@@ -421,15 +421,16 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -421,15 +421,16 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
}
}
/**
/**
* APP支付退款
* APP支付退款
*
* @param
* @param
* @param outTradeNo 订单号
* @param outTradeNo
订单号
* @param tradNo 流水号
* @param tradNo
流水号
* @param refundAmount 退款金额
* @param refundAmount 退款金额
* @param refundReason 退款原因
* @param refundReason 退款原因
* @return
* @return
*/
*/
public
boolean
alipayOrderRefund
(
String
outTradeNo
,
String
tradNo
,
Integer
refundAmount
,
String
refundReason
)
{
public
boolean
alipayOrderRefund
(
String
outTradeNo
,
String
tradNo
,
Integer
refundAmount
,
String
refundReason
)
{
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
);
...
@@ -439,10 +440,11 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
...
@@ -439,10 +440,11 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
"\"refund_amount\":"
+
realAmount
+
","
+
"\"refund_amount\":"
+
realAmount
+
","
+
"\"out_request_no\":\""
+
refundReason
+
"\""
+
"\"out_request_no\":\""
+
refundReason
+
"\""
+
" }"
);
" }"
);
try
{
try
{
AlipayTradeRefundResponse
response
=
alipayClient
.
execute
(
request
);
log
.
info
(
"支付宝退款中:outTradeNo = {}, tradNo = {}, refundAmount = {}, refundReason = {}"
,
outTradeNo
,
tradNo
,
refundAmount
,
refundReason
);
log
.
info
(
"支付宝退款中:outTradeNo = {}, tradNo = {}, refundAmount = {}, refundReason = {}"
,
outTradeNo
,
tradNo
,
refundAmount
,
refundReason
);
if
(
response
.
isSuccess
()){
AlipayTradeRefundResponse
response
=
alipayClient
.
execute
(
request
);
log
.
info
(
response
.
getMsg
());
if
(
response
.
isSuccess
())
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
...
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