Merge pull request #10144 from eileenmcnaughton/iida8
[civicrm-core.git] / CRM / Core / Payment / Manual.php
index 1072f340101ab5517004a324159415ac498d9f32..55bae03df26b461a16284010b8b96b2bcd836a3c 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
  */
 class CRM_Core_Payment_Manual extends CRM_Core_Payment {
 
@@ -137,6 +137,15 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     $this->result = $result;
   }
 
+  /**
+   * Set payment instrument id.
+   *
+   * @param int $paymentInstrumentID
+   */
+  public function setPaymentInstrumentID($paymentInstrumentID) {
+    $this->paymentInstrumentID = $paymentInstrumentID;
+  }
+
   /**
    * Get the name of the payment type.
    *
@@ -173,6 +182,15 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     return TRUE;
   }
 
+  /**
+   * Are back office payments supported.
+   *
+   * @return bool
+   */
+  protected function supportsBackOffice() {
+    return TRUE;
+  }
+
   /**
    * Submit a manual payment.
    *
@@ -192,4 +210,13 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     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;
+  }
+
 }