html52.com
我爱小程序-开发者交流社区

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:

            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数据,但是微信的服务器的推送是空的。空的数据如何解密XML呢?我是参考这个文档:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/component_verify_ticket.html

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

APPID: wx28e9aadd40524a4d

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

空的要怎么才能解密呢?



评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付