Stripe Payment

Stripe Handling Zero Value Orders - Stripe Payment

Stripe Handling Zero Value Orders

by gabbysplaza » Mon Nov 22, 2021 10:54 am

Hello, I offer some free products with free shipping. This leaves the total at checkout to 0.00 but Stripe does not like this and throws an error when you click proceed to checkout. It says something about value must be 1 or greater than 1 (>1).

This is understandable as my checkout value is 0.00 so I was wondering if you will consider updating addon to not attempt to process a payment but just save order in admin as orders at checkout do anyway. Is this something you'll kindly consider?
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Contact:

Re: Stripe Handling Zero Value Orders

by raiwa » Mon Nov 22, 2021 11:03 am

Maybe you should address it with an alternative payment module showing instead of Stripe. Something like COD with a renamed title to something like "Free Order". Stripe is intended to be used to pay something.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Stripe Handling Zero Value Orders

by gabbysplaza » Mon Nov 22, 2021 11:06 am

raiwa wrote:Maybe you should address it with an alternative payment module showing instead of Stripe. Something like COD with a renamed title to something like "Free Order". Stripe is intended to be used to pay something.
Thank you. How would I implement your suggestion? Phoenix does not seem to have a COD module in admin.
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Contact:

Re: Stripe Handling Zero Value Orders

by raiwa » Mon Nov 22, 2021 12:03 pm

COD Title in Admin: Cash on Delivery, it's in core, just install it.
FIlename: cod.php

Then you can enable/disable the modules with something like:

Code: Select all

      if ($GLOBALS['order']->info['total'] > 0) {
and:

Code: Select all

      if ($GLOBALS['order']->info['total'] == 0) {
Just have a look into the cod module how it is done for virtual orders.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Stripe Handling Zero Value Orders

by raiwa » Mon Nov 22, 2021 1:34 pm

Forgot to say that it would be better to use copies of the modules and add your modifications there.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact: