|
|
@@ -0,0 +1,90 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\controller\mini;
|
|
|
+
|
|
|
+use app\extra\basic\Base;
|
|
|
+use LinFly\Annotation\Route\Controller;
|
|
|
+use LinFly\Annotation\Route\Route;
|
|
|
+use support\Request;
|
|
|
+use support\Response;
|
|
|
+
|
|
|
+
|
|
|
+#[Controller(prefix: "/notify")]
|
|
|
+class Notify extends Base
|
|
|
+{
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 撤销核销通知
|
|
|
+ * @param Request $request
|
|
|
+ * @return Response
|
|
|
+ */
|
|
|
+ #[Route(path: "cancel",methods: "post")]
|
|
|
+ public function getCancel(Request $request): Response
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $param = $request->post();
|
|
|
+ echo getDateFull()."==撤销核销通知==\n";
|
|
|
+ print_r($param);
|
|
|
+ return success("ok");
|
|
|
+ } catch (\Throwable $throwable) {
|
|
|
+ return error($throwable->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 券核销通知
|
|
|
+ * @param Request $request
|
|
|
+ * @return Response
|
|
|
+ */
|
|
|
+ #[Route(path: "verify",methods: "post")]
|
|
|
+ public function getVerify(Request $request): Response
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $param = $request->post();
|
|
|
+ echo getDateFull()."==券核销通知==\n";
|
|
|
+ print_r($param);
|
|
|
+ return success("ok");
|
|
|
+ } catch (\Throwable $throwable) {
|
|
|
+ return error($throwable->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易系统支付结果通知
|
|
|
+ * @param Request $request
|
|
|
+ * @return Response
|
|
|
+ */
|
|
|
+ #[Route(path: "pay",methods: "post")]
|
|
|
+ public function getPay(Request $request): Response
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $param = $request->post();
|
|
|
+ echo getDateFull()."==交易系统支付结果通知==\n";
|
|
|
+ print_r($param);
|
|
|
+ return success("ok");
|
|
|
+ } catch (\Throwable $throwable) {
|
|
|
+ return error($throwable->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易系统退款通知
|
|
|
+ * @param Request $request
|
|
|
+ * @return Response
|
|
|
+ */
|
|
|
+ #[Route(path: "refund",methods: "post")]
|
|
|
+ public function getRefund(Request $request): Response
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $param = $request->post();
|
|
|
+ echo getDateFull()."==交易系统退款通知==\n";
|
|
|
+ print_r($param);
|
|
|
+ return success("ok");
|
|
|
+ } catch (\Throwable $throwable) {
|
|
|
+ return error($throwable->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|