Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.86 KB

File metadata and controls

48 lines (41 loc) · 1.86 KB

gepgfun - Gepg emulator, for testing gepg payment/ bill cancellation and control number generating

  • mock/test/demo emulator, allowing you to run local tests for payment processing, bill cancellation, and control number generation.
  • Supports select endpoints from GEPG API versions 4 and 5.
  • Github

Installation

  • Install globally via npm to use as a CLI tool:
$ npm i -g gepgfun

Features

  • Start an HTTP server to simulate GEPG endpoints for testing.
  • Generate control numbers for bills.
  • Simulate payment requests using bill details (control number, amount, currency).
  • Support for autopay mode.
  • Callback mechanisms for receiving control numbers and payment notifications.
  • Configurable via command-line arguments or .env file.

Usage

Starting the Server

  • Start a basic HTTP server (default port: 3000):
$ gepgfun serve
  • Start a HTTP server with autopay enabled:
$ gepgfun serve --autopay

Configuration

Supported Endpoints

Callback Configuration Via .env File

  • Callbacks allow the emulator to notify your application about generated control numbers or completed payments.
  • Create a .env file in your project root with the following variables:
URL_CONTROL_NUMBER_CALLBACK=http://localhost/api/v1/billing/receive-control-number
URL_PAYMENT_CALLBACK=http://localhost/api/v1/billing/receive-payment
  • These URLs will be used for server-initiated callbacks when applicable.

Note: This tool is designed for local testing only and does not connect to the real GEPG system.