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

Link Payment Processor directly to a financial account (instead of financial type)

    Details

      Description

      1. Insert a civicrm_financial_account for to be used as the Asset Account by default for Payment Processors (new install meta data, and upgrades).
      ('

      {ts escape="sql"}

      Payment Processor Account

      {/ts}

      ' , @domainContactId, @opAsset, 'Account to record payments into a payment processor merchant account', '1150', 0, 1, 0, 0),

      2. Remove financial_type_id from civicrm_payment_processor table (schema and upgrade change)

      3. Modify Admin/Form/PaymentProcessor.php to replace financial_type_id field with financial_account_id.

      • Label: "Financial Account"
      • Select includes only financial accounts where financial_account_type is 'Asset'
      • Post Process inserts or updates civicrm_entity_financial_account row:
        entity_table = 'civicrm_payment_processor', entity_id = payment_processor.id, account_relationship = 'Asset Acccount is'.

      4. Add a column for Financial Account 'name' to the Payment Processor selector after the Description column (CRM/Admin/Page/PaymentProcessor.php).

      5. Modify postProcess code for online contributions to lookup the financial account linked to the payment processor used - and use that account id as the to_financial_account_id in the financial_trxn record. (This replaces the logic which looked up the Asset Account associated with the financial type previously stored in payment_processor record.)

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: