This commit is contained in:
ct
2025-07-01 23:13:09 +08:00
parent 79e7d7a49e
commit 209c022f1d
26 changed files with 374 additions and 50 deletions

View File

@@ -0,0 +1,32 @@
<?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)
{
///
}
}