Payment Gateway Integration
Posted: Thu Nov 22, 2012 12:40 pm
Hi There,
I'm trying to integrate the BLC with one of the payment gateway, zaakpay.com (not currently supported by Broadleaf). This integration requires me to post checkout data along with some more data like merchant id and secret key provided by the Payment Gateway Company to the payment gateway.
Where i'm stuggling is in getting the submit button of checkout page (labeled as "Complete Order") to redirect to posttozaakpay.jsp(provided by the Zaakpay in the integration kit at https://www.zaakpay.com/Zaakpay_JSP_Kit.zip). This jsp file actually redirects to the payment gateway site to process the payment as onload action. here is the content of the file:
Can some one help me in redirecting to this jsp, after hitting the Complete Order on the https://127.0.0.1:8443/checkout/ page. in current demo site, i get this button to take me to https://127.0.0.1:8443/checkout/complete in the URL, but the page remains unchanged.
Any help is greatly appreciated.
Thanks,
Rajnish
I'm trying to integrate the BLC with one of the payment gateway, zaakpay.com (not currently supported by Broadleaf). This integration requires me to post checkout data along with some more data like merchant id and secret key provided by the Payment Gateway Company to the payment gateway.
Where i'm stuggling is in getting the submit button of checkout page (labeled as "Complete Order") to redirect to posttozaakpay.jsp(provided by the Zaakpay in the integration kit at https://www.zaakpay.com/Zaakpay_JSP_Kit.zip). This jsp file actually redirects to the payment gateway site to process the payment as onload action. here is the content of the file:
Code: Select all
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zaakpay for Scheme Central</title>
<script type="text/javascript">
function submitForm(){
var form = document.forms[0];
form.submit();
}
</script>
</head>
<body onload="javascript:submitForm()">
<center>
<table width="500px;">
<tr>
<td align="center" valign="middle">
Please wait we are redirecting you to the payment gateway.....<br />
Do Not Refresh or Press Back</td>
</tr>
<tr>
<td align="center" valign="middle">
<form action="https://api.zaakpay.com/transact" method="post">
<%
Enumeration paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String param = (String)paramNames.nextElement();
if ("returnUrl".equals(param)) {
%>
<input type="hidden" name="<%=param%>" value="<%=ParamSanitizer.SanitizeURLParam(request.getParameter(param))%>" />
<%
} else {
%>
<input type="hidden" name="<%=param%>" value="<%=ParamSanitizer.sanitizeParam(request.getParameter(param))%>" />
<%
}
}
%>
<input type="hidden" name="checksum" value="<%=request.getAttribute("checksum")%>" />
</form>
</td>
</tr>
</table>
</center>
</body>
</html>
Can some one help me in redirecting to this jsp, after hitting the Complete Order on the https://127.0.0.1:8443/checkout/ page. in current demo site, i get this button to take me to https://127.0.0.1:8443/checkout/complete in the URL, but the page remains unchanged.
Any help is greatly appreciated.
Thanks,
Rajnish