CRM-20392 Credit card payment not recorded when contribution is partially paid

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.20
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      IIDA ticket : https://jmaltd.atlassian.net/browse/IIDA-108

      Steps to replicate:

      1. Create a contribution with status = Partially Paid
      2. Navigate to the contribution tab on the summary page and click on submit credit card payment from the options next to the contribution record.
      3. After filling in the fields and clicking submit, the payment is not successful and there are notice errors below:
      • Notice: Undefined index: billing_state_province_id-5 in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 516 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).
      • Notice: Undefined index: billing_country_id-5 in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 517 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).
      • Notice: Undefined index: credit_card_exp_date in CRM_Core_Payment_Form::getCreditCardExpirationYear() (line 418 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Payment/Form.php).
      • Notice: Undefined index: credit_card_exp_date in CRM_Core_Payment_Form::getCreditCardExpirationMonth() (line 401 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Payment/Form.php).
      • Notice: Undefined index: credit_card_exp_date in CRM_Core_Payment_Form::getCreditCardExpirationMonth() (line 405 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Payment/Form.php).
      • Notice: Undefined index: credit_card_exp_date in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 552 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).
      • Notice: Undefined index: credit_card_number in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 557 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).
      • Notice: Undefined variable: contributionType in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 571 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).
      • Notice: Trying to get property of non-object in CRM_Contribute_Form_AdditionalPayment->processCreditCard() (line 571 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalPayment.php).

        Attachments

          Activity

          [CRM-20392] Credit card payment not recorded when contribution is partially paid
          Monish Deb added a comment -

          Did QA on https://github.com/civicrm/civicrm-core/pull/10126 and https://github.com/civicrm/civicrm-core/pull/10129.

          Added unit test and did some additional fixes in PR 10126. Some of the code are pulled out in https://github.com/civicrm/civicrm-core/pull/10136 which was QAed by me and later merged by Eileen. During QA, Eileen and I encountered an error on payment form submission, and this was fixed in https://github.com/civicrm/civicrm-core/pull/10137 and https://github.com/civicrm/civicrm-packages/pull/178. Both the PR are tested by me.

           

          https://github.com/civicrm/civicrm-core/pull/10128 is already merged.

           

          Eileen McNaughton added a comment -

          I've closed this against 4.7.20 - it's a bit grey - that was the last PR merged, but I think perhaps the actual bug is resolved in 4.7.19

            People

            • Assignee:
              Monish Deb
              Reporter:
              Edsel Lopez

              Dates

              • Created:
                Updated:
                Resolved: