Browse Source

添加日志

undefined
v-Brocloni 4 years ago
parent
commit
864221c8a6
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      addons/epay/library/Service.php
  2. +1
    -0
      addons/unishop/controller/Pay.php

+ 1
- 1
addons/epay/library/Service.php View File

@@ -188,7 +188,7 @@ class Service
try {
$pay = new Pay(self::getConfig($type));
$data = $type == 'wechat' ? file_get_contents("php://input") : request()->post('', null, 'trim');
file_put_contents(APP_PATH . '/log/' . date('Y-m-d') . '.log', json_encode($data) . PHP_EOL, FILE_APPEND);
$data = $pay->driver($type)->gateway()->verify($data);

if ($type == 'alipay') {


+ 1
- 0
addons/unishop/controller/Pay.php View File

@@ -151,6 +151,7 @@ class Pay extends Base
Hook::add('paid_fail', 'addons\\unishop\\behavior\\Order');

$paytype = $this->request->param('paytype');
file_put_contents(ROOT_PATH . '/runtime/log/' . date('Ym') ."/".date("d"). '.log', $paytype . PHP_EOL, FILE_APPEND);
$pay = Service::checkNotify($paytype);
if (!$pay) {
echo '签名错误';


Loading…
Cancel
Save