Skip to main content

Testing Scenarios

Basic Approve Flow

  1. Select Suma Test Gateway on checkout.
  2. Keep outcome set to approve.
  3. Submit order.

Expected results:

  • Checkout succeeds and redirects to order received URL.
  • Order transitions to paid/completed flow.
  • Order note includes fake transaction and auth code.
  • Meta exists: _stwg_auth_code, _stwg_avs, _stwg_cvv.

Basic Decline Flow

  1. Select Suma Test Gateway.
  2. Choose decline.
  3. Submit order.

Expected results:

  • Checkout returns failure notice.
  • Order status becomes failed.
  • Order note includes DECLINED_100 and Do not honor.
  • Meta exists: _stwg_response_code, _stwg_response_text.
  • woocommerce_payment_failed dependent systems are triggered.

Gateway Validation Guard

  1. Tamper request and post invalid suma_test_gateway_outcome value.

Expected results:

  • Checkout blocked.
  • Error: valid test transaction outcome required.

Email and Thank-You Checks

For approved order:

  • Thank-you page shows test-mode statement.
  • Auth code appears if saved.
  • Customer email includes simulated mode instruction.

Integration Regression Matrix

Run these checks after plugin or WooCommerce updates:

  • Decline path still fires custom decline action.
  • Decline path still fires woocommerce_payment_failed.
  • Approve path still empties cart.
  • WC API callback still returns HTTP 200 and OK.