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
java-youka-wallet
youka-api
Commits
1e875c5e
Commit
1e875c5e
authored
Apr 17, 2018
by
Java-聂换换
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huanqiuuiju通道支付
parent
681724fc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
332 additions
and
12 deletions
+332
-12
ComCode.java
src/main/java/com/thinkgem/jeesite/common/constant/ComCode.java
+7
-3
AlipayService.java
src/main/java/com/thinkgem/jeesite/modules/pay/alipay/service/AlipayService.java
+15
-7
PayApiController.java
src/main/java/com/thinkgem/jeesite/modules/pay/api/PayApiController.java
+67
-0
RateEntity.java
src/main/java/com/thinkgem/jeesite/modules/pay/entity/RateEntity.java
+10
-0
HuanqiuhuijuService.java
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/service/HuanqiuhuijuService.java
+67
-0
HttpUtil.java
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/utils/HttpUtil.java
+0
-0
SignUtils.java
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/utils/SignUtils.java
+30
-0
Bean2Map.java
src/main/java/com/thinkgem/jeesite/modules/pay/juhezhong/utils/Bean2Map.java
+15
-0
PayApiService.java
src/main/java/com/thinkgem/jeesite/modules/pay/service/PayApiService.java
+91
-1
JuHeZhongPayRequest.java
src/main/java/com/thinkgem/jeesite/modules/user/bean/JuHeZhongPayRequest.java
+20
-0
UserDao.xml
src/main/resources/mappings/modules/user/UserDao.xml
+1
-0
youka.properties
src/main/resources/youka.properties
+9
-1
No files found.
src/main/java/com/thinkgem/jeesite/common/constant/ComCode.java
View file @
1e875c5e
...
...
@@ -53,9 +53,12 @@ public class ComCode {
public
static
final
String
JFEN_PEAK_QUICK_PAY_URL
=
"/peak/quick/pay/handle"
;
/**
* HUANQIUHUIJU 快捷支付
*/
public
static
final
String
HUANQIUHUIJU_PAYURL
=
"http://pay.huanqiuhuiju.com/authsys/api/pay/shanglv/qpay/execute.do"
;
public
static
final
String
HUANQIUHUIJU_MERCHANT_ID
=
Global
.
getConfig
(
"huanqiuhuiju.merchant.id"
);
public
static
final
String
HUANQIUHUIJU_MERCHANT_KEY
=
Global
.
getConfig
(
"c7dadd0a"
);
/**
* duolabao相关参数
*
...
...
@@ -147,4 +150,5 @@ public class ComCode {
public
static
final
String
PAYCHANNEL_HL1
=
"quick_no_integral"
;
public
static
final
String
PAYCHANNEL_HL2
=
"quick_jfen"
;
public
static
final
String
PAYCHANNEL_HL3
=
"quick_integral"
;
public
static
final
String
PAYCHANNEL_HUANQIUHUIJU
=
"quick_huanqiuhuiju"
;
}
src/main/java/com/thinkgem/jeesite/modules/pay/alipay/service/AlipayService.java
View file @
1e875c5e
...
...
@@ -5,26 +5,34 @@ import com.alipay.api.AlipayApiException;
import
com.alipay.api.AlipayClient
;
import
com.alipay.api.DefaultAlipayClient
;
import
com.alipay.api.request.AlipayTradeFastpayRefundQueryRequest
;
import
com.alipay.api.request.AlipayTradeOrderSettleRequest
;
import
com.alipay.api.response.AlipayTradeFastpayRefundQueryResponse
;
import
com.alipay.api.response.AlipayTradeOrderSettleResponse
;
import
com.thinkgem.jeesite.common.config.Global
;
public
class
AlipayService
{
public
JSONObject
alipay
()
throws
AlipayApiException
{
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
Global
.
getConfig
(
"alipay.appid"
),
"your private_key"
,
"json"
,
"GBK"
,
"alipay_public_key"
,
"RSA2"
);
AlipayTrade
FastpayRefundQueryRequest
request
=
new
AlipayTradeFastpayRefundQuery
Request
();
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
Global
.
getConfig
(
"alipay.appid"
),
Global
.
getConfig
(
"alipay.private.key"
),
"json"
,
"UTF-8"
,
Global
.
getConfig
(
"alipay.public.key"
)
,
"RSA2"
);
AlipayTrade
OrderSettleRequest
request
=
new
AlipayTradeOrderSettle
Request
();
request
.
setBizContent
(
"{"
+
"\"trade_no\":\"20150320010101001\","
+
"\"out_trade_no\":\"2014112611001004680073956707\","
+
"\"out_request_no\":\"2014112611001004680073956707\""
+
"\"out_request_no\":\"20160727001\","
+
"\"trade_no\":\"2014030411001007850000672009\","
+
" \"royalty_parameters\":[{"
+
" \"trans_out\":\"2088101126765726\","
+
"\"trans_in\":\"2088101126708402\","
+
"\"amount\":0.1,"
+
"\"amount_percentage\":100,"
+
"\"desc\":\"分账给2088101126708402\""
+
" }],"
+
"\"operator_id\":\"A0001\""
+
" }"
);
AlipayTrade
FastpayRefundQuery
Response
response
=
alipayClient
.
execute
(
request
);
AlipayTrade
OrderSettle
Response
response
=
alipayClient
.
execute
(
request
);
if
(
response
.
isSuccess
()){
System
.
out
.
println
(
"调用成功"
);
}
else
{
System
.
out
.
println
(
"调用失败"
);
}
return
null
;
}
...
...
src/main/java/com/thinkgem/jeesite/modules/pay/api/PayApiController.java
View file @
1e875c5e
...
...
@@ -180,6 +180,73 @@ public class PayApiController {
}
/**
* 回调
* @param request
* @param response
*/
@RequestMapping
(
"/notifyHuanqiuhuijuPay"
)
public
void
notifyHuanqiuhuijuPay
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
System
.
out
.
println
(
"。。。。。。回调。。。。。"
);
Response
responseRetrun
=
new
Response
();
Map
map
=
request
.
getParameterMap
();
Set
keSet
=
map
.
entrySet
();
for
(
Iterator
itr
=
keSet
.
iterator
();
itr
.
hasNext
();){
Map
.
Entry
me
=(
Map
.
Entry
)
itr
.
next
();
Object
ok
=
me
.
getKey
();
//获取参数名
Object
ov
=
me
.
getValue
();
//获取参数值
System
.
out
.
println
(
ok
+
"="
+
ok
.
toString
());
System
.
out
.
println
(
ov
+
"="
+
ov
.
toString
());
String
[]
value
=
new
String
[
1
];
if
(
ov
instanceof
String
[]){
value
=(
String
[])
ov
;
}
else
{
value
[
0
]=
ov
.
toString
();
}
for
(
int
k
=
0
;
k
<
value
.
length
;
k
++){
System
.
out
.
println
(
ok
+
"="
+
value
[
k
]);
}
}
//设置编码
try
{
request
.
setCharacterEncoding
(
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
String
orderId
=
request
.
getParameter
(
"dsorderid"
);
String
code
=
request
.
getParameter
(
"respCode"
);
if
(
"00"
.
equals
(
code
)){
System
.
out
.
println
(
"orderId:"
+
orderId
);
OrderEntity
orderEntity
=
new
OrderEntity
();
orderEntity
.
setPayCode
(
orderId
);
try
{
orderEntity
=
payService
.
notifyPay
(
orderEntity
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//返回true 收到请求,停止通知
PrintWriter
write
=
null
;
try
{
write
=
response
.
getWriter
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
write
.
print
(
"success"
);
responseRetrun
.
setMessage
(
"ok"
);
responseRetrun
.
setStatus
(
ComCode
.
STATUS_CODE_9998
);
responseRetrun
.
setData
(
orderEntity
);
write
.
flush
();
write
.
close
();
}
}
/**
* 回调
...
...
src/main/java/com/thinkgem/jeesite/modules/pay/entity/RateEntity.java
View file @
1e875c5e
...
...
@@ -21,6 +21,8 @@ public class RateEntity extends BaseEntity implements Serializable {
private
String
rateType
;
private
String
siglePrice
;
public
RateEntity
()
{
}
...
...
@@ -118,4 +120,12 @@ public class RateEntity extends BaseEntity implements Serializable {
public
void
setRateType
(
String
rateType
)
{
this
.
rateType
=
rateType
;
}
public
String
getSiglePrice
()
{
return
siglePrice
;
}
public
void
setSiglePrice
(
String
siglePrice
)
{
this
.
siglePrice
=
siglePrice
;
}
}
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/service/HuanqiuhuijuService.java
0 → 100644
View file @
1e875c5e
package
com
.
thinkgem
.
jeesite
.
modules
.
pay
.
huanqiuhuiju
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.thinkgem.jeesite.common.config.Global
;
import
com.thinkgem.jeesite.common.constant.ComCode
;
import
com.thinkgem.jeesite.common.utils.IdGen
;
import
com.thinkgem.jeesite.modules.pay.huanqiuhuiju.utils.HttpUtil
;
import
com.thinkgem.jeesite.modules.pay.huanqiuhuiju.utils.SignUtils
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.utils.Bean2Map
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.utils.MakeOrderNum
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.SortedMap
;
@Transactional
@Service
public
class
HuanqiuhuijuService
{
public
JSONObject
huanqiuhuijuPay
(
JSONObject
dto
)
throws
Exception
{
SortedMap
map
=
Bean2Map
.
JSONObject2SortedMap
(
dto
);
String
sign
=
SignUtils
.
createSign
(
map
,
ComCode
.
HUANQIUHUIJU_MERCHANT_KEY
);
map
.
put
(
"sign"
,
sign
);
String
result
=
HttpUtil
.
postRequest
(
ComCode
.
HUANQIUHUIJU_PAYURL
,
JSONObject
.
toJSONString
(
map
));
System
.
out
.
println
(
"result:"
+
result
);
return
JSONObject
.
parseObject
(
result
);
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
HuanqiuhuijuService
huanqiuhuijuService
=
new
HuanqiuhuijuService
();
JSONObject
dto
=
new
JSONObject
();
String
orderId
=
IdGen
.
randomBase62
(
32
);
dto
.
put
(
"transcode"
,
"300"
);
// 交易码
dto
.
put
(
"version"
,
"0100"
);
// 版本号
dto
.
put
(
"ordersn"
,
MakeOrderNum
.
makeOrderNum
());
// 流水号 每次交易都唯一
dto
.
put
(
"merchno"
,
ComCode
.
HUANQIUHUIJU_MERCHANT_ID
);
// 商户号
dto
.
put
(
"dsorderid"
,
orderId
);
// 订单号 唯一
dto
.
put
(
"txnAmt"
,
"1000"
);
// 交易金额
dto
.
put
(
"txnRate"
,
"2"
);
// 费率
dto
.
put
(
"siglePrice"
,
"100"
);
// 单笔价格
dto
.
put
(
"merchno"
,
ComCode
.
HUANQIUHUIJU_MERCHANT_ID
);
// 商户号
dto
.
put
(
"realName"
,
"李波"
);
// 真实姓名
dto
.
put
(
"idCardNo"
,
"53250219850831031X"
);
// 身份证号
dto
.
put
(
"bankCardNo"
,
"6225571645517950"
);
// 银行卡号
dto
.
put
(
"bankCode"
,
"306331003281"
);
// 银行代码
dto
.
put
(
"bankName"
,
"广发银行"
);
// 消费卡银行名称
dto
.
put
(
"phone"
,
"13821934497"
);
// 手机号
dto
.
put
(
"cvn2"
,
"009"
);
dto
.
put
(
"expireDate"
,
"0821"
);
dto
.
put
(
"notifyUrl"
,
Global
.
getConfig
(
"project.access.url"
)+
"/api/pay/notifyPay"
);
dto
.
put
(
"settleBankCode"
,
"102100099996"
);
// 结算银行代码
dto
.
put
(
"settleCardNo"
,
"6212260302011080165"
);
// 结算银行卡
dto
.
put
(
"settlePhone"
,
"13821934497"
);
// 结算手机号
dto
.
put
(
"settleCardBankName"
,
"中国工商银行"
);
// 结算卡银行名称
System
.
out
.
println
(
dto
.
toJSONString
());
huanqiuhuijuService
.
huanqiuhuijuPay
(
dto
);
// 20180417101150959000 20180417101211113000 nXXKJE4LI7VV222bgdjrw3013YQ2ozZSMGGmxhZBGqsDeH9OOu6kB0lP3tYjZm4v
}
}
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/utils/HttpUtil.java
0 → 100644
View file @
1e875c5e
This diff is collapsed.
Click to expand it.
src/main/java/com/thinkgem/jeesite/modules/pay/huanqiuhuiju/utils/SignUtils.java
0 → 100644
View file @
1e875c5e
package
com
.
thinkgem
.
jeesite
.
modules
.
pay
.
huanqiuhuiju
.
utils
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.utils.MD5Utils
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.SortedMap
;
public
class
SignUtils
{
public
static
String
createSign
(
SortedMap
<
Object
,
Object
>
parameters
,
String
APIKEY
)
throws
Exception
{
StringBuffer
buffer
=
new
StringBuffer
();
Set
set
=
parameters
.
entrySet
();
Iterator
iterator
=
set
.
iterator
();
while
(
iterator
.
hasNext
()){
Map
.
Entry
entry
=
(
Map
.
Entry
)
iterator
.
next
();
String
key
=
(
String
)
entry
.
getKey
();
Object
value
=
(
String
)
entry
.
getValue
();
if
(
null
!=
value
&&
!
""
.
equals
(
value
)
&&
!
"sign"
.
equals
(
key
)
&&
!
"key"
.
equals
(
key
)){
buffer
.
append
(
key
);
buffer
.
append
(
"="
);
buffer
.
append
(
value
);
}
}
buffer
.
append
(
APIKEY
);
String
sign
=
MD5Utils
.
md5
(
buffer
.
toString
()).
toUpperCase
();
System
.
out
.
println
(
"签名参数:"
+
sign
);
return
sign
;
}
}
src/main/java/com/thinkgem/jeesite/modules/pay/juhezhong/utils/Bean2Map.java
View file @
1e875c5e
package
com
.
thinkgem
.
jeesite
.
modules
.
pay
.
juhezhong
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
java.lang.reflect.Method
;
import
java.util.*
;
...
...
@@ -100,4 +102,17 @@ public class Bean2Map {
}
return
map
;
}
public
static
SortedMap
JSONObject2SortedMap
(
JSONObject
thisObj
)
{
Set
<
String
>
set
=
thisObj
.
keySet
();
//得到所有title
Iterator
it
=
set
.
iterator
();
SortedMap
map
=
new
TreeMap
();
while
(
it
.
hasNext
())
{
String
key
=
it
.
next
().
toString
();
Object
vlaue
=
thisObj
.
get
(
key
);
map
.
put
(
key
,
vlaue
);
}
return
map
;
}
}
src/main/java/com/thinkgem/jeesite/modules/pay/service/PayApiService.java
View file @
1e875c5e
...
...
@@ -13,6 +13,7 @@ import com.thinkgem.jeesite.modules.pay.entity.BenefitEntity;
import
com.thinkgem.jeesite.modules.pay.entity.OrderEntity
;
import
com.thinkgem.jeesite.modules.pay.entity.RateEntity
;
import
com.thinkgem.jeesite.modules.pay.entity.UserRateEntity
;
import
com.thinkgem.jeesite.modules.pay.huanqiuhuiju.service.HuanqiuhuijuService
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.dto.ApiQuickPayDto
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.dto.MerchantDto
;
import
com.thinkgem.jeesite.modules.pay.juhezhong.dto.PayBackDto
;
...
...
@@ -59,6 +60,9 @@ public class PayApiService {
@Autowired
private
JuHeZhongPayJFenService
juHeZhongPayJFenService
;
@Autowired
private
HuanqiuhuijuService
huanqiuhuijuService
;
@Transactional
(
readOnly
=
false
)
public
PayBackDto
quickPay
(
JuHeZhongPayRequest
request
)
throws
MyException
,
Exception
{
if
(
ComCode
.
PAYCHANNEL_HL2
.
equals
(
request
.
getPayChannel
())){
...
...
@@ -120,6 +124,22 @@ public class PayApiService {
payBackDto
=
this
.
quickPayJuHeZhongIntegralPay
(
userEntity
,
orderEntity
,
request
,
cardEntityPay
);
}
}
else
if
(
ComCode
.
PAYCHANNEL_HUANQIUHUIJU
.
equals
(
request
.
getPayChannel
())){
OrderEntity
orderEntity
=
new
OrderEntity
(
code
,
request
.
getSubMerchantCode
(),
payNo
,
payCode
,
"quick"
,
request
.
getPayChannel
(),
"1"
,
amount
,
request
.
getSubject
(),
""
,
String
.
valueOf
(
"D"
.
equalsIgnoreCase
(
userEntity
.
getUserDetail
().
getCard
().
getCardType
())
?
5
:
(
"C"
.
equalsIgnoreCase
(
userEntity
.
getUserDetail
().
getCard
().
getCardType
())
?
6
:
0
)),
request
.
getCardCode
());
payDao
.
saveOrderInfo
(
orderEntity
);
// 3. 创建分润信息,并保存
Map
<
String
,
String
>
userBenefits
=
getUserBenefit
(
userEntity
,
request
);
for
(
String
key
:
userBenefits
.
keySet
())
{
String
benefitCode
=
IdGen
.
randomBase62
(
64
);
BenefitEntity
benefitEntity
=
new
BenefitEntity
(
benefitCode
,
request
.
getSubMerchantCode
(),
code
,
request
.
getPayChannel
(),
"0"
,
"A"
,
userBenefits
.
get
(
key
),
""
);
benefitEntity
.
setAmount
(
String
.
valueOf
(
Double
.
valueOf
(
benefitEntity
.
getAmount
())));
payDao
.
saveBenefitInfo
(
benefitEntity
);
}
// 获取支付卡号
CardEntity
cardEntityPay
=
userService
.
getCardInfo
(
request
);
payBackDto
=
this
.
huanqiuhujuPay
(
userEntity
,
orderEntity
,
request
,
cardEntityPay
);
}
else
{
OrderEntity
orderEntity
=
new
OrderEntity
(
code
,
request
.
getSubMerchantCode
(),
payNo
,
payCode
,
"quick"
,
ComCode
.
PAYCHANNEL_HL3
,
"1"
,
amount
,
request
.
getSubject
(),
""
,
String
.
valueOf
(
"D"
.
equalsIgnoreCase
(
userEntity
.
getUserDetail
().
getCard
().
getCardType
())
?
5
:
(
"C"
.
equalsIgnoreCase
(
userEntity
.
getUserDetail
().
getCard
().
getCardType
())
?
6
:
0
)),
request
.
getCardCode
());
payDao
.
saveOrderInfo
(
orderEntity
);
...
...
@@ -147,6 +167,8 @@ public class PayApiService {
return
payBackDto
;
}
/*
* 以下为类内使用方法
*/
...
...
@@ -336,7 +358,11 @@ public class PayApiService {
}
// HL2 通道 即JFEN 开卡 需要得参数
/**
* HL2 通道 即JFEN 开卡 需要得参数
* @param request
* @return
*/
public
Response
openCardJFen
(
UserRequest
request
){
Response
response
=
new
Response
();
...
...
@@ -563,6 +589,66 @@ public class PayApiService {
}
/**
* huanqiuhuiju 快捷支付
* @param request
* @return
*/
public
PayBackDto
huanqiuhujuPay
(
UserEntity
userEntity
,
OrderEntity
orderEntity
,
JuHeZhongPayRequest
request
,
CardEntity
cardEntity
)
throws
Exception
{
PayBackDto
payBackDto
=
new
PayBackDto
();
JSONObject
dto
=
new
JSONObject
();
String
orderId
=
IdGen
.
randomBase62
(
32
);
RateEntity
rateEntity
=
new
RateEntity
();
rateEntity
.
setUserLevel
(
userEntity
.
getLevel
());
rateEntity
.
setPayMethod
(
"quick"
);
rateEntity
.
setPayChannel
(
ComCode
.
PAYCHANNEL_HUANQIUHUIJU
);
rateEntity
=
userService
.
getRateByLevel
(
rateEntity
);
dto
.
put
(
"transcode"
,
"300"
);
// 交易码
dto
.
put
(
"version"
,
"0100"
);
// 版本号
dto
.
put
(
"ordersn"
,
MakeOrderNum
.
makeOrderNum
());
// 流水号 每次交易都唯一
dto
.
put
(
"merchno"
,
ComCode
.
HUANQIUHUIJU_MERCHANT_ID
);
// 商户号
dto
.
put
(
"dsorderid"
,
orderId
);
// 订单号 唯一
dto
.
put
(
"txnAmt"
,
request
.
getAmount
());
// 交易金额
dto
.
put
(
"txnRate"
,
rateEntity
.
getRate
());
// 费率
dto
.
put
(
"siglePrice"
,
rateEntity
.
getSiglePrice
()
);
// 单笔价格
dto
.
put
(
"merchno"
,
ComCode
.
HUANQIUHUIJU_MERCHANT_ID
);
// 商户号
dto
.
put
(
"realName"
,
userEntity
.
getUserDetail
().
getRealName
());
// 真实姓名
dto
.
put
(
"idCardNo"
,
userEntity
.
getUserDetail
().
getIdCard
());
// 身份证号
dto
.
put
(
"bankCardNo"
,
cardEntity
.
getCardNo
());
// 银行卡号
dto
.
put
(
"bankCode"
,
cardEntity
.
getBelongBank
());
// 银行代码
dto
.
put
(
"bankName"
,
cardEntity
.
getBankName
());
// 消费卡银行名称
dto
.
put
(
"phone"
,
cardEntity
.
getCardMobile
());
// 手机号
dto
.
put
(
"cvn2"
,
request
.
getCvn2
());
dto
.
put
(
"expireDate"
,
request
.
getExpireDate
());
dto
.
put
(
"notifyUrl"
,
Global
.
getConfig
(
"project.access.url"
)+
"/api/pay/notifyHuanqiuhuijuPay"
);
dto
.
put
(
"settleBankCode"
,
userEntity
.
getUserDetail
().
getCard
().
getBelongBank
());
// 结算银行代码
dto
.
put
(
"settleCardNo"
,
userEntity
.
getUserDetail
().
getCard
().
getCardNo
());
// 结算银行卡
dto
.
put
(
"settlePhone"
,
userEntity
.
getUserDetail
().
getCard
().
getCardMobile
());
// 结算手机号
dto
.
put
(
"settleCardBankName"
,
userEntity
.
getUserDetail
().
getCard
().
getBankName
());
// 结算卡银行名称
System
.
out
.
println
(
dto
.
toJSONString
());
JSONObject
jsonObject
=
huanqiuhuijuService
.
huanqiuhuijuPay
(
dto
);
if
(
"0000"
.
equals
(
jsonObject
.
get
(
"returncode"
))){
payBackDto
.
setIsUrl
(
"0"
);
payBackDto
.
setPayChannel
(
ComCode
.
PAYCHANNEL_HUANQIUHUIJU
);
this
.
notifyPay
(
orderEntity
);
return
payBackDto
;
}
else
{
orderEntity
.
setPayStatus
(
"4"
);
payDao
.
updateOrderStatus
(
orderEntity
);
BenefitEntity
benefitEntity
=
new
BenefitEntity
();
benefitEntity
.
setOrderCode
(
orderEntity
.
getPayCode
());
benefitEntity
.
setDelFlag
(
"1"
);
payDao
.
deleteBenefit
(
benefitEntity
);
throw
new
MyException
(
jsonObject
.
getString
(
"errtext"
));
}
}
/**
* 回调
* @param orderEntity
...
...
@@ -589,6 +675,10 @@ public class PayApiService {
dto
.
setMerchantId
(
ComCode
.
JFEN_MERCHANT_ID
);
dto
.
setMerchantKey
(
ComCode
.
JFEN_MERCHANT_KEY
);
jsonObject
=
juHeZhongPayService
.
query
(
dto
);
}
else
if
(
ComCode
.
PAYCHANNEL_HUANQIUHUIJU
.
equals
(
orderEntity
.
getPayChannel
())){
orderEntity
.
setPayStatus
(
"2"
);
payDao
.
updateOrderStatus
(
orderEntity
);
return
orderEntity
;
}
System
.
out
.
println
(
"查询订单返回结果:"
+
jsonObject
.
toJSONString
());
...
...
src/main/java/com/thinkgem/jeesite/modules/user/bean/JuHeZhongPayRequest.java
View file @
1e875c5e
...
...
@@ -12,6 +12,10 @@ public class JuHeZhongPayRequest extends Request {
private
String
payNo
;
// 订单号
private
String
cvn2
;
// 安全吗
private
String
expireDate
;
// 过期时间
public
String
getAmount
()
{
return
amount
;
}
...
...
@@ -67,4 +71,20 @@ public class JuHeZhongPayRequest extends Request {
public
void
setPayNo
(
String
payNo
)
{
this
.
payNo
=
payNo
;
}
public
String
getCvn2
()
{
return
cvn2
;
}
public
void
setCvn2
(
String
cvn2
)
{
this
.
cvn2
=
cvn2
;
}
public
String
getExpireDate
()
{
return
expireDate
;
}
public
void
setExpireDate
(
String
expireDate
)
{
this
.
expireDate
=
expireDate
;
}
}
src/main/resources/mappings/modules/user/UserDao.xml
View file @
1e875c5e
...
...
@@ -475,6 +475,7 @@
yr.rate,
yr.rate_type,
yr.balance,
yr.sigle_price,
yr.single_limit AS singleLimit,
yr.day_limit AS dayLimit,
yr.create_date AS created,
...
...
src/main/resources/youka.properties
View file @
1e875c5e
...
...
@@ -126,6 +126,12 @@ pay.jfen.merchant_id = 100532502198424
pay.jfen.merchant.key
=
260a7539-6a2b-410d-aeec-9897ccee92a1
pay.jfen.merchant.secret
=
9ad18861-24b3-4904-a2c3-c4401f6f60f3
## HUANQIUHUIJU 快捷支付
huanqiuhuiju.merchant.id
=
201804161813258
huanqiuhuiju.merchant.key
=
c7dadd0a
## 短信相关
message.username
=
710047
message.password
=
HY1034ZY
...
...
@@ -140,4 +146,5 @@ weixin.appsecret = libo13821934497libo1382193449700
## 支付宝相关
alipay.appid
=
2018041002530242
alipay.private.key
=
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC3hFTccWmIFkIQzitDdGTgWKgbs1S2NZutDlUCdiWrXSV+aAvQDqpLXJb7CQ1iSY3CJ4rPbBs7GFZj1rZ1T722Xj1QiFJRTgSSaUe9gejDFOIBpyoG0gT7gZsFrdcYHCzJcA3L9LUWt9XLLH34couARVGY8FUa1GXVUierMms4JnJ1I+Eos4jBmTpLFpZb6brsfuGOzk501KWk+mVXhdEf47MoT6i0ujebf22rdWqQz4ukS7eRbRfvoh0g5wEt14NQHXFLgSAqPN+ZDpKQ8H9Cz0Mj37iN0SA31j3S/Cl0zyPL9n+bWSJdE2MDge8nC7joR4Nxbqirlp3qJ7YOtMghAgMBAAECggEAXG9JFygA0cz0Reayn+1WijHdquYu+wARg58+blj4LFJkekEKAigA2qiuW495sFIAFxU3s7ZuGNvvV6ZkjL43fk4FcDTZ0Z4Ma3qf6fIvPWOdWtvKLVlHrS7g2IFxX/GBFY1dRafiNqkuBIJKiQOZBGjl6rTTCQqGqGYTGQXyP3syu72Nc1p7cq2a4H4Ux+vAC0OxYuCeL12wR5qf1PJ0O+h/syr7+WY7sez5ae36e82C6iQfl3RNqAQyuiqADhUFa/IoKhb1IklddKZZkiU0wsNeLsqkklNSXgejlPKom5MLyRloSyEqARvXBTfAXPn0IkQ9eYNLh1k2MOh5SfqKyQKBgQDum0+irr4T0gpYJ51YzJIjEBn5bUOo0Q0vYb0jRQ0y0lfmAqSTV4RdlasMf8Ny3DZvO1C4nTQ0/Mv2HDJTtLUAC/VntEiKdgS0Dj0iyqTqWXYtTsA1zKr+7RgjPdOC3P7y6lbV+xfmnjHKGFIGKPaxeNVQe72bbLrg5QTMYw0A1wKBgQDE5PqXl6lvEFbNDyHIXOnfXyox1Q881fTZKavKOel6kGP1Qn82BrEC/BF+8ZkGCe/HHuzuFPcw7sInV13xBEVOegcHximXmiR5S8j/SfkTFtrKttMkaZPoW64RrNNsnPckhLTymTefpXX4JQj/ZkNtfg3VO2O9VKkJy74X417HxwKBgBPNYfOPawj8Eo20Y/OdrrcoO++eaNIW33BCPU8zCOBh4pedOolb5wlZRYPZCqB6tC3RD2by7QVEwaygNHEL+0WQuIItzSNongVPdTVw+fTVDeC+u2b7oGldxfYOyIIA00vXtPM3Tol+MYWjNRN7zNV3wMRYMKk4gd3uQ9KumcKrAoGBAIDbAgz3mlEvNj9ZKdjAxeYDl8+pCiHcPDNrDBx6rgwiNuiprisjUfEMGj8jyeuj0SJVYOWnHucNOk8Y5Ef5bYogXj1+OHYY0Mn5CP/Z34HYsTN9Vs07syqb5V13553rU+q4Vtt13mtCk+PkCPFscbBUkKT+CxY7M61Pg4aKrNq9AoGATMAwhGqTdcXvBb1XV5ScbP+UIkqLbib8eYDJRIMlCGGqDMbOoBQQ9joJFtZjV2sL0QwF7qaxtjLs+VVnZkVYHRtn25frtb7teLRuJB7rW9905zqGtCx730uSCX8PuyPS98cV0KnuVCIZZMQbLNVb2M/u/ENJYqSVAETy+xAs7hQ=
alipay.public.key
=
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg3CAeybKvbk7slUC6wCZiqGKgZwwcL4vvlztKO52xqTnHcsxhC+ogrtg5x59+3T4fKqOs38vC8faEbGbCUqr68hrjXkE0ZuPWygrp3jTUC9vkw+d+Fk18xsoRqac3b7OeNVLbCN9Nq2rAzVqLrNeQFWjpZbXFpPcvSLH3rv4U3ljhjvFnEGOpxu8vdpc/AGwZ+R2GX3yH1W85iWcO3GAEC3raTRq3RRgsKC3WZTq85Vxl70K0FfLKDjNTOQVnEwfYS9wTl4zDTBObxAfQEdH03fXJTkpLwAKlsiJiPRsfyoJMFA6nVCfKhjJwXia99MT1kGHVRyPu/JpaXepme2orwIDAQAB
\ No newline at end of file
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