{"action":"opened","issue":{"url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/105","labels_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/105/comments","events_url":"https://api.github.com/repos/dlobo/org.civicrm.module.cividiscount/issues/105/events","html_url":"https://github.com/dlobo/org.civicrm.module.cividiscount/issues/105","id":87581739,"number":105,"title":"Discounts on pay later lines do not result in the discount code being tracked","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-12T02:40:50Z","updated_at":"2015-06-12T02:40:50Z","closed_at":null,"body":"When a discount code is in use in paylater for a membership-by-price set the use of the code is not tracked. This appears to be in part due to the membership path not being followed - \r\n\r\nNotice: Undefined index: selectMembership in cividiscount_civicrm_postProcess() (line 638 of /home/vagrant/civicrm-buildkit/build/drupal-demo/sites/default/ext/org.civicrm.module.cividiscount/cividiscount.php). =>  \r\n\r\nProbably the discount code should in fact be consumed when payment is made rather than when it is entered - but in the absence of a status field - perhaps it makes sense to record it when first applying"}}