TP3.2 微信支付
浏览:27798
最后更新:2017-12-02 11:00
分类:示例
作者寄语:
微信支付使用起来总是有很多问题,这里把TP3.2 和微信支付框架搭建起来了 供大家参考

如有问题,请加微信号 itchuangyebuluo
function index(){
//订单相关的数组
//这里total单位是分
$orderinfo = array(
"totalfee"=>1500,//总费用
"orderno"=>"wxp14as54d5ads45as",//订单号
"id"=>1,//订单id
"product"=>1,//商品id
"num"=>15,//商品数目
);
//商品相关的数组
$product =array("id"=>1,
"icon"=>"http://img4q.duitang.com/uploads/item/201206/13/20120613195538_iUxSx.thumb.700_0.jpeg",
"name"=>"测试商品1"
);
$isweixin = $this->isweixin();
if($isweixin){
$this->parepareweixin($orderinfo,$product);
}else{
$this->pareparealipay($orderinfo,$product);
}
$this->assign("isweixin",$isweixin);
$this->assign("product",$product);
$this->assign("order",$orderinfo);
$this->display();
}