MozillaFoundation / donate-wagtail

[Legacy] - Wagtail based donation stack
Mozilla Public License 2.0
43 stars 22 forks source link

Upsell amounts below minimum value are invalid #1711

Closed tbrlpld closed 1 year ago

tbrlpld commented 1 year ago

Describe the bug

The upsell page suggests amounts that are below the minimum accepted amount for donations. This means the form can not simply be accepted and creates a hurdle for the donor. The donor would need to manually pick an amount above the minimum, while we are also not communicating what the minimum is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://donate-wagtail.mofostaging.net/en-US/
  2. Click on the "one time" and the "$20" options, then click either payment option (card or paypal)
  3. Fill in sandbox payment information and complete the payment.
  4. You will be redirected to the upsell page.
  5. The page suggested a monthly donation of $3. Try to confirm the upsell. See the HTML error because of a too low amount.

Expected behavior

The upsell amount should be set to be above the minimum accepted amount for monthly donations.

Or

We don't enforce the minimum amount on the upsell.

We need to define which way we want to go with.

Updated by @mtdenton, confirmed with Kevin Hill that the first behavior is the expected behavior.

tbrlpld commented 1 year ago

@mtdenton The upsell amounts seem very specific and are tied to some minimum one-time donation amounts. I think we need to come up with a bit more detail on how to handle this.

For example (https://github.com/MozillaFoundation/donate-wagtail/blob/main/donate/payments/constants.py#L29-L36):

        'monthlyUpgrade': [
            {'min': 300, 'value': 30},
            {'min': 200, 'value': 20},
            {'min': 100, 'value': 10},
            {'min': 70, 'value': 7},
            {'min': 35, 'value': 5},
            {'min': 15, 'value': 3},
        ],

Should the last upgrade be dropped or should the value be increased to 5 as well?

Some other examples seem like very specific and make me think that these values are the result of some usertesting:

        'monthlyUpgrade': [
            {'min': 393, 'value': 40},
            {'min': 262, 'value': 25},
            {'min': 131, 'value': 12},
            {'min': 92, 'value': 9},
            {'min': 46, 'value': 6},
            {'min': 20, 'value': 4},
        ],

Is there more thinking that needs to go into this or should we quick fix this by raising all values below the minimum monthly donation up to that minimum?

mtdenton commented 1 year ago

I'm making a judgement call, let's go ahead and get this into a working state for now. Honestly, we may not have to worry about any of this much longer.

tbrlpld commented 1 year ago

@mtdenton Sorry, maybe I did not phrase the question right. How do you want to bring this into a working state?

Remove upgrades that don't meet minimum amount (min 5):

        'monthlyUpgrade': [
            {'min': 393, 'value': 40},
            {'min': 262, 'value': 25},
            {'min': 131, 'value': 12},
            {'min': 92, 'value': 9},
            {'min': 46, 'value': 6},
-           {'min': 20, 'value': 4},
        ],

Or

Change the amounts that are currently below the minimum amount to be the minimum amount:

        'monthlyUpgrade': [
            {'min': 393, 'value': 40},
            {'min': 262, 'value': 25},
            {'min': 131, 'value': 12},
            {'min': 92, 'value': 9},
            {'min': 46, 'value': 6},
-           {'min': 20, 'value': 4},
+           {'min': 20, 'value': 5}, 
        ],
mtdenton commented 1 year ago

I'd say let's go with the latter here

tbrlpld commented 1 year ago

@mtdenton This is ready for testing on staging now

danielfmiranda commented 1 year ago

Just tested this out, I can confirm that the upsell amounts are now no longer under the minimum value and that this is good to go to prod.