...
|
...
|
@@ -11,17 +11,25 @@ namespace WebPlugin\Pay; |
|
|
class Reqparams
|
|
|
{
|
|
|
|
|
|
public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $uid=0, $userName='')
|
|
|
public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $uid=0, $userName='', $_payExpire = '')
|
|
|
{
|
|
|
$this->orderCode = $_orderCode;
|
|
|
$this->totalFee = $_totalFee;
|
|
|
$this->goodsName = $_goodName;
|
|
|
$this->spbill_create_ip = $client_ip;
|
|
|
$this->orderTime = $_orderTime;
|
|
|
$this->paymentParameter = $_paymentParameter;
|
|
|
$this->isTest = $_isTest;
|
|
|
$this->uid = $uid;
|
|
|
$this->userName = $userName;
|
|
|
//到期时间,默认为当前时间加2个小时的时间戳
|
|
|
$_payExpire = empty($_payExpire) ? strtotime('+2 hours') : strtotime($_payExpire);
|
|
|
$payExpireMinute = 0;//剩余分钟数
|
|
|
if ($_payExpire && ($expireTime = $_payExpire - time()) > 0) {
|
|
|
$payExpireMinute = floor($expireTime / 60);
|
|
|
}
|
|
|
|
|
|
$this->orderCode = $_orderCode;
|
|
|
$this->totalFee = $_totalFee;
|
|
|
$this->goodsName = $_goodName;
|
|
|
$this->spbill_create_ip = $client_ip;
|
|
|
$this->orderTime = $_orderTime;
|
|
|
$this->payExpireMinute = $payExpireMinute;
|
|
|
$this->paymentParameter = $_paymentParameter;
|
|
|
$this->isTest = $_isTest;
|
|
|
$this->uid = $uid;
|
|
|
$this->userName = $userName;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|