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) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Recurring dues with initiation fee and cutoff date (PayPal Pro)
Pages: [1]

Author Topic: Recurring dues with initiation fee and cutoff date (PayPal Pro)  (Read 986 times)

rkuykendall

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Recurring dues with initiation fee and cutoff date (PayPal Pro)
March 16, 2012, 02:34:04 pm
I'm having trouble with recurring payments and PayPal Pro. Here's my goal:
Quote
1 Year of Member Dues
$4.99 plus $1/month for the following 11 months, after which they must renew.
$15.29 ( which is the total of the above deal, with 10% taken off ), after which they must renew.

1 Year of [Leader] Dues
$9.99 plus $1/month for the following 11 months, after which they must renew.
$19.79 ( which is the total of the above deal, with 10% taken off ), after which they must renew.

It has been a while since we used recurring payments on this site, but I had used code in the past to tag an initiation fee onto the recurring payments, using the PayPal API. I added a line to the code to limit the billing cycles so that only 11 months were charged.

Code: [Select]
function get_fees()   { return array('1' => 4.99, '2' => 9.99); }

function initiation_fee_civicrm_alterPaymentProcessorParams( $paymentObj, &$rawParams, &$cookedParams ) {
  $fees = get_fees();
  $formid = $rawParams['contributionPageID'];

  if($fees[$formid]) {
  // This is used to add the initiation fee to the order
  $cookedParams['initamt'] = $fees[$formid];
  $cookedParams['failedinitamtaction'] = 'CancelOnFailure';           

  // This will hopefully limit the cycles to 11
  $cookedParams['totalbillingcycles'] = 11;           
  }
}

Unfortunately, I'm not having any luck. The code inside that if block is being run, but no initiation fee is charged and the charges are not recurring. Where do I have to enable recurring payments for PayPal Pro?

rkuykendall

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Recurring dues with initiation fee and cutoff date (PayPal Pro)
March 20, 2012, 06:20:02 pm
27 reads but not a single response? come on, somebody say something, even if it doesn't help me any.

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 dues with initiation fee and cutoff date (PayPal Pro)
March 20, 2012, 08:03:03 pm

have u set your contrib page to be recurring. This is found in the configuration pages of the contrib page

if that is set, then i would check and ensure those params are sent to paypal ( in CRM/Core/Payment/PayPalImpl.php)

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

rkuykendall

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Recurring dues with initiation fee and cutoff date (PayPal Pro)
March 25, 2012, 07:36:12 pm
Ah, I didn't have "Contribution Amounts section" enabled, since I didn't want them to be able to select contribution amounts.

Thank you, Lobo.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Recurring dues with initiation fee and cutoff date (PayPal Pro)

This forum was archived on 2017-11-26.