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
32b4fa4f
Commit
32b4fa4f
authored
Jul 21, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
6b4a4f75
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
14 deletions
+27
-14
esf_center_api.php
center/controllers/esf_center_api.php
+7
-6
constants.php
esf_core/config/constants.php
+2
-0
package_model.php
esf_core/models/package_model.php
+12
-0
user_model.php
esf_core/models/user_model.php
+6
-8
No files found.
center/controllers/esf_center_api.php
View file @
32b4fa4f
...
@@ -2919,12 +2919,13 @@ class Esf_center_api extends MY_Controller {
...
@@ -2919,12 +2919,13 @@ class Esf_center_api extends MY_Controller {
public
function
notify
(){
public
function
notify
(){
$data
=
$_POST
;
$data
=
$_POST
;
$msg
=
"************************************************
\n
"
;
$this
->
user_model
->
addLog
(
"微信支付回调参数数据2:"
,
json_encode
(
$data
)
);
$msg
.=
date
(
'Y-m-d H:i:s'
)
.
var_export
(
$_POST
,
true
)
.
"
\n
"
;
// $msg = "************************************************ \n";
$log
=
dirname
(
__FILE__
)
.
"/notify"
;
// $msg .= date('Y-m-d H:i:s').var_export($_POST,true)." \n";
file_put_contents
(
$log
,
$msg
,
FILE_APPEND
);
// $log = dirname(__FILE__)."/notify";
$log2
=
dirname
(
__FILE__
)
.
"/notifylog2.txt"
;
// file_put_contents($log,$msg,FILE_APPEND );
file_put_contents
(
$log2
,
$msg
,
FILE_APPEND
);
// $log2 = dirname(__FILE__ ) . "/notifylog2.txt";
// file_put_contents( $log2, $msg,FILE_APPEND );
$result
[
'status'
]
=
'FAIL'
;
$result
[
'status'
]
=
'FAIL'
;
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
$result
[
'msg'
]
=
'city error'
;
$result
[
'msg'
]
=
'city error'
;
...
...
esf_core/config/constants.php
View file @
32b4fa4f
...
@@ -419,6 +419,8 @@ define('GB_CHECK_COUPON_URL', 'http://newrent.house365.com/api/tf-app/check-coup
...
@@ -419,6 +419,8 @@ define('GB_CHECK_COUPON_URL', 'http://newrent.house365.com/api/tf-app/check-coup
define
(
'GB_USE_COUPON_URL'
,
'http://newrent.house365.com/api/tf-app/use-coupon'
);
define
(
'GB_USE_COUPON_URL'
,
'http://newrent.house365.com/api/tf-app/use-coupon'
);
// 更新优惠券
// 更新优惠券
define
(
'GB_UPDATE_COUPON_URL'
,
'http://newrenttest.house365.com/api/tf-app/use-coupon'
);
define
(
'GB_UPDATE_COUPON_URL'
,
'http://newrenttest.house365.com/api/tf-app/use-coupon'
);
// 更新优惠券
define
(
'GB_ADD_LOG_URL'
,
'http://newrenttest.house365.com/api/tf-app/add-log'
);
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
{
{
...
...
esf_core/models/package_model.php
View file @
32b4fa4f
...
@@ -952,6 +952,18 @@ class Package_model extends MY_Model
...
@@ -952,6 +952,18 @@ class Package_model extends MY_Model
}
}
/**
* 验证优惠券
* @param $user_id
* @param $coupon_id
*/
public
function
updateCouponStatus
(
$user_id
,
$coupon_id
)
{
$url
=
GB_UPDATE_COUPON_URL
.
'?uid='
.
$user_id
.
'&coupon_id='
.
$coupon_id
;
$couponRes
=
curl_get_contents
(
$url
);
$couponRes
=
!
empty
(
$couponRes
)
?
json_decode
(
$couponRes
,
1
)
:
array
();
return
$couponRes
;
}
/**
/**
* 远程获取
* 远程获取
* @author zj
* @author zj
...
...
esf_core/models/user_model.php
View file @
32b4fa4f
...
@@ -6148,15 +6148,13 @@ if($searcharr['infotype']==4){
...
@@ -6148,15 +6148,13 @@ if($searcharr['infotype']==4){
}
}
/**
/**
* 验证优惠券
* 记录日志
* @param $user_id
* @param $params
* @param $coupon_id
*/
*/
public
function
updateCouponStatus
(
$user_id
,
$coupon_id
)
{
public
function
addLog
(
$msg
,
$content
)
{
$url
=
GB_UPDATE_COUPON_URL
.
'?uid='
.
$user_id
.
'&coupon_id='
.
$coupon_id
;
$url
=
GB_ADD_LOG_URL
;
$couponRes
=
curl_get_contents
(
$url
);
$res
=
$this
->
request_post
(
$url
,
array
(
'msg'
=>
$msg
,
'content'
=>
$content
)
);
$couponRes
=
!
empty
(
$couponRes
)
?
json_decode
(
$couponRes
,
1
)
:
array
();
return
$res
;
return
$couponRes
;
}
}
...
...
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