how to Integrate Razorpay payment gateway in Codeigniter

how to Integrate Razorpay payment gateway in Codeigniter

In this tutorial, we will tell you how to integrate the Razorpay payment gateway in Codeigniter Framework(Codeigniter Razorpay payment gateway integrate example).

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

Razorpay provides two environments for the user like a Test mode and live mode and it allows online payment transaction like Cards, Net-banking, Wallets & UPI. Developer Friendly API, Fast On-boarding, and No Setup.

Overview

Step 1: Create Database Tables
Step 2: Connect to Database
Step 3: Get and Set RAZOR API Key and SECRET
Step 4: Create Controller
Step 5: Create View File

Step 1: Create Database Tables
In this step, we have to create a table in the database, so we will create a database using the below code.

Step 2: Connect to Database
Go to the config folder and open database.php file some changes in this file like hostname, database username, database password, and database name.

Step 3: Get and Set RAZOR API Key and SECRET
In this step, we have to need the API Key and SECRET Key. so we will go to the official Razor site and after then login gets API Key and SECRET Key.
Step 3: Create Controller

In this step, we will create a Razor.php file in the “application/controller” directory and paste the below code in this controller.
application/controller/Razor.php

Step 4: Create View File

So finally, we will create the product_list.php and razor_thankyou.php file in the “application/views/” directory.
application/views/product_list.php

application/views/razor_thankyou.php

Please follow and like us: