|
|
|
|
<?php
|
|
|
|
|
/* *
|
|
|
|
|
* 功能:支付宝电脑网站支付查询接口(alipay.trade.query)接口业务参数封装
|
|
|
|
|
* 版本:2.0
|
|
|
|
|
* 修改日期:2017-05-01
|
|
|
|
|
* 说明:
|
|
|
|
|
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AlipayTradeQueryContentBuilder extends CI_Model
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// 商户订单号.
|
|
|
|
|
private $outTradeNo;
|
|
|
|
|
|
|
|
|
|
// 支付宝交易号
|
|
|
|
|
private $tradeNo;
|
|
|
|
|
|
|
|
|
|
private $bizContentarr = array();
|
|
|
|
|
|
|
|
|
|
private $bizContent = NULL;
|
|
|
|
|
|
|
|
|
|
public function getBizContent()
|
|
|
|
|
{
|
|
|
|
|
if(!empty($this->bizContentarr)){
|
|
|
|
|
$this->bizContent = json_encode($this->bizContentarr); // 5.4增加的常量 JSON_UNESCAPED_UNICODE
|
|
|
|
|
}
|
|
|
|
|
return $this->bizContent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getTradeNo()
|
|
|
|
|
{
|
|
|
|
|
return $this->tradeNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setTradeNo($tradeNo)
|
|
|
|
|
{
|
|
|
|
|
$this->tradeNo = $tradeNo;
|
|
|
|
|
$this->bizContentarr['trade_no'] = $tradeNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getOutTradeNo()
|
|
|
|
|
{
|
|
|
|
|
return $this->outTradeNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setOutTradeNo($outTradeNo)
|
|
|
|
|
{
|
|
|
|
|
$this->outTradeNo = $outTradeNo;
|
|
|
|
|
$this->bizContentarr['out_trade_no'] = $outTradeNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询退款
|
|
|
|
|
*/
|
|
|
|
|
private $out_request_no;
|
|
|
|
|
public function getOutRequestNo()
|
|
|
|
|
{
|
|
|
|
|
return $this->out_request_no;
|
|
|
|
|
}
|
|
|
|
|
public function setOutRequestNo($outRequestNo)
|
|
|
|
|
{
|
|
|
|
|
$this->out_request_no = $outRequestNo;
|
|
|
|
|
$this->bizContentarr['out_request_no'] = $outRequestNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|