laravel 6 Paytm payment gateway integration example

laravel 6 Paytm payment gateway integration example

In this tutorial, we will tell you how to integrate the Paytm payment gateway using the Laravel Framework (Laravel 6 Paytm payment gateway integration example).

The Paytm payment gateway is a popular payment gateway method and it is easily used for the project. so many developers prefer that payment gateway method.

Paytm is a secure payment method and it’s work-based using anandsiddharth/laravel-paytm-wallet package. so let’s start In this article using how to integrate the Paytm payment gateway in a simple and easy way.

Overview

Step 1: Install Laravel 6

Step 2: Setting Database Configuration

Step 3: Create Table using migration

Step 4: Install Package

Step 5: Add providers and aliases

Step 6: Configuration of API Key

Step 7: Create Route

Step 8: Create a Model and Controller

Step 9: Create Blade File

Laravel Paytm Payment Gateway Integration Example

Step 1: Install Laravel 6

We are going to install laravel 6, so first open the command prompt or terminal and go to go to xampp htdocs folder directory using the command prompt. after then run the below command.

Step 2: Setting Database Configuration

After the complete installation of laravel. we have to database configuration. now we will open the .env file and change the database name, username, password in the .env file. See below changes in a .env file.

Step 3: Create Table using migration

Now, We need to create a migration. so we will below command using create the products table migration.

After complete migration. we need below changes in the database/migrations/create_events_table file.

Run the below command. after the changes above file.

Step 4: Install Package

Now, we are going to install the Paytm package using the below command.

Step 5: Add providers and aliases

We will add below providers and aliases in the “config/app.php” file

Step 6: Configuration of API Key

Now, we are going to the configuration of the API key in the app/config/services.php file.

Step 7: Create Route

Add the following route code in the “routes/web.php” file.

Step 8: Create a Model and Controller

Here below command help to create the controller and model.

Event.php

EventController.php

Step 9: Create Blade File

Finally, We will create event.blade.php file in the “resources/views/” folder directory and paste below code.

event.blade.php

We can start the server and run this example using the below command.

Now we will run our example using the below Url in the browser.

Testing Card Credential

Card No : 4242424242424242

Month : any future month

Year : any future Year

CVV : 123

Password : 123123

Please follow and like us: