Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Implement webhook command #1202

Merged
merged 3 commits into from
Jun 21, 2021
Merged

[12.x] Implement webhook command #1202

merged 3 commits into from
Jun 21, 2021

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Jun 19, 2021

This implements a webhook command to easily set up the webhook needed to send the events that Cashier needs from Stripe. By default it'll use the APP_URL with the default webhook route and the default Cashier version. Both of these can be customized. You can also pass a --disabled flag if you don't want it to start sending events straight away.

# Create the webhook with the events needed for Cashier
php artisan cashier:webhook

# Set an explicit url
php artisan cashier:webhook --url="http://example.com/stripe/webhook"

# Set an explicit Stripe API version
php artisan cashier:webhook --api-version="2019-12-03"

# Disable the webhook upon creation
php artisan cashier:webhook --disabled

This will make the setup process that much easier for new Cashier users and users that are upgrading to newer versions. We can add this command to the upgrade guide.

@taylorotwell taylorotwell merged commit 6e21bbc into 12.x Jun 21, 2021
@taylorotwell taylorotwell deleted the webhook-command branch June 21, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants