PHP code example of kulatymic / skrill-php-client

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

    

kulatymic / 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('...');
$money = new Money(1, new Currency('USD'));
$request = new SaleRequest($transactionID, $this->parser->parse('10.5', 'EUR'));
$sid = $client->prepareSale($request);
$redirectURL = RedirectUrlFactory::fromSid($sid);

var_dump($redirectURL);