From 14cf6ffe0a46144a8784a20ade871b9056707aa2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 26 Aug 2019 17:03:53 +0800 Subject: [PATCH] 1 --- sql/paydb.sql | 1 + webapp/controller/PayNotifyController.class.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sql/paydb.sql b/sql/paydb.sql index f37ea6a..ff1452b 100644 --- a/sql/paydb.sql +++ b/sql/paydb.sql @@ -68,6 +68,7 @@ CREATE TABLE `orderinfo` ( `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `sp_orderid` varchar(60) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '平台的订单id', + `sp_amount` double NOT NULL COMMENT 'sp_amount', `sp_confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT '平台确认时间', `sp_pay_result` int(11) NOT NULL DEFAULT '0' COMMENT '0: 未确认 1: 支付成功 -1:支付失败', diff --git a/webapp/controller/PayNotifyController.class.php b/webapp/controller/PayNotifyController.class.php index f98c10b..081253c 100644 --- a/webapp/controller/PayNotifyController.class.php +++ b/webapp/controller/PayNotifyController.class.php @@ -94,11 +94,13 @@ class PayNotifyController { $ret = $conn->execScript('UPDATE orderinfo SET ' . ' sp_pay_result = 1, ' . ' sp_confirm_time = :sp_confirm_time, ' . + ' sp_amount = :sp_amount, ' . ' sp_orderid = :sp_orderid ' . 'WHERE orderid=:orderid;', array( ':orderid' => $_REQUEST['BillNo'], ':sp_orderid' => $_REQUEST['OrderNo'], + ':sp_amount' => $_REQUEST['Amount'], ':sp_confirm_time' => $nowtime )); if ($ret) {