PHPackages                             projovi/khalti - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. projovi/khalti

ActiveLibrary[Payment Processing](/categories/payments)

projovi/khalti
==============

Php wrapper for khalti integration

05PHP

Since Jul 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/projovi/khalti)[ Packagist](https://packagist.org/packages/projovi/khalti)[ RSS](/packages/projovi-khalti/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Khalti
==============

[](#laravel-khalti)

This package can help you integrate Khalti new ePayment Gateway (NEW) to your php application.

Here is an example of how you can initiate Khalti transaction:

```
...
use Projovi\Facades\Khalti;

class PaymentController extends Controller {
    ...
    public function pay() {
        $return_url = "http://example.com/verify";
        $purchase_order_id = "your_transaction_id"; // example 123567;
        $purchase_order_name = "your_order_name"; // example Transaction: 1234,
        $amount = 1000; // Your total amount in paisa Rs 1 = 100 paisa

        return Khalti::initiate($return_url, $purchase_order_id, $purchase_order_name,  $amount);
    }

    public function verify(Request $request) {
        $pidx = $request->get('pidx');
        return Khalti::lookup($pidx);
    }

}
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require projovi/khalti
```

The package will automatically register itself.

You can publish the config with:

```
php artisan vendor:publish --tag=khalti-config
```

This is the contents of the published config file:

```
