<%@ Language=VBScript %> <%'*************************************************************** ' * This is an ASP sample of pre-payment control dynamic page that can ' * be called before the payment by the Ogone Payment server. ' * This is delivered as is, without any guaranty, and should be installed and ' * adapted to merchant's specific e-Commerce application requirements ' * At least all the database names, userid, password, table names, field names ' * should be changed. ' **************************************************************** orderid = request("orderid") Set so_DB = Server.CreateObject("ADODB.Connection") 'so_DB.Open "mydatabase","userid","password" so_DB.Open string ' string for connection if (len(orderid) > 0) then ' If orderid is not defined as numeric, quotes should be added SQLQuery = "SELECT TOTALAMOUNT, CURENCY, STATUS FROM PAYMENT" SQLQuery = SQLQuery & " WHERE orderid = " & orderid Set rs0_orders = so_DB.Execute(SQLQuery) '***************************************************************** '* test if record exists and status is unpaid but completed : '* adapt to your unpaid status and use strcomp function if status is not numeric '***************************************************************** if rs0_orders.EOF then%> > <%elseif (StrComp(rs0_orders("STATUS"),"not completed")=0) then%> > <%elseif (StrComp(rs0_orders("STATUS"),"paid")=0) then%> > <%else amount=rs0_orders("TOTALAMOUNT") * 100%> " amount="%=amount%>" currency="<%=rs0_orders("CURENCY")%>"> <%end if%> <%else%> '***************************************************************** '* Nor orderid received '***************************************************************** <%end if%>