PHP code example of blabs / fidelynet-sdk-php

1. Go to this page and download the library: Download blabs/fidelynet-sdk-php 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/ */

    

blabs / fidelynet-sdk-php example snippets


use Blabs\FidelyNet\ServiceFactory;

// Creates an instance of the Terminal service.
$terminal_service = ServiceFactory::create('terminal', [
    'username' => 'wsTerminal01',
    'password' => 'password',
    'terminal' => '000001'
]);

// Uses the instance to query the service to getting info on a campaign id
/** @var \Blabs\FidelyNet\Services\TerminalService $terminal_service */
$terminal_service->getCampaign('1001');

use Blabs\FidelyNet\ServiceFactory;

// Creates an instance of the Customer service, using a public session and with other customized options.
$customer_service = ServiceFactory::create('customer', [
    // sts'  => false,
    'session_type'      => 'public',
]);