function pay($to, $amount, $comment)
{
    $settings = $GLOBALS["settings"];
    $myHashKey = $GLOBALS["hashKey"];
    $serviceUrl = "https://api.xapo.com/v1";
    $xapo_app_id = trim(decryption($myHashKey, $settings['xapo_app_id']));
    $xapo_secret_key = trim(decryption($myHashKey, $settings['xapo_secret_key']));
    $creditAPI = new XapoCreditAPI($serviceUrl, $xapo_app_id, $xapo_secret_key);
    $currency = "SAT";
    // SAT | BTC
    $unique_request_id = uniqid();
    $ret = $creditAPI->credit($to, $currency, $unique_request_id, $amount, $comments);
    return $ret;
}
示例#2
0
function pay($to, $amount, $comment)
{
    $settings = $GLOBALS["settings"];
    $myHashKey = $GLOBALS["hashKey"];
    $serviceUrl = "https://api.xapo.com/v1";
    $xapo_app_id = trim(decryption($myHashKey, $settings['xapo_app_id']));
    $xapo_secret_key = trim(decryption($myHashKey, $settings['xapo_secret_key']));
    // $creditAPI = new XapoCreditAPI($serviceUrl, $xapo_app_id, $xapo_secret_key);
    $creditAPI = new XapoCreditAPI($serviceUrl, $settings['xapo_app_id'], $settings['xapo_secret_key']);
    $currency = "SAT";
    // SAT | BTC
    $unique_request_id = uniqid();
    $ret = $creditAPI->credit($to, $currency, $unique_request_id, $amount, $comments);
    /*   $amount = $amount * 0.01;
        $unique_request_id = uniqid();
        $to="*****@*****.**";
    	
    	//$to = "*****@*****.**" ;
    	
    	
        $ret = $creditAPI->credit($to, $currency, $unique_request_id, $amount, "Thank you for using Faucet Builder");
      */
    return $ret;
}
示例#3
0
<?php

require 'XapoCreditAPI.php';
// Test the example. Replace with your own AppId and Secret
$serviceUrl = "https://api.xapo.com/v1";
$creditAPI = new XapoCreditAPI($serviceUrl, "your app id", "your app secret");
$to = "*****@*****.**";
$currency = "SAT";
// SAT | BTC
$unique_request_id = uniqid();
$amount = 1;
$comments = "This is a sample deposit";
$result = $creditAPI->credit($to, $currency, $unique_request_id, $amount, $comments);
printf("XAPO API Credit call result -> \n%s\n", json_encode($result));