how to integration stripe payment gateway in codeigniter

how to integration stripe payment gateway in codeigniter

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

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

Stripe is a secure payment method and it’s work-based using API. it provides two environments for the user like a sandbox(Test) and live.

Overview

Step 1: Install or Download stripe-PHP Library
Step 2: Get and Set Stripe API Key and SECRET
Step 3: Create Controller
Step 4: Create View File

Step 1: Install or Download stripe-PHP Library
Now, we are going to install the stripe package using the below command and if you want to download the stripe-PHP library then you can download it on https://github.com/stripe/stripe-php. git repository.

Step 2: Get and Set Stripe API Key and SECRET
In this step, we have to need the API Key and SECRET Key. so we will go to the official Stripe site and after then login gets API Key and SECRET Key after then we will set in a config file.
application/config/config.php

Step 3: Create Controller

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

Step 4: Create View File

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

Now you can see the following card details:

Number: 4242 4242 4242 4242
CSV: 123
Expiration Month: Use the future month
Expiration Year: Use the future month

Please follow and like us: