mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-17 21:56:28 +08:00
@@ -174,4 +174,16 @@ public interface EcommerceService {
|
||||
* @return 返回数据
|
||||
*/
|
||||
FundBalanceResult subDayEndBalance(String subMchid, String date) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 请求分账API
|
||||
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/profitsharing/chapter3_1.shtml
|
||||
* </pre>
|
||||
*
|
||||
* @param request 分账请求
|
||||
* @return 返回数据
|
||||
*/
|
||||
ProfitSharingResult profitSharing(ProfitSharingRequest request) throws WxPayException;
|
||||
|
||||
}
|
||||
|
||||
@@ -148,6 +148,13 @@ public class EcommerceServiceImpl implements EcommerceService {
|
||||
return GSON.fromJson(response, FundBalanceResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfitSharingResult profitSharing(ProfitSharingRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/ecommerce/profitsharing/orders", this.payService.getPayBaseUrl());
|
||||
String response = this.payService.postV3(url, GSON.toJson(request));
|
||||
return GSON.fromJson(response, ProfitSharingResult.class);
|
||||
}
|
||||
|
||||
private boolean verifyNotifySign(SignatureHeader header, String data) {
|
||||
String beforeSign = String.format("%s\n%s\n%s\n",
|
||||
header.getTimeStamp(),
|
||||
|
||||
Reference in New Issue
Block a user