PHP code example of zhooravell / skrill-php-client
1. Go to this page and download the library: Download zhooravell/skrill-php-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/ */
zhooravell / skrill-php-client example snippets
use Money\Money;
use Money\Currency;
use GuzzleHttp\Client;
use Skrill\SkrillClient;
use Skrill\ValueObject\Email;
use Skrill\Request\SaleRequest;
use Skrill\ValueObject\Password;
use Skrill\ValueObject\TransactionID;
use Skrill\Factory\RedirectUrlFactory;
$httpClient = new Client();
$email = new Email('...');
$password = new Password('...');
$client = new SkrillClient($httpClient, $email, $password);
$transactionID = new TransactionID('...');
$request = new SaleRequest($transactionID, new Money(1, new Currency('USD')));
$sid = $client->prepareSale($request);
$redirectURL = RedirectUrlFactory::fromSid($sid);
var_dump($redirectURL);