Closed korridor closed 1 month ago
Hi Korridor. Could you provide me with some code to reproduce this? I realise you're saying this is happening in Spark but some code to reproduce this would be wonderful. Also the full body of the request that's going to Paddle if possible as I could inspect that against the API.
Hey there,
We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.
Cashier Paddle Version
2.4.3
Laravel Version
11.10.0
PHP Version
8.3.7
Database Driver & Version
PostgreSQL 15
Description
I'm using Cashier Paddle with Laravel Spark, and we have
prorate
activated. A customer of our tried to increase their seats at the end of the billing period and we got the following error. I think the problem is that Cashier or Spark forces paddle to invoice immediately even though this is not possible, since the amount is too small. As far as I understand this, this could happen with any seat price as long as the customer increases the seats shortly before the end of the billing period.I'm not sure if this is a bug of Laravel Spark or Cashier Paddle. Laravel Spark could probably use
incrementQuantity
instead ofincrementAndInvoice
, but that would change the behavior in all cases. I think the better solution would be for Cashier to check if the amount is too small and if the amount is too small, change the proration type fromprorated_immediately
toprorated_next_billing_period
. Cashier could also catch exactly this error and if that happens, try it again with a different proration type, since calculating the transaction amount is done by Paddle.Stacktrace
Steps To Reproduce