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) »
  • possible CRM/Core/Payment/PayPalIPN.php error
Pages: [1]

Author Topic: possible CRM/Core/Payment/PayPalIPN.php error  (Read 1304 times)

dougall

  • Guest
possible CRM/Core/Payment/PayPalIPN.php error
August 27, 2008, 11:50:43 am
Hi,

I've been looking at the payment processors (in CiviCRM v2.1a4).

I notice that in CRM/Core/Payment/PayPalIPN.php lines 146-156 are responsible for adding new contribution objects for repeat contributions. By inspection it looks like there is error where the contribution_type_id is set:
Code: [Select]
$contribution->contribution_type_id  = $contributionType->id;

At this stage in the code there doesn't appear to be an active variable called $contributionType.

However although BaseIPN.php does define $contributionType and stores it in $objects["contributionType"] (BaseIPN.php line 116) in the function loadObjects() which has occured by this stage, so I suggest the following line is added prior to the above code (i.e. inserted at line 150)
Code: [Select]
$contributionType=$objects["contributionType"];

I reiterate that I've noticed this purely by inspection and I'm not actually using the PayPal payment processor so this is untested. Apologies if I'm incorrect.

Thanks,
   Dougall
« Last Edit: August 27, 2008, 11:53:09 am by dougall »

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: possible CRM/Core/Payment/PayPalIPN.php error
August 27, 2008, 12:02:24 pm

this was found and fixed in the repository. I liked your solution a bit better, so i reworked the fix

thanx for tracking this

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) »
  • possible CRM/Core/Payment/PayPalIPN.php error

This forum was archived on 2017-11-26.