Closed srmklive closed 1 month ago
Bit confused here @srmklive. Why is hasDefaultPaymentMethod
not enough for you? That should only return true
if there's a valid default payment method in Stripe. Is that not happening for you?
@driesvints the ``hasDefaultPaymentMethod
method only returns if payment method type is set or not,
/**
* Determines if the customer currently has a default payment method.
*
* @return bool
*/
public function hasDefaultPaymentMethod()
{
return (bool) $this->pm_type;
}
But this type is only set if there's a valid default payment method on the customer in stripe. So again: why do you specifically need this new method?
We need this method is that they is no way to verify the default payment method in Cashier on Stripe. This method offers that check.
I still don't understand sorry. The pm_type
method is only filled out when there's a valid default payment method. I don't see how this new method is differently other than it invokes an API call to Stripe. I'm going to close this one now but if you at some point can offer a thorough explanation why this is different from the current hasDefaultPaymentMethod
then I'll be happy to revisit.
This PR adds a method hasValidDefaultPaymentMethod which checks whether the user has a valid default payment method stored on Stripe.
Currently in cashier, we can check whether a user has a default payment method through:
This method will check: