mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 03:20:46 +02:00
Capture emaill when the license is default or invalid (#4998)
Stripe checkout captures email if the license is the default or invalid.
This commit is contained in:
+3
-2
@@ -42,13 +42,14 @@ export const useCheckoutSession = (
|
||||
}
|
||||
|
||||
// Fetch current license key for upgrades
|
||||
// Only include if it's a valid PRO/ENTERPRISE license (not NORMAL/free tier)
|
||||
let existingLicenseKey: string | undefined;
|
||||
try {
|
||||
const licenseInfo = await licenseService.getLicenseInfo();
|
||||
if (licenseInfo && licenseInfo.licenseKey) {
|
||||
if (licenseInfo?.licenseType && licenseInfo.licenseType !== 'NORMAL' && licenseInfo.licenseKey) {
|
||||
existingLicenseKey = licenseInfo.licenseKey;
|
||||
setCurrentLicenseKey(existingLicenseKey);
|
||||
console.log('Found existing license for upgrade');
|
||||
console.log('Found existing valid license for upgrade');
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Could not fetch license info, proceeding as new license:', error);
|
||||
|
||||
Reference in New Issue
Block a user