Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,175,574 members, 7,895,274 topics. Date: Saturday, 20 July 2024 at 07:15 AM

How To Integrate Flutterwave Payment Gateway In Website Using PHP - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / How To Integrate Flutterwave Payment Gateway In Website Using PHP (1937 Views)

Learn How To Integrate Flutterwave Payment Laravel 8 In 5min / Paystack Or Flutterwave Payment Integration. (Pay When Completed) / [Tutorial Post] How To Integrate Paystack Payment System With PHP (2) (3) (4)

(1) (Reply)

How To Integrate Flutterwave Payment Gateway In Website Using PHP by mavigold: 3:46pm On Mar 15, 2022
How To Integrate Flutterwave Payment Gateway In Website Using PHP And Save Details In Database

What is Flutterwave?

Flutterwave is a Nigerian fintech company that provides a payment infrastructure for global merchants and payment service providers across the continent. It assists most E-commerce platforms, Educational Organizations and lots more to accept payment from their customers.

To seamlessly integrate Flutter into PHP Applications, we must ensure our environment has the following in place:

Verified Flutterwave Account.
Your Flutterwave account public key.
A little knowledge of HTML, CSS & JavaScript
Step 1: Sign Up with Flutterwave

The first thing is to register your business account on Flutterwave's website and verify your sign up using a verification link sent to your email. The next thing is to Signin to your new Paystack account. On your dashboard you will find your public and secret key. We will make use of the public and secret key for this tutorial.
Step 2: Creating Our HTML, CSS Files

Our HTML file will be the markup for our checkout page where customer pays for our product. This page will display the summary of what the customer purchased with a pay button. We also link our CSS and JavaScript file.

The key element in our index.php file. This index.php file contains the required customer fields to process the transaction. In this Tutorial, we focus on (Name, email and Payment reference). The Html form is connected to initializeusd.php Using the Form post method.


This files contains the set of codes to process user inputs and send to flutterwave server. Note: Change the Flutterwave Public key to your own. Once the data is being send to flutterwave server, there is a call back function to verify if the transaction amount is altered or payment was successful, the successusd.php file take care of this.

on line $redirect_url = ""; // Change the url to your website url for proper redirections
Step 3: Verifying the transaction

It is very important to verify if a transaction is successful before given value for what is being paid for. successusd.php file handles this.

$amount = "900"; //Correct Amount from Server

Always make sure the amount set here is the same as the amount accepted from customer, else the transaction will be failed and customer will be debited.

This function is to prevent a case where the user edit the amount required or did not pay up to the specified amount.

"SECKEY" => "FLWSECK_TEST-04d9408253eced86f18513ee58f57df4-X", // Replace with your secret key.

Once the transaction is successful, value will be given and user details will be saved inside the database. This can be best used for a subscription portal.


CARD NO: "5531886652142950",
Security: "564",
EXPIRY DATE: "09/32",
PIN: "3310",
OTP: "12345"

Remember to replace with your own flutterwave secret key

After the setup, we can now use our setup to call the openIframe() function.

If you have followed this tutorial from the beginning then its time to test our app.

Download and View the source Code here: https://mavigoldsolutions.com/article/7/how-to-integrate-flutterwave-payment-gateway-in-website-using-php-and-save-details-in-database

1 Like 1 Share

Re: How To Integrate Flutterwave Payment Gateway In Website Using PHP by Prettylima(f): 7:31pm On Mar 16, 2022
Can you integrate 2d gateway on a website?
Re: How To Integrate Flutterwave Payment Gateway In Website Using PHP by Nobody: 10:39pm On Mar 16, 2022
Can you integrate 2d gateway on a website?

I can do that

Message me on WhatsApp 08122647016

(1) (Reply)

Do We Have Any Hosted Nigerian Open Source Project One Can Contribute To? / Understanding Business Logic In Software Engineering / Learn How To Programme Integrated Circuit (IC) Easily

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.