Commit 32b4fa4f authored by zhangjun's avatar zhangjun

修改

parent 6b4a4f75
...@@ -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';
......
...@@ -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')
{ {
......
...@@ -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
......
...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment