{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/cashier/issues/460","repository_url":"https://api.github.com/repos/laravel/cashier","labels_url":"https://api.github.com/repos/laravel/cashier/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/laravel/cashier/issues/460/comments","events_url":"https://api.github.com/repos/laravel/cashier/issues/460/events","html_url":"https://github.com/laravel/cashier/issues/460","id":268709565,"number":460,"title":"Can not update default card details anymore","user":{"login":"ahalimkara","id":455458,"avatar_url":"https://avatars3.githubusercontent.com/u/455458?v=4","gravatar_id":"","url":"https://api.github.com/users/ahalimkara","html_url":"https://github.com/ahalimkara","followers_url":"https://api.github.com/users/ahalimkara/followers","following_url":"https://api.github.com/users/ahalimkara/following{/other_user}","gists_url":"https://api.github.com/users/ahalimkara/gists{/gist_id}","starred_url":"https://api.github.com/users/ahalimkara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahalimkara/subscriptions","organizations_url":"https://api.github.com/users/ahalimkara/orgs","repos_url":"https://api.github.com/users/ahalimkara/repos","events_url":"https://api.github.com/users/ahalimkara/events{/privacy}","received_events_url":"https://api.github.com/users/ahalimkara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-26T10:35:02Z","updated_at":"2017-11-02T13:38:18Z","closed_at":null,"author_association":"NONE","body":"This might be a rare case but it happened today for me, so i just want to share here maybe it worth to check. When creating Stripe customer:\r\n```php\r\nAuth::user()->createAsStripeCustomer($token);\r\n```\r\nIt created Stripe customer, card and associated them on Stripe but failed to update `card_brand` and `card_last_four` columns at my database. So when i call `Auth::user()->updateCard($token);` for same user it never updates because of following control:\r\n```php\r\nif ($token[$token->type]->id === $customer->default_source) {\r\n  return;\r\n}\r\n```\r\n\r\nIn case of database connection problem or something else when card details could not be updated on database, is it possible to add a new check inside control as:\r\n```php\r\nif ($token[$token->type]->id === $customer->default_source) {\r\n  if (! $this->card_brand)\r\n    $this->fillCardDetails($token[$token->type])->save();\r\n  return;\r\n}\r\n```\r\n\r\nI am using Laravel 5.5 with Cashier 7.0"},"comment":{"url":"https://api.github.com/repos/laravel/cashier/issues/comments/341423115","html_url":"https://github.com/laravel/cashier/issues/460#issuecomment-341423115","issue_url":"https://api.github.com/repos/laravel/cashier/issues/460","id":341423115,"user":{"login":"ahalimkara","id":455458,"avatar_url":"https://avatars3.githubusercontent.com/u/455458?v=4","gravatar_id":"","url":"https://api.github.com/users/ahalimkara","html_url":"https://github.com/ahalimkara","followers_url":"https://api.github.com/users/ahalimkara/followers","following_url":"https://api.github.com/users/ahalimkara/following{/other_user}","gists_url":"https://api.github.com/users/ahalimkara/gists{/gist_id}","starred_url":"https://api.github.com/users/ahalimkara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahalimkara/subscriptions","organizations_url":"https://api.github.com/users/ahalimkara/orgs","repos_url":"https://api.github.com/users/ahalimkara/repos","events_url":"https://api.github.com/users/ahalimkara/events{/privacy}","received_events_url":"https://api.github.com/users/ahalimkara/received_events","type":"User","site_admin":false},"created_at":"2017-11-02T13:38:18Z","updated_at":"2017-11-02T13:38:18Z","author_association":"NONE","body":"Thank you @sagar-mi for information. The problem was not about usage of Cashier, it was just a suggestion and I think contributors understood what it is."}}
{"actor":{"display_login":"ahalimkara"}}