Merge pull request #12154 from compucorp/122-fix-bug-with-action-links
[civicrm-core.git] / CRM / Core / Payment.php
index faf05f510a04d3f212ec6ae5169ea0c075dc9ae8..202e3fe729d865bcfdb7dc34bf7f752ca24471cd 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -489,10 +489,10 @@ abstract class CRM_Core_Payment {
         if (array_keys($params) == array('is_recur_installments', 'is_email_receipt')) {
           $gotText = ts('Your recurring contribution will be processed automatically.');
           if ($params['is_recur_installments']) {
-            $gotText .= ts(' You can specify the number of installments, or you can leave the number of installments blank if you want to make an open-ended commitment. In either case, you can choose to cancel at any time.');
+            $gotText .= ' ' . ts('You can specify the number of installments, or you can leave the number of installments blank if you want to make an open-ended commitment. In either case, you can choose to cancel at any time.');
           }
           if ($params['is_email_receipt']) {
-            $gotText .= ts(' You will receive an email receipt for each recurring contribution.');
+            $gotText .= ' ' . ts('You will receive an email receipt for each recurring contribution.');
           }
         }
         break;
@@ -1542,6 +1542,18 @@ INNER JOIN civicrm_contribution con ON ( con.contribution_recur_id = rec.id )
     return FALSE;
   }
 
+  /**
+   * Checks if payment processor supports recurring contributions
+   *
+   * @return bool
+   */
+  public function supportsRecurring() {
+    if (!empty($this->_paymentProcessor['is_recur'])) {
+      return TRUE;
+    }
+    return FALSE;
+  }
+
   /**
    * Should a receipt be sent out for a pending payment.
    *