Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.1
-
Component/s: CiviContribute
-
Labels:
Description
After successfully completing a new membership transaction for an organization with a recurring membership via Paypal Standard, all aspects of the contribution, membership, and user (organization) appear to go smoothly, but the user is shown the following error:
Notice: Undefined index: installments in CRM_Core_Payment_PayPalImpl->doTransferCheckout() (line 601 of /home/musicnova/www/www/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
The line in question is:
'srt' => ($params['installments'] > 0) ? $params['installments'] : NULL,
which in context is adding the 'number of times to recur' parameter to the $paypalParams array of the transaction. Omitting this parameter entirely is legal within the paypal API and causes the Subscription to recur indefinitely, which is the behaviour I want anyway. Commenting the line out entirely fixes this for my use-case. Perhaps a better way would be:
'srt' => (isset ($params['installments']) AND $params['installments'] > 0) ? $params['installments'] : NULL,
but my PHP is a bit crappy and I am short on time right this second. Deadlines to hit, bugs to whack . . .
I experienced this under CiviCRM 4.2.7, but the line in the same file is identical in the 4.3.0 version of the same file. Apologies if this has been addressed elsewhere.