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

_ipn_process_transaction() misses parameters

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.10
    • Fix Version/s: 4.6.11
    • Component/s: CiviContribute
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      _ipn_process_transaction() takes an array with parameters (the $params array). It later calls $ipn->completeTransaction(). But instead of supplying those parameters to it, _ipn_process_transaction() builds a new array with parameters (the $input array) that it then passes to $ipn->completeTransaction(). In this process some of the parameters that were passed to _ipn_process_transaction() never get passed to $ipn->completeTransaction().

      One of these parameters is the transaction fee. So, for example, if we do:

      $result = civicrm_api3('Contribution', 'completetransaction', array(
      'sequential' => 1,
      'id' => 305,
      'trxn_id' => 'ch_17Jg51ISj0NDf41qft8dc0',
      'fee_amount' => 0.49
      ));

      the 'fee_amount' parameter doesn't get passed to $ipn->completeTransaction() and so doesn't get written to the database.

      Patch that fixes the problem for the 'fee_amount' parameter: https://github.com/civicrm/civicrm-core/pull/7479

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              borislavzlatanov Borislav Zlatanov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: