mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-28 12:37:55 +08:00
🆕 #2664 【微信支付】电商收付通(分账)增加查询订单剩余待分金额的接口
This commit is contained in:
@ -0,0 +1,36 @@
|
|||||||
|
package com.github.binarywang.wxpay.bean.ecommerce;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单剩余待分金额API 请求对象
|
||||||
|
*
|
||||||
|
* @author mshyh
|
||||||
|
* @date 2022/05/26
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ProfitSharingOrdersUnSplitAmountRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 字段名:微信订单号
|
||||||
|
* 变量名:transaction_id
|
||||||
|
* 是否必填:是
|
||||||
|
* 类型:string[1, 32]
|
||||||
|
* 描述:微信支付订单号
|
||||||
|
* 示例值:4208450740201411110007820472
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SerializedName(value = "transaction_id")
|
||||||
|
private String transactionId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.github.binarywang.wxpay.bean.ecommerce;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单剩余待分金额API 结果响应
|
||||||
|
*
|
||||||
|
* @author mshyh
|
||||||
|
* @date 2022/05/26
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ProfitSharingOrdersUnSplitAmountResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 字段名:微信支付订单号
|
||||||
|
* 变量名:transaction_id
|
||||||
|
* 是否必填:是
|
||||||
|
* 类型:string[1,32]
|
||||||
|
* 描述:微信支付订单号。
|
||||||
|
* 示例值:4208450740201411110007820472
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SerializedName(value = "transaction_id")
|
||||||
|
private String transactionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 字段名:订单剩余待分金额
|
||||||
|
* 变量名:unsplit_amount
|
||||||
|
* 是否必填:是
|
||||||
|
* 类型:int
|
||||||
|
* 描述:订单剩余待分金额,整数,单位为分。
|
||||||
|
* 示例值:1000
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SerializedName(value = "unsplit_amount")
|
||||||
|
private Integer unsplitAmount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -252,6 +252,18 @@ public interface EcommerceService {
|
|||||||
*/
|
*/
|
||||||
ProfitSharingResult queryProfitSharing(ProfitSharingQueryRequest request) throws WxPayException;
|
ProfitSharingResult queryProfitSharing(ProfitSharingQueryRequest request) throws WxPayException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 查询订单剩余待分金额API
|
||||||
|
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_4_9.shtml
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @param request 查询订单剩余待分金额请求
|
||||||
|
* @return 返回数据 profit sharing UnSplitAmount result
|
||||||
|
* @throws WxPayException the wx pay exception
|
||||||
|
*/
|
||||||
|
ProfitSharingOrdersUnSplitAmountResult queryProfitSharingOrdersUnsplitAmount(ProfitSharingOrdersUnSplitAmountRequest request) throws WxPayException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 添加分账接收方API
|
* 添加分账接收方API
|
||||||
|
|||||||
@ -200,6 +200,14 @@ public class EcommerceServiceImpl implements EcommerceService {
|
|||||||
return GSON.fromJson(response, ProfitSharingResult.class);
|
return GSON.fromJson(response, ProfitSharingResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProfitSharingOrdersUnSplitAmountResult queryProfitSharingOrdersUnsplitAmount(ProfitSharingOrdersUnSplitAmountRequest request) throws WxPayException {
|
||||||
|
String url = String.format("%s/v3/ecommerce/profitsharing/orders/%s/amounts",
|
||||||
|
this.payService.getPayBaseUrl(), request.getTransactionId());
|
||||||
|
String response = this.payService.getV3(url);
|
||||||
|
return GSON.fromJson(response, ProfitSharingOrdersUnSplitAmountResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProfitSharingReceiverResult addReceivers(ProfitSharingReceiverRequest request) throws WxPayException {
|
public ProfitSharingReceiverResult addReceivers(ProfitSharingReceiverRequest request) throws WxPayException {
|
||||||
String url = String.format("%s/v3/ecommerce/profitsharing/receivers/add", this.payService.getPayBaseUrl());
|
String url = String.format("%s/v3/ecommerce/profitsharing/receivers/add", this.payService.getPayBaseUrl());
|
||||||
|
|||||||
Reference in New Issue
Block a user