Forum Moderators: open

Message Too Old, No Replies

Problems with Linkpoint ASP script

800a03f2 error on "Public Class PREAUTH"

         

beniro

7:18 pm on Nov 28, 2006 (gmt 0)

10+ Year Member



Hello, all. I'm implementing LinkPoint API on my site, but I have an error coming up in their code, and I'm wondering if anyone could give me any guidance on this one.

Here is the specific error:


Microsoft VBScript compilation error 800a03f2

Expected identifier

/fsboms/newuser.asp, line 141

Private Class PREAUTH
--------^

Aaargh! It's such a simple line! Here's the actual code:


Public Class PREAUTH
Inherits LinkPointTxn_Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If IsPostBack Then
' Parse form data
ParseFormData()
' process order
ProcessOrder()
End If

End Sub

Private Sub ProcessOrder()

' create order
Dim op As LinkPointTransaction.LPOrderPart
Dim order As LinkPointTransaction.LPOrderPart

order = LinkPointTransaction.LPOrderFactory.createOrderPar t("order")
' create a part we will use to build the order
op = LinkPointTransaction.LPOrderFactory.createOrderPar t()

' Build 'orderoptions'
' For a test, set result to GOOD, DECLINE, or DUPLICATE
op.put("result", "GOOD")
op.put("ordertype", "PREAUTH")
' add 'orderoptions to order
order.addPart("orderoptions", op)

' Build 'merchantinfo'
op.clear()
op.put("configfile", configfile)
' add 'merchantinfo to order
order.addPart("merchantinfo", op)

' Build 'creditcard'
op.clear()
op.put("cardnumber", cardnumber)
op.put("cardexpmonth", expmonth)
op.put("cardexpyear", expyear)
' add 'creditcard to order
order.addPart("creditcard", op)

' Build 'billing'
op.clear()
op.put("addrnum", baddrnum)
op.put("zip", bzip)
' add 'billing to order
order.addPart("billing", op)

' Build 'payment'
op.clear()
op.put("chargetotal", total)
' add 'payment to order
order.addPart("payment", op)

' create transaction object
LPTxn = New LinkPointTransaction.LinkPointTxn()

' get outgoing XML from 'order' object
Dim outXml As String = order.toXML()

' Call LPTxn
Dim resp As String = LPTxn.send(keyfile, host, port, outXml)

'Store transaction data on Session and redirect
Session("outXml") = outXml
Session("resp") = resp
Server.Transfer("status.aspx")
End Sub

End Class

Hmmm...I don't know how to solve that. Any assistance would be greatly appreciated.

Thanks very much.

TheNige

12:43 am on Nov 29, 2006 (gmt 0)

10+ Year Member



The code that you pasted is VB.Net. The file name and error code that you show is from "Classic ASP" and the VBScript compiler.

Did you copy and paste their code into your file? You'll need to convert their code to old ASP or change your code to VB.Net and run it in an ASPX extension page.

beniro

9:12 pm on Dec 4, 2006 (gmt 0)

10+ Year Member



That was the problem. Thanks.