Only registered members are permitted to use this interface. If you wish to register and get access to this interface, please send information on your online project, your IP and URL of your website, and purpose for use of this interface to WM-ID 941977853154 (technical support) via WM Keeper messenger. In addition, you have to receive a personal WM passport.
| Requests using WM Keeper Classic key authorization should be sent to: |
https://w3s.webmoney.ru/asp/XMLFindWMPurse.asp |
| Requests using WM Keeper Light certificate authorization should be sent to: |
https://w3s.wmtransfer.com/asp/XMLFindWMPurseCert.asp |
| Method | POST |
| Request format |
|
| Request properties |
| name |
purpose |
description |
| reqn |
Request number |
An integer, maximum 15 digits. It should always be larger than the number of previous request submitted |
| wmid |
Signer's WM-ID |
Is used for WM Keeper Classic authorization |
| sign |
Request's signature
Uses the following parameters:testwmpurse\wmid+testwmpurse\purse |
Is used for WM Keeper Classic authorization
|
| testwmpurse |
Request attributes |
You can define one or two attributes depending on a search task:
see the table below
|
| testwmpurse\wmid |
WM-ID |
12 digits |
| testwmpurse\purse |
Purse |
a letter prefix Z,R,E,C,D and 12 digits |
| response properties |
| name |
purpose |
description |
| reqn |
Request number |
|
| retval |
Execution code |
1 - search was successful, 0 - no matches were found |
| retdesc |
Code interpretation |
|
| testwmpurse |
Response attributes |
See the table below |
| testwmpurse\wmid |
Target WM-ID |
Returns the number of target WM-ID, if it exists |
| testwmpurse\purse |
Target purse |
Returns the number of target purse, if it exists and belongs to target WM-ID |
Variants of this request depending on a search task
| search task | sent attributes | search result/ value of retval | returned attributes |
| Search by WM-ID | wmid | found/1 | wmid |
| not found/0 | |
| Search by purse number | purse | found/1 | wmid purse |
| not found/0 | purse |
| Information on a WM purse belonging to a WMID | wmid purse | belongs/1 | wmid purse |
| does not belong/1 | wmid |
| WM-ID was not registered/0 | |
Sample (IIS, ASP, JScript, MSXML)
<%@ Language=JScript %>
<%
try
{
var AuthorizeType = 'classic' // 'light'
var url;
if ('classic'== AuthorizeType)
url = 'https://w3s.webmoney.ru/asp/XMLFindWMPurse.asp'
else
url = 'https://w3s.wmtransfer.com/asp/XMLFindWMPurseCert.asp'
var findwmid = '111111111111'
var findpurse = 'Z111111111111'
var reqwmid = '941977853154'
var signstr // only for 'classic'
var reqn = (new Date()).valueOf()
if ('classic'== AuthorizeType)
{
var planstr = '' + findwmid+findpurse
var reqwmpwd = 'password'
var reqwmfilename = 'c:\\wmkeeperclassickeyfile.kwm'
var Signer = Server.CreateObject("WMSignerX.Signer")
Signer.Login = reqwmid
Signer.Passwd = reqwmpwd
Signer.KeyFName = reqwmfilename
signstr = Signer.SignString(planstr)
}
var s = ''
s += ''+reqn+''
if ('classic' == AuthorizeType)
{
s += ''+reqwmid+''
s += ''+signstr+''
}
s += ''
s += ' '+findwmid+''
s += ' '+findpurse+''
s += ''
s += ''
var xmlhttp = Server.CreateObject ("MSXML2.ServerXMLHTTP");
if ('light' == AuthorizeType)
{
xmlhttp.setOption(3, 'WM id: '+reqwmid)
}
xmlhttp.open('POST', url, false);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(s);
var texttes = xmlhttp.responseText;
// Response.Write(texttes) //
var xmlres = Server.CreateObject ('Microsoft.XMLDOM');
xmlres.loadXML(texttes);
var retcode = 0
var purse
var Node = xmlres.selectSingleNode("w3s.response/retval")
if (null!=Node)
retcode = parseInt(Node.text, 10)
if (1==retcode)
{
// wmid exists
purse = xmlres.selectSingleNode("w3s.response/testwmpurse/purse")
if (purse.Text == findpurse)
{
// purse belongs to this wmid
}
}
}
catch(e)
{
Response.Write('error:'+(new Number(e.number)).toString(16)+'
\r\n')
Response.Write('desc:'+e.description+'\r\n')
}
%>