perfexmodule.com — technical docs

Module Documentation

What each module does. How licensing works. What you need to know. No fluff.

🛒
Module 07 · pm_shop

PM Shop

Perfex 3.0+ Auto license generation Invoice automation Internal use

The shop engine behind perfexmodule.com. Customers buy modules at /shop, Perfex creates an invoice automatically, and the moment payment is recorded, a license key is generated and emailed to the buyer. Zero manual work.

Note: This module is designed for running your own module marketplace on a Perfex installation. It is not a general-purpose shop.

What you get

  • Public shop at /shop with product/package listings
  • Checkout flow with automatic Perfex invoice creation
  • License key generated instantly on payment confirmation
  • License email sent automatically (DE + EN)
  • Trial reminders at day 7, 14, 27 via cron
  • Client portal license overview at /clients/licenses
  • Order management in admin

Setup

  • Install and activate
  • Go to PM Shop → Settings → enter License Server URL and API Key
  • Create products and packages in admin
  • Shop is live at /shop
  • When a Perfex invoice is paid → license auto-generated → email sent
  • License Server URL: https://licenses.perfexmodule.com

🔑 Licensing — what the buyer must do

1

Purchase → receive license key via email.

2

Perfex admin → PM Shop → Settings → paste key → Activate License.

3

Also configure: License Server URL and License Server API Key — these connect your shop to the license server so it can auto-issue keys to your customers.

Technical notes

  • Hooks into Perfex invoice_payment_recorded event — fully automatic
  • License generation via POST to /api/create.php on license server
  • Free products (price = 0) get license immediately without invoice step
  • Trial reminders via perfex_scheduler_daily_tasks cron hook
  • All order data stored in pm_orders, pm_products, pm_packages tables
  • CSRF protection on all public checkout forms
⚙️
All modules

Requirements & First-Time Setup

Server requirements

  • Perfex CRM 3.0 or higher
  • PHP 8.0 or higher
  • MySQL 5.7+ / MariaDB 10.3+
  • application/config/my_routes.php writable (chmod 664)
  • Outgoing HTTPS connections to licenses.perfexmodule.com

If something doesn't work

  • Routes 404? → Check my_routes.php permissions
  • Language error? → Copy lang file to application/language/
  • License won't activate? → Check outgoing HTTPS
  • License valid but expired? → 7-day grace period. Reconnect to internet and reload.
  • Still stuck? → Email support with your domain and order number