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
fdfcbc42
Commit
fdfcbc42
authored
Aug 02, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付宝支付方式
parent
329e4dd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+12
-11
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
fdfcbc42
...
...
@@ -300,22 +300,23 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
BigDecimal
realAmount
=
new
BigDecimal
(
orderPayVo
.
getAmount
().
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
AlipayTradeAppPayRequest
request
=
new
AlipayTradeAppPayRequest
();
//SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。
request
.
setBizContent
(
"{"
+
"\"timeout_express\":\"30m\","
+
"\"product_code\":\"QUICK_MSECURITY_PAY\","
+
"\"total_amount\":\""
+
realAmount
.
toString
()
+
"\","
+
"\"subject\":\""
+
orderPayVo
.
getSubject
()
+
"\","
+
"\"body\":\""
+
orderPayVo
.
getBody
()
+
"\","
+
"\"out_trade_no\":\""
+
orderPayVo
.
getTradeNo
()
+
"\""
+
"}"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
log
.
info
(
"请求参数:param = {}"
,
request
.
getBizContent
());
try
{
//这里和普通的接口调用不同,使用的是sdkExecute
request
.
setBizContent
(
"{"
+
"\"timeout_express\":\"30m\","
+
"\"product_code\":\"QUICK_MSECURITY_PAY\","
+
"\"total_amount\":\""
+
realAmount
.
toString
()
+
"\","
+
"\"subject\":\""
+
new
String
(
orderPayVo
.
getSubject
().
getBytes
(),
"utf-8"
)
+
"\","
+
"\"body\":\""
+
new
String
(
orderPayVo
.
getBody
().
getBytes
(),
"utf-8"
)
+
"\","
+
"\"out_trade_no\":\""
+
orderPayVo
.
getTradeNo
()
+
"\""
+
"}"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
log
.
info
(
"请求参数:param = {}"
,
request
.
getBizContent
());
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
log
.
info
(
response
.
getBody
());
//就是orderString 可以直接给客户端请求,无需再做处理。
return
response
.
getBody
();
}
catch
(
AlipayApi
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
...
...
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