OWU Friends Fund Online Payment Form
<%
If Request("cost1") = "" then
%>
Use this form to make payments and donations.
We accept Mastercard, Visa, AMEX, and Discover.
This is a secure system.
<%
Else
If request("FinalStatus") = "success" then
'record purchased items in database
Function IsoDate(dteDate)
If IsDate(dteDate) = True Then
DIM dteDay, dteMonth, dteYear
dteDay = Day(dteDate)
dteMonth = Month(dteDate)
dteYear = Year(dteDate)
IsoDate = dteYear &_
"-" & Right(Cstr(dteMonth + 100),2) &_
"-" & Right(Cstr(dteDay + 100),2)
Else
IsoDate = NULL
End If
End Function
Dim objConn, objRS, strConnection, strQ
Dim str_name, str_amount, str_desc, str_orderID
str_name = Trim(Request("card-name"))
str_amount = Trim(Request("cost1"))
str_desc = Trim(Request("description1"))
str_orderID = Trim(Request("orderID"))
Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "Data Source=delaware;"
strConnection = strConnection & "User ID=sa;Password=;"
objConn.Open strConnection
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = objConn
strQ = "SELECT * FROM Payments;"
objRS.CursorLocation = adUseServer
objRS.CursorType = adOpenKeyset
objRS.LockType = adLockOptimistic
objRS.Open strQ
objRS.Addnew
objRS("Name") = str_name
objRS("Amount") = str_amount
objRS("Description") = str_desc
objRS("OrderID") = str_orderID
objRS("Pay_Date") = IsoDate(Date)
objRS.Update
objRS.Close
objConn.close
Set objConn = Nothing
%>
Payment Received
Name: <%=str_name%>
Payment Amount: <%=str_amount%>
Payment Description: <%=str_desc%>
Order ID: <%=str_orderID%>
Please print this page for confirmation.
Thank you!
<%
Else
%>
There is a problem with your order.
Your credit card MAY HAVE BEEN declined.
Please contact OWU Friends for assistance.
<%
End If
End If
%>
|