This file contains hidden or 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
brew install caddy mkcert nss dnsmasq | |
mkcert -install | |
mkcert '*.app.test' '*.cdn.test' | |
# rename the certs and move them under /usr/local/etc/caddy/certs | |
cat <<EOF > /usr/local/etc/caddy/Caddyfile | |
*.app.test:443, *.cdn.test:443 { |
This file contains hidden or 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
<?php | |
class StripeSubscriptionHandler { | |
/** | |
* Cancel a Stripe subscription, optionally prorating and refunding the unused amount | |
* | |
* @param string $id Stripe Subscription ID | |
* @param bool $at_period_end Type of cancellation | |
* If set to true, will cancel the subscription at its end |