Skip to content

分账接口增加amount、description参数#3794

Closed
jarcms wants to merge 1 commit intobinarywang:developfrom
jarcms:develop
Closed

分账接口增加amount、description参数#3794
jarcms wants to merge 1 commit intobinarywang:developfrom
jarcms:develop

Conversation

@jarcms
Copy link
Contributor

@jarcms jarcms commented Dec 5, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

此 PR 为微信支付分账接收方请求对象(ProfitSharingReceiverV3Request)添加了两个新字段:amount(分账金额)和 description(分账描述)。这些字段用于 V3 版本的分账接收方添加/删除接口。

主要变更:

  • 添加 amount 字段:Integer 类型,用于指定分账金额(单位:分)
  • 添加 description 字段:String 类型,用于描述分账原因
  • 添加了一些空行以改善代码格式

Comment on lines +93 to 114
/**
* <pre>
* 字段名:分账金额
* 是否必填:是
* 描述:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额。调整最大分账比例:特约商户登录商户平台,进入以下页面:产品中心-授权的产品-分账授权
* </pre>
*/
@SerializedName("amount")
private Integer amount;

/**
* <pre>
* 字段名:分账描述
* 是否必填:是
* 描述:分账的原因描述,会在查询分账结果接口和分账账单中原样返回
* </pre>
*/
@SerializedName("description")
private String description;

/**
* <pre>
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加的 amountdescription 字段可能不适用于分账接收方管理接口。

根据微信支付分账业务逻辑:

  • ProfitSharingReceiverV3Request 用于 /v3/profitsharing/receivers/add/v3/profitsharing/receivers/delete 接口,目的是管理分账接收方白名单(添加/删除哪些账户可以接收分账)
  • amount(分账金额)和 description(分账描述)应该属于实际执行分账操作时的参数,已经存在于 ProfitSharingV3Request.Receiver 类中(用于 /v3/profitsharing/orders 接口)

添加接收方时通常只需要指定接收方的身份信息(type、account、name、relation_type 等),而不需要指定具体的分账金额和描述。这些参数应该在每次实际分账请求时动态指定。

建议:

  1. 核实微信支付官方文档 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter8_1_8.shtml 是否真的要求在添加接收方时提供这些字段
  2. 如果文档未要求,应将这两个字段移除,保持 API 设计的准确性
Suggested change
/**
* <pre>
* 字段名分账金额
* 是否必填
* 描述分账金额单位为分只能为整数不能超过原订单支付金额及最大分账比例金额调整最大分账比例特约商户登录商户平台进入以下页面产品中心-授权的产品-分账授权
* </pre>
*/
@SerializedName("amount")
private Integer amount;
/**
* <pre>
* 字段名分账描述
* 是否必填
* 描述分账的原因描述会在查询分账结果接口和分账账单中原样返回
* </pre>
*/
@SerializedName("description")
private String description;
/**
* <pre>
/**
* <pre>

Copilot uses AI. Check for mistakes.
@jarcms jarcms closed this Dec 5, 2025
@binarywang binarywang added this to the 4.8.0 milestone Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

商家分账接口参数缺失amount

3 participants