Merge pull request #4962 from totten/master-angular-ts
[civicrm-core.git] / CRM / Core / Payment.php
index 10fe9c1608d3c8bce2a30280e1e2899c7d0db120..187f1c67eaf28d8d026647935b93c35f77f16a3d 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 use Civi\Payment\System;
 
@@ -86,7 +86,6 @@ abstract class CRM_Core_Payment {
    *
    * @return CRM_Core_Payment
    * @throws \CRM_Core_Exception
-   * @static
    */
   public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
     // make sure paymentProcessor is not empty
@@ -184,7 +183,8 @@ abstract class CRM_Core_Payment {
   /**
    * Getter for payment form that is using the processor
    * @deprecated
-   * @return CRM_Core_Form  A form object
+   * @return CRM_Core_Form
+   *   A form object
    */
   public function getForm() {
     return $this->_paymentForm;
@@ -303,7 +303,7 @@ abstract class CRM_Core_Payment {
             'rule_message' => ts('Please enter a valid value for your card security code. This is usually the last 3-4 digits on the card\'s signature panel.'),
             'rule_name' => 'integer',
             'rule_parameters' => NULL,
-          )
+          ),
         ),
       ),
       'credit_card_exp_date' => array(
@@ -318,7 +318,7 @@ abstract class CRM_Core_Payment {
             'rule_message' => ts('Card expiration date cannot be a past date.'),
             'rule_name' => 'currentDate',
             'rule_parameters' => TRUE,
-          )
+          ),
         ),
       ),
       'credit_card_type' => array(
@@ -357,7 +357,7 @@ abstract class CRM_Core_Payment {
             'rule_message' => ts('Please enter a valid Bank Identification Number (value must not contain punctuation characters).'),
             'rule_name' => 'nopunctuation',
             'rule_parameters' => NULL,
-          )
+          ),
         ),
         'is_required' => TRUE,
       ),
@@ -378,7 +378,7 @@ abstract class CRM_Core_Payment {
             'rule_message' => ts('Please enter a valid Bank Identification Number (value must not contain punctuation characters).'),
             'rule_name' => 'nopunctuation',
             'rule_parameters' => NULL,
-          )
+          ),
         ),
       ),
       'bank_name' => array(
@@ -408,7 +408,7 @@ abstract class CRM_Core_Payment {
    *   the result in an nice formatted array (or an error object)
    * @abstract
    */
-  abstract function doDirectPayment(&$params);
+  abstract protected function doDirectPayment(&$params);
 
   /**
    * Process payment - this function wraps around both doTransferPayment and doDirectPayment
@@ -442,7 +442,7 @@ abstract class CRM_Core_Payment {
    * @return string
    *   the error message if any
    */
-  abstract function checkConfig();
+  abstract protected function checkConfig();
 
   /**
    * @param $paymentProcessor
@@ -589,7 +589,7 @@ abstract class CRM_Core_Payment {
    * @param string $method
    *   Method to check for.
    *
-   * @return boolean
+   * @return bool
    */
   public function isSupported($method = 'cancelSubscription') {
     return method_exists(CRM_Utils_System::getClassName($this), $method);
@@ -671,4 +671,5 @@ INNER JOIN civicrm_contribution con ON ( con.contribution_recur_id = rec.id )
     // Else default
     return $this->_paymentProcessor['url_recur'];
   }
+
 }