CRM-15407 - add fee_amount and net_amount to Dummy processor.
authorDave Greenberg <dave@civicrm.org>
Thu, 2 Oct 2014 01:16:30 +0000 (18:16 -0700)
committerDave Greenberg <dave@civicrm.org>
Thu, 2 Oct 2014 01:16:30 +0000 (18:16 -0700)
----------------------------------------
* CRM-15407:
  https://issues.civicrm.org/jira/browse/CRM-15407

CRM/Core/Payment/Dummy.php

index 05d19d37e2c2448b9404e1a70096f6462665fafd..efaeeefd37ecd8019773d494e211954e4821a386 100644 (file)
@@ -119,6 +119,10 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment {
       $params['trxn_id'] = sprintf('live_%08d', $trxn_id);
     }
     $params['gross_amount'] = $params['amount'];
+    // Add a fee_amount so we can make sure fees are handled properly in underlying classes.
+    $params['fee_amount'] = 1.50;
+    $params['net_amount'] = $params['gross_amount'] - $params['fee_amount'];
+
     return $params;
   }