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

CIVICRM-668 Credit card type is unset on submission causing credit card payment to fail with CVV validation error message

    Details

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

      Description

      Credit card type is unset on submission causing credit card payment to fail with CVV validation error message. This is a regression bug introduced with CiviCRM 4.7.25

      Step to reproduce:

      1. In CiviCRM, change default credit card name for "Amex" to "American Express".
      2. Submit a test credit card transaction using an American Express test credit card number, 378282246310005
      3. Contribution will fail with CVV validation error message.
      4. Existing code does not set the credit card type on submission, causing the CVV not to be validated correctly. American Express uses 4 digit CVV.

      The problem stems from:

      1. Credit card names being converted to lower case using getCreditCardCSSNames
      2. Then later CRM_Contribute_PseudoConstant::creditCard is used to populate the select
      3. And then the two values are compared, case mismatch
      4. The select option label was also being set instead of the select option value

      Agileware Ref: CIVICRM-668

        Attachments

          Activity

            People

            • Assignee:
              agileware Agileware
              Reporter:
              agileware Agileware
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: