var mRecordID
var resCode
var RecRRN
var RecClientCard
var RecCardName
var RecHash
var RecAmount

//======================Укажите номер операции==============================//
mRecordID = 2
//==========================================================================//


oleObject = new ActiveXObject("SBRFSRV.Server")
ws = WScript.CreateObject('WScript.Shell')

oleObject.clear()
oleObject.SParam("RecordID", mRecordID)
resCode = oleObject.NFun(7006)

RecRRN = oleObject.GParamString("RRN")
RecClientCard = oleObject.GParamString("ClientCard")
RecCardName = oleObject.GParamString("CardName")
RecHash = oleObject.GParamString("HASH")
RecAmount = oleObject.GParamString("Amount")

oleObject.SParam("RRN", RecRRN)
oleObject.SParam("ClientCard", RecClientCard)
oleObject.SParam("CardName", RecCardName)
oleObject.SParam("INHASH", RecHash)
oleObject.SParam("Amount", RecAmount)
resCode = oleObject.NFun(4002)
oleObject.clear()


function showTextInNotepad(text){
filename = (new Date()).valueOf() + "UPOS_check.txt"
fso = WScript.CreateObject('Scripting.FileSystemObject')
file = fso.CreateTextFile(filename)
file.Write(text)
file.Close()
WScript.CreateObject('WScript.Shell').Run("notepad " + filename)
WScript.Sleep(2000)
fso.DeleteFile(filename)
}