define('GOOGLE_DEBUG_PP', 0);
+
+/**
+ * Class CRM_Core_Payment_GoogleIPN
+ */
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) {
*
* @param string $mode the mode of operation: live or test
*
- * @return void
+ * @param $paymentProcessor
+ *
+ * @return \CRM_Core_Payment_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>
*
- * @return void
+ * @param $component
*
+ * @return void
*/
function newOrderNotify($dataRoot, $privateData, $component) {
$ids = $input = $params = array();
$contribution->invoice_id = $input['invoice'];
$contribution->total_amount = $dataRoot['order-total']['VALUE'];
$contribution->contribution_status_id = 2;
- $contribution->honor_contact_id = $objects['contribution']->honor_contact_id;
- $contribution->honor_type_id = $objects['contribution']->honor_type_id;
$contribution->campaign_id = $objects['contribution']->campaign_id;
$objects['contribution'] = $contribution;
/**
* 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();
$this->completeRecur($input, $ids, $objects);
}
+ /**
+ * @param $input
+ * @param $ids
+ * @param $objects
+ */
function completeRecur($input, $ids, $objects) {
if ($ids['contributionRecur']) {
$recur = &$objects['contributionRecur'];
*
* @param string $mode the mode of operation: live or test
*
+ * @param $component
+ * @param $paymentProcessor
+ *
* @return object
* @static
*/
/**
* 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
*/
}
}
+ /**
+ * @param $input
+ * @param $ids
+ * @param $dataRoot
+ *
+ * @return bool
+ */
function getInput(&$input, &$ids, $dataRoot) {
if (!$this->getBillingID($ids)) {
return FALSE;