{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/34","repository_url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/34/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/34/events","html_url":"https://github.com/paypal/PayPal-Ruby-SDK/issues/34","id":40861417,"number":34,"title":"500 error when creating a Paypal payment","user":{"login":"bilby91","id":2201079,"avatar_url":"https://avatars.githubusercontent.com/u/2201079?v=3","gravatar_id":"","url":"https://api.github.com/users/bilby91","html_url":"https://github.com/bilby91","followers_url":"https://api.github.com/users/bilby91/followers","following_url":"https://api.github.com/users/bilby91/following{/other_user}","gists_url":"https://api.github.com/users/bilby91/gists{/gist_id}","starred_url":"https://api.github.com/users/bilby91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilby91/subscriptions","organizations_url":"https://api.github.com/users/bilby91/orgs","repos_url":"https://api.github.com/users/bilby91/repos","events_url":"https://api.github.com/users/bilby91/events{/privacy}","received_events_url":"https://api.github.com/users/bilby91/received_events","type":"User","site_admin":false},"labels":[{"id":99059360,"url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/labels/api-bug","name":"api-bug","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":35,"created_at":"2014-08-21T23:29:29Z","updated_at":"2016-11-06T16:27:58Z","closed_at":"2014-09-18T14:55:45Z","body":"I'm trying to create a paypal payment and always get a 500 response from paypal in sandbox mode.\n\nThis is my code: \n\n```\nPayPal::SDK.configure( mode: 'sandbox',\n                      client_id: 'XXXX',\n                      client_secret: 'XXX',\n                      ssl_options: {} )\np = PayPal::SDK::REST::DataTypes::Payment.new( {\n  intent: 'sale',\n  payer: {\n    payment_method: 'paypal',\n    transactions: [ {\n      amount: {\n        total: 1.1,\n        currency: 'USD'\n      }\n    } ]\n  },\n  redirect_urls: {\n    return_url: 'http://localhost',\n    cancel_url: 'http://localhost'\n  }\n})\n\np.create\n```\n\nThe error looks something like this:\n\n```\nI, [2014-08-21T20:21:46.325710 #1569]  INFO -- : Request[post]: https://api.sandbox.paypal.com/v1/oauth2/token\nI, [2014-08-21T20:21:49.156803 #1569]  INFO -- : Response[200]: OK, Duration: 2.831s\nI, [2014-08-21T20:21:49.170133 #1569]  INFO -- : PayPal-Request-Id: XXXXXXXX\nI, [2014-08-21T20:21:49.170219 #1569]  INFO -- : Request[post]: https://api.sandbox.paypal.com/v1/payments/payment\nI, [2014-08-21T20:21:50.689819 #1569]  INFO -- : Response[500]: Internal Server Error, Duration: 1.520s\nPayPal::SDK::Core::Exceptions::ServerError: Failed.  Response code = 500.  Response message = Internal Server Error.  Response debug ID = f2cb266f13c33.\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/util/http_helper.rb:138:in `handle_response'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/api/rest.rb:110:in `handle_response'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/util/http_helper.rb:72:in `http_call'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/api/base.rb:84:in `api_call'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/api/rest.rb:95:in `api_call'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/paypal-sdk-core-0.3.0/lib/paypal-sdk/core/api/base.rb:96:in `post'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/bundler/gems/rest-api-sdk-ruby-e6f7b5ad7fa2/lib/paypal-sdk/rest/data_types.rb:66:in `create'\n    from (irb):3\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/console.rb:90:in `start'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/console.rb:9:in `start'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:69:in `console'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'\n    from /Users/bilby91/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands.rb:17:in `<top (required)>'\n    from bin/rails:4:in `require'\n    from bin/rails:4:in `<main>'\n```\n"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/comments/258692024","html_url":"https://github.com/paypal/PayPal-Ruby-SDK/issues/34#issuecomment-258692024","issue_url":"https://api.github.com/repos/paypal/PayPal-Ruby-SDK/issues/34","id":258692024,"user":{"login":"nilocoelhojunior","id":1450196,"avatar_url":"https://avatars.githubusercontent.com/u/1450196?v=3","gravatar_id":"","url":"https://api.github.com/users/nilocoelhojunior","html_url":"https://github.com/nilocoelhojunior","followers_url":"https://api.github.com/users/nilocoelhojunior/followers","following_url":"https://api.github.com/users/nilocoelhojunior/following{/other_user}","gists_url":"https://api.github.com/users/nilocoelhojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/nilocoelhojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilocoelhojunior/subscriptions","organizations_url":"https://api.github.com/users/nilocoelhojunior/orgs","repos_url":"https://api.github.com/users/nilocoelhojunior/repos","events_url":"https://api.github.com/users/nilocoelhojunior/events{/privacy}","received_events_url":"https://api.github.com/users/nilocoelhojunior/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T16:27:58Z","updated_at":"2016-11-06T16:27:58Z","body":"I'm having the same problem. I'm usign the [https://github.com/paypal/PayPal-Java-SDK](https://github.com/paypal/PayPal-Java-SDK)\r\n\r\nI'm posting:\r\n\r\n```json\r\n{\r\n  \"intent\": \"sale\",\r\n  \"payer\": {\r\n    \"payment_method\": \"paypal\"\r\n  },\r\n  \"transactions\": [\r\n    {\r\n      \"amount\": {\r\n        \"currency\": \"USD\",\r\n        \"total\": \"62.18\",\r\n        \"details\": {\r\n          \"shipping\": \"43.50\",\r\n          \"subtotal\": \"16.36\",\r\n          \"tax\": \"2.32\"\r\n        }\r\n      },\r\n      \"item_list\": {\r\n        \"items\": [\r\n          {\r\n            \"name\": \"Serviço\",\r\n            \"quantity\": \"1\",\r\n            \"price\": \"8\",\r\n            \"currency\": \"USD\"\r\n          },\r\n          {\r\n            \"name\": \"253\",\r\n            \"quantity\": \"1\",\r\n            \"price\": \"8.36\",\r\n            \"currency\": \"USD\"\r\n          }\r\n        ]\r\n      }\r\n    }\r\n  ],\r\n  \"redirect_urls\": {\r\n    \"return_url\": \"http://localhost:9000\",\r\n    \"cancel_url\": \"http://localhost:9000\"\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"nilocoelhojunior"}}