+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
*/
class CRM_Core_Payment_Manual extends CRM_Core_Payment {
return TRUE;
}
+ /**
+ * Checks if backoffice recurring edit is allowed
+ *
+ * @return bool
+ */
+ public function supportsEditRecurringContribution() {
+ return TRUE;
+ }
+
+ /**
+ * 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');
+ if ($params['is_pay_later']) {
+ $result['payment_status_id'] = array_search('Pending', $statuses);
+ }
+ 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;
+ }
+
}