We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad23439 commit 78f673dCopy full SHA for 78f673d
src/NotchPay.php
@@ -39,7 +39,7 @@ private static function validateApiKey($apiKey): bool
39
throw new InvalidArgumentException('Api key must be a string and cannot be empty');
40
}
41
42
- if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk.") {
+ if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk." && substr( $apiKey, 0, 8 ) !== "pk_test.") {
43
throw new InvalidArgumentException('Api key must have a valid signature.');
44
45
return true;
0 commit comments