<%@ LANGUAGE=vbscript %> <% ' NAME ' ==== ' SSL_DR.asp ' ' PURPOSE ' ======= ' Receive a Digital Receipt from the Payment Server; extract and return details. ' ' OUTPUTS ' ======= ' If no errors detected ' Receipt Details Sent to DRDetailsURL (via browser redirection) ' - SessionID ' - MerchantID ' - PurchaseAmount ' - Locale ' - ReceiptNo Receipt number - issued by Acquiring bank ' - TransactionNo ' - AcqResponseCode Acquirer Response Code ' - QSIResponseCode Summary of Acquirer Response Code ' Else ' ErrorCode Sent to sErrorPage (via browser redirection) ' Exception Returns Payment Client Exception (where generated) ' ' ErrorCode Values ' ================ ' 10 Payment Client has not initialised correctly. ' - Check the installation of the payment client. ' 11 Digital Receipt could not be decrypted ' ' 12 Digital Receipt has not created correctly. ' - No result. ' ' VARIABLES ' ========= ' objPayClient Payment Client object ' enDigitReceipt Encrypted Digital Receipt ' sDRDetailsURL Where to send the Digital Receipt details to ' sErrorPage Name of Error Handler ' nErrorCode Error Code number ' sException Payment Client Exception (where generated) ' ' ========================================================================== ' ' Initialisation ' ============== ' Define the error constants const No_Error = 0 const ERR_PayClient = 10 const ERR_Decrypt = 11 const ERR_No_Results = 12 const OK = 1 dim errmsg ' Define Error Handler sErrorPage = "/inc/commoninc/error.asp" ' Define module to receive Digital Receipt details sDRDetailsURL = "./regonlinepmtconf.asp" ' Initialise ErrorCode - set to No Errors nErrorCode = No_Error sException = "" ' Turn off default error checking, as any errors are explicitly handled on error resume next ' Stop the page being cached on the web server Response.Expires = 0 ' Retrieve Digital Order ' ====================== enDigitReceipt = Request.QueryString("RespCode") ' Get Digital Receipt details ' =========================== ' if no errors ... if nErrorCode = No_Error then ' Gather Digital Receipt variables and append to Digital Receipt Details URL sDRDetailsURL = sDRDetailsURL & _ "?SessionID=" & request.querystring("txnid") & _ "&strMessage=" & request.querystring("Message") & _ "&strAuthID="& request.querystring("AuthIdCode") & _ "&receiptno="& request.querystring("RRN") & _ "&TransactionNo="& Request.QueryString("ePGTxnID") & _ "&strData="&request("strData") & _ "&QSIResponseCode="& Request.QueryString("RespCode") ' 'response.write sDRDetailsURL 'response.end Response.Redirect sDRDetailsURL else ' Finished with the objPayClient object, so nullify it 'response.end DetermineError ' Pass control to the error handler sErrorPage = sErrorPage & "?errorno=" & errmsg & _ "§ion="&server.URLEncode ("Associate Member Registration") Response.Redirect sErrorPage end if Sub DetermineError() ' ' ErrorCode Values ' ================ ' 10 Payment Client has not initialised correctly. ' - Check the installation of the payment client. ' 11 Digital Order has not created correctly. ' - Check input parameters. Select Case nErrorCode Case "10" errmsg="PC1" Case "11" errmsg="PC2" Case "12" errmsg="PC3" Case Else errmsg="Payment Client Error unable to be determined." End Select End Sub %>