Appearance
发货
接口说明
支付成功后,KeepSDK POST 你的 deliver_url。你验签、按订单号加币。不要再回调 KeepSDK。
请求方式
- Method:
POST - Content-Type:
application/json - 地址:后台填写的
deliver_url - 密钥:
pay_key。PHP 读php://input,不要用$_POST
参数说明
json
{
"app_id": "lmyxweb",
"order_id": "K...",
"cp_order_id": "G...",
"uid": "45yx_web:joy_acc_895111",
"server_id": "330",
"role_id": "10001",
"product_id": "101",
"amount": "1000",
"ext": "",
"time": "1757250000",
"sign": "..."
}| 参数 | 必填 | 说明 |
|---|---|---|
app_id | 是 | 游戏 app_id |
order_id | 是 | KeepSDK 单号,K 开头。幂等用这个 |
cp_order_id | 是 | 下单时的游戏订单号 |
uid | 是 | KeepSDK 账号,同登录 |
amount | 是 | 金额,分(字符串) |
server_id | 是 | 区服 |
role_id | 是 | 角色 ID |
product_id | 是 | 商品 ID |
time | 是 | 时间戳秒 |
ext | 否 | 下单时的 ext 原样回传 |
sign | 是 | 签名,pay_key |
渠道单号只在 KeepSDK 订单后台,发货不传。加币幂等用 order_id。
接入说明
按 order_id 幂等加币。同一单已经加过币,回 1010,不要再回 0。
响应
| code | 本接口 |
|---|---|
0 | 加币成功 |
1010 | 这一单已经加过币 |
1202 | 区服不存在 |
1203 | 用户不存在 |
1204 | 金额不对 |
1101 | 其它失败 |
码表见 错误码。