{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/cashier/issues/206","labels_url":"https://api.github.com/repos/laravel/cashier/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/laravel/cashier/issues/206/comments","events_url":"https://api.github.com/repos/laravel/cashier/issues/206/events","html_url":"https://github.com/laravel/cashier/pull/206","id":108970013,"number":206,"title":"fixes two bugs","user":{"login":"beeseenmedia","id":9390360,"avatar_url":"https://avatars.githubusercontent.com/u/9390360?v=3","gravatar_id":"","url":"https://api.github.com/users/beeseenmedia","html_url":"https://github.com/beeseenmedia","followers_url":"https://api.github.com/users/beeseenmedia/followers","following_url":"https://api.github.com/users/beeseenmedia/following{/other_user}","gists_url":"https://api.github.com/users/beeseenmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/beeseenmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeseenmedia/subscriptions","organizations_url":"https://api.github.com/users/beeseenmedia/orgs","repos_url":"https://api.github.com/users/beeseenmedia/repos","events_url":"https://api.github.com/users/beeseenmedia/events{/privacy}","received_events_url":"https://api.github.com/users/beeseenmedia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-29T22:07:57Z","updated_at":"2015-09-30T18:39:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/cashier/pulls/206","html_url":"https://github.com/laravel/cashier/pull/206","diff_url":"https://github.com/laravel/cashier/pull/206.diff","patch_url":"https://github.com/laravel/cashier/pull/206.patch"},"body":"please see edits.\r\n\r\nfixes cancellation problem when you cancel at end of billing period and then cancel it immediately.\r\n\r\nfixes trial period bug"},"comment":{"url":"https://api.github.com/repos/laravel/cashier/issues/comments/144502664","html_url":"https://github.com/laravel/cashier/pull/206#issuecomment-144502664","issue_url":"https://api.github.com/repos/laravel/cashier/issues/206","id":144502664,"user":{"login":"beeseenmedia","id":9390360,"avatar_url":"https://avatars.githubusercontent.com/u/9390360?v=3","gravatar_id":"","url":"https://api.github.com/users/beeseenmedia","html_url":"https://github.com/beeseenmedia","followers_url":"https://api.github.com/users/beeseenmedia/followers","following_url":"https://api.github.com/users/beeseenmedia/following{/other_user}","gists_url":"https://api.github.com/users/beeseenmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/beeseenmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeseenmedia/subscriptions","organizations_url":"https://api.github.com/users/beeseenmedia/orgs","repos_url":"https://api.github.com/users/beeseenmedia/repos","events_url":"https://api.github.com/users/beeseenmedia/events{/privacy}","received_events_url":"https://api.github.com/users/beeseenmedia/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T18:39:37Z","updated_at":"2015-09-30T18:39:37Z","body":"@taylorotwell \r\n\r\n1.  I added a Invoice Payment Failed webhook.  There was an issue with the trial.  The trial would be for x amount of days After, stripe would attempt to charge the credit card (even if there was none), it sends the webhook,  then two days later it would try again.  It attempts 3 times to charge the credit card before sending the cancelation webhook, which meant the trial was extended to x + days attempting to charge.  I added the Payment Failed webook which basically says, if payment fails and there is no credit card on file then cancel immediately.\r\n\r\n2.  cancel subscription has a bug in which if you cancel(true) it sets stripe active = 0 and subscription ends = future, if you then cancel immediately it fails to set subscription end = now because the user is no longer subscribed so it bypasses the if ($customer->subscription).  by moving the line down it makes sure that it sets subscription ends = now"}}