CRM-19372 allow payment processors to define an array of accepted credit card types
[civicrm-core.git] / CRM / Core / Payment / Manual.php
index a2c15bbe9dacf48766320dc89c6c7b77122345e3..ecc3c92520042f31815fa12c7ba231cebf0f68e2 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 class CRM_Core_Payment_Manual extends CRM_Core_Payment {
 
@@ -174,10 +174,12 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
   }
 
   /**
-   * Submit a payment using Advanced Integration Method.
+   * Submit a manual payment.
    *
    * @param array $params
    *   Assoc array of input parameters for this transaction.
+   *
+   * @return array
    */
   public function doDirectPayment(&$params) {
     $statuses = CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id');
@@ -187,6 +189,16 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     else {
       $result['payment_status_id'] = array_search('Completed', $statuses);
     }
+    return $result;
+  }
+
+  /**
+   * Should a receipt be sent out for a pending payment.
+   *
+   * e.g for traditional pay later & ones with a delayed settlement a pending receipt makes sense.
+   */
+  public function isSendReceiptForPending() {
+    return TRUE;
   }
 
 }