1. Go to this page and download the library: Download samrap/gemini 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/ */
samrap / gemini example snippets
use Samrap\Gemini\Gemini;
$key = 'mykey';
$secret = '1234abcd'
$gemini = new Gemini($key, $secret);
use Samrap\Gemini\Exceptions\GeminiException;
use Samrap\Gemini\Exceptions\MaintenanceException;
use Samrap\Gemini\Exceptions\OrderNotFoundException;
// ...
public function getOrderStatus($order_id)
{
try {
$status = $this->gemini->orderStatus([
'order_id' => $order_id,
])
} catch (OrderNotFoundException $e) {
return 'The order you searched for does not exist.';
} catch (MaintenanceException $e) {
$this->logger->critical($e->getMessage());
return 'The API is currently unavailable';
} catch (GeminiException $e) {
$this->logger->warn($e->getMessage())
}
return $status['original_amount'];
}
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.