{"action":"created","issue":{"url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/13","labels_url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/13/comments","events_url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/13/events","html_url":"https://github.com/spree-contrib/better_spree_paypal_express/issues/13","id":17430080,"number":13,"title":"API endpoints","user":{"login":"radar","id":2687,"avatar_url":"https://avatars.githubusercontent.com/u/2687?v=3","gravatar_id":"","url":"https://api.github.com/users/radar","html_url":"https://github.com/radar","followers_url":"https://api.github.com/users/radar/followers","following_url":"https://api.github.com/users/radar/following{/other_user}","gists_url":"https://api.github.com/users/radar/gists{/gist_id}","starred_url":"https://api.github.com/users/radar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radar/subscriptions","organizations_url":"https://api.github.com/users/radar/orgs","repos_url":"https://api.github.com/users/radar/repos","events_url":"https://api.github.com/users/radar/events{/privacy}","received_events_url":"https://api.github.com/users/radar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-07-31T01:20:45Z","updated_at":"2015-04-23T15:09:33Z","closed_at":null,"body":"If a user selects the PayPal Express payment method, there is currently no way for them to proceed through the checkout process if they're doing it through Spree's API component. (see [this thread](https://groups.google.com/forum/#!topic/spree-user/nXYWZW8PQls) for an example of that)\r\n\r\nTherefore I propose that we add an API controller to this extension which serves up two endpoints:\r\n\r\n* `/orders/:number/paypal/start` - Same as `Spree::PaypalController#express`\r\n* `/orders/:number/paypal/confirm` - Same as `Spree::PaypalController#confirm`\r\n\r\nWith the code for the API + frontend controllers being identical, I think we should move that logic out of the controllers and into a service object of sorts. \r\n"},"comment":{"url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/comments/95619651","html_url":"https://github.com/spree-contrib/better_spree_paypal_express/issues/13#issuecomment-95619651","issue_url":"https://api.github.com/repos/spree-contrib/better_spree_paypal_express/issues/13","id":95619651,"user":{"login":"williscool","id":394931,"avatar_url":"https://avatars.githubusercontent.com/u/394931?v=3","gravatar_id":"","url":"https://api.github.com/users/williscool","html_url":"https://github.com/williscool","followers_url":"https://api.github.com/users/williscool/followers","following_url":"https://api.github.com/users/williscool/following{/other_user}","gists_url":"https://api.github.com/users/williscool/gists{/gist_id}","starred_url":"https://api.github.com/users/williscool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williscool/subscriptions","organizations_url":"https://api.github.com/users/williscool/orgs","repos_url":"https://api.github.com/users/williscool/repos","events_url":"https://api.github.com/users/williscool/events{/privacy}","received_events_url":"https://api.github.com/users/williscool/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T15:09:33Z","updated_at":"2015-04-23T15:09:33Z","body":"Looks like Im going to have to build this. Working on an ember app that communicates with spree via the api "}}