India Online Pay enables you to use an API so that you can easily embed payment pages into your website. This kind of integration allows the buyer to proceed to the payment page without leaving the purchase tunnel. This document presents the technical aspects of the API mode. It should be noted that it does not replace the Hosted Payment Page Implementation guide. Using the API mode requires the merchant’s website to use the HTTPS protocol on all of its pages. iFrame based integration offers the easiest path to PCI Compliance. Since iFrame is as good as a separate browser window, your website is completely shielded away from releasing any sensitive card information.
iframe tag on the page where you would like to display the payment page (this page should correspond to the ‘Payment’ stage of your purchase journey).
<iframe name="nameFrame"
src="payment_form.php"
width="600" height="550" scrolling="no">
<form>tag
<form method="POST" action="https://indiaonlinepay.com/"
target="nameFrame"> ... </form>
https://indiaonlinepay.com/merchantcheckout/
https://indiaonlinepay.com/merchantcheckout/
<script type="text/javascript"
src="https://indiaonlinepay.com/merchantcheckout/js/zipcodehelp.js"></script><input type="button" value="submit" onclick="displayIframe()">
function displayIframe () {
var fname = document.getElementById("firstName").value;
var lname = document.getElementById("lastName").value;
var mno = document.getElementById("phoneNumber").value;
var email = document.getElementById("email").value;
var ad1 = document.getElementById("addressLine1").value;
var city = document.getElementById("city").value;
var pcode = document.getElementById("postalCode").value;
var state = document.getElementById("state").value;
var country = document.getElementById("country").value;
}
document.getElementById("iframeDisplay").innerHTML = "<iframe name='myiframe' src='https://indiaonlinepay.com/merchantcheckout/getmerchantcheckout?mId=HuLjNJIUUfI=RkZGRlZSVU1XTFBNTVdIWg==&sType=cMund8zvWyI=MQ==&pId=5JVJGNFLjOU=UEwyMDAxMzAyMA==&fName=" + fname + "&lName=" + lname + "&mNo=" + mno + "&email=" + email + "&add1=" + ad1 + "&city=" + city + "&pCode=" + pcode + "&state=" + state + "&country=" + country + "' height='1300' width='1080' frameborder='0' scrolling='no' align='middle'>";
mId="Merchant Identifier(Encrypted)"
sType="Service type = 1(Encrypted)"
fName="First name"
lName="Last Name"
mNo="Mobile number"
email="Email"
add1="Address"
city="City"
pCode="Pincode"
state="State"
country="Country"