Skip to content

PHP Integration with Paymob payment gateway in general. It can be used with laravel, codeigniter or PHP native

License

Notifications You must be signed in to change notification settings

alaa-hany-elsaid/paymob-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial Paymob Gateway API in PHP

Paymob-php to pay with Payment gateway

Installation

Install the latest version with:

$ composer require  alaa-hany/paymob-php

Requirements

  • PHP 5.6 or higher is required

Basic usage

   use \Alaa\Paymob\Paymob ;
    // add paymob config to Paymob facade in AppServiceProvider 
    // inside your serviceProvider 
    Paymob::setConfig([
        "api_key" => "API_KEY_HERE" ,
        "card_integration"  => "VALUE",
        "wallet_integration"  => "VALUE",
        "card_iframe"  => "VALUE",
    ]);
    // cart or wallet 
    // for wallet mobile first 
    /**
    * $amount 
    * $billing_data --> customer info [ first_name , last_name , phone , email  ] required
    * $items = [] 
    * $delivery_needed = false, 
    * $additional_info = []
    * $lock_order_when_paid = false 
    * 
    */
   Paymob::card( $amount_cents ,  $billing_data );
   Paymob::mobileWallet($mobile , $amount_cents ,  $billing_data )
   // all of these return [ 'order_id'  , "url"  ]
  • Laravel
    • set config to Paymob facade in any service provider

Note

If you need any non exists operation , you are welcome to order it .
Contact me on :
  Email : [email protected]
  whatsapp : +201063745208

License

alaa-hany/paymob-php is licensed under the MIT License.

About

PHP Integration with Paymob payment gateway in general. It can be used with laravel, codeigniter or PHP native

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages