예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 public function testClientIp()
 {
     $ip = '127.0.0.1';
     $_SERVER['REMOTE_ADDR'] = $ip;
     $this->assertEquals($ip, $this->model->getClientIp());
 }