Commit c9f3ac92 authored by wanjilong's avatar wanjilong

add: 调整记录日志及打点的顺序

parent 488ab881
...@@ -57,13 +57,13 @@ class PingxxService ...@@ -57,13 +57,13 @@ class PingxxService
); );
//Mon 日志监控增加 //Mon 日志监控增加
$end = microtime(true); //计算结束时间 $end = microtime(true); //计算结束时间
FileLog::info('pingxx-sendRefund:' . '退款订单返回', json_encode(['req'=>$refundData, 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$total_time = round(($end - $start),4) * 1000; //计算耗时 $total_time = round(($end - $start),4) * 1000; //计算耗时
$url = 'pingxx/v1/refund/create'; $url = 'pingxx/v1/refund/create';
MonUtil::proxyMon($url, '200', 'bp-pay', $total_time); MonUtil::proxyMon($url, '200', 'bp-pay', $total_time);
FileLog::info('pingxx-sendRefund:' . '退款订单返回', json_encode(['req'=>$refundData, 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$response = json_decode($ret, true); $response = json_decode($ret, true);
} catch (\Pingpp\Error\Base $e) { } catch (\Pingpp\Error\Base $e) {
...@@ -97,12 +97,12 @@ class PingxxService ...@@ -97,12 +97,12 @@ class PingxxService
$ret = OrderRefund::retrieve($orderId, $refundId); $ret = OrderRefund::retrieve($orderId, $refundId);
$end = microtime(true); //计算结束时间 $end = microtime(true); //计算结束时间
$total_time = round(($end - $start),4) * 1000; //计算耗时 FileLog::info('pingxx-getRefund:' . '退款查询返回', json_encode(['req'=>[$orderId, $refundId], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$total_time = round(($end - $start),4) * 1000; //计算耗时
$url = 'pingxx/v1/refund/get'; $url = 'pingxx/v1/refund/get';
MonUtil::proxyMon($url, '200', 'bp-pay', $total_time); MonUtil::proxyMon($url, '200', 'bp-pay', $total_time);
FileLog::info('pingxx-getRefund:' . '退款查询返回', json_encode(['req'=>[$orderId, $refundId], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$respose = json_decode($ret, true); $respose = json_decode($ret, true);
} catch (\Pingpp\Error\Base $e) { } catch (\Pingpp\Error\Base $e) {
...@@ -148,12 +148,12 @@ class PingxxService ...@@ -148,12 +148,12 @@ class PingxxService
); );
$end = microtime(true); //计算结束时间 $end = microtime(true); //计算结束时间
FileLog::info('pingxx-createOrder:' . '创建订单返回', json_encode(['req'=>[$order, $metadata], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$total_time = round(($end - $start),4) * 1000; //计算耗时 $total_time = round(($end - $start),4) * 1000; //计算耗时
$url = 'pingxx/v1/order/create'; $url = 'pingxx/v1/order/create';
MonUtil::proxyMon($url, '200', 'bp-pay', $total_time); MonUtil::proxyMon($url, '200', 'bp-pay', $total_time);
FileLog::info('pingxx-createOrder:' . '创建订单返回', json_encode(['req'=>[$order, $metadata], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$respose = json_decode($ret, true); $respose = json_decode($ret, true);
} catch (\Pingpp\Error\Base $e) { } catch (\Pingpp\Error\Base $e) {
...@@ -189,11 +189,12 @@ class PingxxService ...@@ -189,11 +189,12 @@ class PingxxService
$ret = Order::pay($orderId, $pay); $ret = Order::pay($orderId, $pay);
$end = microtime(true); //计算结束时间 $end = microtime(true); //计算结束时间
FileLog::info('pingxx-pay:' . '订单pay返回', json_encode(['req'=>[$orderId, $pay], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$total_time = round(($end - $start),4) * 1000; //计算耗时 $total_time = round(($end - $start),4) * 1000; //计算耗时
$url = 'pingxx/v1/order/pay'; $url = 'pingxx/v1/order/pay';
MonUtil::proxyMon($url, '200', 'bp-pay', $total_time); MonUtil::proxyMon($url, '200', 'bp-pay', $total_time);
FileLog::info('pingxx-pay:' . '订单pay返回', json_encode(['req'=>[$orderId, $pay], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$respose = json_decode($ret, true); $respose = json_decode($ret, true);
} catch (\Pingpp\Error\Base $e) { } catch (\Pingpp\Error\Base $e) {
...@@ -226,12 +227,12 @@ class PingxxService ...@@ -226,12 +227,12 @@ class PingxxService
$ret = Order::retrieve($orderId); $ret = Order::retrieve($orderId);
$end = microtime(true); //计算结束时间 $end = microtime(true); //计算结束时间
FileLog::info('pingxx-pay:' . '查询订单返回', json_encode(['req'=>[$orderId], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$total_time = round(($end - $start),4) * 1000; //计算耗时 $total_time = round(($end - $start),4) * 1000; //计算耗时
$url = 'pingxx/v1/order/get'; $url = 'pingxx/v1/order/get';
MonUtil::proxyMon($url, '200', 'bp-pay', $total_time); MonUtil::proxyMon($url, '200', 'bp-pay', $total_time);
FileLog::info('pingxx-pay:' . '查询订单返回', json_encode(['req'=>[$orderId], 'res'=>$ret], JSON_UNESCAPED_UNICODE));
$respose = json_decode($ret, true); $respose = json_decode($ret, true);
} catch (\Pingpp\Error\Base $e) { } catch (\Pingpp\Error\Base $e) {
......
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