File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ const getNotificationEngine = (): NotificationEngine => {
1313}
1414
1515const handleCheckoutSessionCompleted = async ( session : Stripe . Checkout . Session ) : Promise < void > => {
16- const customer = session . customer as Stripe . Customer
17- console . log ( 'customer' , customer )
18- const customerId = customer . id
16+ const customerId = session . customer as string
1917 const userId = session . client_reference_id || session . metadata ?. user_id
2018 const productId = session . metadata ?. product_id
2119
@@ -107,6 +105,7 @@ const handleCheckoutSessionCompleted = async (session: Stripe.Checkout.Session):
107105
108106
109107const handleSubscriptionUpdated = async ( subscription : Stripe . Subscription ) : Promise < void > => {
108+ console . log ( 'subscription' , subscription )
110109 // Check if subscription was just marked for cancellation
111110 if ( subscription . cancel_at_period_end ) {
112111 console . log ( `Subscription ${ subscription . id } marked for cancellation at period end` )
@@ -145,6 +144,7 @@ const handleSubscriptionUpdated = async (subscription: Stripe.Subscription): Pro
145144}
146145
147146const handleSubscriptionDeleted = async ( subscription : Stripe . Subscription ) : Promise < void > => {
147+ console . log ( 'subscription' , subscription )
148148 const updatedLicense = await LicenseRepo . updateLicenseByStripePaymentId ( subscription . id , 'expired' )
149149
150150 if ( ! updatedLicense ) {
You can’t perform that action at this time.
0 commit comments