|
|
|
|
|
|
|
|
 |
|
Interface X3. Receiving the History of Transactions. Checking Transaction Status
| Requests using WM Keeper Classic key authorization should be sent to: |
https://w3s.webmoney.ru/asp/XMLOperations.asp |
| Requests using WM Keeper Light certificate authorization should be sent to: |
https://w3s.wmtransfer.com/asp/XMLOperationsCert.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: purse + reqn |
Is used for WM Keeper Classic authorization |
| getoperations |
Parameters of requested operation used in the search |
Parameters: purse, datestart, datefinish are required, the rest parameters may be left undefined or defined as 0 |
| getoperations\purse |
Number of purse for which the transaction is requested |
|
| getoperations\wmtranid |
Transaction number (in the WebMoney system) |
An integer > 0 |
| getoperations\tranid |
Transfer number |
Transfer number set by the sender; an integer; (see trans\tranid in Interface X2) |
| getoperations\wminvid |
Invoice number (in the WebMoney system) |
An integer > 0 |
| getoperations\orderid |
Serial invoice number |
Serial invoice number set by the store; an integer; (see trans\tranid in Interface X2) |
| getoperations\datestart |
Minimum time and date of transaction execution |
YYYYMMDD HH:MM:SS |
| getoperations\datefinish |
Maximum time and date of transaction execution |
YYYYMMDD HH:MM:SS |
| Response properties |
| name |
purpose |
description |
| reqn |
Request number |
|
| retval |
Execution code |
0 means that the request was executed |
| retdesc |
Code interpretation |
|
| operations |
List of transfers received in response |
cnt defines number of transfers satisfying the request |
| operations\operation |
Transfer attributes |
id defines a unique number of an invoice in the WebMoney system ts defines a service number of an invoice in the WebMoney system
|
| operation\tranid |
Transfer number |
Transfer number set by the sender; an integer; it should be unique for each trasaction (the same tranid should not be used for two transactions) |
| operation\pursesrc |
Sender's purse number |
|
| operation\pursedesc |
Recipient's purse number |
|
| operation\amount |
Amount |
|
| operation\comiss |
Fee charged |
|
| operation\opertype |
Transfer type |
0 - simple,
4 - protected (not completed),
12 - protected (refunded) |
| operation\period |
Protection period in days |
An integer in the range: 0 - 255; zero means that transfer is simple |
| operation\wminvid |
Invoice number (in the WebMoney system) of the transaction |
An integer > 0; 0 means that transfer is made without invoice |
| operation\orderid |
Serial invoice number set by the store |
An integer > 0; 0 means that transfer is made without invoice |
| operation\desc |
Description of product or service |
|
| operation\datecrt |
Date and time of transaction |
|
| operation\dateupd |
Date and time of transaction status change |
|
| operation\corrwm |
Correspondent WMID |
|
| operation\rest |
Rest after transaction |
|
Sample (IIS, ASP, JScript, MSXML)<%@ Language=JScript %>
<%
try
{
var AuthorizeType = 'light' // 'classic'
var url;
if ('classic'== AuthorizeType)
url = 'https://w3s.webmoney.ru/asp/XMLOperations.asp'
else
url = 'https://w3s.wmtransfer.com/asp/XMLOperationsCert.asp'
var purse = 'R111111111111'
var wmtranid = 0
var tranid = 89
var wminvid = 0
var orderid = 0
var datestart = '20020409 00:00:00'
var datefinish = '20020412 00:00:00'
var reqwmid = '111111111111'
var signstr // only for 'classic'
var reqn = (new Date()).valueOf()
if ('classic'== AuthorizeType)
{
var planstr = purse+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 += ' '+purse+''
s += ' '+wmtranid+''
s += ' '+tranid+''
s += ' '+wminvid+''
s += ' '+orderid+''
s += ' '+datestart+''
s += ' '+datefinish+''
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)
if (0==retcode)
{
// successful
}
}
catch(e)
{
Response.Write('error:'+(new Number(e.number)).toString(16)+' \r\n')
Response.Write('desc:'+e.description+'\r\n')
}
%>
|
 |
|
|
|
|
|
|
|
|
|
|
|
|
|