这是我的页面的代码,无论何时我想先付款
msxml3.dll错误' 80070005'
访问被拒绝
但付款已完成,之后如果我再次尝试,则会显示付款成功,错误在127行。
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/wea-admin/includes/common.asp" -->
<%
uid = request.querystring("q")
if uid="" then uid = request.form("uid")
if request.form() <> "" then
For each item in Request.Form
If Left(item,1)<>"_" then
execute(item &"= Request.Form("""&item&""")")
end if
next
valid = true
set rs = conn.execute("select ifnull(sum(price_quote),0) as charge from quotes where parent_id = '"&parent_id&"' and paid=0")
if cdbl(rs("charge")) = cdbl(request.form("charge")) then 'were good to go, lets charge
On Error Resume Next
submited = 1
cc_number = request.form("_cc_number")
cc_exp = request.form("_cc_exp")
cc_cvn = request.form("_cc_cvn")
first_name = request.form("_first_name")
last_name = request.form("_last_name")
notes = request.form("notes")
Dim post_url
post_url = "https://secure.authorize.net/gateway/transact.dll"
Dim objXML, post_response, response_array
Dim post_values
Set post_values = Server.CreateObject("Scripting.Dictionary")
post_values.CompareMode = vbTextCompare
'live
x_login = "xxxxxxxxxxx"
x_tran_key = "xxxxxxxxxxx"
post_values.Add "x_login", x_login
post_values.Add "x_tran_key", x_tran_key
post_values.Add "x_delim_data", "TRUE"
post_values.Add "x_delim_char", "|"
post_values.Add "x_relay_response", "FALSE"
if request.form("charge") = 0.01 then post_values.Add "x_test_request", "TRUE"
post_values.Add "x_invoice_num", id
post_values.Add "x_email", email
post_values.Add "x_type", "AUTH_CAPTURE"
post_values.Add "x_method", "CC"
post_values.Add "x_card_num", cc_number
post_values.Add "x_exp_date", cc_exp
post_values.Add "x_card_code", cc_cvn
post_values.Add "x_amount", request.form("charge")
post_values.Add "x_description", itemdesc
post_values.Add "x_first_name", request.form("_first_name")
post_values.Add "x_last_name", request.form("_last_name")
post_values.Add "x_address", request.form("_address")
post_values.Add "x_state", request.form("_state")
post_values.Add "x_city", request.form("_city")
post_values.Add "x_zip", request.form("_zip")
post_values.Add "x_ship_to_address", request.form("_address")
post_values.Add "x_ship_to_state", request.form("_state")
post_values.Add "x_ship_to_city", request.form("_city")
post_values.Add "x_ship_to_zip", request.form("_zip")
Dim post_string
post_string = ""
For Each Key In post_values
post_string=post_string & Key & "=" & Server.URLEncode(post_values(Key)) & "&"
Next
post_string = Left(post_string,Len(post_string)-1)
' We use xmlHTTP to submit the input values and record the response
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
objXML.open "POST", post_url, false
objXML.send post_string
post_response = objXML.responseText
Set xml = nothing
'response.write post_response
If err.number <> 0 then
returncode = "Error:"
returnmsg = "An error occured and system administrator has been informed. A representative will contact you to complete your order."
Call SendEmail("xxxxxxxxxxxxx@hotmail.com",site_short(session("site_id"))&" Error",Err.number & "<br>" &Err.Description & "<br>" & Err.Source & "<br>" & post_response ,senderEmail,senderName,priority)
else
' the response string is broken into an array using the specified delimiting character
response_array = split(post_response, post_values("x_delim_char"), -1)
counter = 0
For Each value in response_array
dump = dump & mindigits(counter,2) &" - " & value & vbCrLf
counter = counter + 1
Next
' the results are output to the screen in the form of an html numbered list.
dim respcode(4)
respcode(1) = "Approved"
respcode(2) = "Declined"
respcode(3) = "Error"
respcode(4) = "Held for Review"
if response_array(0)=1 then success = true
returncode = respcode(response_array(0))
returnmsg = response_array(3)
tprice = 0
if cint(0&response_array(0)) = 1 then tprice = response_array(9)
conn.execute("insert into authorizenet (order_id,amount,authcode,response,notes,stamp) values ('"&parent_id&"','"& tprice &"','"&response_array(4)&"','"&prepstring(dump)&"','"&prepstring(notes)&"',now())")
end if 'end no error
On error goto 0
if success then
conn.execute("update quotes set paid=1,txn_id='"&response_array(4)&"' where parent_id='"&parent_id&"'")
if session("ass_affiliate_id") <> "" then conn.execute("update affiliates set quote_id='"&parent_id&"' where id='"&session("ass_affiliate_id")&"'")
'INSERT LINE ITEMS
Select Case charge
case 275
Call AddOrderItem(parent_id,"FINV",1)
case 350
Call AddOrderItem(parent_id,"FINM",1)
case 650
Call AddOrderItem(parent_id,"FINM1000",1)
case 1025
Call AddOrderItem(parent_id,"FINM2500",1)
case 1450
Call AddOrderItem(parent_id,"FINM5000",1)
case 1875
Call AddOrderItem(parent_id,"FINM7500",1)
End Select
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.open "POST", "http://www.farmersmarketinsurenow.com/paypal.asp?uid="&request.form("parentuid"), false
objXML.send 'post_string
post_response = objXML.responseText
Set xml = nothing
'update renwal
if session("renewal_id")<>"" then
conn.execute("update quotes set sqft='"&parent_id&"' where id='"& session("renewal_id")&"';")
session("renewal_id")=""
end if
'if market quote with ref then create an affiliate for this market with association parent
set rs =conn.execute("select quotes.*,affiliates.id as aid from quotes left join affiliates on referer=affiliates.uid where quotes.id='"&parent_id&"' and qtype='2' and referer != ''")
if not rs.EOF then
conn.execute("insert into affiliates (id, parent_id, expiration_date, site_id, atype, uid, password, quote_id, biz_name, biz_address, biz_url, contact_name, contact_phone, contact_email) values (null,'"&rs("aid")&"','"&year(rs("eventend"))&"-"&month(rs("eventend"))&"-"&day(rs("eventend"))&"',3,3,UUID(),left(UUID(),8),'"&parent_id&"', '"&prepstring(rs("bizname"))&"', '"&prepstring(rs("address"))&" "&prepstring(rs("city"))&" "&prepstring(rs("state"))&" "&prepstring(rs("country"))&"', '"&prepstring(rs("website"))&"', '"&prepstring(rs("contact_name"))&"', '"&prepstring(rs("phone"))&"', '"&prepstring(rs("email"))&"' )")
'send Toolkit email - Market joining association email
set ss=conn.execute("select * from affiliates where id=last_insert_id()")
if not ss.EOF then
HTMLmessage = readfile("/inc/toolkit_to_fmiaamarket.html")
HTMLmessage = replace(HTMLmessage,"[email]",ss("contact_email"))
HTMLmessage = replace(HTMLmessage,"[password]",ss("password"))
call SendEmail(ss("contact_email"),"FarmersMarketInsureNow - Toolkit Information",HTMLmessage,senderEmail,senderName,priority)
end if
end if
response.redirect "/order_completed.asp"
end if
else
'double charge attempt
Call SendEmail("xxxxxxxxxxxxxx@hotmail.com",site_short(session("site_id"))&" Error Double Charge attempt", "cert#: " & parent_id & "<br>Charge:" & rs("charge") ,senderEmail,senderName,priority)
if cdbl(rs("charge")) = 0 then response.redirect "/order_completed.asp"
returncode = "Error:"
returnmsg = "An error occured processing your order, you may try again or contact us to complete your order."
success = false
end if
end if
if uid <> "" then
set rs = conn.execute("select * from quotes where paid=0 and uid='"&prepString(uid)&"'")
if rs.EOF then
response.redirect("/")
else
For each item in rs.Fields
Execute(item.Name & "=rs(""" & item.Name & """)")
Next
end if
'Check for No Renew Flag
set rs = conn.execute("select id from quotes where site='" & session("site_id") & "' and email like '"&email&"' and no_renew=1;")
if not rs.eof then
conn.execute("update quotes set no_renew=1 where parent_id='"&parent_id&"'")
response.redirect("/we-need-to-contact-you/" & parent_id)
end if
set rs = conn.execute("select uid,quantity,price_quote from quotes where id = '"&parent_id&"'")
if not rs.EOF then
parentuid = rs("uid")
quantity = cint(rs("quantity"))
price_quote = rs("price_quote")
end if
For each item in Request.Form
If Left(item,1)<>"_" then
execute(item &"= Request.Form("""&item&""")")
end if
next
if paid=1 and qtype=2 and referer="183430b5-7469-102e-bbfe-72214c1dad0d" then
price_quote = "0"
bl_fmiaa=1
fmiaa_fee = 19.50
end if
else
response.redirect("/")
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/wea-template.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=meta_title%></title>
<meta name="keywords" content="<%=meta_keywords%>" />
<meta name="description" content="<%=meta_description%>" />
<meta name="robots" content="index,follow" />
<link rel="stylesheet" type="text/css" href="/inc/style.css" />
<link rel="stylesheet" type="text/css" href="/toolkit/toolkit.css" />
<script type="text/javascript" src="/wea-admin/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/wea-admin/js/tabs.js"></script>
<link rel="stylesheet" type="text/css" href="/wea-admin/css/tabs.css" />
<!-- InstanceBeginEditable name="head" -->
<script>
$(function(){
$("#paypal").submit(function(){
//$.get('/payment.asp');
$("#framed").attr("src","payment.asp")
});
$('#paymentform').submit(function(){
if (!$('#tc').attr('checked')){
alert('You must accept the term and conditions');
return false
}
$('#_checkoutsubmit').attr("disabled","disabled");
dimMessage("Processing Payment<br>Please Wait","");
});
});
function dimMessage(msg,strclass){
$('body').append('<div id="darken"></div>');
$('#darken').show();
$('body').append('<div id="qnav" class="'+strclass+'">' + msg + '</div>');
}
function dimMessageRemove(){
$('#darken').remove();
$('#qnav').remove();
}
</script>
<!-- InstanceEndEditable --><!-- InstanceParam name="bottom_left" type="boolean" value="true" --><!-- InstanceParam name="testimonials" type="boolean" value="false" --><!-- InstanceParam name="2cols" type="boolean" value="true" -->
<script src="/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5792418-5']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<%
'Toolkit Access
if session("affiliate_id") <> "" then response.write "<style type='text/css'>#menu{height:3px;}</style>"
response.write htmlinject
%>
<div id="container">
<div id="header">
<div id="topsocial">
<a href="https://www.facebook.com/FarmersMarketInsureNow" target="_blank"><img src="/images/Facebook_32.png" border="0" /></a><a href="http://www.linkedin.com/pub/pattie-hubbard/69/262/348" target="_blank"><img src="/images/linkedin_32.png" border="0" /></a><a href="https://twitter.com/FMInsureNow" target="_blank"><img src="/images/Twitter_32.png" border="0" /></a>
</div>
<div id="topLeft"><h1><a href="/"><span>farmermarketinsurenow.com</span></a></h1></div>
</div>
<div id="banner"><div id="slogan">
<h1>Welcome to FarmersMarketInsureNow</h1>
<p>Your Leading Source for Farmers Market Insurance.</p>
</div></div>
<div id="menu">
<%if session("affiliate_type") = "" then%>
<ul>
<li class="not"><a href="/">Home</a></li>
<li><a href="/toolkit/">Toolkit</a></li>
<li><a href="/faqs/">FAQ</a></li>
<li><a href="/contact-us/">Contact</a></li>
<li><a href="/about-us/">About Farmers market Insure Now</a></li>
<li><a href="/why-you-need-farmers-insurance/">Why do you need farmers market Insurance?</a></li>
<li><a href="/what-makes-us-different/">What Makes Us Different</a></li>
</ul>
<%end if%>
</div>
<div id="contain">
<div id="right"><div id="main"><!-- InstanceBeginEditable name="pageContent" -->
<h2>You Are Almost Finished With Your Transaction!</h2>
<div class="greyboxheader"><strong>Process Steps</strong></div>
<div class="greybox">
<ul class="checkoutsteps">
<li class="donestep">Your business information</li>
<li class="donestep">Certificate information</li>
<li class="currentstep">Checkout</li>
<li>Sending certificates to your email in PDF format</li>
</ul>
</div>
<div class="greyboxheader"><img src="/wea-admin/images/ico/cart.png" align="middle" /> <strong>Your Insurance Quote</strong></div>
<div class="greybox">
<table border="0" align="center" cellpadding="3" cellspacing="0" style="width:462px;margin:auto;">
<tr>
<td align="left" >Quantity</td>
<td width="100" align="right"><%=quantity%></td>
</tr>
<tr>
<td width="300" align="left">General Liability $1 Million / $2 Million:</td>
<td width="100" align="right" ><%=formatcurrency(price_quote)%></td>
</tr>
<%if bl_fmiaa then%>
<!--<tr>
<td width="300" align="left">FMIAA Subscription Fee:</td>
<td width="100" align="right" ><%=formatcurrency(fmiaa_fee,2)%></td>
</tr>-->
<%end if%>
<tr>
<td width="300" align="left"><strong style="color:#006600;">Total Policy Premium:</strong></td>
<td width="100" align="right"><strong style="font-size:130%;color:#006600;"><%=formatcurrency(price_quote+price_florida+price_entity)%></strong></td>
</tr>
<tr>
<td width="300" align="left" class="notes"><em>All fees and service charges are included.</em></td>
</tr>
</table>
</div>
<h1 id="payment">Process Step - Payment</h1>
<%if success then%>
<h3>Success</h3>
<p>Thank You, you order has been received. Your insurance will be delivered to you</p>
<%else%>
<h3 class="header">Credit Card Information</h3>
<%if returncode<>"" then%>
<p class="red"><%="<strong>"&returncode &"</strong> "& returnmsg%></p>
<%end if%>
<br />
<form id="paymentform" action="#payment" method="post" >
<p style="width:33%;float:left;">First Name<br /><input type="text" name="_first_name" id="first_name" value="<%=first_name%>"/></p>
<p style="width:33%;float:left;">Last Name<br /><input type="text" name="_last_name" id="last_name" value="<%=last_name%>"/></p>
<div class="clear"></div>
<p style="width:33%;float:left;">Card Number:<br><input type="text" name="_cc_number" id="cc_number" value="<%=cc_number%>" size="20"/></p>
<p style="width:33%;float:left;text-align:left">Expiration Date: <small>(MMYY)</small><br><input type="text" name="_cc_exp" id="cc_exp" value="<%=cc_exp%>" size="10"/></p>
<p style="width:33%;float:left;text-align:left">Security Code:<br><input type="text" name="_cc_cvn" id="cc_cvn" value="<%=cc_cvn%>" size="10"/></p>
<div class="clear"></div>
<h3 class="header">Billing Information</h3>
<p style="width:33%;float:left;">Address<br /><input type="text" name="_address" id="address" value="<%=address%>"/></p>
<p style="width:33%;float:left;text-align:left">City:<br /><input type="text" name="_city" id="city" value="<%=city%>"/></p>
<div class="clear"></div>
<p style="width:33%;float:left;text-align:left">ZipCode:<br /><input type="text" name="_zip" id="zip" value="<%=zip%>" size="10"/></p>
<p style="width:33%;float:left;text-align:left">State:<br /><select name="_state" id="state" class="required">
<%=db_dropdown("select abbreviation,name from wea_state WHERE isprovince=0 and abbreviation NOT IN ('PR') order by name ","name","abbreviation",state)%>
</select></p>
<div class="clear"></div>
<h3 class="header">Terms and Conditions</h3>
<div id="tandc">
<%=htmlContent(118)%>
</div>
<input type="checkbox" name="_t&c" id="tc" value="1" style="width:20px" /> I accept these terms and conditions
<div class="clear"></div>
<input type="hidden" name="id" value="<%=id%>" />
<input type="hidden" name="qtype" value="<%=qtype%>" />
<input type="hidden" name="uid" value="<%=uid%>" />
<input type="hidden" name="parent_id" value="<%=parent_id%>" />
<input type="hidden" name="parentuid" value="<%=parentuid%>" />
<input type="hidden" name="email" value="<%=email%>" />
<input type="hidden" id="charge" name="charge" value="<%=formatnumber(price_quote+price_florida+price_entity+fmiaa_fee,2)%>">
<br />
<p align="left"><button type="submit" id="_checkoutsubmit" name="_checkout" value="next" class="button"><span><span>Buy Now</span></span></button></p>
</form>
<%end if%>
<div class="clear"></div>
<!-- InstanceEndEditable -->
<div class="clear" style="height:10px;"></div>
</div>
</div>
<div id="left">
<!-- InstanceBeginEditable name="EditRegion3" -->
<div align="center">
<p> </p>
<div id="box">
<!-- (c) 2005, 2011. Authorize.Net is a registered trademark of CyberSource Corporation --> <div class="AuthorizeNetSeal" style="float:left;margin-left:10px;"> <script type="text/javascript" language="javascript">var ANS_customer_id="858a5ef3-cf41-43a7-8fe9-edba4c19fe83";</script> <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script> <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Credit Card Services</a> </div>
<div style="margin-top:7px;margin-left:30px;float:left;">
<a href="http://www.farmersmarketcoalition.org/" target="_blank"><img src="/images/btn_FMC_DkGreen.jpg" title="Proud Member of the Farmers Market Coalition" border="0" height="60" width="120" /></a>
</div>
<div class="clear"></div>
</div>
<!--<div class="AuthorizeNetSeal"> <script type="text/javascript" language="javascript">var ANS_customer_id="745e7a3a-a4b6-47f6-abd8-a593eaed918c";</script> <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script> <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Accept Credit Cards</a> </div>-->
</div>
<!-- InstanceEndEditable -->
</div>
<div id="fullwidth"><!-- InstanceBeginEditable name="fullwidth" --><!-- InstanceEndEditable --></div>
<div class="clear"></div>
<div id="footer">
<div id="line"></div>
<div id="copy">
<a href="/">Home</a> |
<a href="/faqs/">FAQ</a> |
<a href="/contact-us/">Contact</a> |
<a href="/about-us/">About Farmers Market Insure Now</a> |
<a href="/why-you-need-farmers-insurance/">Why Do You Need Farmers Market Insurance?</a> |
<a href="/what-makes-us-different/" class="not">What Makes Us Different</a> |
<a href="/articles/" class="not">Related Articles</a> |
<a href="/toolkit/" class="not">Toolkit Login</a>
<br />
<%
set rs = conn.execute("select seo_url,tag from wea_content where bl_keyword=1 and bl_active=1 and site_id='"&session("site_id")&"'")
separator = ""
do while not rs.EOF
response.write separator & "<a href='/"&rs("seo_url")&"/'>"&rs("tag")&"</a>"
separator = " | "
rs.movenext
loop
%>
</div>
</div>
<div id="section">Copyright© <%=year(now)%> Modern Insurance Concepts, Inc. Developed by <a href="http://www.webenaction.com/en/">WebEnAction!</a></div>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
<!--#include virtual="/wea-admin/includes/db_connection_close.asp" -->