-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdemo.php
More file actions
29 lines (25 loc) · 941 Bytes
/
demo.php
File metadata and controls
29 lines (25 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/*
* @Author: will
* @LastEditors: will
* @Description:
*/
//此处如果设置了秘钥,config里面设置的将失效!这个地方可以从数据库调用
//define("PAY_APPID", "138"); //你的appid
//define("PAY_KEY", "22"); //你的秘钥
define('PAY_TYPE', 'all'); //支付类型 all/usdt/wechat/alipay/qq/bankCard
if (!function_exists('PayCreateSdk')) {
require $_SERVER['DOCUMENT_ROOT'] . '/PaySdk/Config.php';
}
$payData = array(
'uid' => "2222", //你的网站用户id
'out_trade_no' => time(), //订单号
'total_fee' => 2, //金额
'param' => "333", //其他参数,可返回回调里面
'currency' => "USD", //人民币/usd
'style' => 'cloud', //云端样式
'return_url' => 'http://' . $_SERVER['HTTP_HOST'], //异步回调地址
'notify_url' => "http://www.baidu.com", //支付成功后返回
);
$geturl = PayCreateSdk($payData);
exit("<meta http-equiv='Refresh' content='0;URL={$geturl}'>");