Quick PHP Class for Stripe Webhook Events as Class Constants

Cats: php, stripe

So you can do stuff like:

if( $webhookEvent->type == \StripeEvents::EVENT_CHARGE_SUCCEEDED ) {
	// put food in me
}

Or,

switch( $webhookEventType ) {
	case \StripeEvents::EVENT_CHARGE_DISPUTE_CREATED:
		// $this->emailStaff();
		break;
	case \StripeEvents::EVENT_TRANSFER_PAID:
		// $this->buyStuff()
		break;
	default:
		// etc
}

Taken from the Types of Events on Stripe’s API.