这个是创胜定制版的支付接口文件,包括下单脚本及几十个第三方平台的接口,之前客户运营的产品完整打包,有需要的拿去研究。
接口文件截图:
脚本内容:
SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON GO USE RYTreasureDB GO ---------------------------------------------------------------------------------- -- 申请订单 CREATE PROCEDURE NET_PW_ApplyOnLineOrder @strOrderID NVARCHAR(32), -- 订/单/标/识 @dwOperUserID INT, -- 操/作/用/户 @dwShareID INT, -- 服/务/类/型 @dwProductType INT, -- 充/值/标/识 @dwAppID INT, -- 手/机/充/值/标/识 @strAccounts NVARCHAR(31), -- 充/值/用/户 @dcOrderAmount DECIMAL(18,2), -- 订/单/金/额 @strIPAddress NVARCHAR(15), -- 支/付/地/址 @strErrorDescribe NVARCHAR(127) OUTPUT -- 输/出/信/息 AS -- 属性设置 SET NOCOUNT ON -- 帐号资料 DECLARE @Accounts NVARCHAR(31) DECLARE @GameID INT DECLARE @UserID INT DECLARE @Nullity TINYINT DECLARE @StunDown TINYINT -- 订单信息 DECLARE @OrderID NVARCHAR(32) DECLARE @OrderAmount DECIMAL(18,2) DECLARE @PayAmount DECIMAL(18,2) DECLARE @Currency DECIMAL(18,2) DECLARE @Rate INT -- 执行逻辑 BEGIN -- 验证用户 SELECT @UserID=UserID,@GameID=GameID,@Accounts=Accounts,@Nullity=Nullity,@StunDown=StunDown FROM RYAccountsDBLink.RYAccountsDB.dbo.AccountsInfo WHERE Accounts=@strAccounts IF @UserID IS NULL BEGIN SET @strErrorDescribe=N'抱歉!您要充/值的用户账号不存在。' RETURN 1 END IF @Nullity=1 BEGIN SET @strErrorDescribe=N'抱歉!您要充/值的用户账号暂时处于冻结状态,请联/系/客/户/服/务/中/心了解详细情况。' RETURN 2 END IF @StunDown<>0 BEGIN SET @strErrorDescribe=N'抱歉!您要充/值的用户账号使用了安全关闭功能,必须重新开通后才能继续使用。' RETURN 3 END -- 订单查询 SELECT @OrderID=OrderID FROM OnLineOrder WHERE OrderID=@strOrderID IF @OrderID IS NOT NULL BEGIN SET @strErrorDescribe=N'抱歉!该订单已存在,请重新充/值。' RETURN 4 END -- 房间锁定 --IF EXISTS (SELECT UserID FROM GameScoreLocker(NOLOCK) WHERE UserID=@UserID) --BEGIN -- SET @strErrorDescribe='抱歉!您已经在金/币游/戏/房/间了,不能进行充/值/操/作,请先退出金/币/游/戏/房/间!' -- RETURN 5 --END -- 充/值/汇/率 --IF @dwProductType = 1000 --BEGIN -- SELECT @Currency=PresentCurrency,@OrderAmount=Price FROM GlobalAppInfo WHERE AppID = @dwAppID -- IF @Currency IS NULL -- BEGIN -- SET @strErrorDescribe=N'抱歉!该充/值/额/度配置不存在。' -- RETURN 4 -- END -- IF @OrderAmount != @dcOrderAmount -- BEGIN -- SET @strErrorDescribe=N'抱歉!该充/值/金/额异常。' -- RETURN 4 -- END --END --ELSE --BEGIN -- SELECT @Currency=PresentCurrency FROM GlobalWebInfo WHERE ProductType=@dwProductType AND Price = @dcOrderAmount -- IF @Currency IS NULL -- BEGIN -- SET @strErrorDescribe=N'抱歉!该充/值/额/度配置不存在。' -- RETURN 4 -- END --END SELECT @Rate=StatusValue FROM RYAccountsDBLink.RYAccountsDB.dbo.SystemStatusInfo WHERE StatusName='RateCurrency' IF @Rate IS NULL SET @Rate=1 -- 订/单/金/额 SET @OrderAmount=@dcOrderAmount SET @PayAmount=@dcOrderAmount SET @Currency = @PayAmount*@Rate -- 新/增/订/单 INSERT INTO OnLineOrder( OperUserID,ShareID,UserID,GameID,Accounts,OrderID,OrderAmount,PayAmount,Rate,Currency,IPAddress) VALUES( @dwOperUserID,@dwShareID,@UserID,@GameID,@Accounts,@strOrderID,@OrderAmount,@PayAmount,0,@Currency,@strIPAddress) SELECT @dwOperUserID AS OperUserID,@dwShareID AS ShareID,@UserID AS UserID,@GameID AS GameID,@Accounts AS Accounts, @strOrderID AS OrderID, @OrderAmount AS OrderAmount,@PayAmount AS PayAmount,@Rate AS Rate,@Currency AS Currency,@strIPAddress AS IPAddress END RETURN 0 GO
接口文件获取:
附件内容看图1
发表评论