Skip to content

Klass-lk/payhere-sanbox-client

Repository files navigation

PayHere Gateway Tester

This is a simple web application to test and debug PayHere payment gateway integrations. It allows you to configure payment parameters, generate the required hash in real-time, and initiate test payments in the PayHere sandbox environment.

Features

  • Configure all required and optional parameters for a PayHere payment.
  • Real-time hash generation as you type.
  • Supports both Sandbox and Production modes.
  • Live event console to monitor payment status (onCompleted, onDismissed, onError).
  • Preview of the payment object being sent to PayHere.
  • Built-in instructions and test card numbers for easy sandbox testing.

Tech Stack

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone <repository-url>
  2. Navigate to the project directory:
    cd project-3
  3. Install the dependencies:
    npm install
    or
    yarn install

Running the Application

To start the development server, run:

npm run dev

or

yarn dev

The application will be available at http://localhost:5173 (or another port if 5173 is in use).

How to Use

  1. Open the application in your browser.
  2. Follow the instructions on the page to get your sandbox Merchant ID and Merchant Secret from PayHere Sandbox.
  3. Fill in the configuration form with your merchant credentials and desired order details.
  4. The hash will be generated automatically.
  5. Click "Pay with PayHere" to initiate a test payment.
  6. Use the provided test card numbers to simulate different payment scenarios.
  7. Monitor the Event Console for real-time feedback from the PayHere SDK.

About

Simple web interface with Payhere javascript SDK to test your integrations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published