Download the PHP package ahmed-abd0/laravel-paymob without Composer

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

Laravel Paymob

A community-built, Cashier-inspired Paymob package for Laravel 11, 12, and 13. It wraps the current Paymob Intention, saved-card, subscription, refund/void/capture, transaction inquiry, and Quick Link APIs while keeping a reliable local billing state.

This package is not an official Paymob package. Replace the Composer vendor name before publishing under your own organization.

Why this design

The package has two layers:

  1. Raw API resources for direct access to every endpoint.
  2. Billing models and workflows for subscriptions, idempotent callbacks, local access checks, trials, grace periods, payment methods, and synchronization.

Redirect responses are never treated as proof of payment. Signed backend callbacks and Paymob inquiry APIs are the source of truth.

Installation

Add Paymob\Laravel\Concerns\Billable to the model that owns subscriptions:

Configure .env:

Supported regions: egypt, ksa, uae, and oman.

Create a Paymob subscription plan

Plans are stored locally in paymob_plans and keep the full remote response for diagnostics.

Start a subscription checkout

For a trial:

When Paymob provides a dedicated 3DS verification integration, pass it explicitly for verification-only enrollment:

The local subscription starts as incomplete. It becomes active only after a verified successful callback.

Subscription checks

valid() returns true while active, on trial, or in a cancellation/suspension grace period.

Manage a subscription

Paymob cancellation is permanent. Creating a fresh subscription is required after cancellation.

Manage cards

To add a secondary card, create an intention with subscriptionv2_id:

Card tokens are encrypted using Laravel's application key. Webhook payloads are also encrypted at rest.

One-off intentions

Saved cards

Customer-initiated payment:

Merchant-initiated payment:

Never expose saved tokens to frontend code.

Refund, void, and capture

Transaction inquiry

Quick Links

Webhooks

The package registers:

Transaction and token callbacks use HMAC-SHA512 validation. Subscription callbacks use a secret embedded in the registered callback URL because the supplied subscription collection does not define a subscription-specific HMAC calculation.

Processing is:

Available events:

If the callbacks use Laravel's web middleware, exclude these paths from CSRF validation. The default package routes use the api middleware group.

Synchronization and cleanup

Schedule synchronization as a reconciliation fallback:

Raw endpoint coverage

Area Methods
Intentions create, update, retrieve, checkout URL
Subscription plans create, list, update, suspend, resume
Subscriptions create, retrieve, update, suspend, resume, cancel
Subscription details last transaction, transactions, cards
Subscription cards add, delete, change primary
Saved cards token enrollment, CIT, MIT/MOTO
Post-payment refund, void, capture
Inquiry order/merchant reference, transaction ID
Quick Links create, cancel

Important production rules

Custom models

Override model classes in config/paymob.php. Custom models should extend the package model so the relationships, casts, and lifecycle methods remain available.

Testing


All versions of laravel-paymob with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/cache Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/encryption Version ^11.0|^12.0|^13.0
illuminate/events Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^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 ahmed-abd0/laravel-paymob contains the following files

Loading the files please wait ...