{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/256","labels_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/256/comments","events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/256/events","html_url":"https://github.com/guardian/subscriptions-frontend/pull/256","id":111633804,"number":256,"title":"Handle credit cards from the backend","user":{"login":"ostapneko","id":1781471,"avatar_url":"https://avatars.githubusercontent.com/u/1781471?v=3","gravatar_id":"","url":"https://api.github.com/users/ostapneko","html_url":"https://github.com/ostapneko","followers_url":"https://api.github.com/users/ostapneko/followers","following_url":"https://api.github.com/users/ostapneko/following{/other_user}","gists_url":"https://api.github.com/users/ostapneko/gists{/gist_id}","starred_url":"https://api.github.com/users/ostapneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostapneko/subscriptions","organizations_url":"https://api.github.com/users/ostapneko/orgs","repos_url":"https://api.github.com/users/ostapneko/repos","events_url":"https://api.github.com/users/ostapneko/events{/privacy}","received_events_url":"https://api.github.com/users/ostapneko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-15T14:51:34Z","updated_at":"2015-10-16T10:02:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/256","html_url":"https://github.com/guardian/subscriptions-frontend/pull/256","diff_url":"https://github.com/guardian/subscriptions-frontend/pull/256.diff","patch_url":"https://github.com/guardian/subscriptions-frontend/pull/256.patch"},"body":"This provides backend support for different payment methods.\r\nUpon form submission, in addition to the existing `payment.*` fields, it requires a `payment.type` field with two possible values: `credit-card` and `direct-debit`. In the former case, another field, `payment.token`, containing the Stripe token, is expected.\r\n\r\nNote that the backend code is *untested*; we will need to wait for the front-end to be ready before writing end-to-end tests.\r\n\r\n~~Also, note that the existing integration tests are broken right now on master, so we will need to wait for them to be fixed before being able to perform regression tests~~\r\n\r\n@joelochlann @afiore @rtyley "},"comment":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/comments/148673101","html_url":"https://github.com/guardian/subscriptions-frontend/pull/256#issuecomment-148673101","issue_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/256","id":148673101,"user":{"login":"afiore","id":63361,"avatar_url":"https://avatars.githubusercontent.com/u/63361?v=3","gravatar_id":"","url":"https://api.github.com/users/afiore","html_url":"https://github.com/afiore","followers_url":"https://api.github.com/users/afiore/followers","following_url":"https://api.github.com/users/afiore/following{/other_user}","gists_url":"https://api.github.com/users/afiore/gists{/gist_id}","starred_url":"https://api.github.com/users/afiore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiore/subscriptions","organizations_url":"https://api.github.com/users/afiore/orgs","repos_url":"https://api.github.com/users/afiore/repos","events_url":"https://api.github.com/users/afiore/events{/privacy}","received_events_url":"https://api.github.com/users/afiore/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T10:02:16Z","updated_at":"2015-10-16T10:02:16Z","body":"Overall :+1: and also agreed on the need of adding coverage for this in the end-to-end tests.\r\nWhile discussing the changes in this PR, we also discussed the possibility of moving the `PaymentData` trait and maybe some of its related form machinery into membership-commons."}}