1. Go to this page and download the library: Download weblebby/payments 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/ */
weblebby / payments example snippets
use Weblebby\Payments\BatigamePayment;
use Weblebby\Payments\PaymentException;
// Composer ile:
'{BATIHOST_GUVENLIK_KODU}'
];
$payment = new BatigamePayment($config);
// {posturl} sayfası.
try {
/**
* Gelen post bilgilerini $post değişkenine atadık. [trans_id, username, credit, secret]
* handle() fonksiyonu, gelen postun eksik olup olmadığını ve güvenlik kodunun doğruluğunu kontrol edip geri dönüş yapıyor.
* Eğer kontrolde bir sorun varsa catch() içine atıyor.
*/
$post = $payment->handle();
// Gelen $post değişkeninden aynı trans_id ile oyuncuya kredi yüklenmiş mi kontrol edebilir, yüklenmemiş ise kredisini yükleyebilirsiniz.
} catch (PaymentException $e) {
// Güvenlik kodu yanlış ya da gelen post eksik.
echo $e->getMessage();
}
html
<!DOCTYPE html>
<html>
<body>
echo $payment->openHtmlForm();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.