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

Function handlePaymentExpress in PayPalProIPN.php returns wrong PaymentProcessorID

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.13
    • Fix Version/s: 4.7.16
    • Component/s: CiviContribute
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      In the function handlePaymentExpress, lines 579-585 reads:

      {{ $paymentProcessorID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType',
      'PayPal', 'id', 'name'
      );

      if (!$this->validateData($input, $ids, $objects, TRUE, $paymentProcessorID))

      { throw new CRM_Core_Exception('Data did not validate'); }

      }}

      This causes $paymentProcessorID equal to the processor type ID of 2, which is PayPal and not the ID of the actual payment processor, so the validation always fails. The correct code can be found on lines 447 - 459. It first finds the Type ID for PayPal and then looks for the payment processor for that ID.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              loganbear Logan Bear
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: