-
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
Exception Attempt to read property "percentage" on string #1475
Conversation
This cannot be an issue. All lines on an invoice are expanded, including the tax rate for a tax amount: https://github.com/laravel/cashier-stripe/blob/14.x/src/Invoice.php#L567 I'm going to revert this for now. @padre can you please open an issue with full steps to reproduce? I have a feeling we're missing something here. Did you maybe adjust the |
)" This reverts commit a4477c7.
@driesvints I din't adjust the receipt.blade.php file. I did some more research and found that if the invoice has more than 10 items, from item number 11 tax_amounts does not include expanded tax_rate. |
That would seem like a bug in stripe tbh. Can you contact stripe support? |
Ok, I'll report back if there is any news. |
@driesvints could you help me, please? stripe/stripe-php#1400 (comment) Thank you. |
@driesvints until there is a better solution, could you accept the pull request? Right now, when executing the instruction |
No sorry, this PR would add an extra load to large invoices doing a stripe call per line item which is just too much. |
When i try:
$user->downloadInvoice($invoiceId);
I receive the following exception:
Because $taxAmount can be:
Stripe\StripeObject JSON: {
"amount": 41,
"inclusive": false,
"tax_rate": {
"id": "txr_1KxZESCelkdgTLAvmlfA4gHl",
"object": "tax_rate",
"active": false,
"country": "ES",
"created": 1652112888,
"description": null,
"display_name": "VAT",
"inclusive": false,
"jurisdiction": "Spain",
"livemode": false,
"metadata": [],
"percentage": 21,
"state": null,
"tax_type": "vat"
}
or
Stripe\StripeObject JSON: {
"amount": 41,
"inclusive": false,
"tax_rate": "txr_1KxZESCelkdgTLAvmlfA4gHl"
}