You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/webht/third_party/pay/models/AlipayTradePagePayContentBu...

112 lines
2.8 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
/* *
* 功能:支付宝电脑网站支付(alipay.trade.page.pay)接口业务参数封装
* 版本2.0
* 修改日期2017-05-01
* 说明:
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
*/
class AlipayTradePagePayContentBuilder extends CI_Model
{
// 订单描述,可以对交易或商品进行一个详细地描述,比如填写"购买商品2件共15.00元"
private $body;
// 订单标题,粗略描述用户的支付目的。
private $subject;
// 商户订单号.
private $outTradeNo;
// (推荐使用,相对时间) 该笔订单允许的最晚付款时间逾期将关闭交易。取值范围1m15d。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;
}
}
?>