{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/71","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/71/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/71/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/71","id":59298090,"number":71,"title":"TypeError creating a charge from a Future Payment authorization","user":{"login":"knightcode","id":1806693,"avatar_url":"https://avatars.githubusercontent.com/u/1806693?v=3","gravatar_id":"","url":"https://api.github.com/users/knightcode","html_url":"https://github.com/knightcode","followers_url":"https://api.github.com/users/knightcode/followers","following_url":"https://api.github.com/users/knightcode/following{/other_user}","gists_url":"https://api.github.com/users/knightcode/gists{/gist_id}","starred_url":"https://api.github.com/users/knightcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knightcode/subscriptions","organizations_url":"https://api.github.com/users/knightcode/orgs","repos_url":"https://api.github.com/users/knightcode/repos","events_url":"https://api.github.com/users/knightcode/events{/privacy}","received_events_url":"https://api.github.com/users/knightcode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-02-27T21:38:39Z","updated_at":"2015-03-09T17:28:20Z","closed_at":null,"body":"Having previously authorized a future payment and stored the refresh token in our DB, The following code is crashing the server (node.js) when payment information comes in from the iOS SDK. I've already ensured that all the data given to these objects is legit, and the `client_id` and `client_secret` were previously set by a call to `paypal.configure`.\r\n\r\n```\r\nppConf = {\r\n          mode = \"sandbox\",\r\n          correlation_id: payment.corrID,\r\n          refresh_token: paymentAuthID\r\n      };\r\ncharge = {\r\n          intent: \"sale\",\r\n          payer: {payment_method: \"paypal\"},\r\n          transactions: [{\r\n            amount: {currency: \"USD\", total: order.grandTotal / 100.0},\r\n            description: \"\"\r\n            }]\r\n      };\r\npaypal.payment.create(charge, ppConf, function (err, payment) {\r\n   ...\r\n}\r\n```\r\nThe exception:\r\n```\r\nTypeError: Cannot set property 'Paypal-Application-Correlation-Id' of undefined\r\n     at Object.executeHttp (....../node_modules/paypal-rest-sdk/lib/api.js:132:67)\r\n     at Object.create (..../node_modules/paypal-rest-sdk/lib/generate.js:27:13)\r\n```"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/comments/77901183","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/71#issuecomment-77901183","issue_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/71","id":77901183,"user":{"login":"knightcode","id":1806693,"avatar_url":"https://avatars.githubusercontent.com/u/1806693?v=3","gravatar_id":"","url":"https://api.github.com/users/knightcode","html_url":"https://github.com/knightcode","followers_url":"https://api.github.com/users/knightcode/followers","following_url":"https://api.github.com/users/knightcode/following{/other_user}","gists_url":"https://api.github.com/users/knightcode/gists{/gist_id}","starred_url":"https://api.github.com/users/knightcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knightcode/subscriptions","organizations_url":"https://api.github.com/users/knightcode/orgs","repos_url":"https://api.github.com/users/knightcode/repos","events_url":"https://api.github.com/users/knightcode/events{/privacy}","received_events_url":"https://api.github.com/users/knightcode/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T17:28:20Z","updated_at":"2015-03-09T17:28:20Z","body":"The error doesn't seem to conform to the documentation. This is what comes back:\r\n```\r\nobj\r\n|- httpStatusCode: 400\r\n|- response\r\n   |- httpStatusCode: 400\r\n   |- error: \"invalid_request\"\r\n   |- error_description: \"Invalid refresh token\"\r\n```\r\n"}}