# Interface: PayParams
• PayParams()
# Properties
# Readonly amount
• amount: number
要支付的游戏币数量
Returns: number
# Optional Readonly billDetail
• billDetail? : string
订单信息
description 用于记录,可以传入购买物品等信息。
Returns: string
# Optional Readonly billNo
• billNo? : string
订单号
description 建议客户端自行指定订单号,可用于防止重复支付;若不指定,服务器会自动生成,这种情况下无法防止多次调用导致的重复支付。
Returns: string
# Methods
# Optional complete
▸ complete(this: void, res: PayRes | MogsError): void
Inherited from GetUserSignParams.complete
操作完成时(成功或失败),均会调用该回调函数
# 参数:
| 属性 | 类型 |
|---|---|
this | void |
res | PayRes | MogsError |
# 返回值:
void
# Optional fail
▸ fail(this: void, error: MogsError): void
Inherited from GetUserSignParams.fail
操作失败时,调用该回调函数
# 参数:
| 属性 | 类型 |
|---|---|
this | void |
error | MogsError |
# 返回值:
void
# Optional success
▸ success(this: void, res: PayRes): void
Inherited from GetUserSignParams.success
操作成功时,调用该回调函数
# 参数:
| 属性 | 类型 |
|---|---|
this | void |
res | PayRes |
PayRes
| 属性 | 类型 | 描述 |
|---|---|---|
balance | number | (预扣后的)余额 |
billNo | string | 订单号 |
consumedGiftedAmount | number | 本次消耗的赠送游戏币的金额(数量) |
eventList? | keyof MogsEvent | 当前 Action 所触发的所有事件的列表 |
# 返回值:
void