Paytm Payment Gateway Integration in Laravel

In this post, I am going to explain “How to Integrate Paytm Payment Gateway in Web”.

Paytm is the most popular mobile wallet and payment method used in India. As we know today market, all the things digital and as specially for India. India become digital india.Paytm is the most popular E commerce and payment tool in India.

There is the official documentation about integrating Paytm but that is very confusing if you are newbie.

Here I will show you step by step explanation “How to Integrate Paytm Payment Gateway”.

Step 1:- Install laravel using below command

Step 2:-  In this step we need to install required packages anandsiddharth/laravel-paytm-wallet package for paytm developer api so open your terminal and fire bellow command:

After install package open config/app.php file and add service provider.

After that add configuration of API keys in service.php file

Step 3:- In this step we need to add the variable in .env file, So let’s open .env file and add the variable.

Step 4:-  Create event registration table and model

After this command you will find one file in following     path  database/migrations and you have to put bellow code in your migration file for create categories table. 

Now run the below migration command

Step 5:- Now create the event registration model file, So let’s create new file in app/EventRegistration.php

Step 6:- Now create the web and API routes in web.php and api.php

web.php

api.php

Step 7:- Now we need to create the controller file, So let’s create the controller file.

Step 8:- Now create the view file with payment form payment_form.blade.php 

Now we are ready to run example, So just run below command

 

View Demo

 

I hope you might have understood it properly, keep reading our other blogs posts for more coding tricks.

Thanks!!

Add a Comment

Your email address will not be published. Required fields are marked *