1 changed files with 45 additions and 6 deletions
@ -1,34 +1,73 @@ |
|||||
<?php |
<?php |
||||
|
|
||||
|
namespace App\Controller\v3; |
||||
|
|
||||
|
use App\Controller\BaseController; |
||||
|
use Hyperf\Logger\LoggerFactory; |
||||
|
|
||||
class CCBNotifyController extends BaseController |
class CCBNotifyController extends BaseController |
||||
{ |
{ |
||||
public function pay() |
|
||||
|
/** |
||||
|
* @var \Psr\Log\LoggerInterface |
||||
|
*/ |
||||
|
private $logger; |
||||
|
|
||||
|
public function __construct(LoggerFactory $loggerFactory) |
||||
{ |
{ |
||||
|
parent::__construct(); |
||||
|
$this->logger = $loggerFactory->get('ccb.notify'); |
||||
|
} |
||||
|
|
||||
|
private function saveLog($func, $content) |
||||
|
{ |
||||
|
$this->logger->info($func."\n".$content."\n"); |
||||
} |
} |
||||
|
|
||||
public function refund() |
|
||||
|
public function pay() |
||||
{ |
{ |
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
|
} |
||||
|
|
||||
|
public function refund() |
||||
|
{ |
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
} |
} |
||||
|
|
||||
public function merchant() |
public function merchant() |
||||
{ |
{ |
||||
|
|
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
} |
} |
||||
|
|
||||
public function accounting() |
public function accounting() |
||||
{ |
{ |
||||
|
|
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
} |
} |
||||
|
|
||||
public function bill() |
public function bill() |
||||
{ |
{ |
||||
|
|
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
} |
} |
||||
|
|
||||
public function platform() |
public function platform() |
||||
{ |
{ |
||||
|
|
||||
|
$this->saveLog(__FUNCTION__, $this->request->getBody()->getContents()); |
||||
|
return $this->response->json([ |
||||
|
'Svc_Rsp_St' => '00', |
||||
|
]); |
||||
} |
} |
||||
} |
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue