PHP code example of alldigitalrewards / rewardstack

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

    

alldigitalrewards / rewardstack example snippets



dentials = new \AllDigitalRewards\RewardStack\Auth\Credentials(
    'username',
    'password'
);

$uri = new \GuzzleHttp\Psr7\Uri('https://admin.qa.alldigitalrewards.com');

$httpClient = new \GuzzleHttp\Client();

$authProxy = new \AllDigitalRewards\RewardStack\Auth\AuthProxy($credentials, $uri, $httpClient);

$client = new \AllDigitalRewards\RewardStack\Client($authProxy);



$participantRequest = new \AllDigitalRewards\RewardStack\Request\ParticipantRequest('TESTPARTICIPANT1');

$participant = $client->request($participantRequest);