Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangjun
User
Commits
03e470e7
Commit
03e470e7
authored
Aug 09, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
1133ec10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
user.php
center/controllers/user.php
+1
-1
package_model.php
esf_core/models/package_model.php
+16
-0
No files found.
center/controllers/user.php
View file @
03e470e7
...
@@ -2028,7 +2028,7 @@ class User extends MY_Controller
...
@@ -2028,7 +2028,7 @@ class User extends MY_Controller
// 0元支付
// 0元支付
if
(
$price
<=
0
)
{
if
(
$price
<=
0
)
{
//支付成功后的操作
//支付成功后的操作
$result
=
$this
->
package_model
->
payFinish
(
$orderData
,
array
(
'transaction_id'
=>
'000000000000000'
));
$result
=
$this
->
package_model
->
payFinish
(
$orderData
,
array
(
'transaction_id'
=>
$this
->
package_model
->
getPaymentTransactionId
(
$packageType
)
));
if
(
GB_CITY
==
'nj'
)
{
if
(
GB_CITY
==
'nj'
)
{
$this
->
package_model
->
sendMsg
(
$orderData
);
$this
->
package_model
->
sendMsg
(
$orderData
);
}
}
...
...
esf_core/models/package_model.php
View file @
03e470e7
...
@@ -58,6 +58,22 @@ class Package_model extends MY_Model
...
@@ -58,6 +58,22 @@ class Package_model extends MY_Model
return
time
()
.
$formatType
.
$randValue
;
return
time
()
.
$formatType
.
$randValue
;
}
}
/**
* 获取某个产品的0元支付交易号
* @param int $type 产品类型 1代表首页推荐,2代表列表页推荐,3代表智能刷新,4代表普通刷新
* @return string
*/
public
function
getPaymentTransactionId
(
$type
)
{
//防止订单ID与租售宝重复,$type 定义为从50开始
$type
=
50
+
$type
;
$formatType
=
self
::
formatValue
(
$type
,
2
);
//随机数
$randValue
=
self
::
formatValue
(
self
::
randValue
(),
4
);
//订单号
return
'zeropay-'
.
time
()
.
$formatType
.
$randValue
;
}
/**
/**
* 获取套餐详情
* 获取套餐详情
* @param int $id 套餐ID
* @param int $id 套餐ID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment