Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
youka-api
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
甄紫君
youka-api
Commits
e720aaf5
Commit
e720aaf5
authored
May 31, 2018
by
zhenzijun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
juhezhong接口补充
parent
f70fb081
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
25 deletions
+35
-25
JuHeZhongPayService.java
src/main/java/com/thinkgem/jeesite/modules/pay/juhezhong/service/JuHeZhongPayService.java
+35
-25
No files found.
src/main/java/com/thinkgem/jeesite/modules/pay/juhezhong/service/JuHeZhongPayService.java
View file @
e720aaf5
...
@@ -41,6 +41,7 @@ public class JuHeZhongPayService {
...
@@ -41,6 +41,7 @@ public class JuHeZhongPayService {
public
JSONObject
orderQuery
(
JuhezhongDto
dto
)
throws
Exception
{
public
JSONObject
orderQuery
(
JuhezhongDto
dto
)
throws
Exception
{
Map
<
String
,
Object
>
params
=
JuhezhongUtils
.
juhezhongBaseDtoToMap
(
dto
);
Map
<
String
,
Object
>
params
=
JuhezhongUtils
.
juhezhongBaseDtoToMap
(
dto
);
String
respStr
=
HttpUtil
.
post
(
ComCode
.
JUHEZHONG_URL
+
ComCode
.
ORDER_QUERY
,
params
);
String
respStr
=
HttpUtil
.
post
(
ComCode
.
JUHEZHONG_URL
+
ComCode
.
ORDER_QUERY
,
params
);
System
.
out
.
println
(
"字符串:"
+
respStr
);
return
JSONObject
.
parseObject
(
respStr
);
return
JSONObject
.
parseObject
(
respStr
);
}
}
...
@@ -174,30 +175,39 @@ public class JuHeZhongPayService {
...
@@ -174,30 +175,39 @@ public class JuHeZhongPayService {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// ApiQuickPayDto request = new ApiQuickPayDto();
JuhezhongDto
a
=
new
JuhezhongDto
();
// request.setAmount(10L);
a
.
setOrderId
(
"Dy58WqJG3MmNpSpQMq3wKZV55OiO48asPzRp4YUBBZUsVEiow7q6CZTQqwrBTl4k"
);
// request.setBody("23");
a
.
setMerchantId
(
ComCode
.
MERCHANT_ID
);
// request.setFrontUrl("");
a
.
setMerchantKey
(
ComCode
.
MERCHANT_KEY
);
// request.setNotifyUrl("");
a
.
setTimestamp
(
System
.
currentTimeMillis
());
// request.setType(0);
System
.
out
.
println
(
"Json格式:"
+
new
JuHeZhongPayService
().
orderQuery
(
a
));
// request.setName("");
// request.setUrl("");
//
// JuHeZhongPayService juHeZhongPayService = new JuHeZhongPayService();
// System.out.println(juHeZhongPayService.quickPay(request).toString());
ApiQuickPayDto
dto
=
new
ApiQuickPayDto
();
dto
.
setOrderId
(
"Dy58WqJG3MmNpSpQMq3wKZV55OiO48asPzRp4YUBBZUsVEiow7q6CZTQqwrBTl4k"
);
dto
.
setMerchantId
(
ComCode
.
MERCHANT_ID
);
dto
.
setMerchantKey
(
ComCode
.
MERCHANT_KEY
);
dto
.
setTimestamp
(
System
.
currentTimeMillis
());
Map
<
String
,
Object
>
params
=
Bean2Map
.
Entity2Map
(
dto
);
String
signBefore
=
SignUtils
.
signBefore
(
params
);
String
sign
=
SignUtils
.
sign
(
signBefore
,
ComCode
.
MERCHANT_SECRET
);
params
.
put
(
"sign"
,
sign
);
String
respStr
=
HttpUtil
.
post
(
ComCode
.
HOST
+
ComCode
.
ORDER_QUERY_URL
,
params
);
System
.
out
.
println
(
respStr
);
}
}
// public static void main (String[] args) throws Exception {
//// ApiQuickPayDto request = new ApiQuickPayDto();
//// request.setAmount(10L);
//// request.setBody("23");
//// request.setFrontUrl("");
//// request.setNotifyUrl("");
//// request.setType(0);
//// request.setName("");
//// request.setUrl("");
////
//// JuHeZhongPayService juHeZhongPayService = new JuHeZhongPayService();
//// System.out.println(juHeZhongPayService.quickPay(request).toString());
// ApiQuickPayDto dto = new ApiQuickPayDto();
// dto.setOrderId("Dy58WqJG3MmNpSpQMq3wKZV55OiO48asPzRp4YUBBZUsVEiow7q6CZTQqwrBTl4k");
// dto.setMerchantId(ComCode.MERCHANT_ID);
// dto.setMerchantKey(ComCode.MERCHANT_KEY);
// dto.setTimestamp(System.currentTimeMillis());
//
// Map<String, Object> params = Bean2Map.Entity2Map(dto);
// String signBefore = SignUtils.signBefore(params);
// String sign = SignUtils.sign(signBefore, ComCode.MERCHANT_SECRET);
// params.put("sign", sign);
// String respStr = HttpUtil.post(ComCode.HOST + ComCode.ORDER_QUERY_URL, params);
//
// System.out.println(respStr);
//
// }
}
}
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