src/FintechFab/BankEmulatorSdk/Gateway.php
private function initRequestParams($type, $params)
	{

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

		$list = $list[$type];
		$requestParams = array();

		foreach ($list as $key) {
			if (!empty($params[$key])) {
				$requestParams[$key] = trim($params[$key]);
			}
		}

		foreach (Config::getAll() as $key => $value) {
			if(
				in_array($type, array('complete', 'refund')) &&
				in_array($key, array('callbackUrl', 'callbackEmail', 'shopUrl'))
			){
				continue;
			}
			$requestParams[$key] = $value;
		}

		$requestParams = $this->convert($requestParams);

		if($type !== 'callback'){
			$requestParams['time'] = time();
		}

		$requestParams['sign'] = $this->sign($type, $requestParams);

		return $requestParams;

	}
private function initRequestParams($type, $params)
	{

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

		$list = $list[$type];
		$requestParams = array();

		foreach ($list as $key) {
			if (!empty($params[$key])) {
				$requestParams[$key] = trim($params[$key]);
			}
		}

		foreach (Config::getAll() as $key => $value) {
			if(
				in_array($type, array('complete', 'refund')) &&
				in_array($key, array('callbackUrl', 'callbackEmail', 'shopUrl'))
			){
				continue;
			}
			$requestParams[$key] = $value;
		}

		$requestParams = $this->convert($requestParams);

		if($type !== 'callback'){
			$requestParams['time'] = time();
		}

		$requestParams['sign'] = $this->sign($type, $requestParams);

		return $requestParams;

	}
private function initRequestParams ( $ type , $ params ) { $ list = self :: $ customParams ; if ( ! isset ( $ list [ $ type ] ) ) { throw new GatewayException ( 'Undefined request type' ) ; } $ list = $ list [ $ type ] ; $ requestParams = array ( ) ; foreach ( $ list as $ key ) { if ( ! empty ( $ params [ $ key ] ) ) { $ requestParams [ $ key ] = trim ( $ params [ $ key ] ) ; } } foreach ( Config :: getAll ( ) as $ key => $ value ) { if ( in_array ( $ type , array ( 'complete' , 'refund' ) ) && in_array ( $ key , array ( 'callbackUrl' , 'callbackEmail' , 'shopUrl' ) ) ) { continue ; } $ requestParams [ $ key ] = $ value ; } $ requestParams = $ this -> convert ( $ requestParams ) ; if ( $ type !== 'callback' ) { $ requestParams [ 'time' ] = time ( ) ; } $ requestParams [ 'sign' ] = $ this -> sign ( $ type , $ requestParams ) ; return $ requestParams ; }
Generate params for http query

@param string $type
@param array  $params

@return array
@throws GatewayException
Generate params for http query