var resultCode
var bankCheck
var rrn
var mHash


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

oleObject.clear()

oleObject.SParam("CardType", 136)
oleObject.SParam("SkipEjectCard", 1)
resCode = oleObject.NFun(5002)

mVas = oleObject.GParamString("VAS")
mHash = oleObject.GParamString("HASH")
mPan = oleObject.GParamString("ClientCard")
resultCheck = "ERRCODE: " + resCode + "\r\n" + "HASH: " + mHash + "\r\n" + "PAN: " + mPan + "\r\n" + "VAS:" + "\r\n" + mVas + "\r\n"
showTextInNotepad(resultCheck)

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)
}