1. Go to this page and download the library: Download kassacom/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/ */
kassacom / php-sdk example snippets
$guzzleClient = new GuzzleHttp\Client();
$transport = new KassaCom\SDK\Transport\GuzzleApiTransport($guzzleClient);
$client = new KassaCom\SDK\Client($transport);
$client->setAuth('login', 'secret'); // or for basic authorization $client->setAuth('login', 'password', KassaCom\SDK\Transport\Authorization\BasicAuthorization::class);
// Create a request object
$createPaymentRequest = new KassaCom\SDK\Model\Request\Payment\CreatePaymentRequest();
// Set up $createPaymentRequest with ment($createPaymentRequest);
} catch (\Exception $e) {
// ...
}
// Create a request object
$processPayment = new KassaCom\SDK\Model\Request\Payment\ProcessPaymentRequest();
// Set up $processPayment with ent->processPayment($processPayment);
} catch (\Exception $e) {
// ...
}
// Create a request object
$createPayoutRequest = new KassaCom\SDK\Model\Request\Payout\CreatePayoutRequest();
// Set up $createPayoutRequest with out($createPayoutRequest);
} catch (\Exception $e) {
// ...
}
// Create a request object
$getPayoutRequest = new KassaCom\SDK\Model\Request\Payout\GetPayoutRequest();
// Set up $getPayoutRequest with ($getPayoutRequest);
} catch (\Exception $e) {
// ...
}