createJsBizPackage() public static method

https://pay.weixin.qq.com/wiki/doc/api/wap.php?chapter=9_1
public static createJsBizPackage ( string $openid, float $totalFee, string $outTradeNo, string $orderName, string $notifyUrl, $timestamp ) : string
$openid string 调用【网页授权获取用户信息】接口获取到用户在该公众号下的Openid
$totalFee float 收款总费用 单位元
$outTradeNo string 唯一的订单号
$orderName string 订单名称
$notifyUrl string 支付结果通知url 不要有问号 https://mp.weixin.qq.com/ 微信支付-开发配置-测试目录 测试目录 http://www.example.com/paytest/ 最后需要斜线,(需要精确到二级或三级目录)
return string
Beispiel #1
0
         mch_id          //微信支付分配的商户号
         appid           //微信分配的公众账号ID
         openid          //用户在商户appid下的唯一标识
         transaction_id  //微信支付订单号
         out_trade_no    //商户订单号
         total_fee       //订单总金额单位默认为分,已转为元
         is_subscribe    //用户是否关注公众账号,Y-关注,N-未关注,仅在公众账号类型支付有效
         attach          //商家数据包,原样返回
         time_end        //支付完成时间
    ]
*/
$notifyUrl = 'http://xxx.com/index.php/wxpay/notify';
// 订单信息
$order = array('totalFee' => 0.01, 'tradeNo' => uniqid(), 'name' => '测试订单');
// 业务签名
$bizPackage = \PFinal\Wechat\Service\PayService::createJsBizPackage($openid, $order['totalFee'], $order['tradeNo'], $order['name'], $notifyUrl, $signPackage['timestamp']);
?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>微信支付demo</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<br>
<br>