{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/431","repository_url":"https://api.github.com/repos/paypal/PayPal-node-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/431/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/431/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/431/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/431","id":470858419,"node_id":"MDU6SXNzdWU0NzA4NTg0MTk=","number":431,"title":"Error 500- paypal.billingPlan.get","user":{"login":"JasminDreasond","id":24939144,"node_id":"MDQ6VXNlcjI0OTM5MTQ0","avatar_url":"https://avatars3.githubusercontent.com/u/24939144?v=4","gravatar_id":"","url":"https://api.github.com/users/JasminDreasond","html_url":"https://github.com/JasminDreasond","followers_url":"https://api.github.com/users/JasminDreasond/followers","following_url":"https://api.github.com/users/JasminDreasond/following{/other_user}","gists_url":"https://api.github.com/users/JasminDreasond/gists{/gist_id}","starred_url":"https://api.github.com/users/JasminDreasond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasminDreasond/subscriptions","organizations_url":"https://api.github.com/users/JasminDreasond/orgs","repos_url":"https://api.github.com/users/JasminDreasond/repos","events_url":"https://api.github.com/users/JasminDreasond/events{/privacy}","received_events_url":"https://api.github.com/users/JasminDreasond/received_events","type":"User","site_admin":false},"labels":[{"id":1507725362,"node_id":"MDU6TGFiZWwxNTA3NzI1MzYy","url":"https://api.github.com/repos/paypal/PayPal-node-SDK/labels/sdk-support","name":"sdk-support","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-07-22T02:04:32Z","updated_at":"2019-10-16T09:52:09Z","closed_at":null,"author_association":"NONE","body":"<!-- ** General notice: if you have an API issue, see our [REST API issues](https://github.com/paypal/PayPal-REST-API-issues) repository, or contact [PayPal Tech Support](https://developer.paypal.com/support/). ** -->\r\n### General information\r\n\r\n* SDK/Library version: 1.8.1\r\n* Environment: Sandbox\r\n* `PayPal-Debug-ID` values: 8aa0631a61be7\r\n* Language, language version, and OS: Nodejs, Windows 10\r\n\r\n### Issue description\r\n\r\nThe callback return a error 500.\r\n\r\n```js\r\nvar fs = require('fs');\r\nvar http = require('http');\r\nvar https = require('https');\r\nvar privateKey  = fs.readFileSync('server.key', 'utf8');\r\nvar certificate = fs.readFileSync('server.crt', 'utf8');\r\n\r\nvar credentials = {key: privateKey, cert: certificate};\r\nvar express = require('express');\r\nvar app = express();\r\nvar bodyParser = require('body-parser');\r\nvar paypal = require('paypal-rest-sdk');\r\n\r\napp.use(bodyParser.json());       // to support JSON-encoded bodies\r\napp.use(bodyParser.urlencoded({     // to support URL-encoded bodies\r\n    extended: true\r\n}));\r\n\r\npaypal.configure(HIDDEN);\r\n\r\napp.post('*', function (req, res) {\r\n\r\n    console.log(req.body);\r\n    paypal.notification.webhookEvent.getAndVerify(JSON.stringify(req.body), (error, response) => {\r\n        if(response === true || response === \"true\") {\r\n            console.log(req.body.resource.plan_id);\r\n            paypal.billingPlan.get(req.body.resource.plan_id, function (error, billingPlan) {\r\n                if (!error) {\r\n                    console.log(\"Get Billing Plan\");\r\n                    console.log(billingPlan);\r\n\r\n\r\n                    if(req.body.event_type === \"BILLING.SUBSCRIPTION.CREATED\"){\r\n\r\n                    }\r\n\r\n\r\n\r\n                } else {\r\n                    console.error(error);\r\n                }\r\n            });\r\n        }\r\n        res.end();\r\n    });\r\n\r\n});\r\n\r\n// your express configuration here\r\n\r\nvar httpServer = http.createServer(app);\r\nvar httpsServer = https.createServer(credentials, app);\r\n\r\nhttpServer.listen(80);\r\nhttpsServer.listen(8443);\r\n\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/comments/542623440","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/431#issuecomment-542623440","issue_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/431","id":542623440,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MjYyMzQ0MA==","user":{"login":"sucithrashanu","id":11882622,"node_id":"MDQ6VXNlcjExODgyNjIy","avatar_url":"https://avatars3.githubusercontent.com/u/11882622?v=4","gravatar_id":"","url":"https://api.github.com/users/sucithrashanu","html_url":"https://github.com/sucithrashanu","followers_url":"https://api.github.com/users/sucithrashanu/followers","following_url":"https://api.github.com/users/sucithrashanu/following{/other_user}","gists_url":"https://api.github.com/users/sucithrashanu/gists{/gist_id}","starred_url":"https://api.github.com/users/sucithrashanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sucithrashanu/subscriptions","organizations_url":"https://api.github.com/users/sucithrashanu/orgs","repos_url":"https://api.github.com/users/sucithrashanu/repos","events_url":"https://api.github.com/users/sucithrashanu/events{/privacy}","received_events_url":"https://api.github.com/users/sucithrashanu/received_events","type":"User","site_admin":false},"created_at":"2019-10-16T09:52:09Z","updated_at":"2019-10-16T09:52:09Z","author_association":"NONE","body":"@JasminDreasond \r\nIf you are still facing this issue.Please provide latest PayPal-Debug-ID.\r\nThanks"}}
{"actor":{"display_login":"sucithrashanu"}}