文档
测试
POST
https://sdk.dbgame.io/api/withdraw

接口描述

请求接口:Withdraw

请求参数

参数名
类型
描述
必填
Host
string
请求域名
必填
GameTypeEnum
GameTypeEnum
游戏类型(使用 GameTypeEnum 枚举类传参)
必填
MerchantCode
string
商户号
必填
Md5Key
string
秘钥
必填
Timestamp
Long
13 位时间戳
必填
LoginName
string
玩家用户名
必填
NickName
string
玩家昵称
必填
Password
string
密码
必填
TransferNo
string
转账单号(不能重复)
必填
Amount
decimal
单位:元 精确到小数点后2位
必填
LoginIp
string
IP
必填

响应参数

参数名
类型
描述
必填
Code
int
返回代码(200代表成功)返回非 200 请调用 QueryTransfer 接口进行二次确认
必填
Message
string
返回消息
必填
Detail
string
細節說明
必填
OriginCode
string
原始状态码
必填

说明 / 示例

```csharp public void Withdraw_Success() { WithDrawReq withdrawRequest = new WithDrawReq(); // 公共請求參數 withdrawRequest.Host = _host; withdrawRequest.VersionEnum = VersionEnum.V1; withdrawRequest.GameTypeEnum = GameTypeEnum.DGZR; withdrawRequest.Md5Key = _key; withdrawRequest.AesKey = string.Empty; withdrawRequest.MerchantCode = _agent; withdrawRequest.Timestamp = TimeUtil.GetTimeStamp(false); // 下分查詢參數 withdrawRequest.LoginName = _username; withdrawRequest.NickName = _username; withdrawRequest.Password = _password; withdrawRequest.TransferNo = _transferNo; withdrawRequest.Amount = 10; withdrawRequest.LoginIp = IPUtil.GetLocalIp(); try { var game = new GameService(); BaseCommonResp withdrawResponse = game.Withdraw(withdrawRequest); Console.WriteLine(JsonConvert.SerializeObject(withdrawResponse, Formatting.Indented)); Assert.AreEqual(EnumUtil.GetEnumAttribute(CodeMsgEnum.SUCCESS).Code, withdrawResponse.Code); } catch (Exception e) { Assert.Fail(e.Message); } } ```