-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnetpayclient_config.php.bak
64 lines (48 loc) · 2.06 KB
/
netpayclient_config.php.bak
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*请按照您的实际情况配置以下各参数*/
//私钥文件,在CHINAPAY申请商户号时获取,请相应修改此处,可填相对路径,下同
define("PRI_KEY", "F:\keys\dackey\MerPrK_808080042300001_20130423150623.key");
//公钥文件,示例中已经包含
define("PUB_KEY", "C:\wamp\www\ora_php\PgPubk.key");
/*如您已有生产密钥,请修改以下配置,默认为测试环境*/
//ORA单笔交易请求地址(测试)
define("PAY_URL","http://sfj-test.chinapay.com/dac/SinPayServletGBK");
//ORA单笔交易请求地址(生产)
//define("PAY_URL","http://ora.chinapay.com/oratrans/OraTransGet");
//单笔查询请求地址(测试)
define("QRY_URL","http://sfj-test.chinapay.com/dac/SinPayQueryServletGBK");
//单笔查询请求地址(生产)
//define("QRY_URL","http://ora.chinapay.com/oraquery/SingleOrderQuery");
//批量退单查询请求地址(测试)
define("BatchOrder_URL_QRY","http://sfj-test.chinapay.com/dac/FailureTradeQueryGBK");
//批量退单查询请求地址(生产)
//define("BatchOrder_URL_QRY","http://ora.chinapay.com/oraquery/BatchOrderQuery");
//备付金余额查询请求地址(测试)
define("Balance_URL_QRY","http://payment-test.chinapay.com/oraquery/BalanceQuery");
//备付金余额查询请求地址(生产)
//define("Balance_URL_QRY","http://ora.chinapay.com/oraquery/BalanceQuery");
//备付金明细查询请求地址(测试)
define("DepositDetail_URL_QRY","http://payment-test.chinapay.com/oraquery/DepositDetailQuery");
//备付金明细查询请求地址(生产)
//define("DepositDetail_URL_QRY","http://ora.chinapay.com/oraquery/DepositDetailQuery");
function getcwdOL(){
$total = $_SERVER[PHP_SELF];
$file = explode("/", $total);
$file = $file[sizeof($file)-1];
return substr($total, 0, strlen($total)-strlen($file)-1);
}
function getSiteUrl(){
$host = $_SERVER[SERVER_NAME];
$port = ($_SERVER[SERVER_PORT]=="80")?"":":$_SERVER[SERVER_PORT]";
return "http://" . $host . $port . getcwdOL();
}
function traceLog($file, $log){
$f = fopen($file, 'a');
if($f){
fwrite($f, date('Y-m-d H:i:s') . " => $log\n");
fclose($f);
}
}
//取得本示例安装位置
$site_url = getSiteUrl();
?>