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.
- 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.
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd project-3 - Install the dependencies:
or
npm install
yarn install
To start the development server, run:
npm run devor
yarn devThe application will be available at http://localhost:5173 (or another port if 5173 is in use).
- Open the application in your browser.
- Follow the instructions on the page to get your sandbox Merchant ID and Merchant Secret from PayHere Sandbox.
- Fill in the configuration form with your merchant credentials and desired order details.
- The
hashwill be generated automatically. - Click "Pay with PayHere" to initiate a test payment.
- Use the provided test card numbers to simulate different payment scenarios.
- Monitor the Event Console for real-time feedback from the PayHere SDK.