{"action":"created","issue":{"url":"https://api.github.com/repos/degica/active_merchant/issues/13","labels_url":"https://api.github.com/repos/degica/active_merchant/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/degica/active_merchant/issues/13/comments","events_url":"https://api.github.com/repos/degica/active_merchant/issues/13/events","html_url":"https://github.com/degica/active_merchant/pull/13","id":77504835,"number":13,"title":"Add capture method that always returns success.","user":{"login":"shioyama","id":561827,"avatar_url":"https://avatars.githubusercontent.com/u/561827?v=3","gravatar_id":"","url":"https://api.github.com/users/shioyama","html_url":"https://github.com/shioyama","followers_url":"https://api.github.com/users/shioyama/followers","following_url":"https://api.github.com/users/shioyama/following{/other_user}","gists_url":"https://api.github.com/users/shioyama/gists{/gist_id}","starred_url":"https://api.github.com/users/shioyama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shioyama/subscriptions","organizations_url":"https://api.github.com/users/shioyama/orgs","repos_url":"https://api.github.com/users/shioyama/repos","events_url":"https://api.github.com/users/shioyama/events{/privacy}","received_events_url":"https://api.github.com/users/shioyama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-18T05:15:43Z","updated_at":"2015-05-18T06:45:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/degica/active_merchant/pulls/13","html_url":"https://github.com/degica/active_merchant/pull/13","diff_url":"https://github.com/degica/active_merchant/pull/13.diff","patch_url":"https://github.com/degica/active_merchant/pull/13.patch"},"body":"When capturing payments, we use the `capture!` method which in the `Spree::Payment::Processing` module calls `capture` on the payment method:\r\n\r\nhttps://github.com/degica/spree/blob/47dbf70a8a9976c04749f58bd99b948b3bf32ef2/core/app/models/spree/payment/processing.rb#L44\r\n\r\nBy default, Spree delegates this `capture` method in `Spree::Gateway` to the (ActiveMerchant) provider:\r\n\r\nhttps://github.com/degica/spree/blob/47dbf70a8a9976c04749f58bd99b948b3bf32ef2/core/app/models/spree/gateway.rb#L3\r\n\r\nThe `GmoKonbini` gateway just stubs this method to always return a success response:\r\n\r\nhttps://github.com/komoju/active_merchant/blob/707799ed3fdb9ca062b6a99e0c24dbfa818d2c41/lib/active_merchant/billing/gateways/gmo_konbini.rb#L25\r\n\r\nWe could either add this `capture` method to the `Spree::Gateway::KomojuKonbini` class twice (one for each project) or add it here once; I opted for the latter."},"comment":{"url":"https://api.github.com/repos/degica/active_merchant/issues/comments/102938268","html_url":"https://github.com/degica/active_merchant/pull/13#issuecomment-102938268","issue_url":"https://api.github.com/repos/degica/active_merchant/issues/13","id":102938268,"user":{"login":"shioyama","id":561827,"avatar_url":"https://avatars.githubusercontent.com/u/561827?v=3","gravatar_id":"","url":"https://api.github.com/users/shioyama","html_url":"https://github.com/shioyama","followers_url":"https://api.github.com/users/shioyama/followers","following_url":"https://api.github.com/users/shioyama/following{/other_user}","gists_url":"https://api.github.com/users/shioyama/gists{/gist_id}","starred_url":"https://api.github.com/users/shioyama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shioyama/subscriptions","organizations_url":"https://api.github.com/users/shioyama/orgs","repos_url":"https://api.github.com/users/shioyama/repos","events_url":"https://api.github.com/users/shioyama/events{/privacy}","received_events_url":"https://api.github.com/users/shioyama/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T06:45:34Z","updated_at":"2015-05-18T06:45:34Z","body":"@k2nr thanks! Yes it is only for the degica fork, to get it working."}}