Initial project files: BESCMS full source
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/* *
|
||||
* 功能:支付宝电脑网站alipay.trade.close (统一收单交易关闭接口)业务参数封装
|
||||
* 版本:2.0
|
||||
* 修改日期:2017-05-01
|
||||
* 说明:
|
||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*/
|
||||
|
||||
|
||||
class AlipayTradeCloseContentBuilder
|
||||
{
|
||||
|
||||
// 商户订单号.
|
||||
private $outTradeNo;
|
||||
|
||||
// 支付宝交易号
|
||||
private $tradeNo;
|
||||
|
||||
//卖家端自定义的的操作员 ID
|
||||
private $operatorId;
|
||||
|
||||
private $bizContentarr = array();
|
||||
|
||||
private $bizContent = NULL;
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
if(!empty($this->bizContentarr)){
|
||||
$this->bizContent = json_encode($this->bizContentarr,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;
|
||||
}
|
||||
public function getOperatorId()
|
||||
{
|
||||
return $this->operatorId;
|
||||
}
|
||||
|
||||
public function setOperatorId($operatorId)
|
||||
{
|
||||
$this->operatorId = $operatorId;
|
||||
$this->bizContentarr['operator_id'] = $operatorId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/* *
|
||||
* 功能:支付宝电脑网站支付alipay.trade.fastpay.refund.query (统一收单交易退款查询)业务参数封装
|
||||
* 版本:2.0
|
||||
* 修改日期:2017-05-01
|
||||
* 说明:
|
||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*/
|
||||
|
||||
|
||||
class AlipayTradeFastpayRefundQueryContentBuilder
|
||||
{
|
||||
|
||||
// 商户订单号.
|
||||
private $outTradeNo;
|
||||
// 支付宝交易号
|
||||
private $tradeNo;
|
||||
// 请求退款接口时,传入的退款请求号,如果在退款请求时未传入,则该值为创建交易时的外部交易号
|
||||
private $outRequestNo;
|
||||
|
||||
private $bizContentarr = array();
|
||||
|
||||
private $bizContent = NULL;
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
if(!empty($this->bizContentarr)){
|
||||
$this->bizContent = json_encode($this->bizContentarr,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;
|
||||
}
|
||||
public function getOutRequestNo()
|
||||
{
|
||||
return $this->outRequestNo;
|
||||
}
|
||||
public function setOutRequestNo($outRequestNo)
|
||||
{
|
||||
$this->outRequestNo = $outRequestNo;
|
||||
$this->bizContentarr['out_request_no'] = $outRequestNo;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/* *
|
||||
* 功能:支付宝电脑网站支付(alipay.trade.page.pay)接口业务参数封装
|
||||
* 版本:2.0
|
||||
* 修改日期:2017-05-01
|
||||
* 说明:
|
||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*/
|
||||
|
||||
|
||||
class AlipayTradePagePayContentBuilder
|
||||
{
|
||||
|
||||
// 订单描述,可以对交易或商品进行一个详细地描述,比如填写"购买商品2件共15.00元"
|
||||
private $body;
|
||||
|
||||
// 订单标题,粗略描述用户的支付目的。
|
||||
private $subject;
|
||||
|
||||
// 商户订单号.
|
||||
private $outTradeNo;
|
||||
|
||||
// (推荐使用,相对时间) 该笔订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m
|
||||
private $timeExpress;
|
||||
|
||||
// 订单总金额,整形,此处单位为元,精确到小数点后2位,不能超过1亿元
|
||||
private $totalAmount;
|
||||
|
||||
// 产品标示码,固定值:QUICK_WAP_PAY
|
||||
private $productCode;
|
||||
|
||||
private $bizContentarr = array();
|
||||
|
||||
private $bizContent = NULL;
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
if(!empty($this->bizContentarr)){
|
||||
$this->bizContent = json_encode($this->bizContentarr,JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
return $this->bizContent;
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bizContentarr['product_code'] = "FAST_INSTANT_TRADE_PAY";
|
||||
}
|
||||
|
||||
public function AlipayTradeWapPayContentBuilder()
|
||||
{
|
||||
$this->__construct();
|
||||
}
|
||||
|
||||
public function getBody()
|
||||
{
|
||||
return $this->body;
|
||||
}
|
||||
|
||||
public function setBody($body)
|
||||
{
|
||||
$this->body = $body;
|
||||
$this->bizContentarr['body'] = $body;
|
||||
}
|
||||
|
||||
public function setSubject($subject)
|
||||
{
|
||||
$this->subject = $subject;
|
||||
$this->bizContentarr['subject'] = $subject;
|
||||
}
|
||||
|
||||
public function getSubject()
|
||||
{
|
||||
return $this->subject;
|
||||
}
|
||||
|
||||
public function getOutTradeNo()
|
||||
{
|
||||
return $this->outTradeNo;
|
||||
}
|
||||
|
||||
public function setOutTradeNo($outTradeNo)
|
||||
{
|
||||
$this->outTradeNo = $outTradeNo;
|
||||
$this->bizContentarr['out_trade_no'] = $outTradeNo;
|
||||
}
|
||||
|
||||
public function setTimeExpress($timeExpress)
|
||||
{
|
||||
$this->timeExpress = $timeExpress;
|
||||
$this->bizContentarr['timeout_express'] = $timeExpress;
|
||||
}
|
||||
|
||||
public function getTimeExpress()
|
||||
{
|
||||
return $this->timeExpress;
|
||||
}
|
||||
|
||||
public function setTotalAmount($totalAmount)
|
||||
{
|
||||
$this->totalAmount = $totalAmount;
|
||||
$this->bizContentarr['total_amount'] = $totalAmount;
|
||||
}
|
||||
|
||||
public function getTotalAmount()
|
||||
{
|
||||
return $this->totalAmount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/* *
|
||||
* 功能:支付宝电脑网站支付查询接口(alipay.trade.query)接口业务参数封装
|
||||
* 版本:2.0
|
||||
* 修改日期:2017-05-01
|
||||
* 说明:
|
||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*/
|
||||
|
||||
|
||||
class AlipayTradeQueryContentBuilder
|
||||
{
|
||||
|
||||
// 商户订单号.
|
||||
private $outTradeNo;
|
||||
|
||||
// 支付宝交易号
|
||||
private $tradeNo;
|
||||
|
||||
private $bizContentarr = array();
|
||||
|
||||
private $bizContent = NULL;
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
if(!empty($this->bizContentarr)){
|
||||
$this->bizContent = json_encode($this->bizContentarr,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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/* *
|
||||
* 功能:支付宝电脑网站支付退款接口(alipay.trade.refund)接口业务参数封装
|
||||
* 版本:2.0
|
||||
* 修改日期:2017-05-01
|
||||
* 说明:
|
||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*/
|
||||
|
||||
|
||||
class AlipayTradeRefundContentBuilder
|
||||
{
|
||||
|
||||
// 商户订单号.
|
||||
private $outTradeNo;
|
||||
|
||||
// 支付宝交易号
|
||||
private $tradeNo;
|
||||
|
||||
// 退款的金额
|
||||
private $refundAmount;
|
||||
|
||||
// 退款原因说明
|
||||
private $refundReason;
|
||||
|
||||
// 标识一次退款请求号,同一笔交易多次退款保证唯一,部分退款此参数必填
|
||||
private $outRequestNo;
|
||||
|
||||
private $bizContentarr = array();
|
||||
|
||||
private $bizContent = NULL;
|
||||
|
||||
public function getBizContent()
|
||||
{
|
||||
if(!empty($this->bizContentarr)){
|
||||
$this->bizContent = json_encode($this->bizContentarr,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;
|
||||
}
|
||||
|
||||
public function getRefundAmount()
|
||||
{
|
||||
return $this->refundAmount;
|
||||
}
|
||||
|
||||
public function setRefundAmount($refundAmount)
|
||||
{
|
||||
$this->refundAmount = $refundAmount;
|
||||
$this->bizContentarr['refund_amount'] = $refundAmount;
|
||||
}
|
||||
|
||||
public function getRefundReason()
|
||||
{
|
||||
return $this->refundReason;
|
||||
}
|
||||
|
||||
public function setRefundReason($refundReason)
|
||||
{
|
||||
$this->refundReason = $refundReason;
|
||||
$this->bizContentarr['refund_reason'] = $refundReason;
|
||||
}
|
||||
|
||||
public function getOutRequestNo()
|
||||
{
|
||||
return $this->outRequestNo;
|
||||
}
|
||||
|
||||
public function setOutRequestNo($outRequestNo)
|
||||
{
|
||||
$this->outRequestNo = $outRequestNo;
|
||||
$this->bizContentarr['out_request_no'] = $outRequestNo;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user