Download the PHP package rhaima/laravel-flouci without Composer

On this page you can find all versions of the php package rhaima/laravel-flouci. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-flouci

Laravel Flouci

Tests Latest Stable Version Total Downloads License

Accept Flouci payments (Tunisia) in Laravel: create payments, verify them, handle the webhook with events, refund, and read the transaction history.

Requirements

Installation

The service provider and the Flouci facade are auto-discovered.

Configuration

Get your keys from the Flouci dashboard (every developer account has a TEST APP for the sandbox), then set:

Optionally publish the config file:

Option Env Default Description
base_url FLOUCI_BASE_URL https://developers.flouci.com/api API base URL
public_key FLOUCI_PUBLIC_KEY Public key
private_key FLOUCI_PRIVATE_KEY Private key
success_link FLOUCI_SUCCESS_LINK Default redirect after a successful payment
fail_link FLOUCI_FAIL_LINK Default redirect after a failed payment
webhook FLOUCI_WEBHOOK_URL Default webhook sent with each payment
card_payment FLOUCI_CARD_PAYMENT true Default accept_card (Flouci's own default is false)
image_url FLOUCI_IMAGE_URL Default image shown on the payment page
session_timeout FLOUCI_SESSION_TIMEOUT Flouci: 1200 Payment session duration in seconds (session_timeout_secs)
merchant_id FLOUCI_MERCHANT_ID Default merchant_id for transactionHistory()
timeout FLOUCI_TIMEOUT 15 HTTP timeout in seconds

Usage

Create a payment

Any Flouci field can be passed per call and overrides the config defaults (success_link, fail_link, webhook, accept_card, image_url, session_timeout_secs).

Verify a payment

Flouci appends payment_id to your success and fail links. Always verify it server-side:

PaymentStatus cases: Success, Pending, Expired, Failure, PreauthSuccess, SystemFailure. isFinal() returns false for Pending and PreauthSuccess.

Webhook

Register the route (CSRF protection is removed automatically, so routes/web.php works):

Flouci calls it with GET ?payment_id=...&success=True|False and does not sign the request. The package only trusts the payment_id, reads the real status from verifyPayment(), then dispatches an event:

Flouci status Event
SUCCESS Flouci\Laravel\Events\PaymentSucceeded
FAILURE, SYSTEM_FAILURE Flouci\Laravel\Events\PaymentFailed
EXPIRED Flouci\Laravel\Events\PaymentExpired
PENDING, PREAUTH_SUCCESS none

Each event exposes paymentId, status (PaymentStatus), verification (raw response), trackingId() and amount(). To handle every case in one listener, type-hint the FlouciPaymentEvent interface.

Good to know:

Refund

Only completed, not yet refunded payments can be refunded. A refused refund always throws a FlouciException, even when Flouci answers HTTP 200 with "status": "error".

Transaction history

Parameters are sent as-is to GET /api/developers/history (docs). merchant_id is required: pass it in the query or set FLOUCI_MERCHANT_ID.

Errors

Every failure (HTTP error, timeout, unreadable response) throws a FlouciException:

Testing your app

Fake the Flouci API with Laravel's HTTP client:

Test cards for the Flouci sandbox are listed in the Flouci docs.

AI agents

The package ships a Laravel Boost guideline and a flouci-payments skill, so coding agents (Claude Code, Cursor, Codex...) learn how to integrate Flouci correctly. Run php artisan boost:install (or boost:update --discover if Boost is already installed) after requiring the package.

Contributing

To try the package against the real Flouci sandbox:

Open <APP_URL>/flouci/sandbox and pay with a test card. Webhook calls and dispatched events are logged to vendor/orchestra/testbench-core/laravel/storage/logs/laravel.log.

Security

See SECURITY.md.

License

MIT. See LICENSE.


All versions of laravel-flouci with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rhaima/laravel-flouci contains the following files

Loading the files please wait ...