PHP code example of luismarto / easypay

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

    

luismarto / easypay example snippets


"luismarto/easypay": "1.*"

use Easypay\Easypay;

/**
 * @var Easypay $easypay
 */
protected $easypay;

public function __construct() {
    $this->easypay = new Easypay([
        'ep_user'   => 'ABCDEF',
        'ep_entity' => '12345',
        'ep_cin'    => '123456',
        's_code'    => 'ABCDEFGJI',
    ]);
}

public function createReference() {
    $this->easypay->setValue('t_value', '43.18');
    $this->easypay->setValue('t_key', 1);
    
    $result = $this->client->createReference('normal');
    
}