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

Update README.md #88

Merged
merged 4 commits into from
Dec 28, 2021
Merged

Update README.md #88

merged 4 commits into from
Dec 28, 2021

Conversation

xiaokang-chen
Copy link
Contributor

根据:

  1. 上一次commit
  2. 微信支付开电子发票业务中回调通知接收之后还需要继续向微信支付发送服务请求
    认为:
  3. 先前的方法二更适合作为推荐方法(仅接收回调通知获取内容的情况-大多数场景)
  4. 方法二更适合作为像开电子发票这种接收到回调后,解密内容后,拿到内容明文中的某些字段使用client继续发送服务请求的场景
    进而对先前的commit进行了描述修改并将两个方法顺序按照使用场景的频次重新排序(因ZC说WithWechatPayAutoAuthCipher专门用来初始化Client的,所以就不考虑option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key)作为不初始化client的推荐方法了)

根据:
1. 上一次commit
2. 微信支付开电子发票业务中回调通知接收之后还需要继续向微信支付发送服务请求
认为:
1. 先前的方法二更适合作为推荐方法(仅接收回调通知获取内容的情况-大多数场景)
2. 方法二更适合作为像开电子发票这种接收到回调后,解密内容后,拿到内容明文中的某些字段使用client继续发送服务请求的场景
进而对先前的commit进行了描述修改并将两个方法顺序按照使用场景的频次重新排序(因ZC说WithWechatPayAutoAuthCipher专门用来初始化Client的,所以就不考虑option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key)作为不初始化client的推荐方法了)
Copy link
Contributor

@EmmetZC EmmetZC left a comment

Choose a reason for hiding this comment

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

嗯,你的说法有道理。许多回调处理服务往往是和请求服务是分开的。

优先介绍独立初始化notify.Handler的方案更合理。

感谢你的提议。

@xy-peng
Copy link
Contributor

xy-peng commented Nov 26, 2021

考虑了一下,我建议按商户开发者的使用场景来组织这部分内容

  1. 独立的回调服务:再细分使用注册下载器或者本地证书
  2. 已有client的服务中:直接用平台证书下载器

这样开发者能对号入座,而不是看完123再考虑如何选择

@xy-peng xy-peng self-requested a review November 26, 2021 06:32
@xy-peng xy-peng merged commit c1d7c3b into wechatpay-apiv3:main Dec 28, 2021
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.

3 participants