Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
d302ccdd9863d672992199b9bd3d69b9596fec2e
1 parent
d8e16fb6
支付宝和直联加支付到期时间
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
18 deletions
library/WebPlugin/Pay/Alibank/Service.php
library/WebPlugin/Pay/Alipay/Service.php
library/WebPlugin/Pay/Reqparams.php
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
library/WebPlugin/Pay/Alibank/Service.php
View file @
d302ccd
...
...
@@ -42,8 +42,6 @@ class Service extends PayAbstract
public
function
getPayRequestPars
(
Reqparams
$params
)
{
// $baseUrl = $this->getBaseNoticeUrl($params->isTest);
// $loseTime = intval(($params->orderTime + 7200 - time()) / 60);
// $loseTime = intval((strtotime(date("Y-m-d 10:00:00", strtotime("+1 day")))-time())/60);
UdpLog
::
info
(
"【
{
$this
->
logProjectPrefix
}
-支付宝银行支付】,function:getPayRequestPars,参数"
,
$params
);
$parameter
=
array
(
'service'
=>
$this
->
config
->
service
,
...
...
@@ -58,7 +56,7 @@ class Service extends PayAbstract
'payment_type'
=>
$this
->
config
->
payment_type
,
'defaultbank'
=>
$params
->
paymentParameter
,
'seller_email'
=>
$this
->
config
->
sellerMail
,
// 'it_b_pay' => $loseTime . 'm'
'it_b_pay'
=>
$params
->
payExpireMinute
.
'm'
,
);
if
(
$this
->
config
->
anti_fishing
[
'timestamp_enable'
])
{
$anti_phishing_key
=
$this
->
getTimestamp
();
...
...
library/WebPlugin/Pay/Alipay/Service.php
View file @
d302ccd
...
...
@@ -47,8 +47,6 @@ class Service extends PayAbstract
{
UdpLog
::
info
(
"【
{
$this
->
logProjectPrefix
}
-支付宝支付】,function:getPayRequestPars,参数"
,
$params
);
// $baseUrl = $this->getBaseNoticeUrl($params->isTest);
// $loseTime = intval(($params->orderTime + 7200 -time())/60);
// $loseTime = intval((strtotime(date("Y-m-d 10:00:00", strtotime("+1 day")))-time())/60); //第二天十点
$parameter
=
array
(
'service'
=>
$this
->
config
->
service
,
'partner'
=>
$this
->
config
->
partner
,
...
...
@@ -58,13 +56,14 @@ class Service extends PayAbstract
/* 业务参数 */
'subject'
=>
$params
->
goodsName
,
'out_trade_no'
=>
$params
->
orderCode
,
// 'it_b_pay' => $loseTim
e . 'm',
'it_b_pay'
=>
$params
->
payExpireMinut
e
.
'm'
,
'total_fee'
=>
$params
->
totalFee
/
100
,
//单位为元
'payment_type'
=>
$this
->
config
->
payment_type
,
'seller_email'
=>
$this
->
config
->
sellerMail
,
'sign_id_ext'
=>
$params
->
uid
,
'sign_name_ext'
=>
$params
->
userName
);
if
(
$this
->
config
->
anti_fishing
[
'timestamp_enable'
])
{
$anti_phishing_key
=
$this
->
getTimestamp
();
if
(
!
empty
(
$anti_phishing_key
))
{
...
...
library/WebPlugin/Pay/Reqparams.php
View file @
d302ccd
...
...
@@ -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
;
}
/**
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
View file @
d302ccd
...
...
@@ -283,7 +283,10 @@ class PayModel
$paymentParameter
=
$alipayToken
;
}
$reqParams
=
new
Reqparams
(
$orderCode
,
$totalFee
,
'有货订单号:'
.
$orderCode
,
''
,
$orderDetail
[
'data'
][
'create_time'
],
$paymentParameter
,
$isTest
,
$uid
,
$userName
);
$reqParams
=
new
Reqparams
(
$orderCode
,
$totalFee
,
'有货订单号:'
.
$orderCode
,
''
,
$orderDetail
[
'data'
][
'create_time'
],
$paymentParameter
,
$isTest
,
$uid
,
$userName
,
$orderDetail
[
'data'
][
'pay_expire'
]
);
$reqPars
=
$payService
->
getPayRequestPars
(
$reqParams
);
if
(
empty
(
$reqPars
))
{
$result
[
'error'
]
=
true
;
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
View file @
d302ccd
...
...
@@ -522,7 +522,10 @@ class PaymentModel
$paymentParameter
=
$alipayToken
;
}
$reqParams
=
new
Reqparams
(
$orderCode
,
$totalFee
,
'有货订单号:'
.
$orderCode
,
''
,
$orderDetail
[
'data'
][
'create_time'
],
$paymentParameter
,
$isTest
,
$uid
,
$userName
);
$reqParams
=
new
Reqparams
(
$orderCode
,
$totalFee
,
'有货订单号:'
.
$orderCode
,
''
,
$orderDetail
[
'data'
][
'create_time'
],
$paymentParameter
,
$isTest
,
$uid
,
$userName
,
$orderDetail
[
'data'
][
'pay_expire'
]
);
$reqPars
=
$payService
->
getPayRequestPars
(
$reqParams
);
UdpLog
::
info
(
"【支付-参数】,function:getPayData,orderCode:
{
$orderCode
}
,接口返回"
,
...
...
Please
register
or
login
to post a comment