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.

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 Laravel online payment gateway.

Table of Contents

  1. Installation
  2. Steps to make a transaction on PayMob servers

    1. API Authentication Request (server side)
    2. Order Registration Request (server side)
    3. Payment Key Generation Request (server side)
    4. Prepare Client Code to Perform Payment Request (Webclients and mobile apps) (client side)
      1. Iframe for websites/webapps
      2. Mobile clients
  3. PayMobController
  4. PayMob Postman Collection
  5. Other PayMob Methods
  6. TODO
  7. License

Installation

Require via composer

In config/app.php file

First of all, make an account on WeAccept portal, run this command to generate the PayMob configuration file

Then fill in the credentials in config/paymob.php file. Make sure to make an iframe in your dashboard and get the integration id for payment requests.

Fill in the processed callback and response callback routes in integration details with the routes for processedCallback and invoice methods in PayMobController

Steps to make a transaction on PayMob servers

  1. API Authentication Request
  2. Order Registration Request
  3. Payment Key Generation Request
  4. Prepare Client Code to Perform Payment Request (Webclients and mobile apps)
  5. Merchant Notification Endpoint
  6. Transaction Response Endpoint

You can refer to PayMob online guide for more information.

1. API Authentication Request (server side)

In this step you are required to perform a post request to PayMob's authentication API to obtain authentication token

Use PayMob Facade to make requests.

This method gets the credentials from config/paymob.php file, so fill in username and password first to make this auth request.

2. Order Registration Request (server side)

At this step you will register an order on Paymob Accept so that you can pay for it later using a transaction.

Store the returned paymob order id in your DB to make transactions with using this id in future.

3. Payment Key Generation Request (server side)

At this step you will obtain a payment_key token. This key will be used to authenticate your payment request.

4. Prepare Client Code to Perform Payment Request (Webclients and mobile apps) (client side)

Now that you have obtained payment key, you need to prepare your checkout experience (i.e. client-side code).

Iframe for websites/webapps

PayMob recommended iframe

Mobile clients

In case of mobile apps, you will need to import Accept native IOS or Android SDK to proceed with the payment and/or save the card details.

Please request the needed SDK by emailing [email protected] For more information visit PayMob mobile guid

You can use some test cards to make a test payment.

You can run PayMob::sample() to see available samples.

PayMobController

We have 4 methods in PayMobController.

First use checkingOut method to display the payment form page with the iframe. Or simply make payment using payAPI method for mobile clients.

Then, we have the processedCallback method to catch the POST callback response from PayMob servers, and invoice method to catch the GET callback response and display your invoice page.

Replace all #code ... with your logic.

Don't forget to make routes for these methods, and to save the processedCallback and invoice routes in the integration details in PayMob dashboard.

PayMob Postman Collection

There is a Postman collection for PayMob requests.

Other PayMob Methods

There are some GET methods to get your data from PayMob.

1. Get All Orders

2. Get a Specific Order

3. Get All Transactions

4. Get a Specific Transaction

5. Capture For Auth Transactions

If your transactions is auth type (not standalone), then you have to capture your payment through capture method.

TODO

  1. Invoice page.
  2. Sample transaction cycle.
  3. Get all orders/transactions page.
  4. Refund from backend.
  5. Iframe with JS validations.
  6. Top level redirect request for 3D secure.

License

Laravel PayMob is a free software distributed under the terms of the MIT license.


All versions of laravel-paymob with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/framework Version 10.*
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 engalirock/laravel-paymob contains the following files

Loading the files please wait ....