charge
简介
对接雷霆平台 - 充值平台
https://leiting.feishu.cn/docx/ZZcAd3KPYorVMExMACbcfESmndh
充值平台
组件接口
类
LtChargeNotify
继承自 LtNotify
创建订单通知
成员变量
变量名 | 类型 | 初始值 | 须初始化 | 描述 |
---|---|---|---|---|
userId | string | nil | 可选 | 手游账号ID - Y |
roleId | string | nil | 可选 | 角色ID - Y |
channelNo | string | nil | 可选 | 渠道编号- Y |
currency | string | nil | 可选 | 固定传CNY - Y |
serverId | string | nil | 可选 | 区组ID - Y |
money | int | nil | 可选 | 金额(分)- Y |
productId | string | nil | 可选 | 价格档位/内购id。同一个productId可能会对应多个giftId |
giftId | string | nil | 可选 | 商品ID - Y |
payChannel | int | nil | 可选 | 支付渠道 8:支付宝 9:微信 10:支付宝扫码 11:微信扫码 12:JSAPI(微信公众号) - Y |
order_amount | int | nil | 可选 | 订单总金额 单位:分 - N |
coupon_m | int | nil | 可选 | 优惠满减门槛 单位:分 例如:满100减20,则该字段为 10000 - N |
coupon_s | int | nil | 可选 | 优惠金额 单位:分 例如:满100减20,则该字段为2000 - N |
coupon_id | string | nil | 可选 | 优惠券id - N |
coupon_source | string | nil | 可选 | 优惠券来源 1:抖店 2:充值平台 - N |
coupon_media | string | nil | 可选 | 优惠券M值 - N |
成员方法
函数原型 | 函数作用 |
---|---|
bool is_charged_via_alipay() | 是不是通过支付宝充值 |
bool is_charged_via_alipay_scan() | 是不是通过支付宝扫码充值 |
bool is_charged_via_wechat() | 是不是通过微信充值 |
bool is_charged_via_wechat_scan() | 是不是通过微信扫码充值 |
bool is_charged_via_jsapi() | 是不是通过JSAPI充值 |
LtResult new_result() | 生成处理通知的结果实例 |
LtChargeNotifyResult
继承自 LtResult
处理创建订单通知的结果