From ad2343951202fa53e299d29ff50d131ef14bcacc Mon Sep 17 00:00:00 2001 From: chapdel Date: Mon, 4 Sep 2023 12:29:17 +0100 Subject: [PATCH] Fixed new api --- src/NotchPay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NotchPay.php b/src/NotchPay.php index d462b6e..0a7bc8d 100644 --- a/src/NotchPay.php +++ b/src/NotchPay.php @@ -39,7 +39,7 @@ private static function validateApiKey($apiKey): bool throw new InvalidArgumentException('Api key must be a string and cannot be empty'); } - if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 2 ) !== "pk.") { + if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk.") { throw new InvalidArgumentException('Api key must have a valid signature.'); } return true;