General Information🔗
Introduction🔗
Game servers will be receiving some data from MRGS, for example, data on the issuance of in-game bonuses or on a user's payment.
A manager creates a new bonus and then gives out this bonus to the user with UserID=e7b9bdd689f099cb0490ab6a25e0139b within the application MRGServiceExample under ID=38. Once the manager confirms the bonus for the user, another message will be sent to the inter-server message queue, which will be sent within a minute to the game server at the address specified in application settings.

Example: there's an address specified for the application MRGServiceExample - https://your.game.server/pub/mrgs.php
A manager issues a bonus. Cron responsible for distribution of messages collects all the necessary data and sends it using CURL to this address, adding GET parameters action and signature.
All other data is transmitted using POST or JSON.
As a result, cron will send data to https://your.game.server/pub/mrgs.php?action=bonus&hash=12de10299c1a96d3bb3c750ddec62c6e In the web address, we can see the action sent action=bonus and hash, which is the signature. Signature generation and validation are described in the Signature Validation section.
The following data is sent using POST:
{
bonus: {
id: 1,
userId: e7b9bdd689f099cb0490ab6a25e0139b,
deviceId: 8fdd6ce268d633837ed987506bc1e905fcd62ef9,
...
},
appId: 38,
appVersion: 1.0.3,
requestUserId: e7b9bdd689f099cb0490ab6a25e0139b,
user: {
id: e7b9bdd689f099cb0490ab6a25e0139b,
...
},
user_info: {
id: e7b9bdd689f099cb0490ab6a25e0139b,
...
},
device: {
id: 8fdd6ce268d633837ed987506bc1e905fcd62ef9,
...
}
}
The basic information is in the key which was sent in action.
If desired, parameters can be received in JSON format instead of POST array. To do this, you need to check the "Send data to server in JSON format" checkbox in the application settings.
General Parameters🔗
Each request will include arrays user, device_application and device:
[user] => Array (
[id] => 87bdfdc480c8b629e157839e75fdf2e0
[appId] => 38
[deviceId] => 7a094faa0667549d6d39d65b1736d0be064730c4
[deviceName] => iPhone Simulator
[slot] => 1
[country] => RU
[data] =>
[notes] => Device time changed
[stime] => 1353689947
[atime] => 1356103632
[appVersion] => 1.1
[appBuild] => 700
[language] => en
[registerTime] => 1353689947
[loginTime] => 1356103387
[logoutTime] => 0
[flags] => 1
[isPayment] => 1
),
[device_application] => Array (
[id] => 16
[deviceId] => 7a094faa0667549d6d39d65b1736d0be064730c4
[applicationId] => 38
[applicationVersion] => 1.1
[applicationBuild] => 700
[platform] => x86_64
[country] => RU
[displayName] => MRGServiceExample
[identifier] => ru.akeb.MRGServiceExample
[name] => MRGServiceExample
[memoryUse] => 25.12
[registerTime] => 1353585172
[lastActiveTime] => 1356103387
[isPayment] => 0
[source] => 992205ecc38d44578f3cf46ab53c03a6
[atime] => 1356103632
),
[device] => Array (
[id] => 7a094faa0667549d6d39d65b1736d0be064730c4
[deviceName] => iPhone Simulator
[country] => RU
[platform] => x86_64
[odin1] => dfb7f341235ffa1d2b3e13eaa63fb1d658390b0c
[displayHeight] => 568
[displayWidth] => 320
[language] => en
[localizedModel] => iPhone Simulator
[memoryMax] => 8192.00
[model] => iPhone Simulator
[systemName] => iPhone OS
[systemVersion] => 6.0
[timeZone] => +0400
[reachability] => 2
[carrier] =>
[isPayment] => 1
[isTest] => 1
[isJailbreak] => 0
[ip] => 2147483647
[flags] => 1
[registerTime] => 1353585172
[lastActiveTime] => 1356103387
[atime] => 1356103632
)
Created: 2020-01-16