{"action":"created","issue":{"url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3763","labels_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3763/labels{/name}","comments_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3763/comments","events_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3763/events","html_url":"https://github.com/gratipay/gratipay.com/issues/3763","id":105490890,"number":3763,"title":"refund advances","user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gratipay/gratipay.com/labels/%E2%98%85%E2%98%85%E2%98%85","name":"★★★","color":"339966"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gratipay/gratipay.com/milestones/11","html_url":"https://github.com/gratipay/gratipay.com/milestones/Balanced%20Shutdown","labels_url":"https://api.github.com/repos/gratipay/gratipay.com/milestones/11/labels","id":1037902,"number":11,"title":"Balanced Shutdown","description":"http://blog.balancedpayments.com/shutting-down","creator":{"login":"Changaco","id":1581590,"avatar_url":"https://avatars.githubusercontent.com/u/1581590?v=3","gravatar_id":"","url":"https://api.github.com/users/Changaco","html_url":"https://github.com/Changaco","followers_url":"https://api.github.com/users/Changaco/followers","following_url":"https://api.github.com/users/Changaco/following{/other_user}","gists_url":"https://api.github.com/users/Changaco/gists{/gist_id}","starred_url":"https://api.github.com/users/Changaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Changaco/subscriptions","organizations_url":"https://api.github.com/users/Changaco/orgs","repos_url":"https://api.github.com/users/Changaco/repos","events_url":"https://api.github.com/users/Changaco/events{/privacy}","received_events_url":"https://api.github.com/users/Changaco/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":47,"state":"open","created_at":"2015-03-25T10:10:33Z","updated_at":"2015-09-28T13:09:10Z","due_on":"2015-10-09T04:00:00Z","closed_at":null},"comments":11,"created_at":"2015-09-08T23:54:42Z","updated_at":"2015-09-29T21:53:32Z","closed_at":null,"body":"Reticketed from #3675.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26543937-refund-advances?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/gratipay/gratipay.com/issues/comments/144201991","html_url":"https://github.com/gratipay/gratipay.com/issues/3763#issuecomment-144201991","issue_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3763","id":144201991,"user":{"login":"rorepo","id":7984085,"avatar_url":"https://avatars.githubusercontent.com/u/7984085?v=3","gravatar_id":"","url":"https://api.github.com/users/rorepo","html_url":"https://github.com/rorepo","followers_url":"https://api.github.com/users/rorepo/followers","following_url":"https://api.github.com/users/rorepo/following{/other_user}","gists_url":"https://api.github.com/users/rorepo/gists{/gist_id}","starred_url":"https://api.github.com/users/rorepo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rorepo/subscriptions","organizations_url":"https://api.github.com/users/rorepo/orgs","repos_url":"https://api.github.com/users/rorepo/repos","events_url":"https://api.github.com/users/rorepo/events{/privacy}","received_events_url":"https://api.github.com/users/rorepo/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T21:53:32Z","updated_at":"2015-09-29T21:53:32Z","body":"I got things working up to the point where the refund was being made and the participant balance  correspondingly being brought down to 0. But there was one problem remaining - ```check_db```. The expected balance was the (-ve of the) figure I had directly inserted into the participant balance in order to create the excess balance situation. I suspect this was because there was no corresponding ```payments``` record. \r\n\r\nAt this point, I thought I'd try my own Braintree sandbox credentials. Things didn't go well. Braintree returned an error, complaining that the custom field ```participant_id``` was invalid. Removing that didn't help either, so I put it back and reverted back to the old credentials. Now I get an authorization error. Haven't been able to move beyond that.\r\n\r\nP.S. I hadn't used ```local.env``` to put in my credentials - made the changes in ```test.env```. "}}