Check if properly made ​​the purchase.

@param string $key      Key
@param array  $postData Data received by the bank

@return bool
@throws TpvException
546102
public function check($key = '', $postData)
    {
        if (!isset($postData)) {
            throw new TpvException("Add data return of bank");
        }

        $parameters = $postData["Ds_MerchantParameters"];
        $signatureReceived = $postData["Ds_Signature"];
        $signature = $this->generateMerchantSignatureNotification($key, $parameters);

        return ($signature === $signatureReceived);
    }
194246
public static function post($key,$htmlspecialchars = false){
        if (self::hasPost($key)) {
            if ($htmlspecialchars) {
                return htmlspecialchars($_POST["key"]);
            }else {
                return $_POST["key"];
            }
        }else {
            return null;
        }
    }
1003905
public static function post($key = ""){
		
		if($key){
			$v = self::getRequest()->post($key);
		}else{
			$v = self::getRequest()->post();
		}
		return $v;
	}
495572
public function hasData($key) {
        $key = $this->processKey($key);
        return isset($this->shared[$key]);
    }
818094
public function hasValidData(\Psr\Http\Message\ServerRequestInterface $request, $key = null)
    {
        if (! in_array($request->getMethod(), ['POST', 'PATCH', 'PUT', 'DELETE'])) {
            return false;
        }
        if (! $this->check($request)) {
            return false;
        }
        $data = $request->getParsedBody();
        return ! isset($key) or isset($data[$key]);
    }
233213
public function post(array $params, array $postData) {
        $this->_validatePostParams($params, $postData);
        $model = $this->_normalizeModelName($params['datatype']);
        $contentManager = $this->_getContentManager($model);
        $primaryKey = $contentManager->create($postData);
        $record = array_get(
            array_get(
                $this->get(
                    array(
                        'datatype' => $params['datatype'],
                        'id' => $primaryKey
                    )
                ),
                'data',
                array()
            ),
            'result',
            array()
        );
        $response = array(
            'success' => true,
            'result' => $record,
            'link' => (string)new Garp_Util_FullUrl(
                array(array('datatype' => $params['datatype'], 'id' => $primaryKey), 'rest')
            )
        );
        return $this->_formatResponse($response, 201);
    }
1065056
protected function get_validation_var( $key, $post_array ) {
		return $this->app->utility->array_get( $post_array, $this->get_post_field_name( $key ) );
	}
220969
private function checkDataIsUnreliable($data, $key)
    {
        return isset($data[$key]) && ($data[$key] !== $this->visitorInfo[$key]);
    }
201901
public static function allowImportItem($postdata) {
        $cc_types = array('application/vnd.ims.imsccv1p1',
            'application/vnd.ims.imsccv1p2', 'application/vnd.ims.imsccv1p3');
        if ( ! isset($postdata['content_item_return_url']) ) return false;
        if ( isset($postdata['accept_media_types']) ) {
            $accept = $postdata['accept_media_types'];

            foreach($cc_types as $cc_mimetype ){
                $m = new Mimeparse;
                $cc_allowed = $m->best_match(array($cc_mimetype), $accept);
                if ( $cc_mimetype == $cc_allowed ) return true;
            }
        }
        return false;
    }
703576
protected function _validateDataKey($key, $data)
    {
        $dataOkFlag = true;

        if (!$this->_validationOn) {
            return $dataOkFlag;
        }

        foreach ($this->_validationRules as $ruleKey => $ruleValue) {
            if (!preg_match($ruleKey, $key)) {
                continue;
            }

            $bool = $this->_validateData($ruleValue, $key, $data);
            if (!$bool) {
                $dataOkFlag = false;
            }
        }

        return $dataOkFlag;
    }
564715
public function isValidPrivateKey($key)
    {
        $data = ['integration_key' => $key];
        $response = $this->getHttpClient()->validatePrivateKey($data);

        return $response['status'] === 'SUCCESS';
    }
175851
public function updateType(array $postData)
    {
        $model = $this->getType();
        $model->setAttributes($postData);
        return $model->update();
    }
763988
function has($key)
    {
        $key = $this->_normalizeKey($key);
        return array_key_exists($key, $this->_referDataArrayReference());
    }
835114
private function validatePostData($data)
    {
        $required = ['items', 'currency'];

        foreach ($required as $field) {
            if (!isset($data[$field]) && !is_null($data[$field])) {
                throw new PriceCalculationException($field . ' is required but not set properly');
            }
        }
    }
1333157
public static function allowLtiLinkItem($postdata=false) {
        if ( ! $postdata ) $postdata = LTIX::ltiRawPostArray();
        return parent::allowLtiLinkItem($postdata);
    }
1115528
public function process(\stdClass $postParams) {
        $transactionManager = new Transaction();
        $transactionManager->begin();
        $transaction = $transactionManager->getTransaction();
        $isChanged = false;
        try {
            $isChanged = $this->saveFieldsRecursive($postParams, $this->getEntity(), $this->isCreating(), $transaction);
            $transactionManager->commit();
        } catch(TransactionException $e) {
            $transactionManager->rollback();
        } catch(\Exception $e) {
            if($transactionManager->isInTransaction()) {
                $transactionManager->rollback();
            }
            throw $e;
        }
        return $isChanged;
    }
1316433
public function has($key) {
		$this->check();
		$data = $this->readData();
		return isset($data[$key]);
	}