PHP函数public function weixin_goods_pay() {
header ( 'Content-Type: text/html; charset=UTF-8' );
// $price = I ( 'price' );
// $post_price = I ( 'post_price' );
// $buyNum = I ( 'buyNum' );
$id = I ( 'id' );
$model = new WeixinGoodsModel ();
$goodArray = $model->get_info_byid ( $id );
$price = $goodArray ['price'];
$post_price = $goodArray ['post_price'];
$buyNum = I ( 'buyNum' );
$total_fee_title = $price * $buyNum + $post_price;
$this->assign ( 'total_fee_title', $total_fee_title );
$total_fee = $total_fee_title * 100;
$body = $goodArray ['title'];
$IncludePath = C ( 'IncludePath' );
require_once $IncludePath . 'weixin/pay/' . 'CommonUtil.