Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the customer on stripe #633

Closed
MarGul opened this issue Apr 11, 2019 · 5 comments
Closed

Update the customer on stripe #633

MarGul opened this issue Apr 11, 2019 · 5 comments

Comments

@MarGul
Copy link
Contributor

MarGul commented Apr 11, 2019

Hi.

I have the ability for the user to update their billing information in my system. I want to sync this with Stripe and I can't find a way to do this using Laravel Cashier. This is what I propose to add to the Billable.php file:

public function updateStripeCustomer(array $options = [])
{
    $customer = StripeCustomer::update(
        $this->stripe_id, $options, $this->getStripeKey()
    );

    return $customer;
}

Now I can use it like so: $request->user()->updateStripeCustomer(['email' => 'billing@testcompany.com]);

@driesvints driesvints changed the title [Proposal] Update the customer on stripe Update the customer on stripe Apr 11, 2019
@driesvints
Copy link
Member

I had this on my list as well and a generic solution might work, however I'd also like to see some specific methods like updateVat, updateShippingAddress etc but they could technically make use of this method under the hood.

@MarGul
Copy link
Contributor Author

MarGul commented Apr 11, 2019

Totally agree. I'm using this to update the Shipping address so I can see if I can write another one to do that specifically.

@scottybo
Copy link

Just another vote for this...

@MarGul
Copy link
Contributor Author

MarGul commented Jul 26, 2019

Just another vote for this...

@scottybo I have sent in a PR for this that has been merged. Check it out #634

@scottybo
Copy link

Ah, brilliant! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants