Bagisto Laravel Paytm Extension

bagisto paytm gateway

Bagisto is an open-source Laravel eCommerce application. Bagisto is one of the popular eCommerce applications in the Laravel framework. From the last few years, bagisto made several well-known establishments in the field of the eCommerce section. Today we will go through one of our Paytm payment gateway extension which was made for bagisto users. Before starting this, we all know Paytm is a popular Paytm gateway in India. It provides you with both UPI payment, card, net banking payment collection features in their gateway.

Lets start our steps:

Automatic Installation

1. Use command prompt to run this package composer require wontonee/paytm

2. Now open config/app.php and register paytm provider.


'providers' => [
        // Paytm provider
        Wontonee\Paytm\Providers\PaytmServiceProvider::class,
]

3. Now go to package/Webkul/Admin/src/Resources/lang/en copy these line at the bottom end of code.


'merchant-id'                      => 'Merchant Id',
'merchant-key'                      => 'Merchant Key',
'websitestatus'                      => 'Website',
'industrytype'                      => 'Industry Type',
'paytmstatus'                      => 'Status',
'callback-url'                      => 'Call Back URL'

4. Now go to your bagisto admin section admin/configuration/sales/paymentmethods you will see the new payment gateway paytm.

5. Now open app\Http\Middleware\VerifyCsrfToken.php and add this route to the exception list.


protected $except = [
                 '/paytmcheck'
           ];

6. Now run php artisan config:cache

Manual Installation

1. Download the zip folder from the github repository.
https://github.com/wontone18/paytm-payment-gateway-bagisto-laravel

2. Unzip the folder and go to your bagisto application path package and create a folder name Wontonee/Paytm/ upload src folder inside this path.
3. Now open config/app.php and register paytm provider.

'providers' => [
        // Paytm provider
        Wontonee\Paytm\Providers\PaytmServiceProvider::class,
]

4. Now open composer.json and go to autload psr-4.

"autoload": {
        "psr-4": {
        "Wontonee\\Paytm\\": "packages/Wontonee/Paytm/src"
        }
    }

5. Now go to package/Webkul/Admin/src/Resources/lang/en copy these line at the bottom end of code.

'merchant-id'                      => 'Merchant Id',
'merchant-key'                      => 'Merchant Key',
'websitestatus'                      => 'Website',
'industrytype'                      => 'Industry Type',
'paytmstatus'                      => 'Status',
'callback-url'                      => 'Call Back URL'

6. Now open the command prompt and run composer dump-autoload.

7. Now run php artisan config:cache

8. Now go to your bagisto admin section admin/configuration/sales/paymentmethods you will see the new payment gateway paytm.

9.  Now open app\Http\Middleware\VerifyCsrfToken.php and add this route to the exception list.


protected $except = [
        '/paytmcheck'
];

×How can I help you?