7

I've seen other systems that allow the donor to check a box to cover processing costs, similar to this:

Cover processing fees

In researching whether something like this was possible with CiviCRM, this thread is the closest I've found. The solution there is to simply put a flat rate additional amount.

I'd love some guidance on how this could be implemented more dynamically (so the amount of the fee changes based on the size of the donation) as either a default contribution page, or a Webform-CiviCRM implementation. Anyone have an idea?

  • My organization would also be interested in such a feature. We use Joomla, so I'd be sad if it were implemented using drupal webforms. – Phil Morice Brubaker Aug 10 '15 at 4:51
6

It's pretty late to be answering this, but the Percentage Price Field extension supports something very much like this.

This extension allows you to add an "Additional Percentage" field to any price set, which will automatically calculate and add an additional amount to a transaction, as a configurable percentage of other selected price set options.

Want to ask donors to give an extra 3% to cover credit card processing fees? Or to give an additional 10% of their membership fee to support a special project? Then you're in the right place.

Because it's a price set field, this option will appear as a line item in contribution records and receipts, allow configuration of financial type, label, help text, and other standard price field options, and work equally well for contributions, memberships, events -- anywhere you can use a price set.

https://civicrm.org/extensions/percentage-price-field

[Disclosure: I'm the author of this extension.]

6

Price set options that change are doable, but in order to make the totaling work, you've got to rewrite that bit of code, because it adds and subtracts the single item amount you check or uncheck.

Let's say the fee price option is pegged at 3%. You select $50, the fee option goes up to $1.50 and the total goes to $50. Now, you check the cover-my-fee box, bringing the total to $51.50. You decide to be more generous and select $100. The fee option goes up to $3, but it won't appear to take effect because the totaling only counts the change from $50 to $100. Your total will say $101.50. Now, you decide that if you're donating all that money, the least the organization can do is cover the fee. Uncheck the fee option, and the total goes to $98.50. It subtracts the option amount regardless of whether that's in the total.

The solution to this is to rewrite that javascript to total the entire thing each time something changes.

Hook_civicrm_buildAmount will take care of the amounts on the confirmation page since by that point, you'll know what options are selected.

  • Thanks for this, Andrew! I'll put it in my "rainy day" list of things to experiment with. Do you know off-hand whether post-processing on a webform_civicrm form would work? – Laryn - CEDC.org Mar 25 '15 at 15:47
  • Ooh--haven't tried that. I bet it would work, but I don't know what you'd be changing on the webform vs. anything in CiviCRM. – Andrew Hunt Mar 25 '15 at 16:06
  • I'd like to try to implement this, but I'm not seeing how to "peg" a price option to a percentage. Is that an admin-accessible option, or is it only code-able?Also, would there be a way to implement CiviDiscount to handle this sort of thing? For instance, create a negative discount applicable only to Contributions, and instead of having the "apply discount" field at the top of the contribution page, have it as a check box right above the "Total Amount." (I'm open to moving this to a new question, if that makes more sense. I'm not sure.) – Phil Morice Brubaker Jul 11 '16 at 16:39
  • It would be in custom code. Price options out-of-the-box are only fixed prices. – Andrew Hunt Jul 11 '16 at 18:57
1

The best way to achieve this would be to use price-sets and add the priceset item with the amount of the processing fees. When you have multiple donation amount options, it could be issue, but I think can be achieved via hook alter.

  • Yes, but I believe the op is looking to calculate a percentage. This will work if fixed. Also, you must make it a required option. – Sonicthoughts Jun 30 '15 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.