1. Go to this page and download the library: Download mboateng/sppay-laravel 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/ */
use Mboateng\Sppay\Contracts\SppayClientContract;
public function __construct(
private SppayClientContract $sppay
) {}
public function example(): void
{
$this->sppay->setAccessToken($token);
$this->sppay->getTransaction('REFERENCE');
}
use Mboateng\Sppay\SppayClient;
$client = new SppayClient(
baseUrl: 'https://engine.sppay.dev',
accessToken: $token,
);
$client->initiatePayment([/* ... */]);