Download the PHP package engalirock/laravel-paymob without Composer
On this page you can find all versions of the php package engalirock/laravel-paymob. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download engalirock/laravel-paymob
More information about engalirock/laravel-paymob
Files in engalirock/laravel-paymob
Package laravel-paymob
Short Description Laravel v10 PayMob online payment gateway package
License MIT
Homepage https://github.com/engalirock/laravel-paymob
Informations about the package laravel-paymob
Laravel PayMob
A modern, lightweight Laravel package for integrating PayMob (Accept) Payment Gateway in Egypt and other supported regions. Fully compatible with Laravel 10+ and PHP 8.2+.
Key Features
- Laravel Auto-Discovery supported out of the box.
- Supports both Legacy API (Order & Payment Keys) and the new Intentions API (for unified checkout, wallets, cards, etc.).
- Integrated transaction inquiry and void/refund operations.
- Clean error debugging with HTTP status codes and curl error logs.
- Pre-built
PayMobControllertemplate for callbacks.
Table of Contents
- SEO & Description
- Installation
- Configuration
- Modern Integration (Intentions API - Recommended)
- Legacy Integration (Steps to make a transaction)
- Debugging & Error Handling
- PayMobController & Callbacks
- Other Methods
- License
Installation
You can install the package via Composer:
[!NOTE] Laravel 10+ supports package auto-discovery, so you do not need to add the ServiceProvider or Facade manually to your
config/app.php.
If you are running an older setup or want to register it manually:
Manual Registration (Optional)
In config/app.php:
Configuration
Publish the config file using:
This will create a config/paymob.php file. Fill in your credentials:
Make sure to set up your Processed Callback and Response Callback URLs in your PayMob dashboard pointing to your application routes.
Modern Integration (Intentions API - Recommended)
PayMob's new Intentions API simplifies payment flow integration by reducing multiple backend steps into a single intention.
1. Request Auth Token
2. Create Payment Intention
Use the intention method to build the payment request payload:
3. Unified Checkout URL
Generate the client checkout URL to redirect the user to the unified checkout page:
Legacy Integration (Steps to make a transaction on PayMob servers)
1. API Authentication Request
2. Order Registration Request
3. Payment Key Generation Request
4. Load Iframe
Use the token from the payment key payload inside the iframe:
Debugging & Error Handling
If a request fails, you can inspect the response status code, curl errors, and response headers:
PayMobController
A pre-built controller template PayMobController.php is published inside your app directory to handle response callbacks.
Update the processedCallback and invoice routes on your PayMob dashboard integration page.
Other PayMob Methods
1. Transaction Inquiry
Verify payment details using a PayMob order ID:
2. Get All Orders
3. Get Specific Order
4. Get All Transactions
5. Get Specific Transaction
6. Capture Authorized Transaction
License
Laravel PayMob is open-sourced software licensed under the MIT license.