-
Notifications
You must be signed in to change notification settings - Fork 682
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
invoiceFor() fails when automatic tax calculation is enabled #1204
Comments
@josiasmontag are you enrolled in the Stripe Tax program? It's currently invite only. |
Also: |
Yes, I am enrolled to Stripe Tax. When you submit the form on the Stipe website you get invited within a few hours. As mentioned the same happens with 13.1. Steps to reproduce for 13.1: $user = $this->createCustomer('customer_can_be_invoiced');
$user->createAsStripeCustomer();
$user->updateDefaultPaymentMethod('pm_card_visa');
$invoice = $user->invoiceFor('Laracon', 49900);
// works
$this->assertInstanceOf(Invoice::class, $invoice);
$invoiceWithTax = $user->withTax()->invoiceFor('Laracon', 49900);
// fails (returns false)
$this->assertInstanceOf(Invoice::class, $invoiceWithTax); |
Thanks for making me aware @josiasmontag. For now, in the short amount of time I have available, this is the best solution I can come up with: #1206 I'll need to think more thoroughly about the use of |
Description:
As soon as automatic tax calculation is enabled, the
invoiceFor()
method stops working.This happens both with version
13.1.0
and the current master branch.Steps To Reproduce:
Add this test case to cashier-stripe (master):
Reason
When using automatic tax calculation, Stripe requires that
tax_behavior
for the invoice item price is set.Instead of using
amount
for invoice items we should switch to useprice_data
(Stripe docs):The text was updated successfully, but these errors were encountered: