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 {
/**
*/
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) {
*
* @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();
/**
* 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 <merchant-private-data>
*
+ * @param $component
* @return void
- *
*/
function newOrderNotify($dataRoot, $privateData, $component) {
$ids = $input = $params = array();
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<p>";
}
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 */
/**
* 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 $component
+ * @internal param array $privateData contains the name value pair of <merchant-private-data>
*
* @return void
- *
*/
function orderStateChange($status, $dataRoot, $component) {
$input = $objects = $ids = array();
*
* @param string $mode the mode of operation: live or test
*
+ * @param $component
+ * @param $paymentProcessor
* @return object
* @static
*/
}
}
- function getInput(&$input, &$ids) {
+ /**
+ * @param $input
+ * @param $ids
+ *
+ * @return bool
+ */
+ function getInput(&$input, &$ids) {
if (!$this->getBillingID($ids)) {
return FALSE;
}