Page 1 of 1
Any Help With Stripe
Posted: Wed Feb 23, 2022 8:44 pm
by gabbysplaza
Hello,
I have issued my customers a 100% discount code for a promo product. After they checkout, Stripe throws the following error:
This value must be greater than or equal to 1.
thrown in /home/public_html/catalog/includes/apps/stripe_sca/lib/Exception/ApiErrorException.php on line 38
I understand why this happens but I was wondering if someone can guide me to add something in the code to check if amount is 0.00 then don't attempt to process a payment.
I have asked addon author before but solution he offered was COD which I could not get implemented.
app.php/addons/free_addon/stripe_paymen ... /topic/405
I don't know where in code to do this, so please point me to right file and I can simply add an "if" amount is zero then don't process a payment. Can anyone who uses Stripe show me how to do this?
Thank you
Re: Any Help With Stripe
Posted: Thu Feb 24, 2022 1:34 pm
by raiwa
Hi,
Support for addons is given in the support tab of the addon where you downloaded it.
However, I believe this can't and shouldn't be addressed, like exposed by you, within the stripe payment processing. So it's a more generic question which can be treated here in the general forum.
You may try to use a copy of the COD (Cash on delivery) payment module which does not do any processing.
Then modify the part which disables the module for virtual orders to enable/show it only for orders with zero order total amount. Also change the title for your needs.
Then disable the stripe module (and all other payment modules you may be using) if the order total amount is zero. Use the appropriate modified part of code from the modified COD copy.
Hope this helps
Rainer
Re: Any Help With Stripe
Posted: Thu Feb 24, 2022 6:16 pm
by gabbysplaza
Hi,
I'm not sure what the problem here is. What I need to do can be done, so I don't understand why you say it can't or shouldn't be addressed. Why not? This is an addon and can be modified like all the other countless addons.
I do not want to use COD nor do I wish to get rid of Stripe, so suggestions so far do not address my issue. Stripe does all that I require except I need to modify it's behaviour in this part.
All I need to know is where/what file does the payment processing so I can modify it so it does not error out for 0.00 value orders. This is a simply enough thing to do. It's puzzling when words like can't or shouldn't are applied to addons or mods. The whole point of them is that they can be modified and customised to user needs.
Thank you.
Re: Any Help With Stripe
Posted: Thu Feb 24, 2022 7:52 pm
by raiwa
The problem of your idea to modify and use the stripe module is that the required modifications are not so easy like you believe.
It would require to modify at least 3 parts of the module (and 2 files):
1. the confirmation part which shows the card input fields on checkout confirmation.php. Your customers won't understand that they have to enter credit card data for a free order.
2. The processing of the card data (connection and data transfer to Stripe).
3. The order processing and validation with all actions like stock deduction, order confirmation mail and order status update.
And probably more things like additional security checks.
So it's much more easy to do what I suggested. Applying all the above modifications would be a developer job for which you would have to pay. I, and I believe the other users and developers here, would not guide you how to do this for free.
I do not suggest to use COD always, only as a dummy alternative payment module for the concrete case of zero value orders.
I do not suggest to get rid of stripe. Only for the zero value orders.
If you don't understand how my solution would work and how to realize it, doesn't mean that it does not address your problem.
Meanwhile, the kind of answer and evaluation you gave to my suggestions (for which I'm spending my free and volunteer time) doesn't motivate me (and probably other users here) to continue giving you support here in the forum.
You should be more thankful for it.
Best wishes
Rainer
PS: I found that I gave you already the same suggestions 4 months ago in the Stripe support area and you didn't evaluate it then so negative. No idea why it took you 4 months to come back with this issue.