Knowledgebase

Testing MPGS (Sandbox, Debug Logs, and Test Transactions) Print

  • whmcs, MPGS, Payment Gateway, WHMCS Modules, Suncorp
  • 0

Overview

This guide explains how to test the MPGS gateway safely using sandbox credentials and WHMCS Gateway Logs.

Step 1 – Enter Sandbox Credentials

Your bank (or MPGS portal) should provide a test Merchant ID and API Password. Enter these under:

System Settings → Payments → Payment Gateways → MPGS

Step 2 – Enable Debug Logging (Temporary)

Enable Debug Logging in the MPGS gateway configuration.

Logs can be viewed at:

Utilities → Logs → Gateway Log

Step 3 – Run Test Scenarios

We recommend testing each of the following:

  • Client checkout: Pay an invoice using a new card (CVV provided)
  • Stored card charge: Pay an invoice using card on file
  • Admin charge: Attempt to capture payment from the admin invoice screen (if used)
  • Refund: Full and partial refund tests
  • Cron simulation: Trigger automation (or use a due invoice) to confirm recurring billing behaviour

Important: Stored Cards and CVV

WHMCS does not store CVV (Card Security Code). CVV is only available when the user enters it during checkout.

This means recurring and cron charges must be processed as merchant-initiated recurring transactions where supported by your merchant profile.

Common Test Errors

Error Meaning Fix
Card security code (CVV) is required. Gateway is requiring CVV for this transaction type. Ensure recurring / merchant-initiated transactions are enabled by your bank OR ensure the transaction is being submitted as recurring (see Going Live guide).
HTTP 401 Unauthorized Credentials/username format incorrect. Confirm Merchant ID and API Password. Username should be merchant.{MerchantID}.
HTTP 400 / Unexpected parameter Payload does not match your API version. Confirm API Version (commonly 100) and required payload fields.

Step 4 – Disable Debug Logging

Once testing is complete, turn Debug Logging OFF to reduce log volume and risk.


Was this answer helpful?

« Back