src/FintechFab/BankEmulatorSdk/Gateway.php
public function callback(array $params = null)
	{
		$this->cleanup();

		if(null === $params){
			if(!empty($_POST)){
				$params = $_POST;
			}
		}

		if (
			empty($params) ||
			empty($params['term']) ||
			empty($params['sign']) ||
			empty($params['type'])
		) {
			throw new GatewayException('Input params is failure');
		}

		$type = $params['type'];

		if(!isset(self::$customParams[$type])){
			throw new GatewayException('Undefined type value');
		}

		$sign = $this->sign($type, $params);

		if($sign !== $params['sign']){
			throw new GatewayException('Signature check fail');
		}

		$this->rawResponse = http_build_url($params);

		/** @var stdClass response */
		$this->response = (object)$params;

		if ($this->response->rc !== '00') {
			$this->error = array(
				'type'    => self::C_ERROR_PROCESSING,
				'message' => $this->response->message,
			);
		}

		return empty($this->error);

	}
public function callback(array $params = null)
	{
		$this->cleanup();

		if(null === $params){
			if(!empty($_POST)){
				$params = $_POST;
			}
		}

		if (
			empty($params) ||
			empty($params['term']) ||
			empty($params['sign']) ||
			empty($params['type'])
		) {
			throw new GatewayException('Input params is failure');
		}

		$type = $params['type'];

		if(!isset(self::$customParams[$type])){
			throw new GatewayException('Undefined type value');
		}

		$sign = $this->sign($type, $params);

		if($sign !== $params['sign']){
			throw new GatewayException('Signature check fail');
		}

		$this->rawResponse = http_build_url($params);

		/** @var stdClass response */
		$this->response = (object)$params;

		if ($this->response->rc !== '00') {
			$this->error = array(
				'type'    => self::C_ERROR_PROCESSING,
				'message' => $this->response->message,
			);
		}

		return empty($this->error);

	}
public function callback ( array $ params = null ) { $ this -> cleanup ( ) ; if ( null === $ params ) { if ( ! empty ( $ _POST ) ) { $ params = $ _POST ; } } if ( empty ( $ params ) || empty ( $ params [ 'term' ] ) || empty ( $ params [ 'sign' ] ) || empty ( $ params [ 'type' ] ) ) { throw new GatewayException ( 'Input params is failure' ) ; } $ type = $ params [ 'type' ] ; if ( ! isset ( self :: $ customParams [ $ type ] ) ) { throw new GatewayException ( 'Undefined type value' ) ; } $ sign = $ this -> sign ( $ type , $ params ) ; if ( $ sign !== $ params [ 'sign' ] ) { throw new GatewayException ( 'Signature check fail' ) ; } $ this -> rawResponse = http_build_url ( $ params ) ; /** @var stdClass response */ $ this -> response = ( object ) $ params ; if ( $ this -> response -> rc !== '00' ) { $ this -> error = array ( 'type' => self :: C_ERROR_PROCESSING , 'message' => $ this -> response -> message , ) ; } return empty ( $ this -> error ) ; }
Parse callback request

@param array $params

@return stdClass
@throws GatewayException
Parse callback request