Download the PHP package nikba/laravel-maib without Composer

On this page you can find all versions of the php package nikba/laravel-maib. 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-maib

laravel-maib

Latest Version on Packagist

A Laravel 12 package for the maib e-Commerce API — full coverage of all payment types, automatic token management, and HMAC-SHA256 callback webhook handling.

API documentation: https://docs.maibmerchants.md/e-commerce


Features


Requirements

Version
PHP ^8.2
Laravel ^12.0

Installation

Publish the configuration

Environment variables

Add the following to your .env file:

Credentials are available in maibmerchants.md under your project settings.


Configuration

After publishing, edit config/maib.php:


Usage

Direct Payment

Apple Pay & Google Pay: no separate integration is required. When the customer is redirected to the maib checkout page (payUrl), maib offers Apple Pay and Google Pay alongside card entry automatically, based on the customer's device and browser. They flow through the same /pay, /hold, and one-click/recurring endpoints and return the same callback payload — so any payment you initiate with this package already supports them.

Two-Step Payment (Hold → Capture)

Recurring Payments

One-Click Payments

Refund

Payment Info

Delete Saved Card


Handling Callbacks

The package automatically registers the callback route at MAIB_CALLBACK_ROUTE (default: /maib/callback). This route is excluded from CSRF middleware.

Register this URL in your maibmerchants.md project settings.

Allowed callback IPs (optional firewall rule): 91.250.245.70, 91.250.245.71, 91.250.245.142

Listening for Events

The package dispatches one of three events per callback, based on the transaction status:

Event When Callback status
MaibPaymentReceived A charge succeeded (direct, execute, or save-card with an amount) OK
MaibCardSaved A card was registered without a charge (savecard-recurring / savecard-oneclick) — billerId is present PENDING + billerId
MaibPaymentFailed Anything else (declined, timeout, failed, reversed, or an unknown/undocumented status) otherwise

3-D Secure

The order-fulfilment decision is driven by status, not by threeDs. A status of OK means the payment went through — including the SKIPPED and NOTPARTICIPATED 3DS outcomes, where the card issuer chose not to challenge the cardholder. The threeDs value (a nullable ThreeDsStatus enum on the payload) is available on every event purely for your records/logging; don't gate delivery on it.

Signature validation always runs before any event is dispatched — a callback with a bad signature returns 422 and dispatches nothing. Enum fields on the payload (status, threeDs, currency) are parsed leniently, so a future undocumented value degrades to null instead of erroring the callback (which would otherwise trigger maib's retry loop).

Important: Always return HTTP 200 from your listener logic — the package's callback handler already does this. maib retries the callback at increasing intervals (10, 60, 300, 600, 3600, 43200, 86400 seconds) if it does not receive a 200 response. Implement idempotency in your listeners.


Testing


Author

Nicolai Bargan
Nikba Creative Studio
[email protected]


License

The MIT License (MIT). See LICENSE for details.


All versions of laravel-maib with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0
illuminate/http Version ^12.0
illuminate/contracts Version ^12.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 nikba/laravel-maib contains the following files

Loading the files please wait ...