示例#1
0
//time_stamp已填,商户无需重复填写
//sign已填,商户无需重复填写
$product_id = WxPayConf::APPID . "static";
//自定义商品id
$nativeLink->setParameter("product_id", "{$product_id}");
//商品id
//获取链接
$product_url = $nativeLink->getUrl();
//使用短链接转换接口
$shortUrl = new ShortUrl();
//设置必填参数
//appid已填,商户无需重复填写
//mch_id已填,商户无需重复填写
//noncestr已填,商户无需重复填写
//sign已填,商户无需重复填写
$shortUrl->setParameter("long_url", "{$product_url}");
//URL链接
//获取短链接
$codeUrl = $shortUrl->getShortUrl();
?>

<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>微信安全支付</title>
</head>
<body>
	<div align="center" id="qrcode">
		<p >扫我,扫我</p>
	</div>