{"action":"created","comment":{"url":"https://api.github.com/repos/magfest/ubersystem/pulls/comments/73794790","id":73794790,"diff_hunk":"@@ -98,6 +98,48 @@ def index(self, message=''):\n     def dealer_registration(self, message=''):\n         return self.form(badge_type=c.PSEUDO_DEALER_BADGE, message=message)\n \n+    def redeem(self, session, message='', **params):","path":"uber/site_sections/preregistration.py","position":4,"original_position":4,"commit_id":"4d15ba1149274f06e059b696d63509fee20b7aec","original_commit_id":"4d15ba1149274f06e059b696d63509fee20b7aec","user":{"login":"EliAndrewC","id":651592,"avatar_url":"https://avatars.githubusercontent.com/u/651592?v=3","gravatar_id":"","url":"https://api.github.com/users/EliAndrewC","html_url":"https://github.com/EliAndrewC","followers_url":"https://api.github.com/users/EliAndrewC/followers","following_url":"https://api.github.com/users/EliAndrewC/following{/other_user}","gists_url":"https://api.github.com/users/EliAndrewC/gists{/gist_id}","starred_url":"https://api.github.com/users/EliAndrewC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EliAndrewC/subscriptions","organizations_url":"https://api.github.com/users/EliAndrewC/orgs","repos_url":"https://api.github.com/users/EliAndrewC/repos","events_url":"https://api.github.com/users/EliAndrewC/events{/privacy}","received_events_url":"https://api.github.com/users/EliAndrewC/received_events","type":"User","site_admin":false},"body":"To build on what I said earlier and what @kitsuta has also said, I think there's a different approach we should take here.\r\n\r\nThe current workflow for the attendee is currently:\r\n- Attendee fills out the reg form.\r\n- Before they pay, they fill out the \"redeem coupon\" form.\r\n- At the time they fill out that form, the validity is checked.\r\n- Attendee then pays.\r\n\r\nThere are some problems with this approach.  A better approach would probably be:\r\n- Attendee fills out the prereg form.  During this time, they can enter coupon codes into the \"Comments\" field.\r\n- A discount is applied based on that coupon code.  However, the coupon is not actually redeemed until they try to pay.  It's validity is checked both at that time and when the payment goes through and the attendee is saved.\r\n\r\nThis implementation would be a little trickier, but I think it would be better in the long run.  With that being said, I'm happy to defer to Dom on this, who's working more closely with you on this, and who has spent more time reviewing this.","created_at":"2016-08-07T02:30:00Z","updated_at":"2016-08-07T02:30:00Z","html_url":"https://github.com/magfest/ubersystem/pull/1918#discussion_r73794790","pull_request_url":"https://api.github.com/repos/magfest/ubersystem/pulls/1918","_links":{"self":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/comments/73794790"},"html":{"href":"https://github.com/magfest/ubersystem/pull/1918#discussion_r73794790"},"pull_request":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/1918"}}},"pull_request":{"url":"https://api.github.com/repos/magfest/ubersystem/pulls/1918","id":79972972,"html_url":"https://github.com/magfest/ubersystem/pull/1918","diff_url":"https://github.com/magfest/ubersystem/pull/1918.diff","patch_url":"https://github.com/magfest/ubersystem/pull/1918.patch","issue_url":"https://api.github.com/repos/magfest/ubersystem/issues/1918","number":1918,"state":"open","locked":false,"title":"WIP: Promo codes","user":{"login":"migetman9","id":6538753,"avatar_url":"https://avatars.githubusercontent.com/u/6538753?v=3","gravatar_id":"","url":"https://api.github.com/users/migetman9","html_url":"https://github.com/migetman9","followers_url":"https://api.github.com/users/migetman9/followers","following_url":"https://api.github.com/users/migetman9/following{/other_user}","gists_url":"https://api.github.com/users/migetman9/gists{/gist_id}","starred_url":"https://api.github.com/users/migetman9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migetman9/subscriptions","organizations_url":"https://api.github.com/users/migetman9/orgs","repos_url":"https://api.github.com/users/migetman9/repos","events_url":"https://api.github.com/users/migetman9/events{/privacy}","received_events_url":"https://api.github.com/users/migetman9/received_events","type":"User","site_admin":false},"body":"Allows admins to create promotional codes that may be discounted in price, have a limited number of uses, and/or expire after a certain date. Codes can be randomly generated or user entered.","created_at":"2016-08-03T20:27:34Z","updated_at":"2016-08-07T02:30:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc2d01d74676faa6a3b72e376c7440f3aec1b59c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/magfest/ubersystem/pulls/1918/commits","review_comments_url":"https://api.github.com/repos/magfest/ubersystem/pulls/1918/comments","review_comment_url":"https://api.github.com/repos/magfest/ubersystem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magfest/ubersystem/issues/1918/comments","statuses_url":"https://api.github.com/repos/magfest/ubersystem/statuses/4d15ba1149274f06e059b696d63509fee20b7aec","head":{"label":"magfest:promo_codes","ref":"promo_codes","sha":"4d15ba1149274f06e059b696d63509fee20b7aec","user":{"login":"magfest","id":7840140,"avatar_url":"https://avatars.githubusercontent.com/u/7840140?v=3","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"repo":{"id":16427229,"name":"ubersystem","full_name":"magfest/ubersystem","owner":{"login":"magfest","id":7840140,"avatar_url":"https://avatars.githubusercontent.com/u/7840140?v=3","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magfest/ubersystem","description":"MAGFest's Ubersystem - handles ticketing, staffing, analytics, volunteers, and tons more","fork":true,"url":"https://api.github.com/repos/magfest/ubersystem","forks_url":"https://api.github.com/repos/magfest/ubersystem/forks","keys_url":"https://api.github.com/repos/magfest/ubersystem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magfest/ubersystem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magfest/ubersystem/teams","hooks_url":"https://api.github.com/repos/magfest/ubersystem/hooks","issue_events_url":"https://api.github.com/repos/magfest/ubersystem/issues/events{/number}","events_url":"https://api.github.com/repos/magfest/ubersystem/events","assignees_url":"https://api.github.com/repos/magfest/ubersystem/assignees{/user}","branches_url":"https://api.github.com/repos/magfest/ubersystem/branches{/branch}","tags_url":"https://api.github.com/repos/magfest/ubersystem/tags","blobs_url":"https://api.github.com/repos/magfest/ubersystem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magfest/ubersystem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magfest/ubersystem/git/refs{/sha}","trees_url":"https://api.github.com/repos/magfest/ubersystem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magfest/ubersystem/statuses/{sha}","languages_url":"https://api.github.com/repos/magfest/ubersystem/languages","stargazers_url":"https://api.github.com/repos/magfest/ubersystem/stargazers","contributors_url":"https://api.github.com/repos/magfest/ubersystem/contributors","subscribers_url":"https://api.github.com/repos/magfest/ubersystem/subscribers","subscription_url":"https://api.github.com/repos/magfest/ubersystem/subscription","commits_url":"https://api.github.com/repos/magfest/ubersystem/commits{/sha}","git_commits_url":"https://api.github.com/repos/magfest/ubersystem/git/commits{/sha}","comments_url":"https://api.github.com/repos/magfest/ubersystem/comments{/number}","issue_comment_url":"https://api.github.com/repos/magfest/ubersystem/issues/comments{/number}","contents_url":"https://api.github.com/repos/magfest/ubersystem/contents/{+path}","compare_url":"https://api.github.com/repos/magfest/ubersystem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magfest/ubersystem/merges","archive_url":"https://api.github.com/repos/magfest/ubersystem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magfest/ubersystem/downloads","issues_url":"https://api.github.com/repos/magfest/ubersystem/issues{/number}","pulls_url":"https://api.github.com/repos/magfest/ubersystem/pulls{/number}","milestones_url":"https://api.github.com/repos/magfest/ubersystem/milestones{/number}","notifications_url":"https://api.github.com/repos/magfest/ubersystem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magfest/ubersystem/labels{/name}","releases_url":"https://api.github.com/repos/magfest/ubersystem/releases{/id}","deployments_url":"https://api.github.com/repos/magfest/ubersystem/deployments","created_at":"2014-02-01T02:56:25Z","updated_at":"2016-02-21T21:39:47Z","pushed_at":"2016-08-06T21:06:08Z","git_url":"git://github.com/magfest/ubersystem.git","ssh_url":"git@github.com:magfest/ubersystem.git","clone_url":"https://github.com/magfest/ubersystem.git","svn_url":"https://github.com/magfest/ubersystem","homepage":"http://magfest.org","size":62238,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":286,"forks":3,"open_issues":286,"watchers":24,"default_branch":"master"}},"base":{"label":"magfest:master","ref":"master","sha":"1b8f33c37d634cdb428fe3c27b5088e45dc73c97","user":{"login":"magfest","id":7840140,"avatar_url":"https://avatars.githubusercontent.com/u/7840140?v=3","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"repo":{"id":16427229,"name":"ubersystem","full_name":"magfest/ubersystem","owner":{"login":"magfest","id":7840140,"avatar_url":"https://avatars.githubusercontent.com/u/7840140?v=3","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magfest/ubersystem","description":"MAGFest's Ubersystem - handles ticketing, staffing, analytics, volunteers, and tons more","fork":true,"url":"https://api.github.com/repos/magfest/ubersystem","forks_url":"https://api.github.com/repos/magfest/ubersystem/forks","keys_url":"https://api.github.com/repos/magfest/ubersystem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magfest/ubersystem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magfest/ubersystem/teams","hooks_url":"https://api.github.com/repos/magfest/ubersystem/hooks","issue_events_url":"https://api.github.com/repos/magfest/ubersystem/issues/events{/number}","events_url":"https://api.github.com/repos/magfest/ubersystem/events","assignees_url":"https://api.github.com/repos/magfest/ubersystem/assignees{/user}","branches_url":"https://api.github.com/repos/magfest/ubersystem/branches{/branch}","tags_url":"https://api.github.com/repos/magfest/ubersystem/tags","blobs_url":"https://api.github.com/repos/magfest/ubersystem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magfest/ubersystem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magfest/ubersystem/git/refs{/sha}","trees_url":"https://api.github.com/repos/magfest/ubersystem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magfest/ubersystem/statuses/{sha}","languages_url":"https://api.github.com/repos/magfest/ubersystem/languages","stargazers_url":"https://api.github.com/repos/magfest/ubersystem/stargazers","contributors_url":"https://api.github.com/repos/magfest/ubersystem/contributors","subscribers_url":"https://api.github.com/repos/magfest/ubersystem/subscribers","subscription_url":"https://api.github.com/repos/magfest/ubersystem/subscription","commits_url":"https://api.github.com/repos/magfest/ubersystem/commits{/sha}","git_commits_url":"https://api.github.com/repos/magfest/ubersystem/git/commits{/sha}","comments_url":"https://api.github.com/repos/magfest/ubersystem/comments{/number}","issue_comment_url":"https://api.github.com/repos/magfest/ubersystem/issues/comments{/number}","contents_url":"https://api.github.com/repos/magfest/ubersystem/contents/{+path}","compare_url":"https://api.github.com/repos/magfest/ubersystem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magfest/ubersystem/merges","archive_url":"https://api.github.com/repos/magfest/ubersystem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magfest/ubersystem/downloads","issues_url":"https://api.github.com/repos/magfest/ubersystem/issues{/number}","pulls_url":"https://api.github.com/repos/magfest/ubersystem/pulls{/number}","milestones_url":"https://api.github.com/repos/magfest/ubersystem/milestones{/number}","notifications_url":"https://api.github.com/repos/magfest/ubersystem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magfest/ubersystem/labels{/name}","releases_url":"https://api.github.com/repos/magfest/ubersystem/releases{/id}","deployments_url":"https://api.github.com/repos/magfest/ubersystem/deployments","created_at":"2014-02-01T02:56:25Z","updated_at":"2016-02-21T21:39:47Z","pushed_at":"2016-08-06T21:06:08Z","git_url":"git://github.com/magfest/ubersystem.git","ssh_url":"git@github.com:magfest/ubersystem.git","clone_url":"https://github.com/magfest/ubersystem.git","svn_url":"https://github.com/magfest/ubersystem","homepage":"http://magfest.org","size":62238,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":286,"forks":3,"open_issues":286,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/1918"},"html":{"href":"https://github.com/magfest/ubersystem/pull/1918"},"issue":{"href":"https://api.github.com/repos/magfest/ubersystem/issues/1918"},"comments":{"href":"https://api.github.com/repos/magfest/ubersystem/issues/1918/comments"},"review_comments":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/1918/comments"},"review_comment":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/1918/commits"},"statuses":{"href":"https://api.github.com/repos/magfest/ubersystem/statuses/4d15ba1149274f06e059b696d63509fee20b7aec"}}}}
{"actor":{"display_login":"EliAndrewC"}}