PHP code example of xeemosion / xeepush

1. Go to this page and download the library: Download xeemosion/xeepush 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/ */

    

xeemosion / xeepush example snippets


use Xeemosion\Xeepush\CreateUsdtOrder;

$signKey = "b4d96cff33fa3d6fd39a22f955b266ee"; //你的密钥
$data = [
    'order_id' => "20140520" . time(),
    'amount' => '10.00',
    'pay_type' => 'usdt',
    'notify_url' => 'https://tool.adpay.top/prod/pay/tron/notify',
    'redirect_url' => 'https://www.baidu.com',
    'app_id' => '888810001',
    'user_id' => '100012222222'
];
$res = CreateUsdtOrder::instance($signKey)->post($data);
if ($res['code'] == 200) {
    $pay_url = $res['data']['pay_url']; //支付地址
    $pay_img = $res['data']['pay_img']; //支付二维码
    //其他参数查看文档
    //跳转到支付也没
    echo $pay_url;
} else {
    echo $res['message'];
}