From 9cf4e6ad4934e05d6097198d7b70c07b37eeab7f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 19 Oct 2020 10:09:11 +0800 Subject: [PATCH] 1 --- webapp/controller/PayController.class.php | 51 ++++++++++++++----- .../controller/PayNotifyController.class.php | 20 -------- 2 files changed, 39 insertions(+), 32 deletions(-) delete mode 100644 webapp/controller/PayNotifyController.class.php diff --git a/webapp/controller/PayController.class.php b/webapp/controller/PayController.class.php index 87b2f9e..08d579b 100644 --- a/webapp/controller/PayController.class.php +++ b/webapp/controller/PayController.class.php @@ -1,20 +1,47 @@ preOrder(); + } + } + + public function payNotify() + { + error_log(json_encode($_REQUEST)); + $channel = ''; + if (isset($_REQUEST['_poly_sdk_channel'])) { + $channel = $_REQUEST['_poly_sdk_channel']; + } else { + $channel = $_REQUEST['_channel']; + } + $sdk = sdkwarpper\createSdkByChannel($channel); + if (!$sdk) { + echo 'is null'; + } else { + $sdk->payNotify(); + } + } + + public function queryOrderInfo() { - $mysql_conf = getMysqlConfig(crc32($accountid)); - $conn = new phpcommon\Mysql(array( - 'host' => $mysql_conf['host'], - 'port' => $mysql_conf['port'], - 'user' => $mysql_conf['user'], - 'passwd' => $mysql_conf['passwd'], - 'dbname' => 'paydb' - )); - return $conn; } } diff --git a/webapp/controller/PayNotifyController.class.php b/webapp/controller/PayNotifyController.class.php deleted file mode 100644 index 663c6d6..0000000 --- a/webapp/controller/PayNotifyController.class.php +++ /dev/null @@ -1,20 +0,0 @@ - $mysql_conf['host'], - 'port' => $mysql_conf['port'], - 'user' => $mysql_conf['user'], - 'passwd' => $mysql_conf['passwd'], - 'dbname' => 'paydb' - )); - return $conn; - } - -}