Skip to content

Commit

Permalink
Merge pull request #2 from adrianmacneil/content-type-fix
Browse files Browse the repository at this point in the history
Fix Content-Type header
  • Loading branch information
Adrian Macneil committed Mar 6, 2015
2 parents 4cdea1a + 2a8d247 commit 69c4f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
{
protected $endpoint = 'https://coinbase.com/api/v1';
protected $endpoint = 'https://api.coinbase.com/v1';

public function getApiKey()
{
Expand Down Expand Up @@ -58,6 +58,7 @@ function ($event) {
$body = $data ? http_build_query($data) : null;

$httpRequest = $this->httpClient->createRequest($method, $url, null, $body);
$httpRequest->setHeader('Content-Type', 'application/x-www-form-urlencoded');
$httpRequest->setHeader('ACCESS_KEY', $this->getApiKey());
$httpRequest->setHeader('ACCESS_SIGNATURE', $this->generateSignature($url, $body, $nonce));
$httpRequest->setHeader('ACCESS_NONCE', $nonce);
Expand Down

0 comments on commit 69c4f07

Please sign in to comment.