public function geturl() { $money = 0.01; $data = array("out_trade_no" => time(), "subject" => 'test', "total_fee" => $money, "body" => 'test'); //echo "正在跳转支付宝....<script> window.location.href='".AlipayMobileUtil::getUrl($data)."'</script>"; echo AlipayMobileUtil::getUrl($data); }
/** * 判断用户是否有收获地址和积分是否足够 */ public function index() { $id = I('id', 0); $result = $this->order->getOne($id); $json['code'] = 0; $json['msg'] = 'fail'; if ($result) { $json['code'] = 1; $msg = AlipayMobileUtil::getUrl($result); $json['msg'] = $msg; } $this->msg($json); }