/** * @inheritDoc */ public function addSpecialDataToOrder(array $data = []) { $data['pos_id'] = $this->dataGetter->getPosId(); $data['pos_auth_key'] = $this->dataGetter->getPosAuthKey(); $data['client_ip'] = $this->dataGetter->getClientIp(); $data['ts'] = $this->dataGetter->getTs(); $data['sig'] = $this->dataGetter->getSigForOrderCreate($data); return $data; }
public function testClientIp() { $ip = '127.0.0.1'; $_SERVER['REMOTE_ADDR'] = $ip; $this->assertEquals($ip, $this->model->getClientIp()); }