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/XMLFinishProtect.asp |
| Requests using WM Keeper Light certificate authorization should be sent to: |
https://w3s.wmtransfer.com/asp/XMLFinishProtectCert.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 |
Signer's WM-ID |
Is used for WM Keeper Classic authorization |
| finishprotect |
Attributes of requested transaction |
|
| finishprotect\wmtranid |
Transfer number in the WebMoney system |
An integer |
| finishprotect\pcode |
Protection code |
In the range 0 - 255 characters; without spaces in the beginning and in the end |
| Response properties |
| name |
purpose |
description |
| reqn |
Request number |
|
| retval |
Execution code |
0 means that the request was executed 20 - invalid protecion code, number of attempts to enter the protection code has not been exceeded |
| retdesc |
Code interpretation |
|
| operation |
Attributes of conducted transfer |
id defines a unique number of transfer in the WebMoney system ts defines a service number of transfer in the WebMoney system
|
| operation\opertype |
Transfer type |
0 - simple 12 - protected, funds were refunded |
| operation\dateupd |
Date and time of transaction status change |
YYYYMMDD HH:MM:SS |
Sample (IIS, ASP, JScript, MSXML)
<%@ Language=JScript %>
<%
try
{
var AuthorizeType = 'light' // 'classic'
var url;
if ('classic'== AuthorizeType)
url = 'https://w3s.webmoney.ru/asp/XMLFinishProtect.asp'
else
url = 'https://w3s.wmtransfer.com/asp/XMLFinishProtectCert.asp'
var wmtranid = 1062493
var pcode = 'code_prot'
var reqwmid = '111111111111'
var signstr // only for 'classic'
var reqn = (new Date()).valueOf()
if ('classic'== AuthorizeType)
{
var planstr = '' + wmtranid+pcode+reqn
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 += ' '+wmtranid+''
s += ' '+pcode+''
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 = -1
var Node = xmlres.selectSingleNode("w3s.response/retval")
if (null!=Node)
retcode = parseInt(Node.text, 10)
if (0==retcode)
{
//
}
if (20==retcode)
{
// invalid protection code
}
}
catch(e)
{
Response.Write('error:'+(new Number(e.number)).toString(16)+'
\r\n')
Response.Write('desc:'+e.description+'\r\n')
}
%>