From eec278cdd144b7a887f70a81732ade31ed697273 Mon Sep 17 00:00:00 2001 From: Paul Dixon Date: Tue, 17 Mar 2020 18:28:42 +0000 Subject: [PATCH] fix erroneous loop and status check (also suggested by mgilfillan) --- src/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 3c711b6..c33cdc7 100644 --- a/src/Client.php +++ b/src/Client.php @@ -289,9 +289,9 @@ 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'] == 'ready'); + return (isset($data['status']) && $data['status'] == 'valid'); } /**