Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1812b23
art:证书类配置读取优化调整
Aug 17, 2020
2b27ee9
new:电商收付通二级商户进件
Aug 17, 2020
a3ec261
Merge branch 'develop' into develop
binarywang Aug 18, 2020
cee3753
Merge remote-tracking branch 'wechat/develop' into develop
Aug 24, 2020
10e0ca5
art:微信服务商配置优化
Aug 24, 2020
5db9706
new:jsapi合单支付
Aug 24, 2020
e0d87eb
new:合单支付
Aug 26, 2020
84b9b99
Merge remote-tracking branch 'wechat/develop' into develop
Aug 30, 2020
541899a
Merge remote-tracking branch 'wechat/develop' into develop
Sep 4, 2020
9f60516
Merge remote-tracking branch 'wechat/develop' into develop
Sep 8, 2020
97409a7
new:电商收付通普通支付
Sep 8, 2020
f18c62b
new:电商收付通支付回调处理
Sep 10, 2020
b8d9a15
Merge remote-tracking branch 'wechat/develop' into develop
Sep 10, 2020
c8fc670
new:电商收付通支付回调处理
Sep 10, 2020
4f157b0
Merge remote-tracking branch 'wechat/develop' into develop
Sep 10, 2020
34f0d99
电商收付通支付调整
Sep 11, 2020
c2552de
Merge remote-tracking branch 'wechat/develop' into develop
Sep 11, 2020
3fbeec4
Merge remote-tracking branch 'wechat/develop' into develop
Sep 14, 2020
e56289f
Merge remote-tracking branch 'wechat/develop' into develop
Sep 15, 2020
60c63a5
fix:电商收付通回调通知测试
Sep 17, 2020
5b606fd
Merge remote-tracking branch 'wechat/develop' into develop
Sep 17, 2020
aa2fe98
Merge remote-tracking branch 'wechat/develop' into develop
Sep 20, 2020
9b20c74
new:电商收付通合单支付、普通支付查询
Sep 21, 2020
00bc965
new:电商收付通商户、平台提现
Sep 21, 2020
2037900
fix:命名统一调整
Sep 21, 2020
3b4bb74
Merge remote-tracking branch 'wechat/develop' into develop
Sep 22, 2020
58ac339
new:分账查询、退款通知
Sep 22, 2020
7df0e75
new:修改结算账户、退款查询
Sep 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
电商收付通支付调整
  • Loading branch information
曾浩
曾浩 committed Sep 11, 2020
commit 34f0d99df13fdd77391d8d3484159584a06b729e
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ public interface EcommerceService {
*/
ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo) throws WxPayException;

/**
* <pre>
* 合单支付API(APP支付、JSAPI支付、H5支付、NATIVE支付).
* 请求URL:https://api.mch.weixin.qq.com/v3/combine-transactions/jsapi
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/e-combine.shtml
* </pre>
*
* @param tradeType 支付方式
* @param request 请求对象
* @return 微信合单支付返回
*/
TransactionsResult combine(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException;

/**
* <pre>
* 合单支付API(APP支付、JSAPI支付、H5支付、NATIVE支付).
Expand All @@ -79,6 +92,18 @@ public interface EcommerceService {
*/
CombineTransactionsNotifyResult parseCombineNotifyResult(String notifyData, SignatureHeader header) throws WxPayException;

/**
* <pre>
* 服务商模式普通支付API(APP支付、JSAPI支付、H5支付、NATIVE支付).
* 请求URL:https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/transactions_sl.shtml
* </pre>
* @param tradeType 支付方式
* @param request 请求对象
* @return 调起支付需要的参数
*/
TransactionsResult partner(TradeTypeEnum tradeType, PartnerTransactionsRequest request) throws WxPayException;

/**
* <pre>
* 服务商模式普通支付API(APP支付、JSAPI支付、H5支付、NATIVE支付).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ public ApplymentsStatusResult queryApplyStatusByOutRequestNo(String outRequestNo
}

@Override
public <T> T combineTransactions(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException {
public TransactionsResult combine(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException {
String url = this.payService.getPayBaseUrl() + tradeType.getCombineUrl();
String response = this.payService.postV3(url, GSON.toJson(request));
TransactionsResult result = GSON.fromJson(response, TransactionsResult.class);
return GSON.fromJson(response, TransactionsResult.class);
}

@Override
public <T> T combineTransactions(TradeTypeEnum tradeType, CombineTransactionsRequest request) throws WxPayException {
TransactionsResult result = this.combine(tradeType, request);
return result.getPayInfo(tradeType, request.getCombineAppid(),
request.getCombineMchid(), payService.getConfig().getPrivateKey());
}
Expand All @@ -76,10 +81,15 @@ public CombineTransactionsNotifyResult parseCombineNotifyResult(String notifyDat
}

@Override
public <T> T partnerTransactions(TradeTypeEnum tradeType, PartnerTransactionsRequest request) throws WxPayException {
public TransactionsResult partner(TradeTypeEnum tradeType, PartnerTransactionsRequest request) throws WxPayException {
String url = this.payService.getPayBaseUrl() + tradeType.getPartnerUrl();
String response = this.payService.postV3(url, GSON.toJson(request));
TransactionsResult result = GSON.fromJson(response, TransactionsResult.class);
return GSON.fromJson(response, TransactionsResult.class);
}

@Override
public <T> T partnerTransactions(TradeTypeEnum tradeType, PartnerTransactionsRequest request) throws WxPayException {
TransactionsResult result = this.partner(tradeType, request);
return result.getPayInfo(tradeType, request.getSpAppid(),
request.getSpMchid(), payService.getConfig().getPrivateKey());
}
Expand Down