Skip to content

Commit bc3ae17

Browse files
committed
Yus
1 parent d4d16f1 commit bc3ae17

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/STRIPE/handler.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,14 @@ async function processCompletedSession(eventData) {
134134
} = metadata;
135135

136136
try {
137-
await StripeHelper.updateSubscription(subscriptionId, {
138-
metadata: {
139-
...metadata,
140-
isCheckout: false,
141-
},
142-
});
137+
if (subscriptionId) {
138+
await StripeHelper.updateSubscription(subscriptionId, {
139+
metadata: {
140+
...metadata,
141+
isCheckout: false,
142+
},
143+
});
144+
}
143145
} catch (e) {
144146

145147
}

0 commit comments

Comments
 (0)