How to integrate paytm payment gateway in laravel example

How to integrate paytm payment gateway in laravel example

In this article, i will let you know to integrate paytm payment gateway in laravel with example. In this example will use paytm laravel package.

As we know that paytm is fastest growing plateform to provies payment services. So here i will let you know how to integrate paytm payment gateway in laravel with an example.

Paytm provides digital payment methods and boomed after digital india movement. Most of the marchant accepts paytm payment. 

Here, in this example we will use a laravel package (“anandsiddharth/laravel-paytm-wallet”) to integrate paytm payment gateway in our laravel application.

So let’s start paytm integration process in our laravel application from scratch. You will need to just follow the steps as mentioned in this tutorial.  

Step 1: Install laravel

In this first step, we will create a fresh laravel application using the following command. If you don’t want to install new application you can also integrate into your existing application. You can jump directly to the next step otherwise just open your terminal and run the command as given below.

composer create-project --prefer-dist laravel/laravel test-app

Step 2: Install Package

For installing the desired package, you will just need to run the following composer command in your terminal. It will automatically dowload all the files required for this package in your application.

composer require anandsiddharth/laravel-paytm-wallet

After running the above command, you will need to setup some configurations for this package. So open config/app.php file and add provider and alias as given as under.

config/app.php

'providers' => [

  ....

  Anand\LaravelPaytmWallet\PaytmWalletServiceProvider::class,

],

'aliases' => [

  ....

  'PaytmWallet' => Anand\LaravelPaytmWallet\Facades\PaytmWallet::class,

],

Now we will need to add some other configuration like marchant id and key. So open config/services.php file and add the line of code as mentaioned below.

config/services.php

<?php

return [

    ......
    'paytm-wallet' => [
        'env' => 'local', // values : (local | production)
        'merchant_id' => env('YOUR_MERCHANT_ID'),
        'merchant_key' => env('YOUR_MERCHANT_KEY'),
        'merchant_website' => env('YOUR_WEBSITE'),
        'channel' => env('YOUR_CHANNEL'),
        'industry_type' => env('YOUR_INDUSTRY_TYPE'),
    ],

];

Now add these secret key date in the application’s environment file like below.

YOUR_MERCHANT_ID=DIY12XXXXXXXXXXXXXXXX
YOUR_MERCHANT_KEY=bKXXXXXXXXXXX

YOUR_WEBSITE=XXXXXXXXX

YOUR_CHANNEL=WEB

YOUR_INDUSTRY_TYPE=Retail

laravel integrate paytm in laravel integration paytm gateway laravel example laravel paytm integration paytm gateway in laravel paytm payment gateway

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Razorpay Payment Gateway Integration in ASP.NET MVC

In this article, you will learn Razorpay Payment Gateway Integration in ASP.NET MVC web application or an eCommerce website using C#. With Razorpay, you have access to all payment modes, including credit and debit cards, UPI, and popular mobile wallets.

Laravel 8 CKEditor Tutorial Example

Laravel 8 ckeditor tutorial example, you will learn how to install or integrate ckeditor and use in laravel 8 app

Laravel 8 Stripe Payment Gateway Integration Example

Laravel 8 Stripe integration is our main topic. We will use Stripe payment gateway integration in Laravel 8. You will learn Laravel 8 stripe payment gateway example. Step by step explain Laravel 8 payment integration stripe example.

How to validate mobile phone number in laravel with example

Data validation is a very important thing for a web application. In this article i will let you know how to validate mobile phone number in laravel.

Laravel Stripe Payment Integration Example

Laravel Stripe Payment Gateway Integration Tutorial With Example. We will use Cashier Libraray to integrate Stripe Payment in Subscription based Laravel 6.