-
Notifications
You must be signed in to change notification settings - Fork 191
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
Added Donation Limiting for Logged-In Users. #138
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks @d4mation- , we'll continue refining in this branch. We want to add this feature to core though, just need to ensure it's done right before merging into master. |
DevinWalker
pushed a commit
that referenced
this pull request
May 21, 2015
Added Donation Limiting for Logged-In Users.
jonwaldstein
added a commit
to jonwaldstein/givewp
that referenced
this pull request
Aug 15, 2023
* feature: add preview class to donation form and update form design base style * Feature: Add recurring support to donation form processing (impress-org#137) * feature: scaffold subscription support in donate controller * feature: add createSubsription logic to next gen test gateway * refactor: update donation amount field subscription props and tweak amount rendering * tests: update unit tests for subscriptions * feature: update subscription field default values * tests: add toSubscription test * feature: add controller actions, listeners, and tests * chore: update base style for link focus background * tests: update validated data test * chore: revert default values back to one-time * refactor: change method to getAmountFormatted * refactor: sanitize subscriptionPeriod and donationType --------- Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> * Feature: Add recurring donation support in the form builder (impress-org#128) * wip * chore: Update package-lock * wip * wip * wip * fix: Revent condition for showing the amount input * wip * chore: Remove unsused settings * chore: Remove unused element * chore: Remove default max donation value * chore: Add help text * chore: Add default for block attribute Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * fix: Adjust repeater control alignment * refactor: Add min/max validation rules * refactor: Translate fixed price text * refactor: Replace Interweave * wip * Feature: Amount Field settings updates (impress-org#119) * wip * chore: Update package-lock * wip * wip * wip * fix: Revent condition for showing the amount input * wip * chore: Remove unsused settings * chore: Remove unused element * chore: Remove default max donation value * chore: Add help text * chore: Add default for block attribute Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * fix: Adjust repeater control alignment * refactor: Add min/max validation rules * refactor: Translate fixed price text * refactor: Replace Interweave * chore: Remove bottom margin --------- Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * wip * wip * chore: remove old amount template * chore: update description and rename function * chore: Remove console log * refactor: Update select option values to strings * chore: Remove invalid prop * refactor: Remove recurring period setting * refactor: Remove recurring period placeholder * refactor: Enforce at least one billing period * chore: Remove recurring period setting * refactor: Make month the default billing period * refactor: Change optin default to select * refactor: Remove recurringPeriod attribute * refactor: remove recurringOptInDefault attribute * refactor: Format default billing period options * refactor: Hide recurring message if one-time * refactor: Update billing period selector * fix: Update fixed message for one-time donation * fix: capitlize only first letter of label * refactor: merge recurring messages and simplify conditional message display --------- Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> Co-authored-by: Jon Waldstein <jonwaldstein@macbook-air.mynetworksettings.com> Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> * Feature: Add recurring UI to donation form (impress-org#138) * feature: scaffold donation period selector * feature: set form values on change * feature: add radio field to template api * feature: implement amount period as radio group * refactor: append fields to amount group in converter for dynamic field types * fix: remove margin bottom from amount levels * chore: remove custom donation period component in favor of built in radio group * fix: donation type single * fix: remove default checked * refactor: rename once to one-time * chore: add one-time to front-end validation * chore: revert front-end validation * refactor: change reValidateMode to onBlur to prevent weirdness with validating after form submission * feature: scaffold amount field converter to fields api using mock block attributes * feature: add logic for donor choice and preset configuration * refactor: update logic for frequency, installments, and donationType default values * feature: scaffold fixed amount recurring message * refactor: remove donor preset from logic * feature: add donation choice conditional * refactor: update donation amount group to isolate fixed messaging * refactor: add mock option default value * refactor: repalce mock with block attributes * fix: default period * refactor: lower gap value * feature: add additional error handling * chore: uncomment logic * tests: update unit tests with recurring attributes * fix: use option object for subscription period options * refactor: use sprintf for gateway exception * feature: add subscriptionPeriod value objects and implement labels * chore; remove unused donationType in summary * feature: add capitalize method to subscription period * Feature: Recurring Donations Promotion (impress-org#140) * wip * chore: Update package-lock * wip * wip * wip * fix: Revent condition for showing the amount input * wip * chore: Remove unsused settings * chore: Remove unused element * chore: Remove default max donation value * chore: Add help text * chore: Add default for block attribute Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * fix: Adjust repeater control alignment * refactor: Add min/max validation rules * refactor: Translate fixed price text * refactor: Replace Interweave * wip * Feature: Amount Field settings updates (impress-org#119) * wip * chore: Update package-lock * wip * wip * wip * fix: Revent condition for showing the amount input * wip * chore: Remove unsused settings * chore: Remove unused element * chore: Remove default max donation value * chore: Add help text * chore: Add default for block attribute Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * fix: Adjust repeater control alignment * refactor: Add min/max validation rules * refactor: Translate fixed price text * refactor: Replace Interweave * chore: Remove bottom margin --------- Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> * wip * wip * chore: remove old amount template * chore: update description and rename function * chore: Remove console log * refactor: Update select option values to strings * chore: Remove invalid prop * refactor: Remove recurring period setting * refactor: Remove recurring period placeholder * refactor: Enforce at least one billing period * chore: Remove recurring period setting * refactor: Make month the default billing period * refactor: Change optin default to select * wip * chore: Tweak promo button styles * refactor: Simplify conditionals * wip * chore: Update promo links * refactor: Filter gateways by NextGen support * chore: Add type for Gateway --------- Co-authored-by: Jon Waldstein <Jpwaldstein@gmail.com> Co-authored-by: Jon Waldstein <jonwaldstein@macbook-air.mynetworksettings.com> Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> * Feature: add recurring support for stripe (impress-org#141) * feature: scaffold stripe subscription module from credit card module * feature: scaffold gateway logic * refactor: match legacy logic by creating subscription from customer object * feature: add check for recurring for stripe module * chore: remove console og * refactor: simplify gateway api client to localize gateways properties including supportsSubscriptions * tests: update unit tests * feature: add stripe transaction ID link * feature: add legacy stripe adapter for donation detals * refactor: update stripe logic to use the elements_enable_deferred_intent_beta_1 and only create intents after form submission * refactor: cleanup unused and remove application fee percent from subscriptions * feature: add processing status to donations * feature: defer processing status if using credit card * refactor: update variables without completed * feature: filter subscription name * refactor: git status * refactor: add seperate meta update methods * feature: hook into give-recurring invoice.payment_succeeded event and add listener for next gen * fix: update webhook logic * docs: update comments * feature: add subscription complete to webhook * feature: add webhook listeners for all supported legacy stripe events * tests: update stripe create payment test * refactor: rebuild legacy recurring traits in module, write tests for createSubscription, and hold off on SubscriptionPaymentMethodEditable for now * refactor: move intent webhook listener logic to processEvent and write tests while avoiding exit statement * tests: update stripe test namespaces * refactor: update webhook listneres with try catch * tests: wip for invoice payment succeeded test * tests: add mockStripeAccounts * tests: add invoice payment succeeded tests * tests: add invoice payment failed test * test: add CustomerSubscriptionDeletedTest test * tests: add test for ChargeRefunded * fix: webhook logic needs to use elseif conditionals * refactor: mark all donations as processing regardless of card * fix: invoice payment succeeded should be able to create renewal and complete subscription during one request * refactor: remove can sync for now * chore: update legacy stripe adapter descriptions * chore: update description * chore: update description Generate Payment Intent * docs: update with comments on RespondToBrowser * refactor: update payment intent with new DTO implementation * refactor: use SubscriptionModelDecorator for InvoicePaymentSucceeded * chore: remove unused * refactor: add check for zero decimal currencies * refactor: remove beta flag and update stripe js libraries with updated implementations --------- Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> * feature: add NextGenTestGatewaySubscriptionModule and register in service provider (impress-org#149) Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> * Feature: add recurring support for PayPal Standard (impress-org#148) * feature: add subscription module class * feature: scaffold create subscription functionality * wip: port over permalink and pre-gatewayId * fix: add invoice id prefix from legacy * docs: add docs for invoice arg * feature: port over legacy cancel subscription functionality * tests: fix failing view model test --------- Co-authored-by: Jon Waldstein <jonwaldstein@jons-air.mynetworksettings.com> Co-authored-by: Kyle B. Johnson <kjohnson@users.noreply.github.com> Co-authored-by: Jon Waldstein <jonwaldstein@macbook-air.mynetworksettings.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moved the Pull Request from Master -> donation_limits.
Text from PR on Master:
I was working on donations for a political campaign website and needed to limit the total donation (Past and Current) to a certain value. I guess they couldn't accept donations from any singular party over $500.
This adds that functionality per-form. It works best when Guest Donations are turned off as those cannot be as easily tracked. I didn't want to filter by IP because that could blacklist entire office buildings for example.
I apologize for the indentation in some of these files. It looked fine in Brackets, but the DIffs show otherwise.