PHPackages                             ilinkio/paytm-js-checkout - 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. ilinkio/paytm-js-checkout

ActiveLibrary

ilinkio/paytm-js-checkout
=========================

Paytm JS Checkout for laravel

02PHP

Since Jan 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kaydee123/paytm-js-checkout)[ Packagist](https://packagist.org/packages/ilinkio/paytm-js-checkout)[ RSS](/packages/ilinkio-paytm-js-checkout/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

For Laravel 5.0 and above

Getting Started
---------------

[](#getting-started)

To get started add the following package to your `composer.json` file using this command.

```
composer require ilinkio/paytm-js-checkout

```

Configuring
-----------

[](#configuring)

**Note: For Laravel 5.5 and above auto-discovery takes care of below configuration.**

When composer installs Laravel Paytm Wallet library successfully, register the `Paytm\JsCheckout\PaytmServiceProvider` in your `config/app.php` configuration file.

```
'providers' => [
    // Other service providers...
    Paytm\JsCheckout\PaytmServiceProvider::class,
],
```

Also, add the `Paytm` facade to the `aliases` array in your `app` configuration file:

```
'aliases' => [
    // Other aliases
    'Paytm' => Paytm\JsCheckout\Facades\Paytm::class,
],
```

#### Add the paytm credentials to the `.env` file

[](#add-the-paytm-credentials-to-the-env-file)

```
PAYTM_ENVIRONMENT=staging
PAYTM_MERCHANT_ID=YOUR_MERCHANT_ID_HERE
PAYTM_MERCHANT_KEY=YOUR_SECRET_KEY_HERE
PAYTM_MERCHANT_WEBSITE=YOUR_MERCHANT_WEBSITE
PAYTM_CHANNEL=YOUR_CHANNEL_HERE
PAYTM_INDUSTRY_TYPE=YOUR_INDUSTRY_TYPE_HERE
```

#### One more step to go....

[](#one-more-step-to-go)

On your `config/services.php` add the following configuration

```
'paytm' => [
        'env' => env('PAYTM_ENVIRONMENT'), // values : (staging | production)
        'merchant_id' => env('PAYTM_MERCHANT_ID'),
        'merchant_key' => env('PAYTM_MERCHANT_KEY'),
        'merchant_website' => env('PAYTM_MERCHANT_WEBSITE'),
        'channel' => env('PAYTM_CHANNEL'),
        'industry_type' => env('PAYTM_INDUSTRY_TYPE'),
],
```

Note : All the credentials mentioned are provided by Paytm after signing up as merchant.

#### Laravel 7 Changes

[](#laravel-7-changes)

Our package is compatible with Laravel 7 but same\_site setting is changed in default Laravel installation, make sure you change `same_site` to `null` in `config/session.php` or callback won't include cookies and you will be logged out when a payment is completed

```
