1. Go to this page and download the library: Download ebrahimsalahi/digipay-php 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/ */
ebrahimsalahi / digipay-php example snippets
use EbrahimSalahi\DigiPay\DigiPay;
use EbrahimSalahi\DigiPay\DigiPayConfig;
$config = new DigiPayConfig(
username: 'merchant-username',
password: 'merchant-password',
clientId: 'client-id',
clientSecret: 'client-secret',
);
$sdk = new DigiPay($config);
use EbrahimSalahi\DigiPay\DigiPayConfig;
$config = DigiPayConfig::fromEnv(
clientId: 'your-client-id',
clientSecret: 'your-client-secret'
);