PHP code example of wassa / wedoogift-client
1. Go to this page and download the library: Download wassa/wedoogift-client 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/ */
wassa / wedoogift-client example snippets
$reasonId = 1234;
$userId = 5678;
$valueToDistribute = 1;
$wdg = new \Wassa\WeDooGift\WeDooGiftClient('<APIKEY>');
$wdg->init();
$wdg->addUser('John', 'Doe', '[email protected]'); // returns the user id
$wdg->distribute($reasonId, 'Cool message', $userId, $valueToDistribute);