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
e3d2e597
Commit
e3d2e597
authored
Aug 06, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付宝支付
parent
5a3185f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+5
-6
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
e3d2e597
...
...
@@ -62,9 +62,9 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
@Autowired
MQServiceBiZ
mqServiceBiZ
;
@Value
(
"${universal.url}"
)
String
weixinHost
;
static
String
weixinHost
;
private
static
final
String
notifyUrl
=
weixinHost
+
"/api/universal/pay/app/unauth/notify/alipay"
;
public
JSONObject
preparepay
(
OrderPayVo
orderPayVo
)
{
if
(
null
==
orderPayVo
)
{
...
...
@@ -282,8 +282,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
);
String
notifyUrl
=
weixinHost
+
"/api/universal/pay/app/unauth/notify/alipay"
;
orderPayVo
.
setNotifyUrl
(
notifyUrl
);
//实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.app.pay
try
{
return
appOrderPay
(
alipayClient
,
orderPayVo
);
...
...
@@ -304,7 +303,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
"\"subject\":\""
+
orderPayVo
.
getSubject
()
+
"\","
+
"\"out_trade_no\":\""
+
orderPayVo
.
getTradeNo
()
+
"\""
+
" }"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
()
);
request
.
setNotifyUrl
(
notifyUrl
);
try
{
//这里和普通的接口调用不同,使用的是sdkExecute
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
...
...
@@ -332,7 +331,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> {
"\"product_code\":\"PRE_AUTH_ONLINE\","
+
"\"pay_timeout\":\"1d\","
+
"\"amount\": \""
+
realAmount
.
toString
()
+
"\" }"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
()
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
request
.
setNotifyUrl
(
notifyUrl
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
AlipayFundAuthOrderAppFreezeResponse
response
=
alipayClient
.
sdkExecute
(
request
);
//注意这里是sdkExecute,可以获取签名参数
if
(
response
.
isSuccess
())
{
log
.
info
(
"调用成功"
);
...
...
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