Skip to content

Commit 78f673d

Browse files
authored
Update NotchPay.php
1 parent ad23439 commit 78f673d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NotchPay.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private static function validateApiKey($apiKey): bool
3939
throw new InvalidArgumentException('Api key must be a string and cannot be empty');
4040
}
4141

42-
if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk.") {
42+
if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk." && substr( $apiKey, 0, 8 ) !== "pk_test.") {
4343
throw new InvalidArgumentException('Api key must have a valid signature.');
4444
}
4545
return true;

0 commit comments

Comments
 (0)