alibaba.diantao.gamecenter.order.pay (点淘游戏中心支付订单创建)

点淘游戏中心支付订单创建

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
top_pay_game_trade_request_dto TopPayGameTradeRequestDTO 必须 结果
  • └ game_id
  • Number
  • 必须
  • 10001
  • 点淘分配游戏ID
  • └ item_id
  • String
  • 必须
  • 1
  • 商品ID
  • └ total_amount
  • Number
  • 必须
  • 100
  • 价格,单位分
  • └ item_name
  • String
  • 必须
  • 测试商品
  • 商品名称
  • └ open_id
  • String
  • 必须
  • 123213
  • 用户openID
  • └ out_order_id
  • String
  • 必须
  • 12321321
  • 外部订单ID

响应参数

名称 类型 示例值 描述
msg_info String 未知错误 错误信息
msg_code String 10001 错误码
data TopGameTradeDTO xxxx 数据
  • └ out_order_id
  • String
  • 123312
  • 外部订单ID
  • └ web_form
  • String
  • xxxxx
  • webForm表单
  • └ order_id
  • Number
  • 123456
  • 点淘订单号
succ Boolean true 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDiantaoGamecenterOrderPayRequest req = new AlibabaDiantaoGamecenterOrderPayRequest();
AlibabaDiantaoGamecenterOrderPayRequest.TopPayGameTradeRequestDTO obj1 = new AlibabaDiantaoGamecenterOrderPayRequest.TopPayGameTradeRequestDTO();
obj1.setGameId(10001L);
obj1.setItemId("1");
obj1.setTotalAmount(100L);
obj1.setItemName("测试商品");
obj1.setOpenId("123213");
obj1.setOutOrderId("12321321");
req.setTopPayGameTradeRequestDto(obj1);
AlibabaDiantaoGamecenterOrderPayResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_diantao_gamecenter_order_pay_response>
    <msg_info>未知错误</msg_info>
    <msg_code>10001</msg_code>
    <data>
        <out_order_id>123312</out_order_id>
        <web_form>xxxxx</web_form>
        <order_id>123456</order_id>
    </data>
    <succ>true</succ>
</alibaba_diantao_gamecenter_order_pay_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部