{"action":"created","comment":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/comments/81442342","pull_request_review_id":2424985,"id":81442342,"diff_hunk":"@@ -33,22 +30,23 @@ def description\n       payment.payment_method.name\n     end\n \n-    private\n-\n     # attempts to perform the refund.\n     # raises an error if the refund fails.\n     def perform!\n       return true if transaction_id.present?\n \n       credit_cents = Spree::Money.new(amount.to_f, currency: payment.currency).money.cents\n \n-      @response = process!(credit_cents)\n+      response = process!(credit_cents)\n+      log_entries.create!(details: response.to_yaml)\n \n-      self.transaction_id = @response.authorization\n+      self.transaction_id = response.authorization","path":"core/app/models/spree/refund.rb","position":28,"original_position":28,"commit_id":"d3a714080a650f3440ae9ff9af6665a6ca241e87","original_commit_id":"d3a714080a650f3440ae9ff9af6665a6ca241e87","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"body":"Now that this isn't invoked via a callback we can just do `update!(transaction_id: response.authorization)` right? (And remove the following `update_columns` line)","created_at":"2016-10-01T03:01:22Z","updated_at":"2016-10-01T03:02:10Z","html_url":"https://github.com/solidusio/solidus/pull/1415#discussion_r81442342","pull_request_url":"https://api.github.com/repos/solidusio/solidus/pulls/1415","_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments/81442342"},"html":{"href":"https://github.com/solidusio/solidus/pull/1415#discussion_r81442342"},"pull_request":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1415"}}},"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/1415","id":83846241,"html_url":"https://github.com/solidusio/solidus/pull/1415","diff_url":"https://github.com/solidusio/solidus/pull/1415.diff","patch_url":"https://github.com/solidusio/solidus/pull/1415.patch","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/1415","number":1415,"state":"open","locked":false,"title":"Remove callbacks from refund model","user":{"login":"swively","id":16531632,"avatar_url":"https://avatars.githubusercontent.com/u/16531632?v=3","gravatar_id":"","url":"https://api.github.com/users/swively","html_url":"https://github.com/swively","followers_url":"https://api.github.com/users/swively/followers","following_url":"https://api.github.com/users/swively/following{/other_user}","gists_url":"https://api.github.com/users/swively/gists{/gist_id}","starred_url":"https://api.github.com/users/swively/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swively/subscriptions","organizations_url":"https://api.github.com/users/swively/orgs","repos_url":"https://api.github.com/users/swively/repos","events_url":"https://api.github.com/users/swively/events{/privacy}","received_events_url":"https://api.github.com/users/swively/received_events","type":"User","site_admin":false},"body":"This PR removes two `after_create` callbacks from the refund model; refunds may now be created without automatically performing the transaction. As such, the `perform!` method is now part of the public API.\r\n\r\n- `perform!` method is explicitly called from `reimbursement_helpers.rb`\r\n- `create_log_entry` is called during the transaction","created_at":"2016-09-02T18:36:16Z","updated_at":"2016-10-01T03:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"381555161dba54c011c44b8faf0fbed59f1843d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/solidusio/solidus/pulls/1415/commits","review_comments_url":"https://api.github.com/repos/solidusio/solidus/pulls/1415/comments","review_comment_url":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/1415/comments","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/d3a714080a650f3440ae9ff9af6665a6ca241e87","head":{"label":"swively:refund_callback","ref":"refund_callback","sha":"d3a714080a650f3440ae9ff9af6665a6ca241e87","user":{"login":"swively","id":16531632,"avatar_url":"https://avatars.githubusercontent.com/u/16531632?v=3","gravatar_id":"","url":"https://api.github.com/users/swively","html_url":"https://github.com/swively","followers_url":"https://api.github.com/users/swively/followers","following_url":"https://api.github.com/users/swively/following{/other_user}","gists_url":"https://api.github.com/users/swively/gists{/gist_id}","starred_url":"https://api.github.com/users/swively/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swively/subscriptions","organizations_url":"https://api.github.com/users/swively/orgs","repos_url":"https://api.github.com/users/swively/repos","events_url":"https://api.github.com/users/swively/events{/privacy}","received_events_url":"https://api.github.com/users/swively/received_events","type":"User","site_admin":false},"repo":{"id":67245084,"name":"solidus","full_name":"swively/solidus","owner":{"login":"swively","id":16531632,"avatar_url":"https://avatars.githubusercontent.com/u/16531632?v=3","gravatar_id":"","url":"https://api.github.com/users/swively","html_url":"https://github.com/swively","followers_url":"https://api.github.com/users/swively/followers","following_url":"https://api.github.com/users/swively/following{/other_user}","gists_url":"https://api.github.com/users/swively/gists{/gist_id}","starred_url":"https://api.github.com/users/swively/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swively/subscriptions","organizations_url":"https://api.github.com/users/swively/orgs","repos_url":"https://api.github.com/users/swively/repos","events_url":"https://api.github.com/users/swively/events{/privacy}","received_events_url":"https://api.github.com/users/swively/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swively/solidus","description":"Solidus, Rails eCommerce System","fork":true,"url":"https://api.github.com/repos/swively/solidus","forks_url":"https://api.github.com/repos/swively/solidus/forks","keys_url":"https://api.github.com/repos/swively/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swively/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swively/solidus/teams","hooks_url":"https://api.github.com/repos/swively/solidus/hooks","issue_events_url":"https://api.github.com/repos/swively/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/swively/solidus/events","assignees_url":"https://api.github.com/repos/swively/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/swively/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/swively/solidus/tags","blobs_url":"https://api.github.com/repos/swively/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swively/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swively/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/swively/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swively/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/swively/solidus/languages","stargazers_url":"https://api.github.com/repos/swively/solidus/stargazers","contributors_url":"https://api.github.com/repos/swively/solidus/contributors","subscribers_url":"https://api.github.com/repos/swively/solidus/subscribers","subscription_url":"https://api.github.com/repos/swively/solidus/subscription","commits_url":"https://api.github.com/repos/swively/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/swively/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/swively/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/swively/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/swively/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/swively/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swively/solidus/merges","archive_url":"https://api.github.com/repos/swively/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swively/solidus/downloads","issues_url":"https://api.github.com/repos/swively/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/swively/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/swively/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/swively/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swively/solidus/labels{/name}","releases_url":"https://api.github.com/repos/swively/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/swively/solidus/deployments","created_at":"2016-09-02T18:16:28Z","updated_at":"2016-09-02T18:16:33Z","pushed_at":"2016-09-23T22:29:52Z","git_url":"git://github.com/swively/solidus.git","ssh_url":"git@github.com:swively/solidus.git","clone_url":"https://github.com/swively/solidus.git","svn_url":"https://github.com/swively/solidus","homepage":"https://solidus.io/","size":64376,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solidusio:master","ref":"master","sha":"2ce184c7484656ec0df22a1f529033de1c22790c","user":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"repo":{"id":30985840,"name":"solidus","full_name":"solidusio/solidus","owner":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio/solidus","description":"Solidus, Rails eCommerce System","fork":false,"url":"https://api.github.com/repos/solidusio/solidus","forks_url":"https://api.github.com/repos/solidusio/solidus/forks","keys_url":"https://api.github.com/repos/solidusio/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio/solidus/teams","hooks_url":"https://api.github.com/repos/solidusio/solidus/hooks","issue_events_url":"https://api.github.com/repos/solidusio/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio/solidus/events","assignees_url":"https://api.github.com/repos/solidusio/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio/solidus/tags","blobs_url":"https://api.github.com/repos/solidusio/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio/solidus/languages","stargazers_url":"https://api.github.com/repos/solidusio/solidus/stargazers","contributors_url":"https://api.github.com/repos/solidusio/solidus/contributors","subscribers_url":"https://api.github.com/repos/solidusio/solidus/subscribers","subscription_url":"https://api.github.com/repos/solidusio/solidus/subscription","commits_url":"https://api.github.com/repos/solidusio/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio/solidus/merges","archive_url":"https://api.github.com/repos/solidusio/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio/solidus/downloads","issues_url":"https://api.github.com/repos/solidusio/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio/solidus/labels{/name}","releases_url":"https://api.github.com/repos/solidusio/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/solidusio/solidus/deployments","created_at":"2015-02-18T20:41:58Z","updated_at":"2016-09-30T15:20:05Z","pushed_at":"2016-10-01T02:05:14Z","git_url":"git://github.com/solidusio/solidus.git","ssh_url":"git@github.com:solidusio/solidus.git","clone_url":"https://github.com/solidusio/solidus.git","svn_url":"https://github.com/solidusio/solidus","homepage":"https://solidus.io/","size":71102,"stargazers_count":1096,"watchers_count":1096,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":338,"mirror_url":null,"open_issues_count":176,"forks":338,"open_issues":176,"watchers":1096,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1415"},"html":{"href":"https://github.com/solidusio/solidus/pull/1415"},"issue":{"href":"https://api.github.com/repos/solidusio/solidus/issues/1415"},"comments":{"href":"https://api.github.com/repos/solidusio/solidus/issues/1415/comments"},"review_comments":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1415/comments"},"review_comment":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1415/commits"},"statuses":{"href":"https://api.github.com/repos/solidusio/solidus/statuses/d3a714080a650f3440ae9ff9af6665a6ca241e87"}}}}
{"actor":{"display_login":"jordan-brough"}}