Skip to content

Mellat bank online payment - درگاه پرداخت بانک ملت به زبان PHP

License

Notifications You must be signed in to change notification settings

dpsoft-official/mellat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mellat bank online payment - درگاه پرداخت بانک ملت به زبان PHP

Latest Version on Packagist Total Downloads

Mellat bank transaction library based on php soap extension.

Installation

You can install the package via composer:

composer require dpsoft/mellat

Usage

1- Request transaction and redirect to bank:

try{
    $mellat = new \Dpsoft\Mellat\Mellat($terminalId, $userName, $userPassword);
    $response = $mellat->request($amount);
    
    //save $response info like token($response['token']) and orderId($response['order_id']) then redirect to bank
    echo "redirecting to bank...";
    $response->redirectToBank();
}catch(\Throwable $e){
    echo "error: ".$e->getMessage();
}

2- Handle bank response:

try{
    $mellat = new \Dpsoft\Mellat\Mellat($terminalId, $userName, $userPassword);
    $response = $mellat->verify();
    
    //successful payment. save $response info like reference id($response['reference_id'])
    echo "successful payment.Thanks...";
}catch(\Throwable $e){
    echo "error: ".$e->getMessage();
}

Testing

composer test

Security

If you discover any security related issues, please email sadeghpm@gmail.com instead of using the issue tracker.

Credits

License

The GNU GPLv3. Please see License File for more information.

About

Mellat bank online payment - درگاه پرداخت بانک ملت به زبان PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages