PHP code example of rfmhb2 / sadad-laravel

1. Go to this page and download the library: Download rfmhb2/sadad-laravel 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/ */

    

rfmhb2 / sadad-laravel example snippets


'providers' => [
    ...
    Sadad\Laravel\SadadServiceProvider::class
    ...
]

'sadad' => [
    'merchantID' => '00000000000000',
    'terminalId' => '00000000',
    'key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
],

use Sadad\Laravel\Facade\Sadad;

$results = Sadad::request(
    "example.com/testVerify.php",          //red format=>m/d/Y g:i:s a
);
// save $results['Authority'] for verifying step
Sadad::redirect(); // redirect user to sadad

// after that verify transaction by that $results['Authority']
Sadad::verify('token');