Authored by 郝肖肖

支付到期时间

... ... @@ -10,10 +10,11 @@ class AliwapReqparams
public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $_payExpire = '')
{
//当前时间加六十秒,访问有误差。支付宝是yy-mm-dd HH:ii,没有秒
if (empty($_payExpire)) {
$_payExpire = strtotime('+2 hours', $_orderTime);
$_payExpire = strtotime('+2 hours', $_orderTime) + 60;
} else {
$_payExpire = strtotime($_payExpire);
$_payExpire = strtotime($_payExpire) + 60;
}
$this->orderCode = $_orderCode;
... ... @@ -23,7 +24,7 @@ class AliwapReqparams
$this->orderTime = $_orderTime;
$this->paymentParameter = $_paymentParameter;
$this->isTest = $_isTest;
$this->payExpire = date('Y-m-d H:i', $_payExpire);//到期时间
$this->payExpire = $_payExpire;//到期时间
}
/**
... ...
... ... @@ -39,7 +39,7 @@ class AliwapService
/* 业务参数 */
'payment_type' => $this->config->payment_type,
'seller_id' => $this->config->partner,
'it_b_pay' => $params->payExpire,
'it_b_pay' => date('Y-m-d H:i', $params->payExpire),
'payment_type' => $this->config->payment_type,
'out_trade_no' => $params->orderCode,
'subject' => $params->goodsName,
... ...