Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
46cfb509
Commit
46cfb509
authored
Sep 05, 2017
by
maxiucheng
Browse files
添加支付宝当面付之扫码
parent
867010e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
xxpay-shop/src/main/java/org/xxpay/shop/demo/PayOrderDemo.java
View file @
46cfb509
...
...
@@ -13,14 +13,14 @@ import java.util.Map;
public
class
PayOrderDemo
{
// 商户ID
static
final
String
mchId
=
"2000122
2
"
;
//20001223,20001245
static
final
String
mchId
=
"2000122
3
"
;
//20001223,20001245
// 加签key
static
final
String
reqKey
=
"M86l522AV6q613Ii4W6u8K48uW8vM1N6bFgyv769220MdYe9u37N4y7rI5mQ"
;
// 验签key
static
final
String
repKey
=
"Hpcl522AV6q613KIi46u6g6XuW8vM1N8bFgyv769770MdYe9u37M4y7rIpl8"
;
static
final
String
baseUrl
=
"http://api.xxpay.org/api"
;
//
static final String baseUrl = "http://localhost:3020/api";
//
static final String baseUrl = "http://api.xxpay.org/api";
static
final
String
baseUrl
=
"http://localhost:3020/api"
;
static
final
String
notifyUrl
=
"http://www.baidu.com"
;
// 本地环境测试,可到ngrok.cc网站注册
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -33,7 +33,7 @@ public class PayOrderDemo {
paramMap
.
put
(
"mchId"
,
mchId
);
// 商户ID
paramMap
.
put
(
"mchOrderNo"
,
System
.
currentTimeMillis
());
// 商户订单号
// 支付渠道ID, WX_NATIVE(微信扫码),WX_JSAPI(微信公众号或微信小程序),WX_APP(微信APP),WX_MWEB(微信H5),ALIPAY_WAP(支付宝手机支付),ALIPAY_PC(支付宝网站支付),ALIPAY_MOBILE(支付宝移动支付)
paramMap
.
put
(
"channelId"
,
"
WX_JSAPI
"
);
paramMap
.
put
(
"channelId"
,
"
ALIPAY_QR
"
);
paramMap
.
put
(
"amount"
,
1
);
// 支付金额,单位分
paramMap
.
put
(
"currency"
,
"cny"
);
// 币种, cny-人民币
paramMap
.
put
(
"clientIp"
,
"211.94.116.218"
);
// 用户地址,微信H5支付时要真实的
...
...
@@ -53,6 +53,8 @@ public class PayOrderDemo {
" \"wap_name\": \"xxpay充值\"\n"
+
" }\n"
+
" }\n"
+
" ,\"discountable_amount\":\"0.00\","
+
//面对面支付扫码参数:可打折金额 可打折金额+不可打折金额=总金额
" \"undiscountable_amount\":\"0.00\","
+
//面对面支付扫码参数:不可打折金额
"}"
);
// 附加参数
//{"h5_info": {"type":"Wap","wap_url": "https://pay.qq.com","wap_name": "腾讯充值"}}
...
...
Write
Preview
Supports
Markdown
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