For the complete documentation index, see llms.txt. This page is also available as Markdown.

有效性验证

用于验证用户输入的游戏 ID 和服务器信息是否有效,并确认道具是否可购买。

  • 游戏 ID 是用于标识最终接收道具的对象(用户或角色)的值。在网页商店中,该值以 serviceUserId 的形式传递。(根据游戏结构,该值可作为 UID 或角色 ID 使用。)

Request URI

HTTP Type

HTTPS

HTTP Method

POST

URL

可在 Developer Center > Webshop > Integration Mgmt. 中注册要接收通知的服务器 URL。 详细设置方法请参考《Integration Management Guide》。

Header

Content-Type: application/json; charset=UTF-8

Accept: application/json

Request

Name
Type
Mandatory
Description

param.clientId

String

M

ONE webshop 标题 ID(商品 ID)

param.prodId

String

M

ONE webshop 道具ID(In-App 商品 ID)

param.serviceUserId

String

M

用户游戏 ID

param.serviceServerId

String

Optional

用户服务器 ID ※ 当 Purchase Input Information = “Purchase Identifier + Server” 时为必填。

signature

String

M

用于防止篡改的签名 (License Key)

  • 使用下面的指南,您可以检查 signature 是否被强制生成或伪造。 签名密钥可在 Developer Center > Integration Mgmt. > Settings for Licensing 菜单中查看

Example

curl -X POST \
  'https://example.com/gameuser/check' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "param": {
      "clientId": "WS00000001",
      "prodId": "item1000",
      "serviceUserId": "USR1234567890",
      "serviceServerId": "asia01"
    },
    "signature": "ajkfl;askfjkladfjksl"
  }'

Response

Name
Type
Mandatory
Description

result.code

String

M

"0000":成功 "1000":非会员 "1001":不可购买

result.message

String

M

  • result.code1001 时,该消息将显示给用户。

  • 建议以适合目标用户的语言提供该消息。

  • 示例消息

    • "구매 가능한 횟수를 초과하였습니다."(已超过可购买次数。)

    • "이미 구매한 상품입니다."(该商品已购买。)

    • "이벤트 기간이 종료된 상품입니다."(该商品的活动时间已结束。)

developerPayload

String

Optional

开发者在有效性验证响应中传递的购买标识。

  • 该值也会在支付完成后的 PNS 中包含,用于购买验证。

Example

Last updated