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
64406880
Commit
64406880
authored
Aug 02, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付宝支付方式
parent
fdfcbc42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+18
-9
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
64406880
...
...
@@ -279,7 +279,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
//实例化客户端
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
SystemConfig
.
ALIPAY_PAY_BASE_URL
+
"/gateway.do"
,
SystemConfig
.
ALIPAY_APPID
,
SystemConfig
.
ALIPAY_PRIVATE_KEY
,
AlipayConstants
.
FORMAT_JSON
,
"UTF-8"
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
AlipayConstants
.
CHARSET_UTF8
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
orderPayVo
.
setNotifyUrl
(
notifyUrl
);
try
{
if
(
orderPayVo
.
getPayWay
()
==
2
)
{
//支付宝APP支付
...
...
@@ -303,14 +303,23 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
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.setBizContent("{" +
// "\"timeout_express\":\"30m\"," +
// "\"product_code\":\"QUICK_MSECURITY_PAY\"," +
// "\"total_amount\":\"" + realAmount.toString() + "\"," +
// "\"subject\":\"" + orderPayVo.getSubject() + "\"," +
// "\"body\":\"" + orderPayVo.getBody() + "\"," +
// "\"out_trade_no\":\"" + orderPayVo.getTradeNo() + "\"" +
// "}");
AlipayTradeAppPayModel
model
=
new
AlipayTradeAppPayModel
();
//model.setBody("我是测试数据");
model
.
setSubject
(
orderPayVo
.
getSubject
());
model
.
setOutTradeNo
(
orderPayVo
.
getBody
());
model
.
setTimeoutExpress
(
"30m"
);
model
.
setTotalAmount
(
realAmount
.
toString
());
model
.
setProductCode
(
"QUICK_MSECURITY_PAY"
);
request
.
setBizModel
(
model
);
request
.
setNotifyUrl
(
notifyUrl
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
log
.
info
(
"请求参数:param = {}"
,
request
.
getBizContent
());
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
...
...
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