Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript compilation error (syntax)

Status
Not open for further replies.

DeborahA

Technical User
Jun 13, 2000
20
0
0
CA
www.waterbedandfuton.com
<br>Hi everyone,<br><br>First off I'd like to say thank you for the past help.<br>This forum has been a very valuable tool, for an otherwise difficult situation.<br><br>I have had to add an unsupported Creditcard processor to my confirm.asp page. <br><br>I'm getting a vbscript compilation error 800a0401<br>expected end of statement<br>Ssl/confirm.asp line 250<br>Else TransMethod = &quot;PayWay&quot; and PAYMENT_METHOD = <br>&quot;CREDIT&quot; Then Call PayWayProc<br>---------^<br><br>This happens when I try to order from my site which is live.<br><br>Here is a portion of how the script looks and the processor I added was PayWay.<br><br>Elself TransMethod = &quot;PCAuthorize&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then Call PCAuthProc<br>Elself TransMethod = &quot;CyberCash&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then Call CyberCashProc<br>Elself TransMethod = &quot;PaymentNet&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then Call PaymentNetProc<br>Else TransMethod = &quot;PayWay&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then Call PayWayProc<br><br>End If<br><br>(there is an opening If and the problem seems to be with<br>the condition Then&nbsp;&nbsp;&nbsp;where the PayWay processor line is.)<br>I'm wondering if using Then with Else is not acceptable?<br>I beating my head against my monitor here..lol<br><br>Thanks again and all the help is appreciated! Debbs<br><br>
 
<br>Hello,<br><br>I've changed Else to Elself for the PayWay TransMethod.<br><br>I'm still getting the error message and the error line<br>-----------------------------^&nbsp;&nbsp;&nbsp;Ends at Then for the PayWay processor.<br><br>What the heck am I doing wrong?<br>Nothing has been added or changed on the page except my adding the PayWay line.......I'm stumped. :)<br><br>Thanks all..Debbs
 
Try this<br>If some condition then<br>&nbsp;do something<br>Elself TransMethod = &quot;PCAuthorize&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then <br>&nbsp;&nbsp;Call PCAuthProc<br>Elself TransMethod = &quot;CyberCash&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then <br>&nbsp;&nbsp;Call CyberCashProc<br>Elself TransMethod = &quot;PaymentNet&quot; and PAYMENT_METHOD = &quot;CREDIT&quot; Then <br>&nbsp;&nbsp;Call PaymentNetProc<br>Else <br>Call PayWayProc<br><br>End If<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top