Download the PHP package emmajiugo/flutterwave-cli without Composer
On this page you can find all versions of the php package emmajiugo/flutterwave-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download emmajiugo/flutterwave-cli
More information about emmajiugo/flutterwave-cli
Files in emmajiugo/flutterwave-cli
Package flutterwave-cli
Short Description A CLI app that helps you test Flutterwave payment on the go and also generate sample apps.
License MIT
Homepage https://flutterwave.com
Informations about the package flutterwave-cli
Flutterwave CLI
The Flutterwave CLI application helps you tests some features of Flutterwave on the go and also generate sample applications that shows you the simplest and easy way of how these features work and how to implement them into your own application or platform.
Setup:
- Ensure you have composer installed on your computer. You can confirm this by running
composer -v
from your terminal. If you don't have it installed, you can download and install it using the Composer docs. - After successful installation of composer, run the command on your terminal
composer global require emmajiugo/flutterwave-cli
to require it globally - Run on your terminal
flutterwave -v
to view the available commands.
NB: If you get the errorcommand not found
, don't worry ;) it is not an error, visit this stackoverflow page to read how you can configure/fix it. - Setup your CLI by adding your Flutterwave keys (Test and Live).
Runflutterwave setup
.NB: This is a one time setup and your keys are stored in your computer and not sent to any server.
Usage:
Quickly Open API Documentation for a Feature
Quickly navigate to our API documentation for any Flutterwave feature using this command flutterwave docs --feature=webhook
.
To see all feature, run the command flutterwave docs
.
Account Resolve
You can quickly resolve an account number using the CLI.
Run flutterwave account:resolve accountNumber bankCode --live
NB: You can get Bank codes using the CLI. Read how you can achieve that below.
Check Flutterwave Balance
You can quickly know your balances without logging into the dashboard.
Run flutterwave balance
.
To get by currency, run the command flutterwave balance --currency=NGN
(e.g. NGN, GHS, USD, EUR etc).
Get Bank and Bank Codes
Get Banks and their bank codes.
Run flutterwave bank:list country
. The country
should be replaced with NG, GH, KE, UG, ZA or TZ.
Get Bank Branches
Get Banks and their branches.
Run flutterwave bank:branch ID
. The ID
is returned when listing all banks.
Verify Card BIN
Get information about a card.
Run flutterwave card:bin BIN
. The BIN
should be replaced with the first 6 six digits on a debit/credit card.
Forex Rate
Get Forex rate used by Flutterwave.
Run flutterwave fx:rate --amount=100 --from=USD --to=NGN
.
Make Quick Payment
Make a quick payment using the Flutterwave modal. The command will open up the Flutterwave modal in your browser with the information passed.
Run flutterwave payment [email protected] 100 --currency=NGN
.
Transaction Verification
Quickly verify a transaction to get the final status of the transaction.
Run flutterwave transaction:verify ID
. The transaction ID
is the data.id
param from the charge response.
Resend Failed Webhook
You can quickly resend a failed webhook to your webhook URL added in your Flutterwave dashboard.
Run flutterwave webhook:resend ID
. The ID
is the transaction unique identifier. It is returned in the initiate transaction call as data.id
.
Ping Webhook To LocalHost
This is one of the simplest ways to test webhook without exposing your localhost to the web.
You can use this command to quickly test for webhook during development.
Run flutterwave webhook:ping ID WEBHOOK-URL --event=transfer --hash=password1
.
The transaction ID
from data.id
.
The WEBHOOK-URL
should be replaced with your webhook url for testing purpose (localhost:8080/flutterwave/webhook
).
The --event=
should be transfer|card
.
The --hash=
is your test secret hash.
Generate Sample Apps
To generate sample apps, run flutterwave generate:app
.
This command will list all available or future support of sample apps. E.g (flutterwave generate:app modal
) the following command will generate the sample for Flutterwave modal.
The current supported sample apps are:
3DSecure
Charge
DB Logging
Extra-Info
i.e. passing extra information to FlutterwaveFlutterwave Modal
i.e. Inline, Standard setupSplit Payment
Tokenized Charges
Transfers
Webhook
Chigbo Ezejiugo
[email protected]
All versions of flutterwave-cli with dependencies
laminas/laminas-text Version ^2.7
laravel-zero/framework Version ^7.0
padraic/phar-updater Version ^1.0.6
vlucas/phpdotenv Version ^4.0
yuloh/open Version ^0.1.0