1. Go to this page and download the library: Download komoju-official/komoju-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/ */
$sessionId = $_GET['session_id'];
$komojuSession = $sessionsApi->showSession($sessionId);
if ($komojuSession->getStatus() === Komoju\Model\SessionStatus::COMPLETED) {
// payment status will be "captured", "authorized", or "pending"
echo 'Payment ' . $komojuSession->getPayment()->getStatus();
} else {
echo 'Payment was cancelled or failed';
}
try {
$payment = $paymentsApi->showPayment('pay_xxx');
} catch (Komoju\ApiException $e) {
echo $e->getCode(); // HTTP status code (e.g. 404, 422)
echo $e->getMessage(); // Human-readable description
print_r($e->getResponseBody()); // Full response body
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.