This commit is contained in:
ct
2025-07-02 18:25:12 +08:00
parent 68a47ec916
commit 0aa0d9569f
20 changed files with 515 additions and 193 deletions

View File

@@ -5,7 +5,6 @@
use App\Helpers\FirstParty\Stripe\StripeHelper;
use App\Models\Plan;
use App\Models\UserPlan;
use Illuminate\Support\Facades\Log;
use Laravel\Cashier\Events\WebhookReceived;
class SubscriptionHelper
@@ -28,7 +27,7 @@ private static function handleSubscriptionUpsert(WebhookReceived $event)
{
$object = $event->payload['data']['object'];
//dump($object);
// dump($object);
$ignore_statuses = ['incomplete_expired', 'incomplete'];
@@ -41,7 +40,7 @@ private static function handleSubscriptionUpsert(WebhookReceived $event)
if ($user) {
foreach ($object['items']['data'] as $line_item) {
//dump($line_item);
// dump($line_item);
$stripe_price_id = $line_item['plan']['id'];
$current_period_end = $line_item['current_period_end'];