X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FMoneris.php;h=318ae89af126d0734457ceccd0963e24e2037915;hb=7da04cdea71382ff22ffd94e9b3ae9915c25422b;hp=63a1d04ee6b96b0867a85fb07425771317c73bd5;hpb=8906b92a00b4907e620e80624fb6ac6baa368bed;p=civicrm-core.git diff --git a/CRM/Core/Payment/Moneris.php b/CRM/Core/Payment/Moneris.php index 63a1d04ee6..318ae89af1 100644 --- a/CRM/Core/Payment/Moneris.php +++ b/CRM/Core/Payment/Moneris.php @@ -1,7 +1,7 @@ _mode = $mode; $this->_paymentProcessor = $paymentProcessor; $this->_processorName = ts('Moneris'); @@ -77,13 +79,14 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment { } /** - * singleton function used to manage this object + * Singleton function used to manage this object * * @param string $mode the mode of operation: live or test * + * @param object $paymentProcessor + * * @return object * @static - * */ static function &singleton($mode, &$paymentProcessor) { $processorName = $paymentProcessor['name']; @@ -93,6 +96,15 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment { return self::$_singleton[$processorName]; } + /** + * This function collects all the information from a web/api form and invokes + * the relevant payment processor specific functions to perform the transaction + * + * @param array $params assoc array of input parameters for this transaction + * + * @return array the result in an nice formatted array (or an error object) + * @abstract + */ function doDirectPayment(&$params) { //make sure i've been called correctly ... if (!$this->_profile) { @@ -237,6 +249,11 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment { return $params; } + /** + * @param $response + * + * @return bool + */ function isError(&$response) { $responseCode = $response->getResponseCode(); if (is_null($responseCode)) { @@ -252,6 +269,11 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment { } // ignore for now, more elaborate error handling later. + /** + * @param $response + * + * @return object + */ function &checkResult(&$response) { return $response; @@ -278,6 +300,11 @@ class CRM_Core_Payment_Moneris extends CRM_Core_Payment { return $e; } + /** + * @param null $error + * + * @return object + */ function &error($error = NULL) { $e = CRM_Core_Error::singleton(); if (is_object($error)) {