Thread Rating:
πŸš€ BBMODZ Store β€” Sell Attachments Directly From Your Forum
#1
πŸš€ BBMODZ Store β€” Sell Attachments Directly From Your Forum
PayPal checkout β€’ Auto-unlock downloads β€’ Orders/Refunds β€’ Diagnostics β€’ Logs
Created with ChatGPT & Claude A.I
Pen-tested By XXCORROSIONXX using HCLΒ AppScan


What is it?
BBMODZ Store lets you list forum attachments as products, accept PayPal, and automatically grant access to download after payment. Designed to feel native to MyBB (templates + theming) and simple for admins.


  • Themed storefront at misc.php?action=store β€” uses your theme via {$headerinclude} {$header} {$footer} Products: price, currency, active flag, description, and attachment ID to unlock Orders: pending β†’ paid β†’ refunded states; admin list with timestamps PayPal Checkout: create β†’ approve β†’ capture (and refund from ACP) Secure downloads: only purchasers can fetch the paid attachment Diagnostics: token test + log viewer to troubleshoot creds/cURL []Robust logs: writes to inc/plugins/logs/bbm_store.log Settings repair: self-heals settings if MyBB cache hiccups
  • BankPipe-inspired structure: clean actions, reliable settings handling

  • ACP β†’ Store β†’ Products β€” add/edit/delete products ACP β†’ Store β†’ Orders β€” view purchases, issue refunds ACP β†’ Store β†’ Diagnostics β€” token test + error log Configuration β†’ Settings β†’ BBMODZ Store Settings β€” enable store, PayPal keys, title, currency, etc.

  • MyBB 1.8.x []PHP 7.4+ (8.0/8.1/8.2 OK) []PHP cURL enabled PayPal REST app (Client ID + Secret) * PluginLibrary for nicer settings creation; falls back to manual if missing


Code:
inc/plugins/bbmodz_store.php (bootstrap)
inc/plugins/bbm_store/core.php (tables, settings, templates, helpers)
inc/plugins/bbm_store/admin.php (ACP: products, orders, diagnostics)
inc/plugins/bbm_store/front.php (public routes & downloads)
inc/plugins/bbm_store/paypal.php (token/create/capture/refund)
inc/plugins/logs/ (created automatically)

βš™οΈ Install
Upload all files, preserving folders.
ACP β†’ Configuration β†’ Plugins β†’ Activate β€œBBMODZ Store”.
ACP β†’ Configuration β†’ Settings β†’ BBMODZ Store Settings
  • [
  • ]Enable Store = On []PayPal Mode = Sandbox (switch to Live when ready) Paste Client ID & Secret
ACP β†’ Store β†’ Diagnostics β†’ confirm β€œToken OK”.
ACP β†’ Store β†’ Products β†’ Add your first product:
  • Attachment ID = the aid of a file uploaded to a post Set Active = Yes

[*]Public: go to misc.php?action=store and buy/test.

🧩 How Purchases Work
User clicks Buy β†’ redirected to PayPal (approve)
On return, plugin captures the order and marks it paid
Access is granted in bbm_store_purchases (uid, pid, attachment_id)
User downloads via misc.php?action=store_download&pid=PRODUCT_ID

πŸ”§ Troubleshooting
β€œCould not initiate PayPal checkout”
β†’ Check Store β†’ Diagnostics. Common causes:
  • Missing Client ID/Secret cURL disabled
  • Sandbox vs Live mismatch

β€œStorefront looks unstyled”
β†’ Make sure templates installed on activation. Re-activate the plugin to recreate bbm_store_list & bbm_store_row.
Settings group not showing
β†’ Use Store β†’ Diagnostics/Repair (if included) or re-activate to rebuild settings; clear forum cache.

πŸ” Security Notes
  • Downloads are gated per purchase; direct URL access is blocked by auth checks Refund revokes access automatically
  • Logs include HTTP status + API body for auditing (do not share secrets)

πŸ—ΊοΈ Roadmap
  • Postbit/attachment β€œPaywall” button (buy from the thread) Coupons & limited-time pricing
  • Multiple providers (Stripe, etc.)
  • Refund does not work at the moment. It's half coded in. If you attempt, it will just error out:Β Refund failed: Refund Failed - HTTP 422: Status=unknown, Response: {"name":"UNPROCESSABLE_ENTITY","message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"d353da9011b8e","details":[{"issue":"REFUND_FAILED_INSUFFICIENT_FUNDS","description":"Capture could not be refunded due to insufficient funds. Ple
  • in time....

πŸ†• Changelog (highlights)
  • 1.5.4: Template eval fixed per MyBB docs; cleaner front rendering 1.5.3: Eval concatenation corrected; quote safety 1.5.1: Admin actions reworked to avoid PHP parse on quotes 1.5.0: Multi-file structure, full PayPal flow, templated storefront, secure downloads


Attached Files
.zip   inc.zip (Size: 20.22 KB / Downloads: 0)
Reply
« Next Oldest | Next Newest »


Messages In This Thread
πŸš€ BBMODZ Store β€” Sell Attachments Directly From Your Forum - by admin - 10-21-2025, 10:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)