Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
f2cf1c54
Commit
f2cf1c54
authored
Nov 23, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调用预支付接口
parent
d6330d2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
+19
-1
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+19
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
f2cf1c54
...
@@ -143,6 +143,8 @@ public class PayServiceImpl {
...
@@ -143,6 +143,8 @@ public class PayServiceImpl {
private
Boolean
queryPayOrder
;
private
Boolean
queryPayOrder
;
@Value
(
"${use.pay.feign:true}"
)
@Value
(
"${use.pay.feign:true}"
)
private
Boolean
usePayFeignClient
;
private
Boolean
usePayFeignClient
;
@Value
(
"${pay.response.error:true}"
)
private
Boolean
printUnifiedPayResponseError
;
private
static
final
Integer
MULITI_RESPONSE
=
200
;
private
static
final
Integer
MULITI_RESPONSE
=
200
;
...
@@ -502,7 +504,23 @@ public class PayServiceImpl {
...
@@ -502,7 +504,23 @@ public class PayServiceImpl {
return
orderPayResponse
;
return
orderPayResponse
;
}
}
requestDto
.
setClientCode
(
Long
.
parseLong
(
clientCode
));
requestDto
.
setClientCode
(
Long
.
parseLong
(
clientCode
));
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedPayResponseDto
>
response
=
paymentNewClient
.
unifiedOrder
(
requestDto
);
// com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> response = paymentNewClient.unifiedOrder(requestDto);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
UnifiedPayResponseDto
>
response
=
null
;
//处理超时情况,后续冲正mq正常冲正,同支付sdk逻辑
try
{
response
=
paymentNewClient
.
unifiedOrder
(
requestDto
);
}
catch
(
Exception
e
)
{
AppLogUtil
.
errorLog
(
"获取预支付信息异常"
,
JSONObject
.
toJSONString
(
requestDto
),
null
,
e
);
}
if
(
response
==
null
||
!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
response
.
getCode
()))
{
//打印业务异常
if
(
response
!=
null
&&
printUnifiedPayResponseError
){
AppLogUtil
.
errorLog
(
"获取预支付信息失败"
,
JSONObject
.
toJSONString
(
requestDto
),
JSONObject
.
toJSONString
(
response
),
null
);
}
//预支付失败需要把原因进行记录
orderPayResponse
.
setMsg
(
response
==
null
?
"unified fail"
:
response
.
getMessage
());
return
orderPayResponse
;
}
putDelMq
(
request
.
getPartnerId
(),
request
.
getStoreId
(),
response
.
getData
().
getFmId
(),
orderBean
.
getOid
(),
null
);
putDelMq
(
request
.
getPartnerId
(),
request
.
getStoreId
(),
response
.
getData
().
getFmId
(),
orderBean
.
getOid
(),
null
);
this
.
convent2CreateOrderResponseVo
(
orderPayResponse
,
paymentRequest
.
getWxAppId
(),
response
.
getData
());
this
.
convent2CreateOrderResponseVo
(
orderPayResponse
,
paymentRequest
.
getWxAppId
(),
response
.
getData
());
orderPayResponse
.
setOpenId
(
paymentRequest
.
getOpenId
());
orderPayResponse
.
setOpenId
(
paymentRequest
.
getOpenId
());
...
...
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