Mobule.API - ask your manager
Mobule.API + '/' + serviceName + '.' + methodName
application/x-www-form-urlencoded
partner.
must be excluded from signmeta.
.All responses from Mobule are in JSON.
{
"status" : 200,
"method" : "service.method",
"response" : ...response entity as json...
}
Format of error response:
{
"status" : "int != 200",
"method" : "service.method",
"message" : "Error message"
}
@partner.alias
- Partner alias you got from manager
@partner.sign
partner.sign
partner.
and meta.
, participate in the formation of the signature.Form a set of parameters in any convenient way.
Take a list of names of all parameters that participate in the request.
Filter the list of names. Keep only those names that do NOT start with partner.
and meta.
.
Sorting in lexicographical order.
Full algorithm for signature generation (pseudo code):
val params = Map[Name,Value]
val joined = names
.filter( name => name.startsWith("partner.") == false && name.startsWith("meta.") == false)
.sorted
.map( name => name + "=" + params(name))
.join("&")
// Соединительная частица "&" между 'joined' и 'serviceName' проставляется в любом случае, даже при отсутствии параметров.
val sign = md5(joined + "&" + serviceName + "." + methodName + "&" + "Идентификатор Партнера" + "&" + "Секретный ключ")