ASP‎ > ‎

Using a Chase Paymentech Hosted Pay Page

We had to build a website that uses a hosted pay page from Chase Paymentech.    Here are the 3 html pages you have to have to make it work.

This code works on both Chase Tampa and Chase Salem platforms.   However, the Chase Tampa platform does not support electronic checks (see the "ECP" code below).   So you would have to take that out if you were on Chase Tampa.



CONTENTS OF SUBMITFORM.asp

<html>
<head>
<body>
<form name="form1" method="post" action="https://www.chasepaymentechhostedpay-var.com/securepayments/a1/cc_collection.php"> 
<input type="hidden" name="hostedSecureID" value="cpt92278343432155SB"/>
<input type="hidden" name="content_template_url" value="https://yourwebsite.com/submitformtemplate.asp" />
<input type="hidden" name="return_url" value="https://yourwebsite.com/submitformreturn.asp" /> 
<input type="hidden" name="cancel_url" value="https://yourwebsite.com/submitform.asp" /> 
<input type="hidden" name="trans_type" value="auth_capture" /> 
<input type="hidden" name="payment_type" value="Credit_Card|ECP" />
<input type="hidden" name="allowed_types" value="Visa|MasterCard|American Express|Discover|JCB|ECP" />
<p style='text-align:center'> <label>Payment Amount: <input type="text" disabled name="total_amt" id="total_amt" size="10" value="<%=total%>" /> </label> </p> 
<p style='text-align:center'> <label> <input type="submit" class="myButton" name="submit" value="Pay Now" /> </label> </p> 
<label id="error"></label>
</form>
</body>
</html>


CONTENTS OF SUBMITFORMRETURN.ASP

<html>
<head>
<%
Dim code
code = request.querystring("code")
Dim ApprovalCode
ApprovalCode = request.querystring("ApprovalCode")
Dim error
error = request.querystring("error")
Dim message
message = request.querystring("message")
Dim transactionid
transactionid=request.querystring("ProcTxnID")
Dim AVSMatch
AVSMatch=request.querystring("AVSMatch")
Dim CVVMatch
CVVMatch=request.querystring("CVVMatch")
%>
</head>
<body>
<div>
Return page
<% 
response.write "code is" & code  & "<br>"
response.write "error is" & error  & "<br>"
response.write "message is" & message  & "<br>"
response.write "approval code is : " & ApprovalCode & "<br>"
response.write "transaction id is : " & transactionid & "<br>"
response.write "AVS match is : " & AVSMatch & "<br>"
response.write "CVV match is : " & CVVMatch & "<br>"
%>
</div>
</body>
</html>


CONTENTS OF SUBMITFORMTEMPLATE.ASP


<html>
<head>
<style type="text/css"> 
-U{ text-decoration:none; }
 TABLE TD{  padding-left:15px; } 
 .main{ color:black; font-family:Arial, Helvetica, sans-serif; width:95%; } 
 .main a{ color:blue; text-decoration:none; } 
 .main a:hover{ text-decoration:underline; } 
 .main H2{ color:red; } 
 .main input, .main select { border:2px solid #CCC; background-color:#777; padding:3px; color:#FFF; font-weight:bold; } 
 .main select{ cursor:pointer; } 
 .main #submit{ border:none; cursor:pointer; }
     
</style>
</head>
<body>

[[FORM INSERT]]

</body>
</html>



Comments