CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • recurring payment units and intervals configuration
Pages: [1]

Author Topic: recurring payment units and intervals configuration  (Read 2464 times)

chrism

  • Guest
recurring payment units and intervals configuration
December 09, 2007, 01:59:12 pm
I have a proposed generalization to the payment processor recurring payment configuration.  This is motivated by the PsiGate payment processor which only supports recurring periods of 1 day, 1 week, 1 month, 1 quarter, or 1 year (i.e. doesn't allow intervals of X days), but may be generally useful.  I had a brief discussion with lobo about this on IRC, but have fleshed out the idea here for comments.

1) Add "supported recurring units" option group to each payment processors  which could be one or more of "day, week, month, quarter, year".  This is hard coded based on processor specification.

2) Add "support recurring intervals" boolean to each payment processor. False means recurring intervals are fixed at "1". True means any interval integer is supported.  This is hard coded based on processor specification.

3) Add "enabled recurring units" option group for each payment processor.  A subset of the "supported recurring units" can be selected on the payment processor configuration page.

4) Add "enable recurring intervals" boolean for each payment processor.  If "support recurring intervals" is true, then this value can be set to either true or false on the payment processor configuration page.   If "support recurring intervals" is false, then this value is set to false and no option is provided on the payment processor configuration page.

5) Dynamically adjust the interface on payment forms as follows:

a) If "enable recurring intervals" is true, then the "recurring interval" input field is presented, and the "recurring units" drop down box is populated with "enabled recurring units" appended with '(s)' suffix.   
(eg. I want to contribute this amount every [     ] ['week(s)', 'month(s) ])

b) If "enable recurring intervals" is false, then only the "recurring units" drop down box is populated with "enabled recurring units".  The "recurring interval" input form is hidden and set to a value of 1 so that  correct parameter value is passed.
(eg. I want to contribute this amount every ['week', 'month' ])

c) If there is only one value is the "enabled recurring units" array, then the units are presented just as text and not a drop down box.   
(e.g. 'I want to contribute this amount every month.'   OR 'I want to contribute this amount every [     ] months.'


Note, that the parameter values passed to the payment processors functions would not change so this is a cleanly separately interface change. 

I can imagine general use cases for this where an organization wishes to streamline their interface and reduce accounting outliers (e.g. someone donating every 17 days).  Probably 95% of recurring payment situations would be covered with options of "every week|month|year".

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: recurring payment units and intervals configuration
December 09, 2007, 05:53:14 pm

Chris:

these are some good points and I suspect we'll get them into 2.1. Its a bit too late for 2.0 (as we are a bit late on the code freeze date already, so i've scheduled this for 2.1). The relevant issue is at: http://issues.civicrm.org/jira/browse/CRM-2488

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • recurring payment units and intervals configuration

This forum was archived on 2017-11-26.