33 lines
778 B
PHP
33 lines
778 B
PHP
<?php
|
|
|
|
namespace App\Helpers\FirstParty\Stripe;
|
|
|
|
use Laravel\Cashier\Events\WebhookReceived;
|
|
|
|
class StripeHelper
|
|
{
|
|
public static function handleSubscriptionWebhookEvents(WebhookReceived $event)
|
|
{
|
|
switch ($event->payload['type']) {
|
|
case 'customer.subscription.created':
|
|
case 'customer.subscription.updated':
|
|
self::handleSubscriptionUpsert($event);
|
|
break;
|
|
|
|
case 'customer.subscription.deleted':
|
|
self::handleSubscriptionDelete($event);
|
|
break;
|
|
}
|
|
}
|
|
|
|
private static function handleSubscriptionUpsert(WebhookReceived $event)
|
|
{
|
|
///
|
|
}
|
|
|
|
private static function handleSubscriptionDelete(WebhookReceived $event)
|
|
{
|
|
///
|
|
}
|
|
}
|