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

[9.0] Fix invoicing subscriptions and extend one off charges #598

Merged
merged 4 commits into from
Dec 17, 2018

Conversation

driesvints
Copy link
Member

I sent this PR with 2 changes because the 2nd one depends on the first one. Here's the commit summary for both:

When invoicing the customer while swapping plans, Cashier would invoice the customer for all its pending items instead of just the ones for the subscription. This PR fixes this by using the subscription field when creating an invoice to allow swapping a plan and the incrementAndInvoice method so the invoice at hand only invoices for the subscription and also uses the proper tax which is applied to the subscription.

When doing one off charges and immediately invoicing them you currently can't add extra options like a tax_percent to it which kind of limits you. By adding this extra option we can pass it to the invoice method with the parameter from the previous commit.

Fixes #384

When invoicing the customer while swapping plans, Cashier would invoice the customer for all its pending items instead of just the ones for the subscription. This PR fixes this by using the subscription field when creating an invoice to allow swapping a plan and the `incrementAndInvoice` method so the invoice at hand only invoices for the subscription and also uses the proper tax which is applied to the subscription.
When doing one off charges and immediately invoicing them you currently can't add extra options like a tax_percent to it which kind of limits you. By adding this extra option we can pass it to the invoice method with the parameter from the previous commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants