Encoded the parameters (AES256-CBC) for the pay link and return them

@param array $params The parameters, which are going to be posted to mPAY24

@return string
190544
public function flexLink($params)
    {
        $paramsString = "";

        foreach ($params as $key => $value) {
            $paramsString .= "$key=$value&";
        }

        $encryptedParams = $this->ssl_encrypt($this->config->getFlexLinkPassword(), $paramsString);

        return $encryptedParams;
    }
742542
public function pay(array $params)
    {
        $params['appid'] = $this->app['config']->app_id;

        return $this->request($this->wrap('pay/micropay'), $params);
    }
302071
public static function encryptParametersWithString($parametersJson)
    {
        if (!is_string($parametersJson)) {
            $parametersJson = json_encode($parametersJson);
        }

        $randomKey32 = static::generateRandomString(static::KEY_LENGTH);

        $resultKey = null;
        openssl_public_encrypt($randomKey32, $resultKey, self::SRPAGO_RSA_PUBLIC_KEY);
        $key = base64_encode($resultKey);

        if (version_compare(PHP_VERSION, '7.1.0', '>=')) {
            $resultData = openssl_encrypt($parametersJson, 'AES-256-ECB', $randomKey32, OPENSSL_RAW_DATA);
        } else {
            $resultData = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $randomKey32, $parametersJson, MCRYPT_MODE_ECB);
        }

        $data = base64_encode($resultData);

        return ['key'=>$key, 'data'=>$data];
    }
1325806
private function process_parameters($param){
    foreach ($param as $key => $val){
      //$val is an array
      if (\is_array($val)){
        $param[$key] = $this->process_parameters($val);
      }
      else {
        $param[$key] = $this->sanitize($val);
      }
    }
    //Return the processed parameters
    return $param;
  }
145475
private function decodeParams($params)
    {
        if (is_string($params)) {
            $params = urldecode($params);
        } elseif (is_array($params)) {
            foreach ($params as &$currentParam) {
                $currentParam = $this->decodeParams($currentParam);
            }
        }

        return $params;
    }
47153
public function encodeHttpQuery($qparams = null)
    {
        $qparams = ($qparams === null) ? $this->getRequest()->query->all() : $qparams;

        return http_build_query(array_merge($qparams, $this->remapPagers()));
    }
970915
public static function key(string $key, array $params = []): string
    {
        $key = md5(serialize($key));
        if (count($params) > 0) {
            $key .= '-' . md5(serialize($params));
        }
        return $key;
    }
675911
public function download(array $params): string
    {
        unset($this->payload['spbill_create_ip']);

        $this->payload = Support::filterPayload($this->payload, $params, true);

        Events::dispatch(Events::METHOD_CALLED, new Events\MethodCalled('Wechat', 'Download', $this->gateway, $this->payload));

        $result = Support::getInstance()->post(
            'pay/downloadbill',
            Support::getInstance()->toXml($this->payload)
        );

        if (is_array($result)) {
            throw new GatewayException('Get Wechat API Error: '.$result['return_msg'], $result);
        }

        return $result;
    }
415748
protected function convertParamsToQuery(array $params)
    {
        $query = array();

        foreach ($params as $key => $val) {
            if (is_array($val)) {
                $val = implode(',', $val);
            } elseif ($val instanceof \DateTime) {
                $val = $val->format('Y-m-d');
            } elseif (is_bool($val)) {
                if ($val) {
                    $val = 1;
                } else {
                    continue;
                }
            } else {
                $val = urlencode($val);
            }
            $query[] = $key . '=' . $val;
        }

        return implode('&', $query);
    }
483816
private function getNestedParams(array $params)
    {
        $query = http_build_query($params, null, '&');
        $params = explode('&', $query);
        $result = [];

        foreach ($params as $param) {
            list($key, $value) = explode('=', $param, 2);
            $result[urldecode($key)] = urldecode($value);
        }

        return $result;
    }
305396
protected function prepareParams(array $params)
	{
		$prepared = [];
		
		foreach($params as $k => $v)
		{
			if(is_array($v))
			{
				foreach(array_values($v) as $i => $val)
				{
					$prepared[sprintf('%s%u', $k, $i)] = $val;
				}
			}
			else
			{
				$prepared[(string)$k] = $v;
			}
		}
		
		return $prepared;
	}
915864
private function queryString($params)
	{
		$querystring = '?';
		foreach($params as $k => $v) {
			$querystring .= $k.'='.urlencode($v).'&';
		}
		return substr($querystring, 0, -1);
	}
308006
private static function getCacheKeyForCall(array $params)
    {
        static $domainLevel = null;

        $params += $_GET;
        $keyStr = '';
        foreach ($params as $param) {
            $keyStr .= serialize($param);
        }

        $keyStr .= Request::domainPrefix(
            $domainLevel ?? $domainLevel = count(explode('.', Config::application('domain')))
        );

        return md5($keyStr);
    }
40456
public function getDataTypeParams(array $params)
    {
        $type = $this->getEloquentDataMethod();
        if (in_array($type, ['char', 'string']) && isset($params[0]) && ($length = intval($params[0])) > 0) {
            return [$length];
        }

        if (in_array($type, ['decimal', 'double', 'float'])
            && isset($params[0]) && ($length = intval($params[0])) > 0 && isset($params[1]) && ($decimal = intval($params[1])) > 0) {
            return [$length, $decimal];
        }

        if ($type == 'enum') {
            return $params;
        }

        return [];
    }
496644
private function _getParametersAsString(array $parameters)
    {
        $queryParameters = array();
        foreach ($parameters as $key => $value) {
            $queryParameters[] = $key . '=' . $this->_urlencode($value);
        }
        return implode('&', $queryParameters);
    }
894057
def encode_params(params)
      return params.map do |p|
        if p.is_a?(Integer)
          Util.int_to_hex(p)
        else
          p
        end
      end
    end
826399
public function getSignature(array $params)
    {
        ksort($params);
        $signature = md5($this->parameters->getAuth('secret') . json_encode($params));

        return $signature;
    }