Checks that all the required parameters are received.

@param array $parameters Parameters

@throws ParameterNotReceivedException
327924
private function checkResultParameters(array $parameters)
    {
        $requiredParameters = [
            'payment_status',
        ];

        foreach ($requiredParameters as $requiredParameter) {
            if (!isset($parameters[$requiredParameter])) {
                throw new ParameterNotReceivedException($requiredParameter);
            }
        }
    }
730655
protected function normalize(array $parameters)
    {
        foreach ($parameters as $parameter => $value) {
            if (null !== $this->knownParameters[$parameter]) {
                $parameters[$parameter] = sprintf($this->knownParameters[$parameter], $value);
            }
        }

        return $parameters;
    }
1003868
protected function parseParameters($parameters)
    {
        if (isset($parameters[0])) {
            $params = json_decode($parameters[0], true);
            if ($params) {
                return $params;
            }
        }

        // If json couldn't be encoded return string as it was
        return $parameters;
    }
1252940
public function setParametersAttribute(array $parameters)
    {
        $defaultParameters = $this->getDefaultParameters();
        $this->attributes['parameters'] = json_encode(
            array_merge($defaultParameters, $parameters)
        );
    }
475209
public function loadModuleByParameters(array $parameters)
    {
        if (!isset($parameters['module'])) {
            throw new \InvalidArgumentException('The routing provider expected parameter "module" but could not find it.');
        }

        if ($parameters['module'] instanceof ModuleInterface) {
            return $parameters['module'];
        }

        $identity = $parameters['module'];

        // Get the related module
        $module = $this->manager->findModuleByIdentity($identity);

        if (!$module instanceof ModuleInterface) {
            throw new ResourceNotFoundException(sprintf('Module with identity "%s" does not exist.', $identity));
        }

        return $module;
    }
432115
protected function createParameters($parameters)
    {
        if (is_string($parameters)) {
            $parameters = Parameters::parse($parameters);
        } else {
            $parameters = $parameters ?: array();
        }

        if ($this->defaults) {
            $parameters += $this->defaults;
        }

        return new Parameters($parameters);
    }
100160
public function validateParameters(&$parameters)
    {
        if (!isset($parameters['username']))
        {
            throw new InvalidArgumentException(
                'The \'username\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
        elseif (!isset($parameters['password']))
        {
            throw new InvalidArgumentException(
                'The \'password\' parameter must be defined for the Password grant type',
                InvalidArgumentException::MISSING_PARAMETER
            );
        }
    }
298505
public function processResult(array $parameters)
    {
        if (!isset($parameters['b'])) {
            throw new ParameterNotReceivedException();
        }

        $gestpayMethod = new GestpayMethod();

        $decrypted = $this
            ->gestpayEncrypter
            ->decrypt($parameters['b']);

        /*
         * Adding transaction information to PaymentMethod.
         *
         * This information is only available in PaymentOrderSuccess event
         */
        $gestpayMethod
            ->setTransactionResult($decrypted['TransactionResult'])
            ->setShopTransactionId($decrypted['ShopTransactionID'])
            ->setBankTransactionId($decrypted['BankTransactionID'])
            ->setAuthorizationCode($decrypted['AuthorizationCode'])
            ->setCurrency($decrypted['Currency'])
            ->setAmount($decrypted['Amount'])
            ->setCustomInfo($decrypted['CustomInfo'])
            ->setErrorCode($decrypted['ErrorCode'])
            ->setErrorDescription($decrypted['ErrorDescription']);

        $this->loadPaymentBridgeOrder($gestpayMethod);

        /*
         * Payment paid done.
         *
         * Paid process has ended ( No matters result )
         */
        $this
            ->paymentEventDispatcher
            ->notifyPaymentOrderDone(
                $this->paymentBridge,
                $gestpayMethod
            );

        if (!$this->isValidTransaction($gestpayMethod)) {
            /*
             * Payment paid failed.
             *
             * Paid process has ended failed
             */
            $this
                ->paymentEventDispatcher
                ->notifyPaymentOrderFail(
                    $this->paymentBridge,
                    $gestpayMethod
                );

            throw new PaymentException();
        }

        /*
         * Payment paid successfully.
         *
         * Paid process has ended successfully
         */
        $this
            ->paymentEventDispatcher
            ->notifyPaymentOrderSuccess(
                $this->paymentBridge,
                $gestpayMethod
            );
    }
194605
public function removeParameters(array $parameters = null)
  {
    $this->parameters = array();

    if ($parameters) {
      $this->addParameters($parameters);
    }

    return $this;
  }
1047051
public function validate($parameters = [])
    {
        $response = $this->client->get('validation', [
            'query' => $parameters,
        ]);
        return json_decode($response->getBody())->validation;
    }
78735
public function add(array $parameters)
    {
        foreach ($parameters as $key => $value) {
            $this->set($key, $value);
        }
    }
1023385
private function parameters($parameters): array
    {
        $values = (!is_array($parameters)) ? [$parameters] : $parameters;

        $strings = [];

        foreach ($values as $value) {
            $strings[] = self::make($value, $this->encoding);
        }

        return $strings;
    }
877953
protected function check(array $sessionParameters, $parameter)
    {
        if (empty($sessionParameters[$parameter])) {
            throw new CmisInvalidArgumentException(sprintf('Parameter "%s" is missing!', $parameter));
        }

        return true;
    }
424019
function add(array $parameters): void
    {
        foreach ($parameters as $parameter => $value) {
            $this->query[$parameter] = $value;
        }
    }
328611
public function setParameters($parameters)
    {
        // type check, error must never occur, bad code of it does
        if (!is_array($parameters)) {
            throw new Exception("Expected parameters array got something else");
        }

        $this->_parameters = $parameters;
        $this->setInitialized(false);
    }
677390
public function setParameters($parameters)
    {
        $this->parameters     = $parameters;
        $this->withParameters = !empty($this->parameters);

        return $this;
    }
1291883
protected function process($parameters)
    {
        // Properly encode parameters
        $parameters = $this->encode($parameters);

        $request  = "POST /recaptcha/api/verify HTTP/1.0\r\n";
        $request .= "Host: " . self::VERIFY_SERVER . "\r\n";
        $request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
        $request .= "Content-Length: " . strlen($parameters) . "\r\n";
        $request .= "User-Agent: reCAPTCHA/PHP5\r\n";
        $request .= "\r\n";
        $request .= $parameters;

        if (false == ($socket = @fsockopen(self::VERIFY_SERVER, 80))) {
            throw new Exception('Could not open socket to: ' . self::VERIFY_SERVER);
        }

        fwrite($socket, $request);

        $response = '';

        while (!feof($socket) ) {
            $response .= fgets($socket, 1160);
        }

        fclose($socket);

        return explode("\r\n\r\n", $response, 2);
    }