_appKey = $appKey; $this->_appSecret = $appSecret; } public function getAppKey() { return $this->_appKey; } public function getAppSecret() { return $this->_appSecret; } public function isValidOrder(array $orderParams) { $order = $this->_getOrder($orderParams); if (empty($order)) { return false; } return $order->Check(); } private function _getOrder($orderParams) { return \loyalsoft\pay\OrderNotice::Parse_360Order($orderParams); //应该根据360支付返回的订单号或者应用自身的订单号($order['app_order_id'])查询应用订单数据表 } public function processOrder(array $orderParams) { $order = $this->_getOrder($orderParams); if (empty($order)) { return false; } return $order->UpdateOrderStatus(); //更新订单,标识为已经处理,避免重复处理 //如果更新订单状态失败,记录异常,以便再次处理。再次处理的逻辑需应用自己处理 } }