CRM-16923 enotices when making payments in 4.7

    Details

    • Type: Bug
    • Status: Won't Do
    • Priority: Trivial
    • Resolution: Won't Do
    • Affects Version/s: 4.7
    • Fix Version/s: 4.7, 4.7.13
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      4.7 regression (perhaps because of greater fn use in 4.7 it has shown up) per pic

        Attachments

        1. Civi-Authnet error.txt
          8 kB
          Osvaldo Gomez
        2. notices.jpg
          80 kB
          Eileen McNaughton

          Activity

          [CRM-16923] enotices when making payments in 4.7
          Eileen McNaughton added a comment -

          This turned out to be a bit interesting. The IPN processing code calls loadRelatedObjects which 'guesses' the payment_processor_id if not provided.

          However, if more than one payment processor is configured for an event or contribution page there is actually no way to guess it & an invalid one is used (basically what is store in the payment_processor field.

          The patch for this deliberately introduces an enotice when this 'guess code' is hit & perhaps we will phase out the guess later.

          I expect (hope for) a couple of test e-notices to happen as a result of this.

          Alan Dixon added a comment -

          Wouldn't it make sense to allow the api call(s) that use this to specify the payment processor?

          Or even better - don't we always have the recurring contribution id here and can't we use that to more reliably pick the right one?

          Alan Dixon added a comment -

          Yeah, getting the payment processor id from the recurring record fixes this.

          https://github.com/civicrm/civicrm-core/pull/9097

          Alan Dixon added a comment -

          I've just provided a better fix for this.

          Osvaldo Gomez added a comment - - edited

          Hi guys, 

           

          On 4.7.19 and now on 4.7.22 I'm getting this error on every successful payment: 

           

          • Notice: Undefined variable: CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 2397 of /var/www/html/drupal/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
          • Notice: Undefined index: 59 in CRM_Financial_BAO_PaymentProcessor::getPayment() (line 221 of /var/www/html/drupal/sites/all/modules/civicrm/CRM/Financial/BAO/PaymentProcessor.php).
          • Notice: Undefined index: payment_processor_type_id in CRM_Financial_BAO_PaymentProcessor::getPayment() (line 248 of /var/www/html/drupal/sites/all/modules/civicrm/CRM/Financial/BAO/PaymentProcessor.php).
          • Notice: Undefined index: 59 in CRM_Financial_BAO_PaymentProcessor::getPayment() (line 249 of /var/www/html/drupal/sites/all/modules/civicrm/CRM/Financial/BAO/PaymentProcessor.php).

           

          Osvaldo Gomez added a comment -

          Here's the log

          Civi-Authnet error.txt

          For one-time payments this error shows up to the user, but the transaction is processed properly. But for recurring transactions, the status of the contribution is 'pending from incomplete transaction'. In Authnet the 1st payment is not recorded but the 'subscription' is. Then no error is shown to the user as if the transaction status was 'completed'.
           

          Chris Burgess added a comment -
          Osvaldo Gomez added a comment -

          And when I add '_&backtrace=1' to the url of the contribution form, using the 'recurring' option, as an admin, t_his error shows up: 

          Notice: Undefined index: tax_amount in CRM_Contribute_Form_Contribution_Confirm::processFormContribution() (line 984 of /var/www/html/drupal/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php).

          Osvaldo Gomez added a comment -

          For non-recurring transactions, the error notice can be hidden, in Drupal, by changing the 'Error messages to display' setting to 'None' at admin/config/development/logging. 

          Still debugging recurring payments with 'incomplete transaction' status.

          Eileen McNaughton added a comment -

          I'm going to close this - for further enotices there should be a ticket per incident (not generalised enotices exist which is a bit log logging a ticket & saying 'civi has bugs')  Enotices should be tested against master as many of these have been fixed - I think the sandbox shows them

            People

            • Assignee:
              Alan Dixon
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: