You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.7 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <?php
  2. namespace App\Controller\v3;
  3. use App\Controller\BaseController;
  4. use Hyperf\Logger\LoggerFactory;
  5. class CcbNotifyController extends BaseController
  6. {
  7. /**
  8. * @var \Psr\Log\LoggerInterface
  9. */
  10. private $logger;
  11. public function __construct(LoggerFactory $loggerFactory)
  12. {
  13. parent::__construct();
  14. $this->logger = $loggerFactory->get('ccb.notify');
  15. }
  16. private function saveLog($func, $content)
  17. {
  18. $this->logger->info($func."\n".$content."\n");
  19. }
  20. public function pay()
  21. {
  22. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  23. return $this->response->json([
  24. 'Svc_Rsp_St' => '00',
  25. ]);
  26. }
  27. public function refund()
  28. {
  29. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  30. return $this->response->json([
  31. 'Svc_Rsp_St' => '00',
  32. ]);
  33. }
  34. public function merchant()
  35. {
  36. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  37. return $this->response->json([
  38. 'Svc_Rsp_St' => '00',
  39. ]);
  40. }
  41. public function accounting()
  42. {
  43. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  44. return $this->response->json([
  45. 'Svc_Rsp_St' => '00',
  46. ]);
  47. }
  48. public function bill()
  49. {
  50. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  51. return $this->response->json([
  52. 'Svc_Rsp_St' => '00',
  53. ]);
  54. }
  55. public function platform()
  56. {
  57. $this->saveLog(__FUNCTION__, $this->request->getBody()->getContents());
  58. return $this->response->json([
  59. 'Svc_Rsp_St' => '00',
  60. ]);
  61. }
  62. }