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
>>> import stripe | |
stripe.api_key = "vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE" | |
stripe.Charge.create( | |
amount=400, | |
currency="usd", | |
card={ | |
"number": '4242424242424242', | |
"exp_month": '12', | |
"exp_year": '2012', | |
"cvc": '123' |
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
# Checks that the child directory is a subdirectory of the parent | |
is_subdirectory() { | |
local child="$1" | |
local parent="$2" | |
if [[ "${child##${parent}}" != "$child" ]]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |