GithubHelp home page GithubHelp logo

Comments (2)

driesvints avatar driesvints commented on May 20, 2024

Hi there. The current behaviour is the wanted one imo. I don't think that changing the default payment method on the customer should update the payment method on all of the existing subscriptions. We could add a new method on the subscription model maybe to update that payment method as well but I don't think that the current updateDefaultPaymentMethod method should automatically change the PM for a subscription as those are two separate concerns.

from cashier-stripe.

FrozenGod avatar FrozenGod commented on May 20, 2024

Hi @driesvints

I don't really know what is the default payment method used for. Stripe sets the default payment method on the subscription by default, which always overrides the default payment method of the customer.

Maybe I'm not aware of the various use cases but for subscriptions I really can't come up with a way to have any use in the Customer's default payment method.

I think it's not the best approach by Stripe in the first place. I understand Cashier is just a wrapper on an existing API and I agree that Cashier should at least have an additional method for changing Subscription's payment method.

It was easy to create an event handler with:

$subscription = $billable->subscription();
        $subscription->updateStripeSubscription([
            'default_payment_method' => $newPaymentMethodId,
        ]);

But the time it took me to debug and research why my default payment method is not charged by default is definitely a huge waste of time, especially for people who use Cashier and/or Stripe API for the first time.

from cashier-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.