JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q72557F
  • License ISC

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

Package Exports

  • gepgfun
  • gepgfun/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gepgfun) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.