I have been trying to modify my code so it checks for each payment type before the processing card.
I am doing the processing with the code below:
This is not working so far.
I am getting this error:
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
process.asp, line 120, column 31
If (Request.Form("paymentm") = 'MC' OR Request.Form("paymentm") = 'Disc' OR Request.Form("paymentm") = 'Visa') AND (Request.Form("cardno") = "" OR len(Request.Form("cardno")) < 16 ) Then
Thanks in advance for your assistance
I am doing the processing with the code below:
Code:
If (Request.Form("paymentm") = 'MC' OR Request.Form("paymentm") = 'Disc' OR Request.Form("paymentm") = 'Visa') AND (Request.Form("cardno") = "" OR len(Request.Form("cardno")) < 16 ) Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("Mastercard or Visa or Discover cards must be 16 digits.")
Elseif (Request.Form("paymentm") = 'AmEx') AND (Request.Form("cardno") = "" OR len(Request.Form("cardno")) < 15 ) Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("American Express card must be 15 digits.")
Elseif (Request.Form("paymentm") = 'Diners') AND (Request.Form("cardno") = "" OR len(Request.Form("cardno")) < 14 ) Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("Diners club card must be 14 digits.")
Elseif Request.Form("cardname") = "" OR len(Request.Form("cardname")) <=6 Then
Response.Redirect "checkout.asp?msg=" & Server.URLEncode ("Please fill in a correct credit card name.")
End if
I am getting this error:
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
process.asp, line 120, column 31
If (Request.Form("paymentm") = 'MC' OR Request.Form("paymentm") = 'Disc' OR Request.Form("paymentm") = 'Visa') AND (Request.Form("cardno") = "" OR len(Request.Form("cardno")) < 16 ) Then
Thanks in advance for your assistance