Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
变更内容
实现了微信商户转账的"免确认收款授权模式"功能,解决了issue中关于高频转账场景下用户体验优化的需求。
核心实现
在
TransferBillsRequest中新增了receiptAuthorizationMode字段,支持两种模式:CONFIRM_RECEIPT_AUTHORIZATION(默认):需确认收款授权模式,用户需手动确认才能收款NO_CONFIRM_RECEIPT_AUTHORIZATION:免确认收款授权模式,用户事先授权后转账直接到账类型安全 & 常量定义
新增
WxPayConstants.ReceiptAuthorizationMode常量类,提供编译时类型检查,防止无效的授权模式值。文档 & 示例增强
NewTransferApiExample.java,添加了完整的使用示例功能优势
适用高频场景:消除佣金发放、奖励、返现等场景中的用户确认步骤,显著提升转化率和用户体验。
完全兼容:现有代码无需修改即可继续运行,新字段为可选字段,默认使用传统的需确认模式。
生产就绪:所有变更已通过编译验证、代码风格检查和测试。
API参考
该功能遵循微信官方API规范,文档地址:https://pay.weixin.qq.com/doc/v3/merchant/4014399293
Fixes #3716
Fixes #3716
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.