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

Store card type and last 4 digits of credit card

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Important
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.17
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Store the credit card type used to make a payment.

      Background
      Payment pages for contributions (including for memberships) and events have some in-browser code that recognizes the card type based on the card number entered - it dims the other card types after the entry is completed. This is necessary to support the Accepted Credit Cards functionality that pre-filters card data before it is sent to the payment processor.

      Many organizations need to batch transactions associated with Visa, Mastercard and Discover separately from Amex. A common reason is these transactions are being received separately from the payment processors, and there is a need to reconcile at the batch level.

      Implementation:
      1. Add civicrm_financial_trxn.card_type and civicrm_financial_trxn.pan_truncation
      2. On upgrade, add the field.
      3. On Create/Edit Contribution form, in Payment Details fieldset, add field as a select widget after Payment Method.
      4. On New Membership form, in Payment Details section, add field as a select widget after Payment Method.
      5. on New Event Registration form, in Payment Details section, add field as a select widget after Payment Method.
      6. Add a Card Type multi-select widget to Find Contributions and Advanced Search, Contributions fieldset.

      when a credit card is used for a transaction, store the last 4 digits in the payment record (civicrm_financial_trxn) for reference.

      As of Mar 14:
      https://github.com/civicrm/civicrm-core/pull/9876 merged
      https://github.com/civicrm/civicrm-core/pull/9877 closed, need to replace fn with api call in lots of places
      https://github.com/civicrm/civicrm-core/pull/9878 wip - maybe ready?
      https://github.com/civicrm/civicrm-core/pull/9879 closed, need to replace fn with api call in various places
      https://github.com/civicrm/civicrm-core/pull/9880 open
      https://github.com/civicrm/civicrm-core/pull/9881 open, needs to be refactored significantly

        Attachments

          Activity

            People

            • Assignee:
              joemurray Joe Murray
              Reporter:
              pradeep.nayak Pradeep Nayak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: