Skip to content
Open
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
32bc037
xbox adapter validate changes
jackhellyercw Jun 24, 2025
a096c66
xbox poller setup and now handling generic iap interface
jackhellyercw Jul 1, 2025
7eda417
removed comments and test logs
jackhellyercw Jul 1, 2025
88fb850
go mod tidy, go mod vendor
jackhellyercw Jul 1, 2025
0d44600
playstation validate and before and after hooks added
jackhellyercw Jul 3, 2025
47f18de
work in progress
jackhellyercw Jul 8, 2025
5d72b90
struct pointer issue for apple interal adapter fixed, fixed issue aro…
jackhellyercw Jul 16, 2025
4f24c60
removed unused rpc, before and after funcs now that the generic valid…
jackhellyercw Jul 17, 2025
1daa434
remove test logs
jackhellyercw Jul 17, 2025
f5604af
revert dockerfile changes
jackhellyercw Jul 22, 2025
a2d1df0
white space added back in dockerfile
jackhellyercw Jul 22, 2025
7206953
dockerfile revert
jackhellyercw Jul 22, 2025
c632479
started address PR comments
jackhellyercw Jul 22, 2025
0aa3412
validate request func implemented for apple adapter and called in gen…
jackhellyercw Jul 22, 2025
7dcf4bf
move the console iap config out into console adapter repo
jackhellyercw Jul 23, 2025
21062a8
added the rest of the built ins and now handling error returned from …
jackhellyercw Jul 24, 2025
337daaf
huawei validate purchase request func implemented
jackhellyercw Jul 24, 2025
51f135f
handle refund implemeted in the relevant built ins
jackhellyercw Jul 24, 2025
d3b7f1a
PR requested changes and generic validate subscription implemented
jackhellyercw Aug 2, 2025
a5d79b0
google sub validate implemented
jackhellyercw Aug 11, 2025
621f233
GetProviderString now called platform.String() func in nakama common,…
jackhellyercw Aug 19, 2025
f5a3c99
revert config file path changes
jackhellyercw Aug 19, 2025
c93c5eb
PR comments address: reverted unused config changes and initialized t…
jackhellyercw Aug 20, 2025
e057c6e
removed persisit from client purchase and subscription validate response
jackhellyercw Aug 20, 2025
98b8003
handle refund wrapper implemented
jackhellyercw Aug 22, 2025
2b6bba8
Merge branch 'master' of github.com:jackhellyercw/nakama into feature…
jackhellyercw Aug 26, 2025
40d4774
PR comments: changed error returned if refund fn already register for…
jackhellyercw Aug 26, 2025
c759fad
purchase validate functions, before and after hooks added for js and lua
jackhellyercw Sep 6, 2025
6ee0155
js and lua validate subscription api endpoint and runtime funcs imple…
jackhellyercw Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,080 changes: 272 additions & 808 deletions apigrpc/apigrpc.pb.go

Large diffs are not rendered by default.

4,961 changes: 1,472 additions & 3,489 deletions apigrpc/apigrpc.pb.gw.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions apigrpc/apigrpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,14 @@ service Nakama {
};
}

// Validate Purchase
rpc ValidatePurchase (api.ValidatePurchaseRequest) returns (api.ValidatePurchaseProviderResponse) {
option (google.api.http) = {
post: "/v2/iap/purchase",
body: "*"
};
}

// Validate Apple IAP Receipt
rpc ValidatePurchaseApple (api.ValidatePurchaseAppleRequest) returns (api.ValidatePurchaseResponse) {
option (google.api.http) = {
Expand Down
234 changes: 181 additions & 53 deletions apigrpc/apigrpc.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiEvent"
"$ref": "#/definitions/nakamaapiEvent"
}
}
],
Expand Down Expand Up @@ -1866,30 +1866,7 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name."
},
"description": {
"type": "string",
"description": "Description string."
},
"langTag": {
"type": "string",
"description": "Lang tag."
},
"avatarUrl": {
"type": "string",
"description": "Avatar URL."
},
"open": {
"type": "boolean",
"description": "Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin."
}
},
"description": "Update fields in a given group."
"$ref": "#/definitions/NakamaUpdateGroupBody"
}
}
],
Expand Down Expand Up @@ -2239,6 +2216,39 @@
]
}
},
"/v2/iap/purchase": {
"post": {
"summary": "Validate Purchase",
"operationId": "Nakama_ValidatePurchase",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiValidatePurchaseProviderResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiValidatePurchaseRequest"
}
}
],
"tags": [
"Nakama"
]
}
},
"/v2/iap/purchase/apple": {
"post": {
"summary": "Validate Apple IAP Receipt",
Expand Down Expand Up @@ -3703,6 +3713,32 @@
},
"description": "A single user-role pair."
},
"NakamaUpdateGroupBody": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name."
},
"description": {
"type": "string",
"description": "Description string."
},
"langTag": {
"type": "string",
"description": "Lang tag."
},
"avatarUrl": {
"type": "string",
"description": "Avatar URL."
},
"open": {
"type": "boolean",
"description": "Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin."
}
},
"description": "Update fields in a given group."
},
"UserGroupListUserGroup": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4134,32 +4170,6 @@
},
"description": "Batch delete storage objects."
},
"apiEvent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "An event name, type, category, or identifier."
},
"properties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Arbitrary event property values."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The time when the event was triggered."
},
"external": {
"type": "boolean",
"description": "True if the event came directly from a client call, false otherwise."
}
},
"description": "Represents an event to be passed through the server to registered event handlers."
},
"apiFriend": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4587,6 +4597,55 @@
"default": "NO_OVERRIDE",
"description": "Operator that can be used to override the one set in the leaderboard.\n\n - NO_OVERRIDE: Do not override the leaderboard operator.\n - BEST: Override the leaderboard operator with BEST.\n - SET: Override the leaderboard operator with SET.\n - INCREMENT: Override the leaderboard operator with INCREMENT.\n - DECREMENT: Override the leaderboard operator with DECREMENT."
},
"apiPurchaseProviderValidatedPurchase": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"description": "Purchase User ID."
},
"productId": {
"type": "string",
"description": "Purchase Product ID."
},
"transactionId": {
"type": "string",
"description": "Purchase Transaction ID."
},
"store": {
"$ref": "#/definitions/apiStoreProvider",
"title": "Store identifier"
},
"purchaseTime": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the purchase was done."
},
"createTime": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the receipt validation was stored in DB."
},
"updateTime": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the receipt validation was updated in DB."
},
"refundTime": {
"type": "string",
"format": "date-time",
"title": "Timestamp when the purchase was refunded. Set to UNIX"
},
"providerResponse": {
"type": "string",
"description": "Raw provider validation response."
},
"environment": {
"$ref": "#/definitions/apiStoreEnvironment",
"description": "Whether the purchase was done in production or sandbox environment."
}
}
},
"apiReadStorageObjectId": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -4827,10 +4886,15 @@
"APPLE_APP_STORE",
"GOOGLE_PLAY_STORE",
"HUAWEI_APP_GALLERY",
"FACEBOOK_INSTANT_STORE"
"FACEBOOK_INSTANT_STORE",
"XBOX_STORE",
"PLAYSTATION_STORE",
"EPIC_STORE",
"STEAM_STORE",
"DISCORD_STORE"
],
"default": "APPLE_APP_STORE",
"description": "- APPLE_APP_STORE: Apple App Store\n - GOOGLE_PLAY_STORE: Google Play Store\n - HUAWEI_APP_GALLERY: Huawei App Gallery\n - FACEBOOK_INSTANT_STORE: Facebook Instant Store",
"description": "- APPLE_APP_STORE: Apple App Store\n - GOOGLE_PLAY_STORE: Google Play Store\n - HUAWEI_APP_GALLERY: Huawei App Gallery\n - FACEBOOK_INSTANT_STORE: Facebook Instant Store\n - XBOX_STORE: Xbox Store\n - PLAYSTATION_STORE: Playstation Store\n - EPIC_STORE: Epic Store\n - STEAM_STORE: Steam Store\n - DISCORD_STORE: Discord Store",
"title": "Validation Provider,"
},
"apiSubscriptionList": {
Expand Down Expand Up @@ -5210,6 +5274,44 @@
},
"title": "Huawei IAP Purchase validation request"
},
"apiValidatePurchaseProviderResponse": {
"type": "object",
"properties": {
"validatedPurchases": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/apiPurchaseProviderValidatedPurchase"
}
},
"persist": {
"type": "boolean"
}
}
},
"apiValidatePurchaseRequest": {
"type": "object",
"properties": {
"receipt": {
"type": "string"
},
"purchase": {
"type": "string"
},
"signedRequest": {
"type": "string"
},
"signature": {
"type": "string"
},
"platform": {
"type": "string"
},
"persist": {
"type": "boolean"
}
}
},
"apiValidatePurchaseResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -5423,6 +5525,32 @@
},
"description": "Write objects to the storage engine."
},
"nakamaapiEvent": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "An event name, type, category, or identifier."
},
"properties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Arbitrary event property values."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The time when the event was triggered."
},
"external": {
"type": "boolean",
"description": "True if the event came directly from a client call, false otherwise."
}
},
"description": "Represents an event to be passed through the server to registered event handlers."
},
"protobufAny": {
"type": "object",
"properties": {
Expand Down
Loading