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

Initial Completed Installment of Recurring Contribution Creates Incorrect Payment Instrument and Extraneous Financial Transactions

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Hi all,

      This is an issue that I am not sure can be recreated in demo, but you should be able to recreate it on a dev site with any payment processor (confirmed the issue appears when using PayPal, Authorize.net and iATS).

      To reproduce:
      Create a recurring contribution - once the initial pending installment has been replaced with the completed contribution, look at the financial transaction records associated with the transaction ID - all with positive net_amounts and all with is_payment = 1, but the impact on the financial transactions seems to vary with payment processor.

      For authorize.net, you should three transactions have a to_financial_account_id = 17 (payment processor account), and:

      1. a positive total_amount with payment_instrument_id = 1
      2. a negative total_amount with payment_instrument_id = 4
      3. a positive total_amount with payment_instrument_id = 1

      The contribution itself also looks quite strange with "Check (Credit Card)" listed as the payment instrument when viewing the contribution - see attached screen shot for visual reference.

      For paypal, you should see four transactions:

      1. a positive total_amount, fee_amount and net_amount with payment_instrument_id = 1, to_financial account_id = 17
      2. a positive total_amount = fee_amount listed on first transaction, with $0 fee an net amounts with payment_instrument_id = 1 and to_financial_account_id = 10 (banking fees)
      3. a negative total_amount, positive fee_amount and net_amount with payment_instrument_id = 4 and to_financial_account_id = 17
      4. a positive total_amount, fee_amount and net_amount with payment_instrument_id = NULL, to_financial account_id = 17

      FYI - only a single line item and a single financial item record are created for the same transaction (the expected behavior) - it seems the issue lies in the financial transaction behavior.

      Thanks in advance for your time in looking into this and happy to test PR when one becomes available!

      Kind regards,
      Tamar

        Attachments

        1. first_installment_pending_contribution.png
          185 kB
          Tamar Meir
        2. payment_method_mia.png
          24 kB
          KarinG
        3. payment_method.png
          69 kB
          KarinG
        4. recurring_donation.png
          227 kB
          Sunil Pawar

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tamar Tamar Meir
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: