{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/361","repository_url":"https://api.github.com/repos/paypal/PayPal-node-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/361/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/361/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/361/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/361","id":316855817,"number":361,"title":"500 error with Sandbox environment","user":{"login":"dadsquatch","id":19417626,"avatar_url":"https://avatars3.githubusercontent.com/u/19417626?v=4","gravatar_id":"","url":"https://api.github.com/users/dadsquatch","html_url":"https://github.com/dadsquatch","followers_url":"https://api.github.com/users/dadsquatch/followers","following_url":"https://api.github.com/users/dadsquatch/following{/other_user}","gists_url":"https://api.github.com/users/dadsquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/dadsquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadsquatch/subscriptions","organizations_url":"https://api.github.com/users/dadsquatch/orgs","repos_url":"https://api.github.com/users/dadsquatch/repos","events_url":"https://api.github.com/users/dadsquatch/events{/privacy}","received_events_url":"https://api.github.com/users/dadsquatch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-23T15:09:13Z","updated_at":"2018-04-25T12:18:28Z","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: 622b489eae543\r\n* Language, language version, and OS: Running locally through Node 6.11.3 and Express 4.16.3 \r\n\r\n### Issue description\r\n\r\nFollowing the readme samples to try and get this working.\r\n\r\nWhen I finally had my object pass all the Paypal validation steps on the object I was sending it, did I start receiving the 500 ISE. Here is the sample object I am passing in:\r\n\r\n```\r\n// All #### represent good values in my code\r\n\r\n// Scoped data from front end being passed to backend \r\n// Credit card details are generated within the sandbox environment\r\n$scope.sampleData = {\r\n      intent: \"sale\",\r\n      payer: {\r\n        payment_method: \"credit_card\",\r\n        funding_instruments: [\r\n          {\r\n            \"credit_card\":  { \r\n              number: \"###############\", \r\n              type: \"visa\",\r\n              expire_month: #,\r\n              expire_year:  ##,\r\n              cvv2: \"###\",\r\n              first_name: \"##\",\r\n              last_name: \"##\",\r\n              billing_address: {\r\n                line1: \"##\", \r\n                city: \"Oscoda\",\r\n                state: \"MI\",\r\n                postal_code: \"48750\",\r\n                country_code: \"US\"\r\n              }\r\n            }\r\n          }\r\n        ]\r\n      },\r\n      transactions: [\r\n        {\r\n          amount: {\r\n            total: \"1.06\",\r\n            currency: \"USD\",\r\n            details: {\r\n              subtotal: \"1.00\",\r\n              tax: \"0.06\",\r\n              shipping: \"0.00\"\r\n            }\r\n          },\r\n          invoice_number: \"123456\"\r\n        }\r\n      ]\r\n    }\r\n\r\n// Backend route for passing data to Paypal API\r\n\r\nconst paypal = require('paypal-rest-sdk');\r\n\r\nconst sandboxConfig = {\r\n  'mode': 'sandbox',\r\n  'client_id': '###########################',\r\n  'client_secret': '########################################'\r\n}\r\n\r\npaypal.configure(sandboxConfig);\r\n\r\n// Send an order to the API to process through paypal.\r\nexports.processPayment = (req, res) => {\r\n  paypal.payment.create(req.body, function (error, payment) {\r\n      if (error) {\r\n          res.send(error);\r\n      } else {\r\n          res.send(payment);\r\n      }\r\n  });\r\n}\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/comments/384266224","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/361#issuecomment-384266224","issue_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/361","id":384266224,"user":{"login":"dadsquatch","id":19417626,"avatar_url":"https://avatars3.githubusercontent.com/u/19417626?v=4","gravatar_id":"","url":"https://api.github.com/users/dadsquatch","html_url":"https://github.com/dadsquatch","followers_url":"https://api.github.com/users/dadsquatch/followers","following_url":"https://api.github.com/users/dadsquatch/following{/other_user}","gists_url":"https://api.github.com/users/dadsquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/dadsquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadsquatch/subscriptions","organizations_url":"https://api.github.com/users/dadsquatch/orgs","repos_url":"https://api.github.com/users/dadsquatch/repos","events_url":"https://api.github.com/users/dadsquatch/events{/privacy}","received_events_url":"https://api.github.com/users/dadsquatch/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T12:18:28Z","updated_at":"2018-04-25T12:18:28Z","author_association":"NONE","body":"Looks like you guys have this working again. Will keep an eye on it. Close this as well as my other open issue as my recent orders are reporting properly."}}
{"actor":{"display_login":"dadsquatch"}}