{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/183","repository_url":"https://api.github.com/repos/paypal/PayPal-node-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/183/comments","events_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/183/events","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/183","id":175169908,"number":183,"title":"MALFORMED_REQUEST error is not informative","user":{"login":"wzup","id":3880497,"avatar_url":"https://avatars2.githubusercontent.com/u/3880497?v=3","gravatar_id":"","url":"https://api.github.com/users/wzup","html_url":"https://github.com/wzup","followers_url":"https://api.github.com/users/wzup/followers","following_url":"https://api.github.com/users/wzup/following{/other_user}","gists_url":"https://api.github.com/users/wzup/gists{/gist_id}","starred_url":"https://api.github.com/users/wzup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzup/subscriptions","organizations_url":"https://api.github.com/users/wzup/orgs","repos_url":"https://api.github.com/users/wzup/repos","events_url":"https://api.github.com/users/wzup/events{/privacy}","received_events_url":"https://api.github.com/users/wzup/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":true,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-06T06:30:33Z","updated_at":"2017-06-26T17:42:53Z","closed_at":"2016-09-07T14:06:43Z","body":"What error message is this? How can I know what is \"MALFORMED\" in my JSON?\n\n```\n { \n     name: 'MALFORMED_REQUEST',\n     message: 'Incoming JSON request does not map to API request',\n     information_link: 'https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST',\n```\n\nI have huge `payment_json` config and I want to know exactly what fields are \"MALFORMED\". Tell me what fields are \"MALFORMED\" here. How can I know it from your error message?\n\n```\n { intent: 'sale',\n  payer:\n   { payment_method: 'paypal',\n     payer_info:\n      { salutation: 'Hi there! This is a salutation string.',\n        first_name: 'John',\n        last_name: 'Doe' } },\n  transactions:\n   [ { reference_id: 'Foo Services',\n       amount: { currency: 'USD', total: '100' },\n       description: 'Description of what is being paid for.',\n       note_to_payee: 'Note to the recipient of the funds in this transaction.',\n       custom: 'free-form field for the use of clients.',\n       invoice_number: 'invoice number to track this payment.',\n       payment_options: { allowed_payment_method: 'IMMEDIATE_PAY' },\n       item_list:\n        { items:\n           [ { sku: 'fooItem',\n               name: 'Foo Item Name',\n               description: 'Foo Item description',\n               quantity: '1',\n               price: 20,\n               currency: 'USD',\n               url: 'http://example.com:3000/buy/foo' } ] },\n       notify_url: 'http://example.com:3000/notify_url',\n       order_url: 'http://example.com:3000/buy/foo' } ],\n  note_to_payer: 'free-form field for the use of clients to pass in a message to the payer.',\n  redirect_urls:\n   { return_url: 'http://example.com:3000/complete_payment',\n     cancel_url: 'http://example.com:3000/cancel_payment' } }\n```\n\nPlease do us a favour, create human readable, understandable error message! \n"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/comments/311130518","html_url":"https://github.com/paypal/PayPal-node-SDK/issues/183#issuecomment-311130518","issue_url":"https://api.github.com/repos/paypal/PayPal-node-SDK/issues/183","id":311130518,"user":{"login":"xiaoleih41","id":1178879,"avatar_url":"https://avatars0.githubusercontent.com/u/1178879?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaoleih41","html_url":"https://github.com/xiaoleih41","followers_url":"https://api.github.com/users/xiaoleih41/followers","following_url":"https://api.github.com/users/xiaoleih41/following{/other_user}","gists_url":"https://api.github.com/users/xiaoleih41/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoleih41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoleih41/subscriptions","organizations_url":"https://api.github.com/users/xiaoleih41/orgs","repos_url":"https://api.github.com/users/xiaoleih41/repos","events_url":"https://api.github.com/users/xiaoleih41/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoleih41/received_events","type":"User","site_admin":false},"created_at":"2017-06-26T17:42:39Z","updated_at":"2017-06-26T17:42:39Z","body":"@Shadowstep33  You are correct, this is not a SDK issue but the API issue. Unfortunately we cannot make it more specific when it comes to this error. If you can submit a new issue with your code under [REST API issue repository](https://github.com/paypal/PayPal-REST-API-issues/issues), we can try to look into this for you. I am locking this thread as the original issue was solved. "}}
{"actor":{"display_login":"xiaoleih41"}}