From 9a8e4eb82fa5c36ff037e61430d872e2518b83ec Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Mon, 9 Aug 2021 16:27:30 -0500 Subject: [PATCH] Fix error while pairing with server This commit fixes a TypeError thrown by GuzzleHttp due to a malformed 'headers' array supplied in the pairing request to BitPay's server --- src/Commands/CreateKeypair.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/CreateKeypair.php b/src/Commands/CreateKeypair.php index b65b891..2e2b10d 100644 --- a/src/Commands/CreateKeypair.php +++ b/src/Commands/CreateKeypair.php @@ -153,8 +153,8 @@ public function pairWithServerAndCreateToken() $response = $bitpayClient->post('/tokens', [ 'json' => $postData, 'headers' => [ - 'x-accept-version: 2.0.0', - 'Content-Type: application/json', + 'x-accept-version' => '2.0.0', + 'Content-Type' => 'application/json', // Todo: If added below headers, bitpay responds with error, "This endpoint does not support the `user` facade" // 'x-identity' => $this->publicKey->__toString(), // 'x-signature' => $this->privateKey->sign($this->network.'/tokens'.json_encode($postData)),