{"action":"created","comment":{"url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/comments/50264233","id":50264233,"diff_hunk":"@@ -20,9 +23,8 @@\n     - if EffectiveOrders.app_checkout_enabled\n       = render :partial => '/effective/orders/app_checkout/form', locals: {order: order}\n \n-  - if EffectiveOrders.cheque_enabled\n+  - if EffectiveOrders.cheque_enabled && !order.pending?\n     = render :partial => '/effective/orders/cheque/form', locals: {order: order}","path":"app/views/effective/orders/_checkout_step_2.html.haml","position":16,"original_position":16,"commit_id":"eaeb327d40e7529f199f7b8df1e11df00be3f412","original_commit_id":"eaeb327d40e7529f199f7b8df1e11df00be3f412","user":{"login":"andie-chernysh","id":2458187,"avatar_url":"https://avatars.githubusercontent.com/u/2458187?v=3","gravatar_id":"","url":"https://api.github.com/users/andie-chernysh","html_url":"https://github.com/andie-chernysh","followers_url":"https://api.github.com/users/andie-chernysh/followers","following_url":"https://api.github.com/users/andie-chernysh/following{/other_user}","gists_url":"https://api.github.com/users/andie-chernysh/gists{/gist_id}","starred_url":"https://api.github.com/users/andie-chernysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andie-chernysh/subscriptions","organizations_url":"https://api.github.com/users/andie-chernysh/orgs","repos_url":"https://api.github.com/users/andie-chernysh/repos","events_url":"https://api.github.com/users/andie-chernysh/events{/privacy}","received_events_url":"https://api.github.com/users/andie-chernysh/received_events","type":"User","site_admin":false},"body":"We need to check here if order is not in pending state. Otherwise it will make no sense to show 'Pay by invoice' button, when order is already in 'pending' state. So when user comes to `Orders#show` page, they should see this checkout step 2 without 'Pay by cheque' button, but with 'Print' button instead (added above), in order to make them able to print the order in case they really want to pay via cheque.","created_at":"2016-01-20T15:02:26Z","updated_at":"2016-01-20T15:02:26Z","html_url":"https://github.com/code-and-effect/effective_orders/pull/28#discussion_r50264233","pull_request_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/comments/50264233"},"html":{"href":"https://github.com/code-and-effect/effective_orders/pull/28#discussion_r50264233"},"pull_request":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28","id":56618429,"html_url":"https://github.com/code-and-effect/effective_orders/pull/28","diff_url":"https://github.com/code-and-effect/effective_orders/pull/28.diff","patch_url":"https://github.com/code-and-effect/effective_orders/pull/28.patch","issue_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/28","number":28,"state":"open","locked":false,"title":"Fix bug on checkout step 2 page","user":{"login":"andie-chernysh","id":2458187,"avatar_url":"https://avatars.githubusercontent.com/u/2458187?v=3","gravatar_id":"","url":"https://api.github.com/users/andie-chernysh","html_url":"https://github.com/andie-chernysh","followers_url":"https://api.github.com/users/andie-chernysh/followers","following_url":"https://api.github.com/users/andie-chernysh/following{/other_user}","gists_url":"https://api.github.com/users/andie-chernysh/gists{/gist_id}","starred_url":"https://api.github.com/users/andie-chernysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andie-chernysh/subscriptions","organizations_url":"https://api.github.com/users/andie-chernysh/orgs","repos_url":"https://api.github.com/users/andie-chernysh/repos","events_url":"https://api.github.com/users/andie-chernysh/events{/privacy}","received_events_url":"https://api.github.com/users/andie-chernysh/received_events","type":"User","site_admin":false},"body":"Do not show 'Pay by cheque' button on checkout step 2 when order is already has 'pending' state. Show print button instead.","created_at":"2016-01-20T14:59:23Z","updated_at":"2016-01-20T15:02:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e4972e9d4e58f4847f19054e9b9c1ee9e3e606f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28/commits","review_comments_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28/comments","review_comment_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/28/comments","statuses_url":"https://api.github.com/repos/code-and-effect/effective_orders/statuses/eaeb327d40e7529f199f7b8df1e11df00be3f412","head":{"label":"code-and-effect:fix-bug-on-checkout-step-2","ref":"fix-bug-on-checkout-step-2","sha":"eaeb327d40e7529f199f7b8df1e11df00be3f412","user":{"login":"code-and-effect","id":4742831,"avatar_url":"https://avatars.githubusercontent.com/u/4742831?v=3","gravatar_id":"","url":"https://api.github.com/users/code-and-effect","html_url":"https://github.com/code-and-effect","followers_url":"https://api.github.com/users/code-and-effect/followers","following_url":"https://api.github.com/users/code-and-effect/following{/other_user}","gists_url":"https://api.github.com/users/code-and-effect/gists{/gist_id}","starred_url":"https://api.github.com/users/code-and-effect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-and-effect/subscriptions","organizations_url":"https://api.github.com/users/code-and-effect/orgs","repos_url":"https://api.github.com/users/code-and-effect/repos","events_url":"https://api.github.com/users/code-and-effect/events{/privacy}","received_events_url":"https://api.github.com/users/code-and-effect/received_events","type":"Organization","site_admin":false},"repo":{"id":14698633,"name":"effective_orders","full_name":"code-and-effect/effective_orders","owner":{"login":"code-and-effect","id":4742831,"avatar_url":"https://avatars.githubusercontent.com/u/4742831?v=3","gravatar_id":"","url":"https://api.github.com/users/code-and-effect","html_url":"https://github.com/code-and-effect","followers_url":"https://api.github.com/users/code-and-effect/followers","following_url":"https://api.github.com/users/code-and-effect/following{/other_user}","gists_url":"https://api.github.com/users/code-and-effect/gists{/gist_id}","starred_url":"https://api.github.com/users/code-and-effect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-and-effect/subscriptions","organizations_url":"https://api.github.com/users/code-and-effect/orgs","repos_url":"https://api.github.com/users/code-and-effect/repos","events_url":"https://api.github.com/users/code-and-effect/events{/privacy}","received_events_url":"https://api.github.com/users/code-and-effect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-and-effect/effective_orders","description":"Quickly build an online store with carts, orders, automatic email receipts and payment collection via Stripe, StripeConnect, PayPal and Moneris.","fork":false,"url":"https://api.github.com/repos/code-and-effect/effective_orders","forks_url":"https://api.github.com/repos/code-and-effect/effective_orders/forks","keys_url":"https://api.github.com/repos/code-and-effect/effective_orders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-and-effect/effective_orders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-and-effect/effective_orders/teams","hooks_url":"https://api.github.com/repos/code-and-effect/effective_orders/hooks","issue_events_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/events{/number}","events_url":"https://api.github.com/repos/code-and-effect/effective_orders/events","assignees_url":"https://api.github.com/repos/code-and-effect/effective_orders/assignees{/user}","branches_url":"https://api.github.com/repos/code-and-effect/effective_orders/branches{/branch}","tags_url":"https://api.github.com/repos/code-and-effect/effective_orders/tags","blobs_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-and-effect/effective_orders/statuses/{sha}","languages_url":"https://api.github.com/repos/code-and-effect/effective_orders/languages","stargazers_url":"https://api.github.com/repos/code-and-effect/effective_orders/stargazers","contributors_url":"https://api.github.com/repos/code-and-effect/effective_orders/contributors","subscribers_url":"https://api.github.com/repos/code-and-effect/effective_orders/subscribers","subscription_url":"https://api.github.com/repos/code-and-effect/effective_orders/subscription","commits_url":"https://api.github.com/repos/code-and-effect/effective_orders/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-and-effect/effective_orders/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-and-effect/effective_orders/contents/{+path}","compare_url":"https://api.github.com/repos/code-and-effect/effective_orders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-and-effect/effective_orders/merges","archive_url":"https://api.github.com/repos/code-and-effect/effective_orders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-and-effect/effective_orders/downloads","issues_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues{/number}","pulls_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls{/number}","milestones_url":"https://api.github.com/repos/code-and-effect/effective_orders/milestones{/number}","notifications_url":"https://api.github.com/repos/code-and-effect/effective_orders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-and-effect/effective_orders/labels{/name}","releases_url":"https://api.github.com/repos/code-and-effect/effective_orders/releases{/id}","created_at":"2013-11-25T21:12:19Z","updated_at":"2016-01-19T22:10:39Z","pushed_at":"2016-01-20T14:59:23Z","git_url":"git://github.com/code-and-effect/effective_orders.git","ssh_url":"git@github.com:code-and-effect/effective_orders.git","clone_url":"https://github.com/code-and-effect/effective_orders.git","svn_url":"https://github.com/code-and-effect/effective_orders","homepage":"","size":751,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":14,"default_branch":"master"}},"base":{"label":"code-and-effect:2.0","ref":"2.0","sha":"76e534acfcbfd07e65778a56c9c1e35771bd72e9","user":{"login":"code-and-effect","id":4742831,"avatar_url":"https://avatars.githubusercontent.com/u/4742831?v=3","gravatar_id":"","url":"https://api.github.com/users/code-and-effect","html_url":"https://github.com/code-and-effect","followers_url":"https://api.github.com/users/code-and-effect/followers","following_url":"https://api.github.com/users/code-and-effect/following{/other_user}","gists_url":"https://api.github.com/users/code-and-effect/gists{/gist_id}","starred_url":"https://api.github.com/users/code-and-effect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-and-effect/subscriptions","organizations_url":"https://api.github.com/users/code-and-effect/orgs","repos_url":"https://api.github.com/users/code-and-effect/repos","events_url":"https://api.github.com/users/code-and-effect/events{/privacy}","received_events_url":"https://api.github.com/users/code-and-effect/received_events","type":"Organization","site_admin":false},"repo":{"id":14698633,"name":"effective_orders","full_name":"code-and-effect/effective_orders","owner":{"login":"code-and-effect","id":4742831,"avatar_url":"https://avatars.githubusercontent.com/u/4742831?v=3","gravatar_id":"","url":"https://api.github.com/users/code-and-effect","html_url":"https://github.com/code-and-effect","followers_url":"https://api.github.com/users/code-and-effect/followers","following_url":"https://api.github.com/users/code-and-effect/following{/other_user}","gists_url":"https://api.github.com/users/code-and-effect/gists{/gist_id}","starred_url":"https://api.github.com/users/code-and-effect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-and-effect/subscriptions","organizations_url":"https://api.github.com/users/code-and-effect/orgs","repos_url":"https://api.github.com/users/code-and-effect/repos","events_url":"https://api.github.com/users/code-and-effect/events{/privacy}","received_events_url":"https://api.github.com/users/code-and-effect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-and-effect/effective_orders","description":"Quickly build an online store with carts, orders, automatic email receipts and payment collection via Stripe, StripeConnect, PayPal and Moneris.","fork":false,"url":"https://api.github.com/repos/code-and-effect/effective_orders","forks_url":"https://api.github.com/repos/code-and-effect/effective_orders/forks","keys_url":"https://api.github.com/repos/code-and-effect/effective_orders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-and-effect/effective_orders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-and-effect/effective_orders/teams","hooks_url":"https://api.github.com/repos/code-and-effect/effective_orders/hooks","issue_events_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/events{/number}","events_url":"https://api.github.com/repos/code-and-effect/effective_orders/events","assignees_url":"https://api.github.com/repos/code-and-effect/effective_orders/assignees{/user}","branches_url":"https://api.github.com/repos/code-and-effect/effective_orders/branches{/branch}","tags_url":"https://api.github.com/repos/code-and-effect/effective_orders/tags","blobs_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-and-effect/effective_orders/statuses/{sha}","languages_url":"https://api.github.com/repos/code-and-effect/effective_orders/languages","stargazers_url":"https://api.github.com/repos/code-and-effect/effective_orders/stargazers","contributors_url":"https://api.github.com/repos/code-and-effect/effective_orders/contributors","subscribers_url":"https://api.github.com/repos/code-and-effect/effective_orders/subscribers","subscription_url":"https://api.github.com/repos/code-and-effect/effective_orders/subscription","commits_url":"https://api.github.com/repos/code-and-effect/effective_orders/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-and-effect/effective_orders/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-and-effect/effective_orders/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-and-effect/effective_orders/contents/{+path}","compare_url":"https://api.github.com/repos/code-and-effect/effective_orders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-and-effect/effective_orders/merges","archive_url":"https://api.github.com/repos/code-and-effect/effective_orders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-and-effect/effective_orders/downloads","issues_url":"https://api.github.com/repos/code-and-effect/effective_orders/issues{/number}","pulls_url":"https://api.github.com/repos/code-and-effect/effective_orders/pulls{/number}","milestones_url":"https://api.github.com/repos/code-and-effect/effective_orders/milestones{/number}","notifications_url":"https://api.github.com/repos/code-and-effect/effective_orders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-and-effect/effective_orders/labels{/name}","releases_url":"https://api.github.com/repos/code-and-effect/effective_orders/releases{/id}","created_at":"2013-11-25T21:12:19Z","updated_at":"2016-01-19T22:10:39Z","pushed_at":"2016-01-20T14:59:23Z","git_url":"git://github.com/code-and-effect/effective_orders.git","ssh_url":"git@github.com:code-and-effect/effective_orders.git","clone_url":"https://github.com/code-and-effect/effective_orders.git","svn_url":"https://github.com/code-and-effect/effective_orders","homepage":"","size":751,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28"},"html":{"href":"https://github.com/code-and-effect/effective_orders/pull/28"},"issue":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/issues/28"},"comments":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/code-and-effect/effective_orders/statuses/eaeb327d40e7529f199f7b8df1e11df00be3f412"}}}}