Closed SBordier44 closed 11 months ago
If you search for
"Invalid parameter amount. Amount must be at most €10,000.00 EUR"
in Dolibarrs source code, do you find it any where?
Hello Jon, Thanks a lot for your answer :)
I searched, yes, unfortunately I found nothing. However, I found this error in the Stripe API log console.
Obviously, the paymentIntent object sent by Dolibarr to the Stripe API is no longer really what is expected with the latest versions of the Stripe API. I think the objects sent to Stripe remained in the format of Stripe API version 2020-08-27. https://github.com/Dolibarr/dolibarr/blob/445824f7833f04b86bca65ad3fbe0acc8f888112/htdocs/stripe/config.php#L55
I compared the calls made with the developer scripts provided by Stripe and the calls made by Dolibarr and the format is not the same. I think that's where the error comes from.
Here's where the code falls into error: https://github.com/Dolibarr/dolibarr/blob/445824f7833f04b86bca65ad3fbe0acc8f888112/htdocs/stripe/class/stripe.class.php#L535
I would have liked to help evolve the Stripe code in Dolibarr, but I admit I'm a little lost, I'm relatively new to the Dolibarr world, and I'm a little short of time ^^
Hello,
In the Stripe documentation there's a 10k€ limit specified for SEPA direct debits. Maybe you're in this case.
Hi Pascal :) Thanks for reply! i'm not in this case, i'm use a credit card. When make tests with Stripe api demo scripts, payment of an amount greater than €10,000 works fine.
Hi ! I think that this message is directly coming from the Stripe API. Maybe there's a limitation on your Stripe account ?
Hi Maxime! After verifications, no, I do not have any limitations on my account.
I did tests with Stripe's quickstarts without having any problems with an amount greater than €10,000. https://stripe.com/docs/payments/quickstart
Indeed, I confirm that the message comes from the API. But this error does not occur with Stripe quickstarts.
The only link I found is the PaymentIntent object sent by Dolibarr which does not match what I found in the Stripe docs.
Could someone test it to make sure the issue isn't mine?
Thanks :)
Um.... I found the problem which ultimately isn't a problem...
In the Stripe module options, I had the option "Enable direct debit payments with Stripe" activated, which added the "sepa_debit" item in the payment_method_types array of the API call.
Payments by direct debit being in fact limited to €10,000, this was the reason for the error.
After deactivating this option, everything works correctly :D
Really sorry for the inconvenience and thanks again to everyone and especially to @hansemschnokeloch because he had a good line of research!
Good luck to the Dolibarr dev team, you do a great job, well done and thank you ^^
Bug
Hi, when I want to pay an invoice of more than €10,000, I get the error "Invalid parameter amount. Amount must be at most €10,000.00 EUR".
I tried to change the API version to 2023-10-16 with the STRIPE_FORCE_VERSION parameter, without success, the problem remains the same.
I tried to update the lib in the include/stripe/stripe-php folder but that doesn't change anything.
--
I carried out some tests with the Stripe API outside of Dolibarr by following the Stripe developer documentation and it works very well with large amounts. Namely, the limit of a paymentIntent is 999,999.99 :-)
Does anyone have an idea/way to correct this?
Thank you all and by the way, great work you do, thank you ^^
Environment Version
1.8.3
Environment OS
Linux (shared hosting)
Environment Web server
Apache 2.4
Environment PHP
8.2
Environment Database
MariaDB 10.6.16
Environment URL(s)
(private)
Expected and actual behavior
No response
Steps to reproduce the behavior
Attached files