Skip to content
#

weixin-sdk

Here are 60 public repositories matching this topic...

微信公众平台SDK Senparc.Weixin for C#,支持.NET Framework及.NET Core。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#.

  • Updated Jun 19, 2020
  • C#
observerss
observerss commented Nov 1, 2017

重现步骤 (Reproducing)

wx = WeChatClient(appid, appsecret)
wx.material.add('image', '中文图片.jpg')

问题实质

问题的实质是微信服务器端在解析multipart时不支持rfc2231格式的编码,而requests包发送的正是这种格式。

在文件名是中文时,比如"中文.jpg",

  • requests请求的数据是 filename*=utf-8''%E4%B8%AD%E6%96%87.jpg
  • 而curl请求的数据是 filename="\\344\\270\\255\\346\\226\\207.jpg"

Workaround

我暂时的workaround是monkey patch编码部分

最新最全微信支付集成SDK,一行代码调用微信支付,包含基础支付功能(网页授权、各种签名、统一下单、退款、对账单、用户信息获取)、验收用例指引(沙箱支付、支付验收、免充值产品开通)、商户平台(现金红包、企业付款到用户、代金券或立减优惠)、公众平台(微信卡券、社交立减金活动)、小程序(生成永久二维码、发送模版消息)等等更多丰富接口注释和例子。

  • Updated Apr 1, 2019
  • Java

Improve this page

Add a description, image, and links to the weixin-sdk topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the weixin-sdk topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.