收藏
回答

component_verify_ticket请求已经收到,但是里面的数据是空的,请问哪里出了问题?

授权事件接收url: http://api.bytearts.cn/openplatform/verifyticket

APPID: wx28e9aadd40524a4d

能收到微信服务器POST请求,但是里面的数据是空的。但是里面的数据是空的。但是里面的数据是空的。

空的要怎么才能解密呢?


回答关注问题邀请回答
收藏

3 个回答

  • Jesuer
    Jesuer
    2021-01-26

    我也遇到这个情况,请问你解决了吗?我能收到推送,但是Post的数据是空的

    2021-01-26
    有用
    回复 1
    • BroChun
      BroChun
      2021-08-06
      解决了吗?我也是空的
      2021-08-06
      回复
  • 小程序服务商助手
    小程序服务商助手
    2020-12-21

    你好,经查询该第三方的ticket推送是正常的,内容已推送成功,收到推送之后请按照要求进行解密哈。https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Message_Encryption/Message_encryption_and_decryption.html

    2020-12-21
    有用
    回复
  • btn
    btn
    2020-12-21

    补充一下

    # 验证票据. https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/component_verify_ticket.html

    # 验证票据(component_verify_ticket),在第三方平台创建审核通过后,微信服务器会向其 ”授权事件接收URL” 每隔 10 分钟以 POST 的方式推送 component_verify_ticket

    def recvComponentVerifyTicket(request):

        if request.method == "GET":

            result = {"status": -1, "msg":"post only"}

            return HttpResponse(json.dumps(result, ensure_ascii=False), content_type="application/json, charset=utf-8")

        else:

            try:

                # 存储到数据库

                pass

                log = Log()

                log.LogWrite(request.POST)

                log.LogWrite("component_verify_ticket: " + str(request.POST))

                # 返回给微信服务器

                return HttpResponse("success")

            except Exception as e:

                result = {"status": -1, "msg": str(e)}

                return HttpResponse(json.dumps(result, ensure_ascii=False), content_type="application/json, charset=utf-8")

    上边是我这个接口的临时代码,postman是可以正常访问,并且在日志里可以看到自己的post数据,但是微信的服务器的推送是空的。

    2020-12-21
    有用
    回复 1
    • BroChun
      BroChun
      2021-08-06
      解决了吗?我也是空的
      2021-08-06
      回复
登录 后发表内容
问题标签