Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(payments): add min global payment limit override #7291

Merged
merged 6 commits into from
Apr 29, 2024

Conversation

KenLSM
Copy link
Contributor

@KenLSM KenLSM commented Apr 28, 2024

Problem

Closes frm-1720

Solution

Breaking Changes

  • No - this PR is backwards compatible

Before & After Screenshots

Header Header Header
Cell Cell Cell
Cell Cell Cell
Cell Cell Cell

Tests

Approach for testing should be largely regressive in nature, as we do not have an account has this capability enabled from the 3rd party side (stripe).

Regression
Variable Payment - Admin

  • Create a variable payment form
  • Ensure that $0.49 cannot be set as the lower limit
  • Ensure that error message and placeholder should reflect $0.50 as the minimum amount
  • Ensure that $0.50 can be set as the lower limit and saved
  • Ensure that $10 can be set as the upper limit and saved

Variable Payment - Respondent

  • Load the variable payment form
  • Ensure that the lower limit cannot be lower than $0.50
  • Ensure that the lower limit prompt show Enter an amount between S$0.50 and S$10.00.
  • Ensure that a successful payment can be made with $0.50
  • Ensure that the upper limit cannot be higher than $10
  • Ensure that a successful payment can be made with $10

Payment By Products - Admin

  • Create a payment by products form
  • Create a product priced at $10
  • Ensure that product can be saved
  • Create a product priced at $25
  • Ensure that product can be saved

Payment By Products - Respondent

  • Load the payment form
  • Make a payment with both items selected
  • Ensure that a successful payment can be made

New feature test
Variable Payment - Admin

  • Create a variable payment form
  • On the DB set payments_field.global_min_amount_override to be 10 (Int32)
  • Ensure that $0.09 cannot be set as the lower limit
  • Ensure that error message and placeholder should reflect $0.10 as the minimum amount
  • Ensure that $0.10 can be set as the lower limit and saved
  • Ensure that $10 can be set as the upper limit and saved

Variable Payment - Respondent

  • Load the variable payment form
  • Ensure that the lower limit cannot be lower than $0.09
  • Ensure that the lower limit prompt show Enter an amount between S$0.10 and S$10.00.
  • Ensure that a successful payment can be made with $0.10
  • Ensure that the upper limit cannot be higher than $10
  • Ensure that a successful payment can be made with $10

Copy link

linear bot commented Apr 28, 2024

@KenLSM KenLSM changed the title Feat/frm 1720 payment limit flag feat(payments): add min global payment limit override Apr 28, 2024
@KenLSM KenLSM requested a review from justynoh April 28, 2024 14:01
@sebastianwzq
Copy link
Contributor

Discussed with Ken regarding concerns of hidden feature and tech debt to maintain said feature.

@KenLSM KenLSM merged commit 6f32e46 into develop Apr 29, 2024
20 of 22 checks passed
@KenLSM KenLSM deleted the feat/frm-1720-payment-limit-flag branch April 29, 2024 07:09
@KenLSM KenLSM mentioned this pull request Apr 29, 2024
38 tasks
KenLSM added a commit that referenced this pull request Apr 30, 2024
* fix(deps): bump zod from 3.23.0 to 3.23.4 in /shared (#7283)

Bumps [zod](https://github.com/colinhacks/zod) from 3.23.0 to 3.23.4.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](colinhacks/zod@v3.23.0...v3.23.4)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: reduce output, check gh login auth status only if not logged in (#7282)

* fix(deps): bump type-fest from 4.16.0 to 4.17.0 in /shared (#7287)

Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 4.16.0 to 4.17.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v4.16.0...v4.17.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: add localhost domain into cors, used by attachment uploads (#7280)

* feat(payments): add min global payment limit override (#7291)

* add flag to allow global min override in form

* allow fe variable fields to pass fe validators

* allow respondent variable payment flow to respect global min override value

* remove check min value check on respondent payment submission

* fix: add missing default variable

* test: add test cases for global limit

* feat(btn): phase 2 - add growthbook toggle to control adding twilio creds (#7290)

feat: add growthbook toggle to control adding twilio creds

* fix: update chromium version (#7294)

update chromium version

* fix(deps): bump type-fest from 4.17.0 to 4.18.0 in /shared (#7297)

Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 4.17.0 to 4.18.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](sindresorhus/type-fest@v4.17.0...v4.18.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(payments): allow 0 cents (#7298)

fix: allow 0 cents

* fix(btn): use different growthbook api (#7299)

use different growthbook api

* chore: bump version to v6.118.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants