PHP code example of wslib / esewa

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

    

wslib / esewa example snippets


use Wslib\Esewa;

$esewa = Esewa::init()
$esewa->config("transaction_id", "success_url", "failure_url", "amount");

// verify the transaction
$esewa->validate("transaction_id", "amount")