<% Response.Buffer = True '========================================= 'This code is copyright (c) Internet Business Solutions SL, all rights reserved. 'The contents of this file are protect under law as the intellectual property 'of Internet Business Solutions SL. Any use, reproduction, disclosure or copying 'of any kind without the express and written permission of Internet Business 'Solutions SL is forbidden. 'Author: Vince Reid, vince@virtualred.net %> <% if storesessionvalue="" then storesessionvalue="virtualstore" if Session("loggedon") <> storesessionvalue OR disallowlogin=TRUE then response.redirect "login.asp" isprinter=false %> Email Popup "" then response.write " onload=""updateopener()"""%>>  
<% Set rs = Server.CreateObject("ADODB.RecordSet") Set rs2 = Server.CreateObject("ADODB.RecordSet") Set cnn=Server.CreateObject("ADODB.Connection") cnn.open sDSN if request.form("posted")="1" then alreadygotadmin = getadminsettings() Call do_order_success(request.form("id"),emailAddr,FALSE,FALSE,request.form("customer")="1",request.form("affiliate")="1",request.form("manufacturer")="1") %>

<%=yyOpSuc%>

<%=xxClsWin%>

<% elseif request.form("posted")="2" then ordID = replace(request.form("oid"),"'","") alreadygotadmin = getadminsettings() sSQL = "SELECT ordTransID,ordPayProvider,ordAuthNumber,payProvData1,payProvData2,payProvDemo FROM orders INNER JOIN payprovider ON orders.ordPayProvider=payprovider.payProvID WHERE ordID=" & ordID rs.Open sSQL,cnn,0,1 transid=rs("ordTransID") authcode=rs("ordAuthNumber") if InStr(authcode,"-") > 0 then authcode = Right(authcode,Len(authcode)-InStr(authcode,"-")) login = rs("payProvData1") trankey = rs("payProvData2") if secretword<>"" then login = upsdecode(login, secretword) trankey = upsdecode(trankey, secretword) end if demomode=(Int(rs("payProvDemo"))=1) rs.Close parmList = "x_version=3.1&x_delim_data=True&x_relay_response=False&x_delim_char=|" parmList = parmList & "&x_login="&login parmList = parmList & "&x_tran_key="&trankey parmList = parmList & "&x_trans_id="&transid parmList = parmList & "&x_auth_code="&authcode parmList = parmList & "&x_type=PRIOR_AUTH_CAPTURE" if demomode then parmList = parmList & "&x_test_request=TRUE" ' response.write "paramlist is
" & replace(parmList,"&","
") & "
" & vbCrLf response.write " 

Processing. Please wait...

" response.flush set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") objHttp.open "POST", "https://secure.authorize.net/gateway/transact.dll", false objHttp.Send parmList if err.number <> 0 OR objHttp.status <> 200 Then errormsg = "Error, couldn't connect to Authorize.net server" else varString = Split(objHttp.responseText, "|") ' response.write "The response is " & objHttp.responseText & "
" vsRESULT=varString(0) vsRESPMSG=varString(3) success=FALSE if Int(vsRESULT)=1 then success=TRUE vsRESPMSG=yyOpSuc if capturedordstatus<>"" then sSQL="UPDATE orders SET ordStatus=" & capturedordstatus & " WHERE ordID=" & ordID cnn.Execute(sSQL) end if end if end if set objHttp = nothing %>

<%=vsRESPMSG%>

<%=xxClsWin%>

<% elseif request.querystring("id")<>"" then %> ">
<%=yySendFo%>
<%=yyCusto%>:
<%=yyAffili%>:
<%=yyManDes%>:
<% elseif request.querystring("oid")<>"" then %>  
">
Capture funds for order id <%=request.querystring("oid")%>
 
<% elseif request.querystring("prod")<>"" then id = request.querystring("index") sSQL = "SELECT "&getlangid("pName",1)&",pPrice FROM products WHERE pID='"&replace(request.querystring("prod"),"'","''")&"'" rs.Open sSQL,cnn,0,1 if rs.EOF then prodname="Not Found" prodprice=0 else prodname=rs(getlangid("pName",1)) prodprice=rs("pPrice") end if rs.Close response.write ""&prodname&"" response.write ""&prodprice&"" %> <% sSQL = "SELECT poOptionGroup,optType,optFlags FROM prodoptions INNER JOIN optiongroup ON optiongroup.optGrpID=prodoptions.poOptionGroup WHERE poProdID='"&replace(request.querystring("prod"),"'","''")&"' ORDER BY poID" prodoptions = "" rs.Open sSQL,cnn,0,1 if NOT rs.EOF then prodoptions=rs.getrows else response.write "-" end if rs.Close if IsArray(prodoptions) then response.write "" for rowcounter=0 to UBOUND(prodoptions,2) index=0 sSQL="SELECT optID,"&getlangid("optName",32)&","&getlangid("optGrpName",16)&","&OWSP&"optPriceDiff,optType,optFlags,optStock,optPriceDiff AS optDims FROM options INNER JOIN optiongroup ON options.optGroup=optiongroup.optGrpID WHERE optGroup="&prodoptions(0,rowcounter)&" ORDER BY optID" rs2.Open sSQL,cnn,0,1 if NOT rs2.EOF then if Abs(Int(rs2("optType")))=3 then response.write "" else response.write "" end if end if rs2.Close next response.write "
"&rs2(getlangid("optGrpName",16))&": " response.write "" response.write "
"&rs2(getlangid("optGrpName",16))&":
" end if %>
<% end if cnn.Close %>