Simple and Lite FLUTTERWAVE Standard Payment Library on codeigniter
- Pay with Flutterwave!
- Multi currency support
- Add auto generated invoice
- Light weight and with demo (Standard)
- Support country and currency
- Need no install and has no database, just copy files to the right folder
- Can be integrated to any Codeigniter application
- Tested with codeigniter version 3.0 but backward compactible with version 2.0
- Compatible with PHP 5.0 and later
- Much more!
To manually integrate FLutterwave into your website. When you're done, you will have added a Flutterwave Payments and supporting code to your website so that customers can click to place orders through Fluterwave.
NG (Nigeria) NGN USD EUR GBP
UGX ( Uganda) TZS ( Tanzania) GHS ( Ghana ) USD ( For Ghana Merchants only) KES ( Kenya Card & Mpesa payments) ZAR ( South africa)
This software is distributed under the MIT license. Please read LICENSE.txt for information on the software availability and distribution.
Drop the provided files into the CodeIgniter project
Configure your flutterwave details inside the application/config/flutterwave.php file refer to https://developer.flutterwave.com/docs/
Modify the controller example supplied (application/controller/fluterwave.php) to fit your needs
To use CI_LITE_Flutterwave load the library in your controller
View sample controller code below
defined('BASEPATH') OR exit('No direct script access allowed');
class Flutterwave extends CI_Controller {
public $app_version = 1;
function __construct()
{
parent::__construct();
$this->load->helper('url');
$this->load->library('session');
$this->load->library('form_validation');
$this->config->load('flutterwave', TRUE); //or instead your file name.
$this->load->model('flutterwave_model');
// $this->output->enable_profiler(TRUE);
}
function index($ref = false){
die('Invalid Reference Provided' );
}
function pay($ref = false){
if (! $ref){
die('Invalid Reference Provided' );
}
//generate payment link
$payment_link = $this->flutterwave_model->pay( $ref);
if($payment_link['status'] == true ){ redirect( $payment_link['msg']); } else { echo $payment_link['msg'] ; }
}
function verify(){
$txref = $this->input->get_post('txref', true);
if( isset($txref) ){
$sales = $this->flutterwave_model->get_invoice( $txref );
} else {
echo 'Reference not available! <a href="'.base_url().'">Return home</a>';
exit();
}
$this->flutterwave_model->verify_update( $txref );
}
}
You'll find it easy to implement.
That's it. You should now be ready to use CI_LITE_Flutterwave!
CI_LITE_Flutterwave defaults to English