CRM-16523 baseIPN test fixes
authoreileenmcnaugton <eileen@fuzion.co.nz>
Wed, 5 Aug 2015 02:54:15 +0000 (14:54 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Wed, 5 Aug 2015 02:54:15 +0000 (14:54 +1200)
CRM/Contribute/BAO/Contribution.php

index ae495441a64868a7bfe11787f9649d382a384f42..55db953b939504ec4e9ce14b6485064b26ff82df 100644 (file)
@@ -2360,7 +2360,11 @@ WHERE  contribution_id = %1 ";
       //for tasks 'Change Participant Status' and 'Batch Update Participants Via Profile' case
       //and cases involving status updation through ipn
       // whatever that means!
-      $values['totalAmount'] = $input['amount'];
+      // total_amount appears to be the preferred input param & it is unclear why we support amount here
+      // perhaps we should throw an e-notice if amount is set & force total_amount?
+      if (!empty($input['amount'])) {
+        $values['totalAmount'] = $input['amount'];
+      }
 
       if ($values['event']['is_email_confirm']) {
         $values['is_email_receipt'] = 1;