PHP code example of chrisidakwo / laravel-flutterwave

1. Go to this page and download the library: Download chrisidakwo/laravel-flutterwave library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chrisidakwo / laravel-flutterwave example snippets


// To generate a payment link
Rave::standardPayment($data);

// To verify a transaction 
$transaction = Rave::verifyTransaction($transactionId);

// To refund a transaction
$refund = Rave::refundTransaction($transactionId, $amount);

return [
	/**
	 * Staging URL: https://ravesandboxapi.flutterwave.com/v3
	 * Live URL: https://api.ravepay.co/v3
	 */
	'base_url' => 'https://ravesandboxapi.flutterwave.com/v3',

	'public_key' => '',

	'secret_key' => 'secret key',

	'encryption_key' => '',

	'redirect_url' => '',

	'webhook_url' => '',

	'webhook_failed_transaction_url' => '',

	'webhook_secret_hash' => ''
];
bash
php artisan vendor:publish --provider="ChrisIdakwo\Flutterwave\Laravel\RaveServiceProvider"