Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

必须指定待添加的分账接收方 判断错误 #2184

Open
4 of 8 tasks
houta-higuchi opened this issue May 29, 2020 · 4 comments
Open
4 of 8 tasks

必须指定待添加的分账接收方 判断错误 #2184

houta-higuchi opened this issue May 29, 2020 · 4 comments

Comments

@houta-higuchi
Copy link

此版块专为反馈 bug 及提交需求服务,不负责解答开发问题,请勿发表开发问题,
如果您需要这方面的帮助,请移步问答社区https://weixin.senparc.com/QA

问题描述
public TenpayV3ProfitShareingAddReceiverRequestData(
            string appId, string mchId, string subappid, string submchid, string key, string nonceStr,
            TenpayV3ProfitShareingAddReceiverRequestData_ReceiverInfo receiver
        ){
            Receiver = receiver;
            if (Receiver != null) throw new ArgumentNullException("必须指定待添加的分账接收方");
}

构造添加分账的实体类时,判断错误,导致无法调用构造函数

重现问题步骤(如果可以)

new TenpayV3ProfitShareingAddReceiverRequestData(a, b, c, d, e, f, g);

微信官方文档 URL
微信官方文档快照(直接复制关键内容到下方)
发现问题的模块
  • Senparc.Weixin.Tenpay 版本:1.5.402
模块对应的 .net 版本
  • .net core 3.x
开发环境
  • Visual Studio 2019
缓存环境
  • 服务器内存缓存(默认)
  • Redis 版本:
  • Memcached 版本:
  • 其他:
系统环境
  • Windows,版本:
联系方式

Email:13066216860@163.com

(也可将问题地址及联系方式发送到 www.jeffrey.su@gmail.com)

发布问题后,请保持对 issue 的关注,有时会有需要进一步沟通的信息,很长时间内没有得到答复的 issue 将被关闭。

@fanheshe
Copy link

分账方法修复了
但是以下
TenpayV3ProfitShareingAddReceiverRequestData
TenpayV3ProfitShareingRemoveReceiverRequestData
也存在bug
if (Receiver != null) throw new ArgumentNullException("必须指定待添加的分账接收方");
坐等修复1.5.502.3

@fanheshe
Copy link

fanheshe commented May 29, 2020

添加接收人方法我用如下方式改了以下
var ShareingData = new TenpayV3ProfitShareingAddReceiverRequestData(
TenPayV3Info.AppId,
TenPayV3Info.MchId,
TenPayV3Info.Sub_AppId,
TenPayV3Info.Sub_MchId,
TenPayV3Info.Key,
nonceStr,
null
);
ShareingData.Receiver = receiverInfo;
ShareingData.PackageRequestHandler.SetParameter("receiver", JsonConvert.SerializeObject(receiverInfo));
ShareingData.PackageRequestHandler.SetParameter("sign", ShareingData.PackageRequestHandler.CreateSha256Sign("key", TenPayV3Info.Key)); //签名

@JeffreySu
Copy link
Owner

分账方法修复了
但是以下
TenpayV3ProfitShareingAddReceiverRequestData
TenpayV3ProfitShareingRemoveReceiverRequestData
也存在bug
if (Receiver != null) throw new ArgumentNullException("必须指定待添加的分账接收方");
坐等修复1.5.502.3

已经发布 v1.5.502.3 感谢!

JeffreySu added a commit that referenced this issue Jun 1, 2020
v1.5.502.3 fix bug:必须指定待分账的接收方列表 判断有误 #2184 感谢 @houta-higuchi  @fanheshe
@JeffreySu
Copy link
Owner

添加接收人方法我用如下方式改了以下
var ShareingData = new TenpayV3ProfitShareingAddReceiverRequestData(
TenPayV3Info.AppId,
TenPayV3Info.MchId,
TenPayV3Info.Sub_AppId,
TenPayV3Info.Sub_MchId,
TenPayV3Info.Key,
nonceStr,
null
);
ShareingData.Receiver = receiverInfo;
ShareingData.PackageRequestHandler.SetParameter("receiver", JsonConvert.SerializeObject(receiverInfo));
ShareingData.PackageRequestHandler.SetParameter("sign", ShareingData.PackageRequestHandler.CreateSha256Sign("key", TenPayV3Info.Key)); //签名

这是要说明什么问题?

JeffreySu added a commit that referenced this issue Jun 1, 2020
Sample v5.404.1 使用新版本 TenPay 感谢 @houta-higuchi @fanheshe #2184
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

No branches or pull requests

3 participants