mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 09:45:03 +02:00
change to pg- and add duitku
This commit is contained in:
parent
48350941e9
commit
8a8c7f897f
14 changed files with 300 additions and 107 deletions
45
system/autoload/PGDuitku.php
Normal file
45
system/autoload/PGDuitku.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
*
|
||||
* Payment Gateway duitku.com
|
||||
**/
|
||||
|
||||
class PGDuitku
|
||||
{
|
||||
protected $user;
|
||||
protected $trx;
|
||||
|
||||
public function __construct($trx, $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->trx = $trx;
|
||||
}
|
||||
|
||||
function getSignature($amount,$datetime)
|
||||
{
|
||||
global $_c;
|
||||
return hash('sha256', $_c['duitku_merchant_id'] . $amount . $datetime . $_c['duitku_merchant_key']);
|
||||
}
|
||||
|
||||
|
||||
function createTransaction($channel)
|
||||
{
|
||||
}
|
||||
|
||||
function getStatus($trxID)
|
||||
{
|
||||
}
|
||||
|
||||
private function getServer()
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'Live') {
|
||||
return 'https://passport.duitku.com/webapi/api/merchant/';
|
||||
} else {
|
||||
return 'https://sandbox.duitku.com/webapi/api/merchant/';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ class PGTripay
|
|||
return hash_hmac('sha256', $_c['tripay_merchant'] . $this->trx['id'] . $this->trx['price'], $_c['tripay_secret_key']);
|
||||
}
|
||||
|
||||
function createTransaction($channel) //$trxID, $channel, $amount, $user, $description)
|
||||
function createTransaction($channel)
|
||||
{
|
||||
global $_c;
|
||||
$json = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue