From 6b55f256ae5aab69e6157168af3d5ec4765c7dbb Mon Sep 17 00:00:00 2001 From: Mike Gilfillan Date: Tue, 3 Mar 2020 15:56:42 +0000 Subject: [PATCH] Fix incorrect comparison when auto-retrying authorization Previously only 1 attempt to authorize would be made --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 680326d..d3d67c0 100644 --- a/src/Client.php +++ b/src/Client.php @@ -284,7 +284,7 @@ class Client ); $data = json_decode((string)$response->getBody(), true); sleep(1); - } while ($maxAttempts < 0 && $data['status'] == 'pending'); + } while ($maxAttempts > 0 && $data['status'] == 'pending'); return (isset($data['status']) && $data['status'] == 'valid'); }