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.
当前
WxPayCodepayRequest类仅支持直连商户模式,缺少服务商模式支持,服务商模式需要sub_mch_id参数。在服务商模式下使用付款码支付接口时,用户会遇到以下错误:本PR所做的更改:
为
WxPayCodepayRequest添加服务商模式字段:sp_appid- 服务商应用IDsp_mchid- 服务商商户号sub_appid- 子商户应用IDsub_mchid- 子商户号(解决问题的关键字段)更新服务实现以支持两种模式:
sp_appid、sp_mchid或sub_mchid中的任意一个时,自动检测为服务商模式/v3/pay/partner/transactions/codepay/v3/pay/transactions/codepayWxPayConfig填充缺失的字段向后兼容性
本实现保持向后兼容性 - 现有的直连商户模式用法保持不变。服务商模式的使用示例:
修复 #3676。
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.