Tytan888 / CSSWENG-S11-G1

0 stars 0 forks source link

Field validation: limit the maximum amount donatable #14

Closed rpineda26 closed 11 months ago

rpineda26 commented 11 months ago

💾 Description: Currently, the maximum limit for donation is: Php 9 999 999

⏰ Expected Outcome: Provide a warning when the input amount for donation is greater than PHP 100 000.

☎️ Actual Outcome: No warning is given when amount entered is greater than the current limit (9 999 999). The submit request will not return a response.

image

🎶 Steps to Reproduce:

  1. Choose a project to donate to
  2. Input 9 999 999 to check that it works properly.
  3. Choose another project (or just go back to the same project)
  4. Input 10 000 000 to check that the website will not be redirected to paymongo (stuck loading).
Tytan888 commented 11 months ago

🛠️ Fix: According to PayMongo, the maximum transaction amounts that may be handled by the API are as follows... image

To restrict the user from inputting an amount greater than the allowed limit (for card and e-wallets), the front-end now provides validation to disallow users from proceeding to payment when inputting such a high amount (namely an amount greater than ₱100,000). image

☑️ New Output/Behavior: The page now disallows proceeding to the PayMongo checkout page when an amount greater than ₱100,000 is detected in the amount field. image