Add order details params.

@param string[] $params
@param string[] $options

@return array
501375
protected function addCustomer(array $params, array $options)
    {
        $params['customer_name'] = Arr::get($options, 'name', '');
        $params['customer_email'] = Arr::get($options, 'email', '');

        return $params;
    }
99642
protected function compareOrderToParams(OrderInterface $order, array $params)
    {
        return $order->getReference() === $params['orderID']
            && $order->getCurrency() === $params['currency']
            && (float) ($order->getTotalInc()) === (float) ($params['amount']);
    }
1283275
protected function addOrder(array $params, $amount, array $options)
    {
        $params['metadata'] = ['reference' => Arr::get($options, 'reference')];
        $params['currency'] = Arr::get($options, 'currency', $this->gateway->getCurrency());
        $params['amount'] = (int) $this->gateway->amount($amount);

        return $params;
    }
21335
public static function buildOptions($data, $options_map, $orderby, $options) {
		$data = \Object\Data\Common::options($data, $options_map, $options);
		// sorting
		if (!empty($options['i18n'])) {
			if ($options['i18n'] !== 'skip_sorting') {
				array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
			}
		} else if (empty($orderby)) {
			array_key_sort($data, ['name' => SORT_ASC], ['name' => SORT_NATURAL]);
		}
		return $data;
	}
454966
public function all(array $params = array())
    {
        $endpoint = '/admin/orders.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Order::class, $response['orders']);
    }
882711
public function create(array $params)
    {
        if (!array_key_exists('amount', $params) ||
            !array_key_exists('currency', $params) ||
            !array_key_exists('description', $params) ||
            !array_key_exists('order_id', $params) ||
            !array_key_exists('payment_options', $params) ||
            !array_key_exists('type', $params)
        ) {
            throw new \InvalidArgumentException('Invalid data provided.');
        }

        return $this->post('/orders', [], $params);
    }
575843
public function assemble(array $params = array(), array $options = array()) {
		$this->assembledParams = array();
		return $this->buildRoute(array_merge($params, $this->defaults));
	}
999987
public static function create($params = null, $options = null)
    {
        $opts = \Stripe\Util\RequestOptions::parse($options);
        if (is_null($opts->apiBase)) {
            $opts->apiBase = Stripe::$apiUploadBase;
        }
        // Manually flatten params, otherwise curl's multipart encoder will
        // choke on nested arrays.
        // TODO: use array_column() once we drop support for PHP 5.4
        $flatParams = [];
        foreach (\Stripe\Util\Util::flattenParams($params) as $pair) {
            $flatParams[$pair[0]] = $pair[1];
        }
        return static::_create($flatParams, $opts);
    }
117370
public function put($url, $params = array(), $options = array())
    {
        return $this->request($url, self::PUT, $params, $options);
    }
658074
public function getSortOptions(array $params = []) {

		$options = $this->getOptions();

		$plugin = elgg_get_plugin_from_id('hypeLists');
		$settings = $plugin->getAllSettings();

		foreach ($settings as $k => $val) {
			if (!$val) {
				continue;
			}
			list(, $entity_type, $field, $direction) = explode('::', $k);
			if ($entity_type != $this->getEntityType()) {
				continue;
			}
			if ($field && in_array(strtolower($direction), array('asc', 'desc'))) {
				$sort_options[] = "$field::$direction";
			}
		}

		$params['list'] = $this;

		$sort_options = elgg_trigger_plugin_hook('sort_fields', $this->getEntityType(), $params, $sort_options);

		$subtypes = elgg_extract('subtype', $options);
		if (!$subtypes) {
			$subtypes = elgg_extract('subtypes', $options);
		}
		if (!empty($subtypes)) {
			$subtypes = (array) $subtypes;
			$subtype = array_shift($subtypes);
			$sort_options = elgg_trigger_plugin_hook('sort_fields', "object:$subtype", $params, $sort_options);
		}

		return $sort_options;
	}
176310
public function addParams(array $params)
    {
        foreach ($params as $k => $v) {
            $this->addParam($k, $v);
        }
        return $this;
    }
782467
public static function hostedOrderForm($order, $params = array())
    {
        $orderFormUrl = OpenPayU_Configuration::getServiceUrl() . 'orders';

        $formFieldValuesAsArray = array();
        $htmlFormFields = OpenPayU_Util::convertArrayToHtmlForm($order, '', $formFieldValuesAsArray);

        $signature = OpenPayU_Util::generateSignData(
            $formFieldValuesAsArray,
            OpenPayU_Configuration::getHashAlgorithm(),
            OpenPayU_Configuration::getMerchantPosId(),
            OpenPayU_Configuration::getSignatureKey()
        );

        $formParams = array_merge(self::$defaultFormParams, $params);

        $htmlOutput = sprintf("<form method=\"POST\" action=\"%s\" id=\"%s\" class=\"%s\">\n", $orderFormUrl, $formParams['formId'], $formParams['formClass']);
        $htmlOutput .= $htmlFormFields;
        $htmlOutput .= sprintf("<input type=\"hidden\" name=\"OpenPayu-Signature\" value=\"%s\" />", $signature);
        $htmlOutput .= sprintf("<button type=\"submit\" formtarget=\"%s\" id=\"%s\" class=\"%s\">%s</button>", $formParams['submitTarget'], $formParams['submitId'], $formParams['submitClass'], $formParams['submitContent']);
        $htmlOutput .= "</form>\n";

        return $htmlOutput;
    }
524536
public static function getList(array $options = array())
    {
        $api = new Api\GetService();
        $result = $api->doRequest();
        $paymentMethods = self::reorderOutput($result);

        if (isset($options['country'])) {
            $paymentMethods = self::filterCountry($paymentMethods, $options['country']);
        }

        return $paymentMethods;
    }
590039
protected function addItems($params, $options)
    {
        $items = [];

        if (isset($options['line_items']) && is_array($options['line_items'])) {
            foreach ($options['line_items'] as $item) {
                $items[] = [
                    'itemNumber'      => Arr::get($item, 'sku'),
                    'itemDescription' => Arr::get($item, 'description'),
                    'itemPrice'       => $this->gateway->amount(Arr::get($item, 'unit_price')),
                    'itemQuantity'    => (string) Arr::get($item, 'quantity', 1),
                    'itemBrandName'   => Arr::get($item, 'brand_name', ''),
                ];
            }
        }

        return $items;
    }
429771
public function assemble(array $params = array(), array $options = array())
    {
        $mergedParams = array_merge($this->defaults, $params);
        $url = '/' . $this->spec
             . '/' . $mergedParams['theme']
             . '/' . ($mergedParams['scope']? $mergedParams['scope'] : '__theme__')
             . '/' . ltrim($mergedParams['file'], '/');

        $this->assembledParams[] = array('theme', 'scope', 'file');
        return $url;
    }
633909
protected function parseOrder($order, $options = [])
    {
        if (is_array($order)) {
            $array = [];
            foreach ($order as $key => $val) {
                if (is_numeric($key)) {
                    if (false === strpos($val, '(')) {
                        $array[] = $this->parseKey($val, $options);
                    } else {
                        $array[] = $val;
                    }
                } else {
                    $sort    = in_array(strtolower(trim($val)), ['asc', 'desc']) ? ' ' . $val : '';
                    $array[] = $this->parseKey($key, $options) . ' ' . $sort;
                }
            }
            $order = implode(',', $array);
        }

        return !empty($order) ? ' ORDER BY ' . $order : '';
    }
1289536
public function UnifiedOrder($params)
    {
        $this->input = new UnifiedOrder();
        $params = array_merge($this->configs, $params);
        $this->setParams($params);
        return Api::unifiedOrder($this->input);
    }