GitHub PullRequestReviewCommentEvent at 2014-04-02 18:27:15
Repository: allout-platform
Actor: gustin
Payload: {"comment":{"url":"https://api.github.com/repos/purposefoundation/allout-platform/pulls/comments/11219875","id":11219875,"diff_hunk":"@@ -1,32 +1,42 @@\n class Api::DonationsController < Api::BaseController\n-    def show\n-        donation = Donation.find_by_subscription_id(params[:subscription_id])\n-\n-        if !donation\n-            render :status => 404, :text => \"Can't find donation with subscription id #{params[:subscription_id]}\"\n-        else\n-            render :json => donation.to_json(:include => [:user, :action_page])\n-        end\n+  def show\n+    donation = Donation.find_by_subscription_id(params[:subscription_id])\n+\n+    if !donation\n+      render :status => 404, :text => \"Can't find donation with subscription id #{params[:subscription_id]}\"\n+    else\n+      render :json => donation.to_json(:include => [:user, :action_page])\n     end\n+  end\n+\n+  def create_spreedly_payment_method_and_purchase\n+    spreedly_client = SpreedlyClient.new params[:classification]\n+    purchase = spreedly_client.create_payment_method_and_purchase(params[:token])\n+    if purchase[:errors]\n+      render :json => purchase.to_json, :status => purchase[:code]\n+    else\n+      render :json => purchase.to_json\n+    end\n+  end\n \n-\tdef confirm_payment\n+  def confirm_payment","path":"app/controllers/api/donations_controller.rb","position":31,"original_position":31,"commit_id":"2ddcea7b607c739cd494c959623e78cdc3e61116","original_commit_id":"2ddcea7b607c739cd494c959623e78cdc3e61116","user":{"login":"gustin","id":7021,"avatar_url":"https://avatars.githubusercontent.com/u/7021?","gravatar_id":"03ffb093e87b6e045207788baf09bbad","url":"https://api.github.com/users/gustin","html_url":"https://github.com/gustin","followers_url":"https://api.github.com/users/gustin/followers","following_url":"https://api.github.com/users/gustin/following{/other_user}","gists_url":"https://api.github.com/users/gustin/gists{/gist_id}","starred_url":"https://api.github.com/users/gustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustin/subscriptions","organizations_url":"https://api.github.com/users/gustin/orgs","repos_url":"https://api.github.com/users/gustin/repos","events_url":"https://api.github.com/users/gustin/events{/privacy}","received_events_url":"https://api.github.com/users/gustin/received_events","type":"User","site_admin":false},"body":"I think this should be Donation#create","created_at":"2014-04-02T18:27:15Z","updated_at":"2014-04-02T18:27:15Z","html_url":"https://github.com/purposefoundation/allout-platform/pull/1#discussion_r11219875","pull_request_url":"https://api.github.com/repos/purposefoundation/allout-platform/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/purposefoundation/allout-platform/pulls/comments/11219875"},"html":{"href":"https://github.com/purposefoundation/allout-platform/pull/1#discussion_r11219875"},"pull_request":{"href":"https://api.github.com/repos/purposefoundation/allout-platform/pulls/1"}}}}