1. Go to this page and download the library: Download andriichuk/bluesnap-php-sdk 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/ */
andriichuk / bluesnap-php-sdk example snippets
use Andriichuk\BlueSnap\BlueSnapClient;
use Andriichuk\BlueSnap\Configuration;
use Andriichuk\BlueSnap\Environment;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\HttpFactory;
$httpClient = new Client();
$httpFactory = new HttpFactory();
$blueSnap = new BlueSnapClient(
new Configuration(
username: $_ENV['BLUESNAP_USERNAME'],
password: $_ENV['BLUESNAP_PASSWORD'],
merchantId: $_ENV['BLUESNAP_MERCHANT_ID'],
environment: Environment::Sandbox,
),
httpClient: $httpClient,
requestFactory: $httpFactory,
streamFactory: $httpFactory,
);