1. Go to this page and download the library: Download yosefib/sadad-pgw 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/ */
use YosefIb\SadadPGW\Sadad;
public function initiate(Sadad $sadad)
{
$response = $sadad->validateCustomer(
'0921234567', // Customer phone number
'1990', // Birth year as string
'INV-1001', // Invoice number
75.00, // Amount
7 // Service category (example: Food & Beverages)
);
return response()->json($response);
}
$response = $sadad->validateCustomer(
'0921234567', // Customer phone number
1990, // Birth year
'INV-1001', // Invoice number
75.00, // Amount
7 // Service category (example: Food & Beverages)
);