/** * Update the credit card attached to the entity. * * @param string $token * @return void */ public function updateCard($token) { $customer = $this->getStripeCustomer(); $card = $customer->cards->create(['card' => $token]); $customer->default_card = $card->id; $customer->save(); $this->billable->setLastFourCardDigits($this->getLastFourCardDigits($this->getStripeCustomer()))->saveBillableInstance(); }