PHPackages                             edwardmuss/flutterwave-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. edwardmuss/flutterwave-laravel

ActiveLibrary[Payment Processing](/categories/payments)

edwardmuss/flutterwave-laravel
==============================

A Laravel Package for Flutterwave Rave

v1.0.3(3y ago)21.4k↓50%2[1 issues](https://github.com/edwardmuss/flutterwave-laravel/issues)MITPHPPHP ^7.2 || ^8.1

Since Jan 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/edwardmuss/flutterwave-laravel)[ Packagist](https://packagist.org/packages/edwardmuss/flutterwave-laravel)[ RSS](/packages/edwardmuss-flutterwave-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Flutterwave Package for PHP Laravel)
====================================

[](#flutterwave-package-for-php-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/93c63dd0312e4afe8b617dcc5d02af1f7dd429a994e3920217dfcbaa7168d602/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6564776172646d7573732f666c7574746572776176652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edwardmuss/flutterwave-laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/401148f8b204e9ecbeda31d8c5a83ef58ea24014a3ad385cdea32202c37d75e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6564776172646d7573732f666c7574746572776176652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/edwardmuss/flutterwave-laravel)

> Implement Flutterwave Rave payment gateway easily with Laravel framework

- Go to [Flutterwave](https://dashboard.flutterwave.com/dashboard/settings/apis) to get your public and private key

Documentation
-------------

[](#documentation)

Installation
------------

[](#installation)

### Prerequisite

[](#prerequisite)

**PHP, Laravel and composer**

To get the latest version of Flutterwave, simply use composer

```
composer require edwardmuss/flutterwave-laravel

```

Configuration
-------------

[](#configuration)

Publish the configuration file using this command:

```
php artisan vendor:publish --provider="EdwardMuss\Rave\RaveServiceProvider"

```

A configuration-file named `flutterwave.php` will be placed in your `config directory`

Open your `.env` file and add your `public key`, `secret key`, `secret hash` like so:

Get your keys form [here](https://dashboard.flutterwave.com/dashboard/settings/apis)

```
FLW_PUBLIC_KEY=FLWPUBK-xxxxxxxxxxxxxxxxxxxxx-X
FLW_SECRET_KEY=FLWSECK-xxxxxxxxxxxxxxxxxxxxx-X
FLW_SECRET_HASH='My_lovelysite123'

```

- **FLW\_PUBLIC\_KEY** - This is the api public key gotten from your dashboard(compulsory)
- **FLW\_SECRET\_KEY** - This is the api secret key gotten from your dashboard(compulsory)
- **FLW\_SECRET\_HASH** - This is the secret hash for your webhook

USage
-----

[](#usage)

### 1. Setup Routes

[](#1-setup-routes)

```
// The page that displays the payment form
Route::get('/', function () {
    return view('welcome');
});
// The route that the button calls to initialize payment
Route::post('/pay', [FlutterwaveController::class, 'initialize'])->name('paynow');
// The callback url after a payment
Route::get('/rave/callback', [FlutterwaveController::class, 'callback'])->name('callback');

```

2. Setup the Payment Page

A sample payment button will look like so:

```
welcome.blade.php

```

```
Buy me Coffee

    {{ csrf_field() }}

```

3. Setup your Controller

    Setup your controller to handle the routes. I created the FlutterwaveController. Use the Rave as Flutterwave facade.

Example

```
