From 1678021ce36f9537609e0ae3b1aa4ce7faa92e78 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 18 Jan 2020 09:49:10 +0530 Subject: [PATCH] chore: updated Amazon Adapter Methods --- src/Auth/OAuth/Amazon.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Auth/OAuth/Amazon.php b/src/Auth/OAuth/Amazon.php index fd7de98360..64c04fdc90 100644 --- a/src/Auth/OAuth/Amazon.php +++ b/src/Auth/OAuth/Amazon.php @@ -67,11 +67,13 @@ class Amazon extends OAuth 'POST', 'https://api.amazon.com/auth/o2/token', $headers, - 'code=' . urlencode($code) . - '&client_id=' . urlencode($this->appID) . - '&client_secret=' . urlencode($this->appSecret). - '&redirect_uri='.urlencode($this->callback). - '&grant_type=authorization_code' + http_build_query([ + 'code' => $code, + 'client_id' => $this->appID , + 'client_secret' => $this->appSecret, + 'redirect_uri' => $this->callback , + 'grant_type' => 'authorization_code' + ]) ); $accessToken = json_decode($accessToken, true);