Download the PHP package rudraramesh/esewa-payment without Composer

On this page you can find all versions of the php package rudraramesh/esewa-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package esewa-payment

Laravel eSewa Payment Gateway Integration

Current Version: v2.0.0

Latest Version on Packagist

A Laravel package for seamless integration of the eSewa payment gateway, the leading online payment solution in Nepal. Easily accept online payments in your Laravel application using eSewa, with secure server-to-server verification and customizable success/failure pages.

Features

Installation

  1. Install the Package:

  2. Publish Configuration and Views

    This will copy the config file to config/esewa.php and the views to resources/views/vendor/esewa-payment/ so you can customize them.

  3. Add Configuration to .env

Configuration File

The package uses config/esewa.php to manage settings like the merchant code, API credentials, environment, and URLs for payment success, failure, and callback.

Usage

1. Routes

The package automatically registers the following routes (with prefix esewa.):

Method URI Name Description
POST /esewa/payment esewa.payment Initiate payment
POST /esewa/callback esewa.callback Handle eSewa callback
GET /esewa/success esewa.success Success redirect (optional)
GET /esewa/failure esewa.failure Failure redirect (optional)

2. Initiate Payment

Send a POST request to /esewa/payment with amount and order_id:

Or, from a form:

3. Handle Callback

The package will handle the callback from eSewa and perform server-to-server verification. On success/failure, it will redirect to the configured URLs.

4. Customizing Views

The package provides default success and failure views that use standalone HTML and Bootstrap for styling. You can customize these views after publishing:

You can edit these files to match your application's look and feel. There is no dependency on any specific layout.

5. Events

Listen for payment events in your application:

Sandbox/Live Environment

Set ESEWA_ENVIRONMENT=sandbox for testing, or live for production. The package will use the correct endpoints automatically.

Error Handling

Links

Contributing

Feel free to fork the repository and create pull requests. Please follow best practices and write tests if you add new features.

License

This package is open-sourced under the MIT License. See the LICENSE File for more information.


All versions of esewa-payment with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laravel/framework Version ^9.0 || ^10.0 || ^11.0 || ^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rudraramesh/esewa-payment contains the following files

Loading the files please wait ...