Merge pull request #1625 from sondin/main

fix current_period_end
This commit is contained in:
Marko Kraemer 2025-09-16 07:20:36 -07:00 committed by GitHub
commit 21247b8428
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ class SubscriptionService:
'id': stripe_subscription['id'],
'status': 'trialing',
'is_trial': True,
'current_period_end': stripe_subscription['current_period_end'],
'current_period_end': stripe_subscription["items"]["data"][0]['current_period_end'],
'cancel_at_period_end': stripe_subscription['cancel_at_period_end'],
'trial_end': stripe_subscription.get('trial_end'),
'price_id': price_id,
@ -153,7 +153,7 @@ class SubscriptionService:
'id': stripe_subscription['id'],
'status': stripe_subscription['status'],
'is_trial': False,
'current_period_end': stripe_subscription['current_period_end'],
'current_period_end': stripe_subscription["items"]["data"][0]['current_period_end'],
'cancel_at_period_end': stripe_subscription['cancel_at_period_end'],
'trial_end': stripe_subscription.get('trial_end'),
'price_id': price_id,