{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/175","repository_url":"https://api.github.com/repos/paypal/PayPal-Python-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/175/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/175/events","html_url":"https://github.com/paypal/PayPal-Python-SDK/issues/175","id":190826114,"number":175,"title":"Webhook verification always fails.","user":{"login":"kaste","id":8558,"avatar_url":"https://avatars.githubusercontent.com/u/8558?v=3","gravatar_id":"","url":"https://api.github.com/users/kaste","html_url":"https://github.com/kaste","followers_url":"https://api.github.com/users/kaste/followers","following_url":"https://api.github.com/users/kaste/following{/other_user}","gists_url":"https://api.github.com/users/kaste/gists{/gist_id}","starred_url":"https://api.github.com/users/kaste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaste/subscriptions","organizations_url":"https://api.github.com/users/kaste/orgs","repos_url":"https://api.github.com/users/kaste/repos","events_url":"https://api.github.com/users/kaste/events{/privacy}","received_events_url":"https://api.github.com/users/kaste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-21T20:24:51Z","updated_at":"2016-11-22T15:49:40Z","closed_at":null,"body":"### General Information\r\n\r\n- Mode (Sandbox/Live): sandbox\r\n- PayPal-Debug-ID(s) (from any logs):\r\n- Version of Python used: 2.7.11\r\n- SDK Version: \r\n\r\n### Issue Description\r\n\r\nI'm trying to verify a webhook event using the REST API https://developer.paypal.com/docs/api/webhooks/#verify-webhook-signature\r\n\r\nFollowing naive python code (using Flask)\r\n\r\n```\r\n@app.route('/paypal_receipt', methods=['POST'])\r\ndef ack_receipt():\r\n    payload = {\r\n        'auth_algo': request.headers['PAYPAL-AUTH-ALGO'],\r\n        'cert_url': request.headers['PAYPAL-CERT-URL'],\r\n        'transmission_id': request.headers['PAYPAL-TRANSMISSION-ID'],\r\n        'transmission_sig': request.headers['PAYPAL-TRANSMISSION-SIG'],\r\n        'transmission_time': request.headers['PAYPAL-TRANSMISSION-TIME'],\r\n        'webhook_id': \"5L518819FA0214926\",\r\n        'webhook_event': request.json\r\n    }\r\n\r\n    rv = paypal.post('/v1/notifications/verify-webhook-signature', payload)\r\n\r\n    logger.info('response:: %s' % rv)\r\n    try:\r\n        verification_status = rv['verification_status']\r\n    except KeyError:\r\n        abort(400)\r\n\r\n    if verification_status != 'SUCCESS':\r\n        logger.info('Verification failed')\r\n        abort(401)\r\n\r\n    queue.task(handle_receipt, request.json).enqueue()\r\n\r\n    return 'Ok', 200\r\n\r\n```\r\nUnfortunately `verification_status` is always `FAILURE`. What am I doing wrong here?"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/comments/262277760","html_url":"https://github.com/paypal/PayPal-Python-SDK/issues/175#issuecomment-262277760","issue_url":"https://api.github.com/repos/paypal/PayPal-Python-SDK/issues/175","id":262277760,"user":{"login":"pp-randy","id":6819909,"avatar_url":"https://avatars.githubusercontent.com/u/6819909?v=3","gravatar_id":"","url":"https://api.github.com/users/pp-randy","html_url":"https://github.com/pp-randy","followers_url":"https://api.github.com/users/pp-randy/followers","following_url":"https://api.github.com/users/pp-randy/following{/other_user}","gists_url":"https://api.github.com/users/pp-randy/gists{/gist_id}","starred_url":"https://api.github.com/users/pp-randy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pp-randy/subscriptions","organizations_url":"https://api.github.com/users/pp-randy/orgs","repos_url":"https://api.github.com/users/pp-randy/repos","events_url":"https://api.github.com/users/pp-randy/events{/privacy}","received_events_url":"https://api.github.com/users/pp-randy/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T15:49:40Z","updated_at":"2016-11-22T15:49:40Z","body":"Are you verifying a Sandbox or Live generated webhook?  I am aware of issues trying to verify webhooks from the simulator. "}}
{"actor":{"display_login":"pp-randy"}}