PHP code example of alaa-hany / paymob-php
1. Go to this page and download the library: Download alaa-hany/paymob-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alaa-hany / paymob-php example snippets
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 ]
bash
$ composer