diff --git a/src/NotchPay.php b/src/NotchPay.php index 6deeb7c..d462b6e 100644 --- a/src/NotchPay.php +++ b/src/NotchPay.php @@ -6,13 +6,13 @@ class NotchPay { - /** @var string The Paystack API key to be used for requests. */ + /** @var string The Notch Pay API key to be used for requests. */ public static string $apiKey; /** @var string The instance API key, settable once per new instance */ private $instanceApiKey; - /** @var string The base URL for the Paystack API. */ + /** @var string The base URL for the Notch Pay API. */ public static $apiBase = 'https://api.notchpay.co'; /** @@ -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." ) { + if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 2 ) !== "pk.") { throw new InvalidArgumentException('Api key must have a valid signature.'); } return true; diff --git a/src/Util/Util.php b/src/Util/Util.php index c3a5316..4059349 100644 --- a/src/Util/Util.php +++ b/src/Util/Util.php @@ -28,7 +28,7 @@ public static function utf8(mixed $value): mixed } /** - * Converts a response from the Paystack API to the corresponding PHP object. + * Converts a response from the Notch Pay API to the corresponding PHP object. */ public static function convertArrayToObject(array $resp): array|object {