Download the PHP package yosefib/sadad-pgw without Composer

On this page you can find all versions of the php package yosefib/sadad-pgw. 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 sadad-pgw

yosefIb/sadad-pgw

Laravel package for integrating with SADAD PGW (Payment Gateway)
This package simplifies the process of validating users, creating invoices, handling OTPs, and confirming payments using SADAD.


🚀 Features


📦 Installation (Local Usage in Laravel)

  1. Install the package in your Laravel project:

  2. Edit your Laravel project’s composer.json and add:

  3. Run:

  4. Add environment variables in your .env:

  5. Add this config file in config/sadad.php:

🧪 Usage Example


✅ Response Format

Success

Failure


🏦 Complete Payment Flow (Full Transaction Steps)

To complete a transaction using SADAD PGW:

  1. Validate the Customer and Create Invoice

    • Call the validateCustomer method.
    • This sends an OTP to the customer's phone.
    • Also creates a pending transaction in SADAD.
  2. Pay the Invoice with OTP

    • After the customer receives the OTP via SMS, use it to confirm payment.
    • You need the transactionId returned from validateCustomer.
  3. Resend OTP (if needed)

    • If the customer did not receive the OTP, you can request to resend it.
  4. Check Transaction Status (Optional)
    • To check if the transaction was successfully paid:

📋 Example Flow

✅ Done!


📄 License

MIT © 2025 Yosef Ibrahem Ali

🧾 Response Example for Completed Payment

After calling payInvoice, a successful response may look like:

On failure (e.g. invalid OTP):


🗂️ Service Categories

When creating an invoice via validateCustomer, you must pass a category ID.
Use one of the following:

Category Name (Arabic) ID
بدون تصنيف 0
مواد صحية 5
صيدليات 6
مواد غذائية 7
مقاهي ومطاعم 8
ملابس وأحذية 9
قرطاسية 10
إلكترونيات 11
صيانة وقطع غيار 12
خدمات سياحية 13
مواد بناء 14
خدمات تعليمية 15
خدمات دعائية 16
مواد منزلية 17
أثاث ومفروشات 18
إطارات وونشات 19
البيع الإلكتروني 20
العطور ومواد منزلية 21
المخابز والحلويات 22
البصريات والعدسات 23
ساعات ومجوهرات وإكسسوارات 24
مستلزمات الأم والطفل 25
ورش صيانة 26
مواد تنظيف 27
الألعاب 28
لحوم ودواجن 29
عيادات ومصحات 30
معامل تحاليل 32
الملابس التقليدية 36

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.


All versions of sadad-pgw with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^10.0|^11.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 yosefib/sadad-pgw contains the following files

Loading the files please wait ....