mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +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:
+6
-1
@@ -88,8 +88,13 @@ const AdminPlanSection: React.FC = () => {
|
||||
|
||||
const handleManageClick = useCallback(async () => {
|
||||
try {
|
||||
// Only allow PRO or ENTERPRISE licenses to access billing portal
|
||||
if (!licenseInfo?.licenseType || licenseInfo.licenseType === 'NORMAL') {
|
||||
throw new Error('No valid license found. Please purchase a license before accessing the billing portal.');
|
||||
}
|
||||
|
||||
if (!licenseInfo?.licenseKey) {
|
||||
throw new Error('No license key found. Please activate a license first.');
|
||||
throw new Error('License key missing. Please contact support.');
|
||||
}
|
||||
|
||||
// Create billing portal session with license key
|
||||
|
||||
Reference in New Issue
Block a user