WP Manifestindependent plugin directory
manifest / ecommerce / test-gateway

Test Gateway

WooCommerce test payment gateway, accepts TESTPAY and logs transactions.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/m-haris-dev/test-gateway/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Test Gateway WooCommerce Plugin

Description

Custom payment gateway for WooCommerce that accepts a special test code (TESTPAY). Logs all transactions in a custom database table and is always enabled by default.

Features

  • Always enabled Test Gateway on checkout
  • Accepts code TESTPAY to mark order as paid
  • Logs transactions: Order ID, Amount, Status, Date
  • Admin page to view logs
  • Modular class-based design

Installation

  1. Upload test-gateway folder to /wp-content/plugins/.
  2. Activate plugin from WordPress admin.
  3. Checkout page will automatically show Test Gateway.
  4. Enter TESTPAY to complete payment.
  5. Logs can be viewed under Test Gateway Logs in admin.

Hooks Used

  • woocommerce_payment_gateways → register gateway
  • woocommerce_available_payment_gateways → force gateway available
  • register_activation_hook → create DB table & default settings
  • add_menu_page → admin logs page

Notes

  • All gateway code prefixed with tg_
  • DB table: wp_tg_transactions
  • Error logging via error_log() to debug issues