Closed rabol closed 4 years ago
hasPaymentMethod
determines if the Billable model has a default payment method. You'll need to add a default payment method first.
Also: if you have your webhooks properly set up it'll always keep your default payment method in sync through the customer.updated
event.
yes, but if the user don't have any of his payment methods marked as default, then it will not help
and the method is called hasPaymentMethod(), not hasDefaultPaymentMethod()
Calling addPaymentMethod() should update the 'card_brand' field
@rabol the reason for this is that Cashier v10.x is the first version that supports multiple payment methods so this method wasn't renamed properly. I'll send in a PR to deprecate the current method and implement a new one.
Calling addPaymentMethod() should update the 'card_brand' field
Definitely not. That's only for the default payment method.
Send in a PR for this here: https://github.com/laravel/cashier/pull/838
Description:
hasPaymentMethod() return false even if the user have several payment methods available
Steps To Reproduce:
use addPaymentMethod() to add one or more payment methods
then call hasPaymentMethod()
It will return false even if the user have several payment methods
public function hasPaymentMethod() { return (bool) $this->card_brand; }
and if card_brand have never been updated, then it will always return false