We made a lot of changes to our Gateway from UI to new codes. Now we have a faster and easier gateway to use. Like before it's just start with below code, it will add a payment button to your page :

<form method='POST' action='https://bitmoneyback.com/ext_tran/v2/' >
<input type='hidden' name='merchant_key' value='Your_Key' />
<input type='hidden' name='callback_url' value='callback_url' />
<input type='number' step="any" name='amount' value='10000' />
<input type='submit' value='submit' />
</form>

You can change this code how you like to view. For invoices you can add this code too (it's optional) :

<input type='hidden' name='invoice_id' value='Your_invoice_ID' />

In return after payment , there is two element with it. First is "s" it is status of payment and "id" this is your invoice id. If you did not used above input for invoice id , the system will create it .

"s" key that return have three value:

1 : Approved

2 : Pending

3 : Denied

After you recieved payment , now you can easily verify it just by adding this code to your callback file :

<?php

$key = "Your_key";
$id = $_GET['id'];

$url = "https://bitmoneyback.com/api/?k=$key&inv=$id";
$r = file_get_contents($url);
$respond=json_decode($r, TRUE);

var_dump($respond);

?>

 

As you seen the respond is a json file that will be like below , you can find the transaction information in it. It is handy if you want to use it for your database. In this example you can see the "trx" is NULL , it's because the transaction is not confirmed yet after confirmation you can find "trx" here and because the payer is not a registered user you can see email beside account number. If the payer was a registered then the "address" will be null and the "trx" will be same as invoice id.

 

if you need more help feel free to contact. 

 

example response:

array(8) {
  ["status"]=>
  string(1) "2"
  ["message"]=>
  string(2) "OK"
  ["trx"]=>
  NULL
  ["acct_no"]=>
  "[email protected]"
  ["address"]=>
  string(34) "TQnPT13ctnboZmiLQXmavx89zTmqqb9Mdy"
  ["amount"]=>
  string(4) "4.75"
  ["coin"]=>
  string(4) "usdt"
  ["time"]=>
  string(19) "2021-11-10 23:22:46"
}