CRM-13035 CRM Core Payment BaseIPN.php : function validateData() uses DAO objects instead of BAO objects

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.3, 4.3.4, 4.3.5
    • Fix Version/s: 4.3.6
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The validateData function instantiates a CRM_Contribute_DAO_Contribution object.

      A few lines later, the call of loadObjects() function will erase this object by a new one because this object type "CRM_Contribute_DAO_Contribution" doesn't match "CRM_Contribute_BAO_Contribution".
      There is no legacy.

      Consequently, the line CRM_Utils_Date::isoToMysql() has no effect.
      An "1292" MySQl error may occured in case of contribution failure. -> Date invalide.
      (cf attachment)

      I suggest to instantiate BAO objects for contribution and contact.

        Attachments

          Activity

          [CRM-13035] CRM Core Payment BaseIPN.php : function validateData() uses DAO objects instead of BAO objects
          Kurund Jalmi added a comment -

          Can you please provide the steps to replicate this problem.

          Valéry Gouleau added a comment - - edited

          This bug is almost the same that CRM-11098,
          but appears during the failed method (instead of cancelled method).

          To resolve, it's possible to add this in the failed() method :
          $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);

          But i think the origin of the problem is in the validedata() function (BaseIPN.php) as i describe above.

          Pratik Joshi added a comment -

            People

            • Assignee:
              Pratik Joshi
              Reporter:
              Valéry Gouleau

              Dates

              • Created:
                Updated:
                Resolved: