Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12353

installments array value not set

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              poorhaus Sean MacGillivray
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 minutes
                2m
                Remaining:
                Remaining Estimate - 2 minutes
                2m
                Logged:
                Time Spent - Not Specified
                Not Specified