Exemplo n.º 1
0
 protected function build()
 {
     parent::build();
     $password = $this->client->getPassword();
     $url = $this->request->getUrl(true);
     $query = $url->getQuery();
     $query->add('password', $password);
     $url->setQuery($query);
     $this->request->setUrl($url);
 }
Exemplo n.º 2
0
 /**
  * @see https://en.bitcoin.it/wiki/MtGox/API/HTTP#PHP
  */
 protected function build()
 {
     parent::build();
     // sign the request
     // see
     $apiKey = $this->client->getApiKey();
     $apiSecret = $this->client->getApiSecret();
     $this->request->addPostFields(array('nonce' => $this->getNonce()));
     $this->request->addHeader('Rest-Key', $apiKey);
     $postData = $this->request->getPostFields();
     $this->request->addHeader('Rest-Sign', base64_encode(hash_hmac('sha512', $postData, base64_decode($apiSecret), true)));
 }