%
'**********************************************************
' 2Checkout.com gateway specific code
'***********************************************************
' Change these
const MERCHANTID="74732" ' Store Id from 2checkout.com
const DEMOTEST="False" ' for production set to "False"
'
' 2checkout requires result URL to be specified in their admin system
' This must be set to
' http://www.yoursite.com/shopping/2checkoutresult.asp
const gatewaylocation="https://www.2checkout.com/cgi-bin/buyers/cartpurchase.2c"
'
Sub PerformGateway
setsess "currenturl","2checkoutshopcheckout.asp"
Response.Write("
Press to pay by Credit Card.
")
Response.write "
<%
End sub
'
Sub GetDatabaseFields
Dim Dbc,orders
Dim StrSql
dim epsname
OpenOrderdb dbc ' Open the database
strsql = "select * from orders where orderid=" & oid
Set Orders = dbc.execute(strsql)
Amount=Orders("Orderamount")
amount=formatnumber(amount,2)
amount=replace(amount,",","")
epsname = orders("ofirstname") & " " & orders("olastname")
DoField "total", amount
DoField "card_holder_name", epsname
DoField "street_address", orders("oaddress")
DoField "city", orders("ocity")
dofield "state", orders("ostate")
dofield "zip",orders("opostcode")
dofield "email",orders("oemail")
dofield "country",orders("ocountry")
dofield "phone",orders("ophone")
Closerecordset Orders
ShopCloseDatabase dbc
end sub
'
Sub DoField (fieldname,fieldvalue)
if fieldvalue="" or isNull(fieldvalue) then
exit sub
end if
Response.write ""
end sub
%>