ComusThumbz 문서
관리자 로그인

Access Packages

Overview

The Admin Access Packages page manages all subscription and purchase packages on the platform. This is where administrators configure what users can buy, including site VIP subscriptions, token bundles, and creator subscription templates. The page integrates with multiple payment providers and dynamically loads provider-specific capabilities.

Key capabilities include:

  • Create and manage subscription packages with initial and recurring pricing
  • Configure token bundles for one-time purchases
  • Set up creator subscription package templates
  • Map packages to external payment provider IDs
  • Enable/disable packages without deletion
  • Duplicate packages for quick variations
  • View package usage and subscription counts
  • Dynamic provider capability detection

 


System Requirements

PHP Requirements

Requirement Minimum Recommended
PHP Version 7.4+ 8.0+
Memory Limit 64M 128M

PHP Extensions Required

  • mysqli - Database connectivity
  • json - JSON encoding for configurations
  • session - Session management for CSRF protection

PHP Settings

session.autostart = Off
date.timezone = Your/Timezone

Features & UI Elements

Page Header

[Screenshot: access-packages-header]

The page header displays:

  • Title: "Access Packages"
  • Icon: fa-box (package icon)
  • Breadcrumb: Dashboard / Billing / Access Packages

 

Alert Messages

Success and error messages appear below the header:

  • Success (green): "Package created successfully", "Package updated successfully"
  • Error (red): "Invalid security token", "Package not found"

 

Navigation Tabs

[Screenshot: access-packages-tabs]

Three tabs organize packages by type:

Tab Icon Description
Site VIP Packages fa-crown Site-wide VIP subscriptions
Token Packages fa-coins One-time token purchases
Creator Subscriptions fa-user-star Creator subscription templates
Note: The Creator Subscriptions tab provides a link to manage subscription package templates at creatorsubscriptionpackages.admin.php

Packages Table

[Screenshot: access-packages-table]

Each tab displays a table of packages:

Column Description
ID Package ID (auto-increment)
Provider Payment provider with icon
External ID Provider's package/offer ID
Title Package display name
Price Initial price / Rebill price (for recurring)
Duration Initial days / Rebill days
Tokens Token count (for token packages)
Status Active/Inactive toggle
Subscribers Count of active subscriptions (for subscriptions)
Actions Edit, Duplicate, Delete buttons

Status Badges:

Status Badge Color Meaning
Active Green Available for purchase
Inactive Gray Hidden from users

Add Package Form

[Screenshot: access-packages-form]

A form to create or edit packages:

Basic Information:

Field Type Required Description
Provider Dropdown Yes Select payment processor
External ID Text Provider-specific Package ID in provider system
Title Text Yes Display name (max 255 chars)
Description Textarea No Marketing description


Pricing & Duration (Site VIP):

Field Type Required Description
Initial Price Number Yes First payment amount
Rebill Price Number No Recurring payment amount
Initial Duration Number Yes First period in days
Rebill Duration Number No Recurring period in days


Token Packages:

Field Type Required Description
Price Number Yes Purchase price
Tokens Number Yes Tokens granted


Creator Subscription:

Field Type Required Description
Package Tier Dropdown Yes Links to creator package template
Initial Price Number Yes First payment amount


Additional Options:

Field Type Description
Trial Period Number Optional trial period in days
Trial Price Number Trial period price (can be 0)
Currency Dropdown Currency code (default USD)
Featured Checkbox Highlight on pricing page
Display Order Number Sort order for display
Active Checkbox Package is available for purchase

Provider Capabilities

 

[Screenshot: access-packages-provider-capabilities]

When selecting a provider, the form dynamically shows:

  • Whether provider supports recurring billing
  • Whether provider supports token purchases
  • Provider-specific external ID requirements
  • Available currency options

 

 

Configuration Required: Provider capabilities are loaded from processor classes in ct/admin/processors/. Each processor class implements a getCapabilities() method.

 

Bulk Actions

At the bottom of each package table:

  • Activate Selected - Enable multiple packages
  • Deactivate Selected - Disable multiple packages
  • Delete Selected - Remove multiple packages (with confirmation)

 


Step-by-Step Usage

Creating a Site VIP Package

  1. Navigate to Admin Panel → Billing → Access Packages
  2. Ensure the Site VIP Packages tab is selected
  3. Click Add Package button
  4. Fill in the form:

Example VIP Monthly:

  • Provider: Select your payment provider
  • External ID: Enter the package ID from your provider
  • Title: "VIP Monthly"
  • Description: "Full access to all premium content"
  • Initial Price: 29.99
  • Rebill Price: 29.99
  • Initial Duration: 30
  • Rebill Duration: 30
  • Featured: Check if this is your main offer
  • Active: Check to make available

 

  1. Click Save Package

 

Success: Package created successfully

 

Creating a Token Package

  1. Click the Token Packages tab
  2. Click Add Package
  3. Fill in the form:

Example 100 Token Bundle:

  • Provider: Select your payment provider
  • External ID: Provider's token package ID
  • Title: "100 Tokens"
  • Description: "Get 100 tokens for tips and PPV"
  • Price: 9.99
  • Tokens: 100
  • Active: Check

 

  1. Click Save Package

 

Tip: Create tiered token packages with better value at higher quantities to encourage larger purchases.

 

Suggested Token Bundles:

Tokens Price Per Token
100 $9.99 $0.10
500 $39.99 $0.08
1000 $69.99 $0.07
2500 $149.99 $0.06

Creating a Creator Subscription Package

 

  1. Click the Creator Subscriptions tab
  2. Click the link to Manage Subscription Package Templates
  3. Create package templates first (see Creator Subscription Packages)
  4. Return to Access Packages
  5. Click Add Package
  6. Fill in the form:
  • Provider: Select payment provider
  • External ID: Provider's package ID
  • Title: "Creator Basic Subscription"
  • Package Tier: Select the template tier
  • Initial Price: As defined in template
  • Active: Check
  1. Click Save Package

 

Note: Creator subscription packages use templates that define benefits. The price in the access package should match the template price.

 

Editing an Existing Package

  1. Find the package in the appropriate tab
  2. Click the Edit button (pencil icon)
  3. Form populates with current values
  4. Make desired changes
  5. Click Update Package

 

Warning: Changing prices on active packages affects new purchases only. Existing subscriptions continue at their original price until renewal.

 

Duplicating a Package

  1. Find the package to duplicate
  2. Click the Duplicate button (copy icon)
  3. A new form opens with copied values
  4. Modify as needed (e.g., different price tier)
  5. Change the title to distinguish
  6. Click Save Package

Deactivating a Package

  1. Find the package in the table
  2. Click the status toggle (or Edit button)
  3. Uncheck the Active checkbox
  4. Save changes

 

Note: Deactivated packages are hidden from users but existing subscriptions remain active until expiration.

 

Deleting a Package

  1. Find the package in the table
  2. Click the Delete button (trash icon)
  3. Confirm the deletion

 

Warning: Deleting a package may cause issues with existing subscriptions. Prefer deactivation over deletion.

 

Linking to External Provider Packages

Different providers have different requirements for External ID:

Stripe:

  • External ID = Stripe Price ID (e.g., price1ABC123def)
  • Create products/prices in Stripe Dashboard first

 

PayPal:

  • External ID = PayPal Plan ID (e.g., P-123456789)
  • Create billing plans in PayPal Dashboard

 

CCBill:

  • External ID = CCBill Subaccount:Form (e.g., 0000000000:0000)
  • Configure forms in CCBill Admin

 

Epoch:

  • External ID = Epoch PI Code
  • Get from Epoch merchant panel

 

 

Configuration Required: Each payment processor class in ct/admin/processors/ handles the mapping between your package and the provider's system.

 


Best Practices

Package Strategy

 

Tip: Effective package strategy maximizes conversions and revenue:

 

  1. Tiered Pricing:
  • Offer 3 subscription options (Basic, Standard, Premium)
  • Sweet spot pricing usually in the middle tier
  • Feature one package as "Most Popular"
  1. Token Bundles:
  • Minimum 4 bundle sizes
  • Clear value increase at higher tiers
  • Never let per-token cost increase with quantity
  1. Trial Offers:
  • Consider 3-7 day trials at reduced price
  • Set trial price > $0 to qualify customers
  • Auto-convert to full price after trial

Provider Management

  1. Multiple Providers:
  • Offer 2-3 payment options
  • Different providers for different regions
  • Backup if one provider has issues
  1. External ID Accuracy:
  • Double-check external IDs with provider
  • Test purchases before going live
  • Document ID mappings

Pricing Guidelines

Package Type Typical Range Notes
VIP Monthly $9.99 - $49.99 Higher for niche content
VIP Yearly $49.99 - $199.99 30-40% discount from monthly
Token Small $4.99 - $14.99 Entry-level purchase
Token Large $49.99 - $199.99 Power user bundle

Troubleshooting

Common Issues

Package Not Appearing to Users

Cause: Package is inactive or provider issue

Solutions:

  1. Verify Active checkbox is checked
  2. Confirm provider is also active
  3. Check displayorder isn't hidden
  4. Verify packagetype matches display location
  5. Clear any caching

 

External ID Mismatch

Cause: ID doesn't match provider's system

Solutions:

  1. Log into provider dashboard
  2. Verify exact package/plan ID
  3. Check for copy/paste errors (extra spaces)
  4. Ensure correct environment (sandbox vs production)

 

Payment Fails with Valid Package

Cause: Provider-side configuration issue

Solutions:

  1. Check billing logs for error details
  2. Verify external ID is active in provider
  3. Test in provider's sandbox first
  4. Confirm currency matches provider settings
  5. Check processor class is handling correctly

 

Subscribers Count Not Updating

Cause: Subscription table not being updated

Solutions:

  1. Check tblUserSubscriptions for records
  2. Verify webhook is creating subscriptions
  3. Check packageid matches in transactions
  4. Review billing logs for webhook errors

 

Database Issues

Orphaned Packages

Cause: Provider deleted but packages reference it

Solution:

-- Find orphaned packages

SELECT p. FROM tblAccessPackages p

LEFT JOIN tblPaymentProviders pp ON p.providerid = pp.internalproviderid

WHERE pp.internalproviderid IS NULL;

 


-- Either reassign or delete:
UPDATE tblAccessPackages SET isactive = 0
WHERE provider
id NOT IN (SELECT internalproviderid FROM tblPaymentProviders);

 

Duplicate External IDs

Cause: Same external ID used for multiple packages

Solution:

-- Find duplicates

SELECT externalid, providerid, COUNT() as count

FROM tblAccessPackages

WHERE externalid IS NOT NULL

GROUP BY externalid, providerid

HAVING count > 1;

 


-- Deactivate duplicates (keep newest)
-- Review manually to decide which to keep

 


Security Considerations

CSRF Protection

All form submissions include CSRF token validation:

if ($POST['csrftoken'] !== $SESSION['admincsrftoken']) {

    die('Invalid security token');

}

 

Input Validation

  • Prices validated as positive decimals
  • Durations validated as positive integers
  • External IDs sanitized to prevent injection
  • Provider IDs verified against database

Price Manipulation Prevention

  • Prices stored in database, not client-side
  • Frontend displays only, backend calculates
  • Webhooks verify amounts match expected

Translatable Strings

{
    "accesspackagestitle": "Access Packages",
    "accesspackagesbreadcrumb": "Dashboard / Billing / Access Packages",
    "accesspackagestabvip": "Site VIP Packages",
    "accesspackagestabtokens": "Token Packages",
    "accesspackagestabcreator": "Creator Subscriptions",
    "accesspackagesadd": "Add Package",
    "accesspackagesedit": "Edit Package",
    "accesspackagestableid": "ID",
    "accesspackagestableprovider": "Provider",
    "accesspackagestableexternalid": "External ID",
    "accesspackagestabletitle": "Title",
    "accesspackagestableprice": "Price",
    "accesspackagestableduration": "Duration",
    "accesspackagestabletokens": "Tokens",
    "accesspackagestablestatus": "Status",
    "accesspackagestablesubscribers": "Subscribers",
    "accesspackagestableactions": "Actions",
    "accesspackagesformprovider": "Payment Provider",
    "accesspackagesformexternalid": "External ID",
    "accesspackagesformtitle": "Title",
    "accesspackagesformdescription": "Description",
    "accesspackagesformpriceinitial": "Initial Price",
    "accesspackagesformpricerebill": "Rebill Price",
    "accesspackagesformdurationinitial": "Initial Duration (days)",
    "accesspackagesformdurationrebill": "Rebill Duration (days)",
    "accesspackagesformtokens": "Tokens",
    "accesspackagesformpackagetier": "Package Tier",
    "accesspackagesformtrialperiod": "Trial Period (days)",
    "accesspackagesformtrialprice": "Trial Price",
    "accesspackagesformcurrency": "Currency",
    "accesspackagesformfeatured": "Featured",
    "accesspackagesformdisplayorder": "Display Order",
    "accesspackagesformactive": "Active",
    "accesspackagesformsave": "Save Package",
    "accesspackagesformupdate": "Update Package",
    "accesspackagesformcancel": "Cancel",
    "accesspackagesstatusactive": "Active",
    "accesspackagesstatusinactive": "Inactive",
    "accesspackagesduplicate": "Duplicate",
    "accesspackagesdelete": "Delete",
    "accesspackagesdeleteconfirm": "Are you sure you want to delete this package?",
    "accesspackagescreatedsuccess": "Package created successfully",
    "accesspackagesupdatedsuccess": "Package updated successfully",
    "accesspackagesdeletedsuccess": "Package deleted successfully",
    "accesspackagesduplicatedsuccess": "Package duplicated successfully",
    "accesspackageserrorcsrf": "Invalid security token",
    "accesspackageserrornotfound": "Package not found",
    "accesspackageserrorrequired": "Title and provider are required",
    "accesspackagesnopackages": "No packages found",
    "accesspackagesmanagetemplates": "Manage Subscription Package Templates",
    "accesspackagesproviderselect": "Select Provider",
    "accesspackagestierselect": "Select Package Tier",
    "accesspackagesdays": "days",
    "accesspackagesinitial": "Initial",
    "accesspackagesrebill": "Rebill"
}


Version History

Version Date Changes
1.0.0 2025-10-20 Initial access packages page
1.1.0 2025-11-01 Added token package support
1.2.0 2025-11-15 Added creator subscription type
1.3.0 2025-12-01 Dynamic provider capability loading
1.4.0 2025-12-15 Modern UI with green theme
1.5.0 2025-01-02 Added trial period support, bulk actions