Skip to content

Commit

Permalink
Update NotchPay.php
Browse files Browse the repository at this point in the history
  • Loading branch information
chapdel authored Apr 10, 2024
1 parent ad23439 commit 78f673d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NotchPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, 3 ) !== "pk.") {
if(substr( $apiKey, 0, 2 ) !== "b." && substr( $apiKey, 0, 3 ) !== "sb." && substr( $apiKey, 0, 3 ) !== "pk." && substr( $apiKey, 0, 8 ) !== "pk_test.") {
throw new InvalidArgumentException('Api key must have a valid signature.');
}
return true;
Expand Down

0 comments on commit 78f673d

Please sign in to comment.