-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to check stripe acct in dev
- Loading branch information
1 parent
4f17e97
commit b82b2c6
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Expected stripe display name | ||
EXPECTED_STRING="KCD Training" | ||
|
||
# Currently connected stripe display name | ||
COMMAND_OUTPUT=$( | ||
stripe config --list | grep '^display_name' | awk -F'=' '{print $2}' | xargs | ||
) | ||
|
||
# Compare the expected string with the command output | ||
if [ "$EXPECTED_STRING" = "$COMMAND_OUTPUT" ]; then | ||
exit 0 # exit with status 0, indicating success/match | ||
else | ||
echo "Mismatched Stripe accounts, expected $EXPECTED_STRING, got $COMMAND_OUTPUT." | ||
exit 1 # exit with status 1, indicating failure/no match | ||
fi |