From f1d31dee886620c92257458eb65a7f8984f6a619 Mon Sep 17 00:00:00 2001 From: Mike Gilfillan Date: Tue, 3 Mar 2020 15:45:02 +0000 Subject: [PATCH] Check the authorization status is "valid" rather than "ready" According to https://tools.ietf.org/html/rfc8555#section-7.1.4 the status of an authorization object can only be "pending", "valid", or "revoked". An order can have a status of "ready" but never an authorization. --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 5ca07ad..680326d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -286,7 +286,7 @@ class Client sleep(1); } while ($maxAttempts < 0 && $data['status'] == 'pending'); - return (isset($data['status']) && $data['status'] == 'ready'); + return (isset($data['status']) && $data['status'] == 'valid'); } /**