First commit
This commit is contained in:
56
weixinpay/example/micropay.php
Executable file
56
weixinpay/example/micropay.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>微信支付样例-查退款单</title>
|
||||
|
||||
</head>
|
||||
|
||||
<?php
|
||||
|
||||
require_once "../lib/WxPay.Api.php";
|
||||
|
||||
require_once "WxPay.MicroPay.php";
|
||||
|
||||
require_once 'log.php';
|
||||
|
||||
|
||||
|
||||
//初始化日志
|
||||
|
||||
$logHandler= new CLogFileHandler("../logs/".date('Y-m-d').'.log');
|
||||
|
||||
$log = Log::Init($logHandler, 15);
|
||||
|
||||
|
||||
|
||||
//打印输出数组信息
|
||||
|
||||
function printf_info($data)
|
||||
|
||||
{
|
||||
|
||||
foreach($data as $key=>$value){
|
||||
|
||||
echo "<font color='#00ff55;'>$key</font> : $value <br/>";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST["auth_code"]) && $_REQUEST["auth_code"] != ""){
|
||||
|
||||
$auth_code = $_REQUEST["auth_code"];
|
||||
|
||||
$input = new WxPayMicroPay();
|
||||
|
||||
$input->SetAuth_code($auth_code);
|
||||
|
||||
$input->SetBody("刷卡测试样例-支付");
|
||||
|
||||
Reference in New Issue
Block a user