X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tools%2Fextensions%2Forg.civicrm.payment.googlecheckout%2FGoogleIPN.php;h=e0545abb0a9817fdbe936635741fa6f55c1e18a0;hb=3838662faff56daff7b4fbbd25c60a4b7242a484;hp=450172e77f19e9cfbf2cd90c70a7a23d96895731;hpb=6a4880350680e1e4d20e5c8a622a791f926ca750;p=civicrm-core.git diff --git a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php index 450172e77f..e0545abb0a 100644 --- a/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php +++ b/tools/extensions/org.civicrm.payment.googlecheckout/GoogleIPN.php @@ -37,6 +37,10 @@ require_once 'CRM/Core/Payment/BaseIPN.php'; define('GOOGLE_DEBUG_PP', 1); + +/** + * Class org_civicrm_payment_googlecheckout_GoogleIPN + */ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_BaseIPN { /** @@ -56,6 +60,14 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base */ static 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) { @@ -80,7 +92,9 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base * * @param string $mode the mode of operation: live or test * - * @return void + * @param $paymentProcessor + * + * @return \org_civicrm_payment_googlecheckout_GoogleIPN */ function __construct($mode, &$paymentProcessor) { parent::__construct(); @@ -92,11 +106,11 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base /** * The function gets called when a new order takes place. * - * @param xml $dataRoot response send by google in xml format + * @param xml $dataRoot response send by google in xml format * @param array $privateData contains the name value pair of * + * @param $component * @return void - * */ function newOrderNotify($dataRoot, $privateData, $component) { $ids = $input = $params = array(); @@ -151,18 +165,13 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base require_once 'CRM/Core/Transaction.php'; $transaction = new CRM_Core_Transaction(); - // fix for CRM-2842 - // if ( ! $this->createContact( $input, $ids, $objects ) ) { - // return false; - // } - // check if contribution is already completed, if so we ignore this ipn if ($contribution->contribution_status_id == 1) { CRM_Core_Error::debug_log_message("returning since contribution has already been handled"); echo "Success: Contribution has already been handled

"; } else { - /* Since trxn_id hasn't got any use here, + /* Since trxn_id hasn't got any use here, * lets make use of it by passing the eventID/membershipTypeID to next level. * And change trxn_id to google-order-number before finishing db update */ @@ -184,11 +193,12 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base /** * 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 + * @param string $status status of the transaction send by google + * @param $dataRoot + * @param $component + * @internal param array $privateData contains the name value pair of * * @return void - * */ function orderStateChange($status, $dataRoot, $component) { $input = $objects = $ids = array(); @@ -265,6 +275,8 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base * * @param string $mode the mode of operation: live or test * + * @param $component + * @param $paymentProcessor * @return object * @static */ @@ -524,7 +536,13 @@ class org_civicrm_payment_googlecheckout_GoogleIPN extends CRM_Core_Payment_Base } } - function getInput(&$input, &$ids) { + /** + * @param $input + * @param $ids + * + * @return bool + */ + function getInput(&$input, &$ids) { if (!$this->getBillingID($ids)) { return FALSE; }