PHP code example of kyash / api
1. Go to this page and download the library: Download kyash/api 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/ */
kyash / api example snippets
use Kyash\Collection;
// Get the Kyash Credentials from your Kyash Account API Settings. There is a separate set of credentials for production and development environments.
$kyash = Collection('public_api_id', 'api_secret');
$kyash_code = $kyash->getKyashCode('T12345678');
if ($kyash_code['status'] === 'paid') {
$kyash->capture($kyash_code['id']);
}