{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/294","repository_url":"https://api.github.com/repos/paypal/PayPal-node-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/294/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/294/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/294","id":249055355,"number":294,"title":"Can't verify webhook sandbox events (not simulator) ","user":{"login":"trixyz","id":4889991,"avatar_url":"https://avatars1.githubusercontent.com/u/4889991?v=4","gravatar_id":"","url":"https://api.github.com/users/trixyz","html_url":"https://github.com/trixyz","followers_url":"https://api.github.com/users/trixyz/followers","following_url":"https://api.github.com/users/trixyz/following{/other_user}","gists_url":"https://api.github.com/users/trixyz/gists{/gist_id}","starred_url":"https://api.github.com/users/trixyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trixyz/subscriptions","organizations_url":"https://api.github.com/users/trixyz/orgs","repos_url":"https://api.github.com/users/trixyz/repos","events_url":"https://api.github.com/users/trixyz/events{/privacy}","received_events_url":"https://api.github.com/users/trixyz/received_events","type":"User","site_admin":false},"labels":[{"id":33431923,"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-09T14:44:32Z","updated_at":"2017-08-09T15:29:10Z","closed_at":null,"body":"### General information\r\n\r\n* SDK/Library version: 1.7.1\r\n* Environment: sandbox\r\n* `PayPal-Debug-ID` values: -\r\n* Language, language version, and OS: node 8.2.1, express \r\n\r\n### Issue description\r\ni'm using paypal.notification.webhookEvent.verify method and always got failure.\r\n\r\nhere is example of latest event:\r\n\r\nHeaders object i pass as headers arg:\r\n`{ host: '93.85.94.98',\r\n  connection: 'close',\r\n  'content-length': '1584',\r\n  accept: '*/*',\r\n  'paypal-transmission-id': '47a57790-7d0e-11e7-ac1e-6b62a8a99ac4',\r\n  'paypal-transmission-time': '2017-08-09T14:23:14Z',\r\n  'paypal-transmission-sig': 'ZA4VaHAn4/+/F0+RqlL+QjEbx50iLxCiNhdt1XfeBUwJtxCPU1OkDOPJF2vHq1QPuYF0XEk5TomrAlgkJc4+rbee8Vcm9CVftAQN2UGTYaRe3osGxFFFADgefNHXV/W8DkvE6xo3e30kqSASYfaqyxckjxUl2DnNFsX1mIHI8Z06O+s7PSXFN3sZbp4JyfJvRY+6uyT0VokNa7jCKNSBRhwoNq0vtL7L+VJ0jfPcUfY72JHb8HIhRaBwUwR89mB/ejPTriZQKVOWh2HrqikLvaQWm/eUEduE54RIIrgEf6/ruqYEEd2iTOL9CMZp5AqhkNrT0TIlSwHgJgGyv1wzXg==',\r\n  'paypal-auth-version': 'v2',\r\n  'paypal-cert-url': 'https://api.sandbox.paypal.com/v1/notifications/certs/CERT-360caa42-fca2a594-aecacc47',\r\n  'paypal-auth-algo': 'SHA256withRSA',\r\n  'content-type': 'application/json',\r\n  'user-agent': 'PayPal/AUHD-211.0-33754056',\r\n  'correlation-id': '3d92e1964b3f9' }`\r\n\r\nrequest body: \r\n`{\"id\":\"WH-5CK508006B546110N-3E048491YS948403K\",\"event_version\":\"1.0\",\"create_time\":\"2017-08-09T14:23:09.883Z\",\"resource_type\":\"invoices\",\"event_type\":\"INVOICING.INVOICE.PAID\",\"summary\":\"An invoice has been paid\",\"resource\":{\"invoice\":{\"id\":\"INV2-8D3A-CPGB-9BZV-FM6H\",\"number\":\"0064\",\"template_id\":\"TEMP-46M523821A2033342\",\"status\":\"PAYMENT_PENDING\",\"merchant_info\":{\"email\":\"support-facilitator@secondwarehouse.com\"},\"billing_info\":[{\"email\":\"support-buyer@secondwarehouse.com\"}],\"shipping_info\":{\"first_name\":\"dear customer\"},\"items\":[{\"name\":\"Commission fee for...\",\"quantity\":1.0,\"unit_price\":{\"currency\":\"EUR\",\"value\":\"15.00\"}}],\"invoice_date\":\"2017-08-09 PDT\",\"tax_calculated_after_discount\":false,\"tax_inclusive\":false,\"total_amount\":{\"currency\":\"EUR\",\"value\":\"15.00\"},\"payments\":[{\"type\":\"PAYPAL\",\"transaction_id\":\"59722583FG433445B\",\"transaction_type\":\"SALE\",\"method\":\"PAYPAL\",\"date\":\"2017-08-09 07:22:44 PDT\",\"amount\":{\"currency\":\"EUR\",\"value\":\"15.00\"}}],\"metadata\":{\"created_date\":\"2017-08-09 07:21:12 PDT\",\"last_updated_date\":\"2017-08-09 07:22:24 PDT\",\"first_sent_date\":\"2017-08-09 07:21:13 PDT\",\"last_sent_date\":\"2017-08-09 07:21:13 PDT\"},\"links\":[{\"rel\":\"self\",\"href\":\"https://api.sandbox.paypal.com/v1/invoicing/invoices/INV2-8D3A-CPGB-9BZV-FM6H\",\"method\":\"GET\"}]}},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-5CK508006B546110N-3E048491YS948403K\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-5CK508006B546110N-3E048491YS948403K/resend\",\"rel\":\"resend\",\"method\":\"POST\"}]}\r\n`\r\ni tried to pass them as object after body is parsed by bodyParser and also tried to pass simply as string read directly without bodyParser like:\r\n`req.on(\"data\", (chunk) => (rawData += chunk))`\r\n\r\nhere is my webhook id:\r\n`02U57613FJ0952018`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/comments/321290884","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/294#issuecomment-321290884","issue_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/294","id":321290884,"user":{"login":"pp-randy","id":6819909,"avatar_url":"https://avatars2.githubusercontent.com/u/6819909?v=4","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":"2017-08-09T15:29:10Z","updated_at":"2017-08-09T15:29:10Z","body":"Can you toss me the headers? "}}
{"actor":{"display_login":"pp-randy"}}