Colorized Source Code
<%
'----------------------------------------
' Generation of Hash Code for New Transaction web service
'----------------------------------------
Dim crypto
Dim PlainData
Dim HashCode
Dim CommerceID
Dim RetailerKey
Dim BookID
Dim RetailerTrans Dim RetailerUserID
CommerceID = "MyCommerceID" ' remplace this string by your CommerceID
RetailerKey= "Mykeyaaa" ' replace this string by your retailer private key
BookID = "6716" RetailerTrans = "125" 'replace this by the purchase transaction ID in your system
RetailerUserID = "75860"
'Step 1. make the Plain DATA string
CommerceID+RetailerUserID+BookId+RetailerTrans
PlainData = CommerceID & RetailerUserID & BookID & RetailerTrans
'Step 2. encode the Plain DATA string
Set crypto = Server.CreateObject("MobiSecureClient.CryptoUrl")
crypto.setKey(RetailerKey)
HashCode = crypto.Encode(PlainData)
set crypto = nothing
%>
|