views.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:dj-paypal 作者: HearthSim 项目源码 文件源码
def post(self, request):
        if "HTTP_PAYPAL_TRANSMISSION_ID" not in request.META:
            # Do not even attempt to process/store the event if there is
            # no paypal transmission id so we avoid overfilling the db.
            return HttpResponseBadRequest()

        trigger = WebhookEventTrigger.from_request(request)

        if trigger.exception:
            # An exception happened, return 500
            return HttpResponseServerError()

        if not trigger.valid:
            # Webhook Event did not validate, return 400
            return HttpResponseBadRequest()

        return HttpResponse(str(trigger.id))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号