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; - } - -}