Merge pull request #2326 from eileenmcnaughton/CRM-14069
[civicrm-core.git] / CRM / Core / Payment / GoogleIPN.php
index c87d52f02d3e3c027e54c2a19fa6496bc4033412..4dd6ed4241d3ce9f5fe951d0eff7ef1dd64757eb 100644 (file)
 
 
 define('GOOGLE_DEBUG_PP', 0);
+
+/**
+ * Class CRM_Core_Payment_GoogleIPN
+ */
 class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN {
 
   /**
@@ -53,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) {
@@ -232,11 +244,13 @@ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN {
   /**
    * The function gets called when the state(CHARGED, CANCELLED..) changes for an order
    *
-   * @param string $status      status of the transaction send by google
-   * @param array  $privateData contains the name value pair of <merchant-private-data>
+   * @param string $status status of the transaction send by google
+   * @param $dataRoot
+   * @param array $privateData contains the name value pair of <merchant-private-data>
    *
-   * @return void
+   * @param $component
    *
+   * @return void
    */
   function orderStateChange($status, $dataRoot, $privateData, $component) {
     $input = $objects = $ids = array();
@@ -326,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'];
@@ -379,6 +398,9 @@ WHERE  contribution_recur_id = {$ids['contributionRecur']}
    *
    * @param string $mode the mode of operation: live or test
    *
+   * @param $component
+   * @param $paymentProcessor
+   *
    * @return object
    * @static
    */
@@ -411,11 +433,13 @@ WHERE  contribution_recur_id = {$ids['contributionRecur']}
   /**
    * The function returns the component(Event/Contribute..), given the google-order-no and merchant-private-data
    *
-   * @param xml     $xml_response   response send by google in xml format
-   * @param array   $privateData    contains the name value pair of <merchant-private-data>
-   * @param int     $orderNo        <order-total> send by google
-   * @param string  $root           root of xml-response
+   * @param array $privateData contains the name value pair of <merchant-private-data>
+   * @param int $orderNo <order-total> send by google
+   * @param string $root root of xml-response
    *
+   * @param $response
+   * @param $serial
+   * @internal param \xml $xml_response response send by google in xml format
    * @return array context of this call (test, module, payment processor id)
    * @static
    */
@@ -625,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;