CRM/Core/Payment add missing code blocks (autogenerated)
authorEileen McNaughton <eileen@fuzion.co.nz>
Sat, 24 May 2014 02:51:35 +0000 (14:51 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sat, 24 May 2014 02:51:35 +0000 (14:51 +1200)
20 files changed:
CRM/Core/Payment/AuthorizeNet.php
CRM/Core/Payment/AuthorizeNetIPN.php
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/Dummy.php
CRM/Core/Payment/Elavon.php
CRM/Core/Payment/Google.php
CRM/Core/Payment/GoogleIPN.php
CRM/Core/Payment/IATS.php
CRM/Core/Payment/Moneris.php
CRM/Core/Payment/PayJunction.php
CRM/Core/Payment/PayPalIPN.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment/PayPalProIPN.php
CRM/Core/Payment/PayflowPro.php
CRM/Core/Payment/PaymentExpress.php
CRM/Core/Payment/PaymentExpressIPN.php
CRM/Core/Payment/PaymentExpressUtils.php
CRM/Core/Payment/ProcessorForm.php
CRM/Core/Payment/Realex.php
CRM/Core/Payment/eWAY.php

index dc891f1f67ef1123f4b5b63332e8cc9b717a1622..e789983266cfa5ac6dcf9216ab57fe5af1a0c98b 100644 (file)
@@ -337,6 +337,9 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @return array
+   */
   function _getAuthorizeNetFields() {
     $amount = $this->_getParam('total_amount');//Total amount is from the form contribution field
     if(empty($amount)){//CRM-9894 would this ever be the case??
@@ -564,6 +567,12 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
     return $value;
   }
 
+  /**
+   * @param null $errorCode
+   * @param null $errorMessage
+   *
+   * @return object
+   */
   function &error($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
     if ($errorCode) {
@@ -617,10 +626,19 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @return string
+   */
   function accountLoginURL() {
     return ($this->_mode == 'test') ? 'https://test.authorize.net' : 'https://authorize.net';
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return bool|object
+   */
   function cancelSubscription(&$message = '', $params = array(
     )) {
     $template = CRM_Core_Smarty::singleton();
@@ -663,6 +681,12 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
     return TRUE;
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return bool|object
+   */
   function updateSubscriptionBillingInfo(&$message = '', $params = array(
     )) {
     $template = CRM_Core_Smarty::singleton();
@@ -717,6 +741,12 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
     return TRUE;
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return bool|object
+   */
   function changeSubscriptionAmount(&$message = '', $params = array(
     )) {
     $template = CRM_Core_Smarty::singleton();
index d3e5f593766526800fa99c054adeb39d97aa7f2a..dcbff70044744b219ba39e31c06f602d9151f52d 100644 (file)
@@ -40,6 +40,11 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     parent::__construct();
   }
 
+  /**
+   * @param string $component
+   *
+   * @return bool|void
+   */
   function main($component = 'contribute') {
 
     //we only get invoice num as a key player from payment gateway response.
@@ -77,6 +82,12 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     }
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param $first
+   */
   function recur(&$input, &$ids, &$objects, $first) {
     $recur = &$objects['contributionRecur'];
 
@@ -201,6 +212,10 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     }
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   */
   function getInput(&$input, &$ids) {
     $input['amount'] = self::retrieve('x_amount', 'String');
     $input['subscription_id'] = self::retrieve('x_subscription_id', 'Integer');
@@ -239,6 +254,10 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     }
   }
 
+  /**
+   * @param $ids
+   * @param $input
+   */
   function getIDs(&$ids, &$input) {
     $ids['contact'] = self::retrieve('x_cust_id', 'Integer');
     $ids['contribution'] = self::retrieve('x_invoice_num', 'Integer');
@@ -293,6 +312,15 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
     }
   }
 
+  /**
+   * @param $name
+   * @param $type
+   * @param bool $abort
+   * @param null $default
+   * @param string $location
+   *
+   * @return mixed
+   */
   static function retrieve($name, $type, $abort = TRUE, $default = NULL, $location = 'POST') {
     static $store = NULL;
     $value = CRM_Utils_Request::retrieve($name, $type, $store,
@@ -308,6 +336,12 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
     return $value;
   }
 
+  /**
+   * @param $ids
+   * @param $input
+   *
+   * @return bool
+   */
   function checkMD5($ids, $input) {
     $paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($ids['paymentProcessor'],
       $input['is_test'] ? 'test' : 'live'
index 747f8f0d293f3754fe8037b9a560d9985d9c4fbb..ca212e394b3276547b9b7d7e1870a564992944e3 100644 (file)
@@ -248,6 +248,13 @@ class CRM_Core_Payment_BaseIPN {
     return TRUE;
   }
 
+  /**
+   * @param $objects
+   * @param $transaction
+   * @param array $input
+   *
+   * @return bool
+   */
   function cancelled(&$objects, &$transaction, $input = array()) {
     $contribution = &$objects['contribution'];
     $memberships = &$objects['membership'];
@@ -305,6 +312,12 @@ class CRM_Core_Payment_BaseIPN {
     return TRUE;
   }
 
+  /**
+   * @param $objects
+   * @param $transaction
+   *
+   * @return bool
+   */
   function unhandled(&$objects, &$transaction) {
     $transaction->rollback();
     // we dont handle this as yet
@@ -313,6 +326,13 @@ class CRM_Core_Payment_BaseIPN {
     return FALSE;
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param $transaction
+   * @param bool $recur
+   */
   function completeTransaction(&$input, &$ids, &$objects, &$transaction, $recur = FALSE) {
     $contribution = &$objects['contribution'];
     $memberships = &$objects['membership'];
@@ -621,6 +641,11 @@ LIMIT 1;";
     CRM_Core_Error::debug_log_message("Success: Database updated");
   }
 
+  /**
+   * @param $ids
+   *
+   * @return bool
+   */
   function getBillingID(&$ids) {
     // get the billing location type
     $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
@@ -646,6 +671,16 @@ LIMIT 1;";
    * @params bool $returnMessageText Should text be returned instead of sent. This
    * is because the function is also used to generate pdfs
    */
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param $values
+   * @param bool $recur
+   * @param bool $returnMessageText
+   *
+   * @return mixed
+   */
   function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) {
     $contribution = &$objects['contribution'];
     $input['is_recur'] = $recur;
@@ -785,6 +820,9 @@ LIMIT 1;";
    * The pledge payment record should already exist & will need to be updated with the new contribution ID.
    * If not the contribution will also need to be linked to the pledge
    */
+  /**
+   * @param $contribution
+   */
   function updateRecurLinkedPledge(&$contribution) {
     $returnProperties = array('id', 'pledge_id');
     $paymentDetails   = $paymentIDs = array();
@@ -845,6 +883,11 @@ LIMIT 1;";
     );
   }
 
+  /**
+   * @param $recurId
+   * @param $contributionId
+   * @param $input
+   */
   function addrecurLineItems($recurId, $contributionId, &$input) {
     $lineSets = $lineItems = array();
 
@@ -871,6 +914,10 @@ LIMIT 1;";
 
   // function to copy custom data of the
   // initial contribution into its recurring contributions
+  /**
+   * @param $recurId
+   * @param $targetContributionId
+   */
   function copyCustomValues($recurId, $targetContributionId) {
     if ($recurId && $targetContributionId) {
       // get the initial contribution id of recur id
@@ -912,6 +959,10 @@ LIMIT 1;";
 
   // function to copy soft credit record of first recurring contribution
   // and add new soft credit against $targetContributionId
+  /**
+   * @param $recurId
+   * @param $targetContributionId
+   */
   function addrecurSoftCredit($recurId, $targetContributionId) {
     $contriID = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $recurId, 'id', 'contribution_recur_id');
 
index ac58928aa9f1a17cfa405117c1aecfe35197fef3..2dca05ea830a3ce4ff2a9c00975a9265f171c08a 100644 (file)
@@ -112,6 +112,12 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment {
     return $params;
   }
 
+  /**
+   * @param null $errorCode
+   * @param null $errorMessage
+   *
+   * @return object
+   */
   function &error($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
     if ($errorCode) {
index 55ded8b3e623de9e2e7b61468e20228fbd708a33..72e041207b56b69d4f94fab9542128f746d19c19 100644 (file)
@@ -374,6 +374,11 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment {
     }
   }
   //end check config
+  /**
+   * @param $requestFields
+   *
+   * @return string
+   */
   function buildXML($requestFields) {
     $xmlFieldLength['ssl_first_name'] = 15;
     // credit card name
@@ -413,6 +418,12 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment {
     return $xml;
   }
 
+  /**
+   * @param $value
+   * @param $fieldlength
+   *
+   * @return string
+   */
   function tidyStringforXML($value, $fieldlength) {
     // the xml is posted to a url so must not contain spaces etc. It also needs to be cut off at a certain
     // length to match the processor's field length. The cut needs to be made after spaces etc are
@@ -453,6 +464,11 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment {
     return ($return);
   }
 
+  /**
+   * @param $Xml
+   *
+   * @return mixed
+   */
   function decodeXMLresponse($Xml) {
 
     /**
index ca2d49e708cfbcdad02e3500f40ad4acbfb7a8b6..17708bb0af3bdcff619778482c5e02485dc6f05f 100644 (file)
@@ -165,6 +165,10 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment {
     $this->submitPostParams($params, $component, $cart);
   }
 
+  /**
+   * @param $params
+   * @param $component
+   */
   function doRecurCheckout(&$params, $component) {
     $intervalUnit = CRM_Utils_Array::value('frequency_unit', $params);
     if ($intervalUnit == 'week') {
@@ -349,6 +353,11 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment {
     return self::getArrayFromXML($xmlResponse);
   }
 
+  /**
+   * @param $searchParams
+   *
+   * @return string
+   */
   static function buildXMLQuery($searchParams) {
     $xml = '<?xml version="1.0" encoding="UTF-8"?>
 <notification-history-request xmlns="http://checkout.google.com/schema/2">';
@@ -382,6 +391,11 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment {
     return $xml;
   }
 
+  /**
+   * @param $xmlData
+   *
+   * @return array
+   */
   static function getArrayFromXML($xmlData) {
     require_once 'Google/library/xml-processing/gc_xmlparser.php';
     $xmlParser = new gc_XmlParser($xmlData);
@@ -391,6 +405,12 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment {
     return array($root, $data);
   }
 
+  /**
+   * @param null $errorCode
+   * @param null $errorMessage
+   *
+   * @return object
+   */
   function &error($errorCode = NULL, $errorMessage = NULL) {
     $e = &CRM_Core_Error::singleton();
     if ($errorCode) {
@@ -402,10 +422,19 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment {
     return $e;
   }
 
+  /**
+   * @return string
+   */
   function accountLoginURL() {
     return ($this->_mode == 'test') ? 'https://sandbox.google.com/checkout/sell' : 'https://checkout.google.com/';
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return bool|object
+   */
   function cancelSubscription(&$message = '', $params = array(
     )) {
     $orderNo = CRM_Utils_Array::value('subscriptionId', $params);
index 804576336288134944b7af0695382192cb7d7494..4dd6ed4241d3ce9f5fe951d0eff7ef1dd64757eb 100644 (file)
@@ -57,6 +57,14 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN {
    */
   protected $_mode = NULL;
 
+  /**
+   * @param $name
+   * @param $type
+   * @param $object
+   * @param bool $abort
+   *
+   * @return mixed
+   */
   static function retrieve($name, $type, $object, $abort = TRUE) {
     $value = CRM_Utils_Array::value($name, $object);
     if ($abort && $value === NULL) {
@@ -332,6 +340,11 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN {
     $this->completeRecur($input, $ids, $objects);
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   */
   function completeRecur($input, $ids, $objects) {
     if ($ids['contributionRecur']) {
       $recur               = &$objects['contributionRecur'];
@@ -636,6 +649,13 @@ WHERE  contribution_recur_id = {$ids['contributionRecur']}
     }
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $dataRoot
+   *
+   * @return bool
+   */
   function getInput(&$input, &$ids, $dataRoot) {
     if (!$this->getBillingID($ids)) {
       return FALSE;
index a59884a75a28ccb790f048815887ac477096a24a..a6e8d4595f8ca3e10f60a5c8eea6b204dfd2ae8f 100644 (file)
@@ -74,6 +74,12 @@ class CRM_Core_Payment_IATS extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param string $mode
+   * @param array $paymentProcessor
+   *
+   * @return mixed
+   */
   static function &singleton($mode, &$paymentProcessor) {
     $processorName = $paymentProcessor['name'];
     if (self::$_singleton[$processorName] === NULL) {
@@ -255,6 +261,11 @@ class CRM_Core_Payment_IATS extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param null $error
+   *
+   * @return object
+   */
   function &error($error = NULL) {
     $e = CRM_Core_Error::singleton();
     if (is_object($error)) {
@@ -281,6 +292,11 @@ class CRM_Core_Payment_IATS extends CRM_Core_Payment {
     return $e;
   }
 
+  /**
+   * @param $error_id
+   *
+   * @return string
+   */
   function errorString($error_id) {
     $errors = array(
       1 => 'Agent Code has not been set up on the authorization system.',
index d8c34a644f851cf6900d30c40072035e011085b9..7bd198d9dfc255d8296e07c1f65293099a78772f 100644 (file)
@@ -249,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)) {
@@ -264,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;
 
@@ -290,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)) {
index 8487ab68962011b8de309639f73a80f9979ab33e..68dcb814226b22ff045658a6342f180974a7d39a 100644 (file)
@@ -199,6 +199,11 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
   /*
    * This function checks the PayJunction response code
    */
+  /**
+   * @param $response
+   *
+   * @return bool
+   */
   function isError(&$response) {
     $responseCode = $response['dc_response_code'];
 
@@ -212,6 +217,11 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
 
 
   // ignore for now, more elaborate error handling later.
+  /**
+   * @param $response
+   *
+   * @return mixed
+   */
   function &checkResult(&$response) {
     return $response;
   }
@@ -233,6 +243,11 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param null $error
+   *
+   * @return object
+   */
   function &error($error = NULL) {
     $e = CRM_Core_Error::singleton();
     if ($error) {
index 99274206c1ab305fe925ac2c94d8d71592043e9e..694f30374b31a646853979826a8b39bc24b24ebe 100644 (file)
@@ -43,6 +43,14 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     parent::__construct();
   }
 
+  /**
+   * @param $name
+   * @param $type
+   * @param string $location
+   * @param bool $abort
+   *
+   * @return mixed
+   */
   static function retrieve($name, $type, $location = 'POST', $abort = TRUE) {
     static $store = NULL;
     $value = CRM_Utils_Request::retrieve($name, $type, $store,
@@ -56,6 +64,12 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     return $value;
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param $first
+   */
   function recur(&$input, &$ids, &$objects, $first) {
     if (!isset($input['txnType'])) {
       CRM_Core_Error::debug_log_message("Could not find txn_type in input request");
@@ -205,6 +219,13 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     );
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param bool $recur
+   * @param bool $first
+   */
   function single(&$input, &$ids, &$objects,
     $recur = FALSE,
     $first = FALSE
@@ -319,6 +340,10 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     }
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   */
   function getInput(&$input, &$ids) {
     if (!$this->getBillingID($ids)) {
       return FALSE;
index bb2b3d1ae40990e73b23171b373207fd2d1a2edf..1f6563af5e82174e1a57b766863cd146506a9879 100644 (file)
@@ -224,6 +224,11 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
   }
 
   //LCD add new function for handling recurring payments for PayPal Express
+  /**
+   * @param $params
+   *
+   * @return mixed
+   */
   function createRecurringPayments(&$params) {
     $args = array();
 
@@ -277,6 +282,10 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return $params;
   }
   //LCD end
+  /**
+   * @param $args
+   * @param $method
+   */
   function initialize(&$args, $method) {
     $args['user']      = $this->_paymentProcessor['user_name'];
     $args['pwd']       = $this->_paymentProcessor['password'];
@@ -403,6 +412,9 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @return null|string
+   */
   function cancelSubscriptionURL() {
     if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal_Standard') {
       return "{$this->_paymentProcessor['url_site']}cgi-bin/webscr?cmd=_subscr-find&alias=" . urlencode($this->_paymentProcessor['user_name']);
@@ -429,6 +441,12 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return parent::isSupported($method);
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return array|bool|object
+   */
   function cancelSubscription(&$message = '', $params = array(
     )) {
     if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
@@ -449,6 +467,12 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return FALSE;
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return array|bool|object
+   */
   function updateSubscriptionBillingInfo(&$message = '', $params = array(
     )) {
     if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
@@ -482,6 +506,12 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return FALSE;
   }
 
+  /**
+   * @param string $message
+   * @param array $params
+   *
+   * @return array|bool|object
+   */
   function changeSubscriptionAmount(&$message = '', $params = array()) {
     if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
       $config = CRM_Core_Config::singleton();
@@ -504,6 +534,12 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     return FALSE;
   }
 
+  /**
+   * @param $params
+   * @param string $component
+   *
+   * @throws Exception
+   */
   function doTransferCheckout(&$params, $component = 'contribute') {
     $config = CRM_Core_Config::singleton();
 
index f31851b58bd31eb2b864ac11c217a8c015db4088..98d86395d19d1347b28075b6e3eda9850182a256 100644 (file)
@@ -293,6 +293,13 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
     );
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   * @param $objects
+   * @param bool $recur
+   * @param bool $first
+   */
   function single(&$input, &$ids, &$objects, $recur = FALSE, $first = FALSE) {
     $contribution = &$objects['contribution'];
 
@@ -433,6 +440,12 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
     }
   }
 
+  /**
+   * @param $input
+   * @param $ids
+   *
+   * @throws CRM_Core_Exception
+   */
   function getInput(&$input, &$ids) {
 
     if (!$this->getBillingID($ids)) {
index 0b3957f02176368f4a5768639251bdda5aee3a1d..181871d023bff976ba484e80cc152995f6b22f89 100644 (file)
@@ -33,6 +33,10 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
    *
    * @return void
    */
+  /**
+   * @param $mode
+   * @param $paymentProcessor
+   */
   function __construct($mode, &$paymentProcessor) {
     // live or test
     $this->_mode = $mode;
@@ -379,6 +383,12 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
   /*
    * Produces error message and returns from class
    */
+  /**
+   * @param null $errorCode
+   * @param null $errorMessage
+   *
+   * @return object
+   */
   function &errorExit($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
     if ($errorCode) {
@@ -394,6 +404,12 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
   /*
    * NOTE: 'doTransferCheckout' not implemented
    */
+  /**
+   * @param $params
+   * @param $component
+   *
+   * @throws Exception
+   */
   function doTransferCheckout(&$params, $component) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
@@ -443,6 +459,11 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
   /*
    * convert to a name/value pair (nvp) string
    */
+  /**
+   * @param $payflow_query_array
+   *
+   * @return array|string
+   */
   function convert_to_nvp($payflow_query_array) {
     foreach ($payflow_query_array as $key => $value) {
       $payflow_query[] = $key . '[' . strlen($value) . ']=' . $value;
@@ -458,6 +479,12 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
    * @payflow_query value string to be posted
    *
    */
+  /**
+   * @param $submiturl
+   * @param $payflow_query
+   *
+   * @return mixed|object
+   */
   function submit_transaction($submiturl, $payflow_query) {
     /*
      * Submit transaction using CuRL
@@ -598,6 +625,12 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
   }
   //end submit_transaction
 
+  /**
+   * @param $recurringProfileID
+   * @param $processorID
+   *
+   * @throws Exception
+   */
   function getRecurringTransactionStatus($recurringProfileID, $processorID) {
     if (!defined('CURLOPT_SSLCERT')) {
       CRM_Core_Error::fatal(ts('PayFlowPro requires curl with SSL support'));
index 767bd728aba86375734e9186aaf45824ce4e1f4f..4e1a006ea2ea7e51dbb55103c7293fcb5fb7d003 100644 (file)
@@ -115,14 +115,29 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param $params
+   *
+   * @throws Exception
+   */
   function setExpressCheckOut(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * @param $token
+   *
+   * @throws Exception
+   */
   function getExpressCheckoutDetails($token) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * @param $params
+   *
+   * @throws Exception
+   */
   function doExpressCheckout(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
index 5cc135389f24a2980344dcee1c51d9eb8d19b788..2402515d91cc19fc21bbc55eb0208e783512737e 100644 (file)
@@ -54,6 +54,14 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN {
    */
   protected $_mode = NULL;
 
+  /**
+   * @param $name
+   * @param $type
+   * @param $object
+   * @param bool $abort
+   *
+   * @return mixed
+   */
   static function retrieve($name, $type, $object, $abort = TRUE) {
     $value = CRM_Utils_Array::value($name, $object);
     if ($abort && $value === NULL) {
index ca37097e987bfad85abc25dd6adf0b82e898c5b0..8b513af1435740cf8f3415df3f270ab9843b4a23 100644 (file)
  */
 class CRM_Core_Payment_PaymentExpressUtils {
 
+  /**
+   * @param $element
+   * @param null $value
+   *
+   * @return string
+   */
   static function _valueXml($element, $value = NULL) {
     $nl = "\n";
 
@@ -51,16 +57,34 @@ class CRM_Core_Payment_PaymentExpressUtils {
     return "<" . $element . ">" . $value . "</" . $element . ">" . $nl;
   }
 
+  /**
+   * @param $xml
+   * @param $name
+   *
+   * @return mixed
+   */
   static function _xmlElement($xml, $name) {
     $value = preg_replace('/.*<' . $name . '[^>]*>(.*)<\/' . $name . '>.*/', '\1', $xml);
     return $value;
   }
 
+  /**
+   * @param $xml
+   * @param $name
+   *
+   * @return mixed|null
+   */
   static function _xmlAttribute($xml, $name) {
     $value = preg_replace('/<.*' . $name . '="([^"]*)".*>/', '\1', $xml);
     return $value != $xml ? $value : NULL;
   }
 
+  /**
+   * @param $query
+   * @param $url
+   *
+   * @return resource
+   */
   static function &_initCURL($query, $url) {
     $curl = curl_init();
 
index 3fa23d7e1c5fdc19fa3bf86390f926b38cb27e10..d823029a7b1b57eb48794cd379a415e60b266837 100644 (file)
  */
 class CRM_Core_Payment_ProcessorForm {
 
+  /**
+   * @param $form
+   * @param null $type
+   * @param null $mode
+   *
+   * @throws Exception
+   */
   static function preProcess(&$form, $type = NULL, $mode = NULL ) {
     if ($type) {
       $form->_type = $type;
@@ -100,6 +107,9 @@ class CRM_Core_Payment_ProcessorForm {
     }
   }
 
+  /**
+   * @param $form
+   */
   static function buildQuickform(&$form) {
     $form->addElement('hidden', 'hidden_processor', 1);
 
index 01413de9773bb2ddd8ed0fe6cf0e188651e0e2ce..2122c6ad79b66ff297387710cda71b70acebef99 100644 (file)
@@ -95,18 +95,38 @@ class CRM_Core_Payment_Realex extends CRM_Core_Payment {
     return self::$_singleton[$processorName];
   }
 
+  /**
+   * @param $params
+   *
+   * @throws Exception
+   */
   function setExpressCheckOut(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * @param $token
+   *
+   * @throws Exception
+   */
   function getExpressCheckoutDetails($token) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * @param $params
+   *
+   * @throws Exception
+   */
   function doExpressCheckout(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
+  /**
+   * @param $params
+   *
+   * @throws Exception
+   */
   function doTransferCheckout(&$params) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
@@ -296,6 +316,12 @@ class CRM_Core_Payment_Realex extends CRM_Core_Payment {
   }
 
   // private helper for  xml_parse_into_assoc, to recusively parsing the result
+  /**
+   * @param $input
+   * @param int $depth
+   *
+   * @return array
+   */
   function _xml_parse($input, $depth = 1) {
     $output = array();
     $children = array();
@@ -467,6 +493,12 @@ class CRM_Core_Payment_Realex extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param null $errorCode
+   * @param null $errorMessage
+   *
+   * @return object
+   */
   function &error($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
 
index cbf81ec2bc83f7ba37be95e4c95d6633d673225f..f8ecb80018a2e60f7f4a282577581eda261ffa4f 100644 (file)
@@ -507,6 +507,13 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     }
   }
 
+  /**
+   * @param $p_eWAY_tran_num
+   * @param $p_trxn_out
+   * @param $p_trxn_back
+   * @param $p_request
+   * @param $p_response
+   */
   function send_alert_email($p_eWAY_tran_num, $p_trxn_out, $p_trxn_back, $p_request, $p_response) {
     // Initialization call is required to use CiviCRM APIs.
     civicrm_initialize(TRUE);