GameToy is a WordPress plugin that integrates your WooCommerce store with an external game-recharge merchant REST API. It bridges two systems: it pulls the merchant's goods catalog into WooCommerce as products, and — when a customer's order is completed — it automatically submits a corresponding top-up/recharge order back to the merchant API, then notifies the customer by email.
The plugin handles the full lifecycle: authenticated API requests (client ID, signed requests with timestamp + nonce), product synchronization into WooCommerce, order submission on woocommerce_order_status_completed, activity logging (account and debug logs), and transactional email via a bundled SMTP/mailer with an admin settings page. An admin dashboard page lets you configure credentials and inspect API responses, while account and log pages give visibility into syncs and submitted orders.
It is built for store owners and developers running a WooCommerce-based digital game top-up / recharge shop who need a reliable connector to a merchant fulfillment API.
🔎 Keywords: WooCommerce game recharge, WordPress merchant API integration, game top-up plugin, WooCommerce REST API client, product sync plugin, order submission automation, SMTP email WordPress, digital recharge store, game credit plugin.
- 🔗 Merchant REST API integration — authenticated requests (ClientId + signed
AuthSignwith timestamp and nonce) to the external recharge merchant API. - 🛒 Product sync into WooCommerce — fetches the merchant goods list and creates/updates WooCommerce products (matched by SKU).
- ⚙️ Automatic order submission — on completed WooCommerce orders, submits the matching recharge order to the merchant API.
- 🆔 Order helpers — generates unique merchant order IDs, player IDs, and random values for each submission.
- 📧 SMTP email notifications — bundled mailer and email templates to notify customers, configurable from settings.
- 🧾 Logging — account and debug logs (
logs/account.log,logs/debug.log) for syncs, submissions, and errors. - 🖥️ Admin dashboard — settings page for credentials, plus pages to display API responses, product cards, and account/order logs.
- 🧩 WooCommerce hooks — clean integration via WooCommerce order-status actions.
| Layer | Technology |
|---|---|
| Platform | WordPress (plugin) |
| Commerce | WooCommerce |
| Language | PHP 7+ |
| Networking | cURL REST client (signed requests) |
| SMTP / custom mailer | |
| Front-end | JavaScript, CSS |
- WordPress 5.0+
- PHP 7.0+
- WooCommerce installed and active
- Valid merchant API credentials (client ID / secret)
- Download the plugin (clone or grab a ZIP of this repository).
- In your WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the archive and click Install Now.
- Activate the plugin from the Plugins menu.
git clone https://github.com/morpheusadam/TopUpBridge.git- Open the GameToy settings page in the WordPress admin and enter your merchant API credentials and SMTP details.
- Trigger a goods-list sync to import merchant products into WooCommerce (matched and upserted by SKU).
- Sell as usual — when an order reaches the Completed status, GameToy automatically submits the recharge order to the merchant API and emails the customer.
- Review the API response, account, and log pages in the admin to monitor syncs and submissions.
gametoy/
├── gametoy.php # main plugin bootstrap (includes)
├── admin/
│ └── gametoy-admin-page.php # admin dashboard page
├── includes/
│ ├── class-gametoy-api.php # merchant API client + product import
│ ├── class-gametoy-sync.php # product synchronization
│ ├── class-gametoy-submitorder.php # submit recharge order to merchant API
│ ├── woocommerce-hooks.php # order-status integration
│ ├── class_smtp.php # SMTP mailer
│ ├── settings-page.php # plugin settings
│ ├── log.php · logs-page.php # logging + log viewer
│ ├── account-logs-page.php # account activity logs
│ └── enqueue-scripts.php # assets
├── assets/ # css · js
└── logs/ # account.log · debug.log
Contributions are welcome! Open an issue or submit a pull request with new integrations, improvements, or fixes.
⚠️ Security note: do not commit real API credentials or secrets. Keep merchant keys in configuration/environment, not in source.
Distributed under the MIT License (or see LICENSE if present).
Web developer & cheerful hacker · PHP · Laravel · Go
⭐ If GameToy powered your store, consider giving it a star! ⭐