/** * Add order params to request. * * @param string[] $params * @param int $money * @param string[] $options * * @return array */ protected function addOrder(array $params, $money, array $options) { $params['order_id'] = Arr::get($options, 'reference'); $params['order_name'] = Helper::ascii(Arr::get($options, 'description', 'PayMe Purchase')); $params['order_price'] = $this->gateway->amount($money); return $params; }
/** * Add order params to request. * * @param string[] $params * @param int $money * @param string[] $options * * @return array */ protected function addOrder(array $params, $money, array $options) { $params['description'] = Helper::ascii(Arr::get($options, 'description', 'PayMe Purchase')); $params['reference_id'] = Arr::get($options, 'reference'); $params['currency'] = Arr::get($options, 'currency', $this->gateway->getCurrency()); $params['amount'] = $this->gateway->amount($money); return $params; }
/** * Add order params to request. * * @param string[] $params * @param int $money * @param string[] $options * * @return array */ protected function addOrder(array $params, $money, array $options) { return array_merge($params, ['amount' => $this->gateway->amount($money), 'currency' => Arr::get($options, 'currency', $this->gateway->getCurrency()), 'description' => Helper::ascii(Arr::get($options, 'description', 'PayMe Purchase')), 'order_id' => Arr::get($options, 'reference')]); }
/** * Add order params to request. * * @param string[] $params * @param int $money * @param string[] $options * * @return array */ protected function addOrder(array $params, $money, array $options) { $params['PAYMENTREQUEST_0_DESC'] = Helper::ascii(Arr::get($options, 'description', 'PayMe Purchase')); $params['PAYMENTREQUEST_0_INVNUM'] = Arr::get($options, 'reference'); $params['PAYMENTREQUEST_0_CURRENCYCODE'] = Arr::get($options, 'currency', $this->gateway->getCurrency()); $params['PAYMENTREQUEST_0_AMT'] = $this->gateway->amount($money); $params = $this->addLineItems($params, $options); $params = $this->addShippingAddress($params, $options); return $params; }