<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Welcome to sample.com</title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<script src="js/libFunctions.js" type="text/javascript"></script>
<style type="text/css">
.style2
{
width: 500px;
}
.style3
{
height: 13px;
text-align: left;
}
.style4
{
font-weight: bold;
font-size: 13pt;
height: 19px;
}
.style5
{
text-align: left;
}
.style6
{
height: 18px;
}
</style>
</head>
<body class="bodybg">
<form id="form1" method="post" name='frmTrans' action="https://www.ccavenue.com/servlet/new_txn.PaymentIntegration">
<div>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
<tr>
<td align="center">
<div class="t" style="width: 980px; text-align: center">
<div class="b">
<div class="l">
<div class="r">
<div class="bl">
<div class="br">
<div class="tl">
<div class="tr" align="center">
<table class="style2" cellpadding="3" cellspacing="3">
<tr>
<td class="style4" colspan="2">
Booking Details
</td>
</tr>
<tr>
<td class="style5">
Theater Name
</td>
<td align="left">
<asp:Label ID="lblTheaterName" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td class="style3">
Movie Name
</td>
<td class="style3">
<asp:Label ID="lblMovieName" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td class="style5">
Seats
</td>
<td align="left">
<asp:Label ID="lblSeats" runat="server" Text="" Style="text-align: left"></asp:Label>
</td>
</tr>
<tr>
<td class="style5">
Show Date
</td>
<td align="left">
<asp:Label ID="lblShowDate" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td class="style5">
Cost
</td>
<td align="left">
<asp:Label ID="lblCost" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle">
<input name='cardOption' value='netBanking' type="radio" />
<strong>Pay Using Your Internet Enabled Bank Account</strong>
</td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td class="style5" colspan="2">
<span><b>ATM-CUM-DEBIT CARD </b>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" value="CANVIS_N" onclick="checkcardoptionccavenue(this);"
type="radio">Canara Bank Debit Card</label> <label><input name="netBankingCards"
value="CBIDEB_N" onclick="checkcardoptionccavenue(this);" type="radio">Citibank
Debit Card</label>
<label>
<input name="netBankingCards" value="PNBVIS_N" onclick="checkcardoptionccavenue(this);"
type="radio">Punjab National Bank Debit Card</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" value="SBIDB_N" onclick="checkcardoptionccavenue(this);"
type="radio">State Bank of India Debit Card<input name="netBankingCards" value="UNIDB_N"
onclick="checkcardoptionccavenue(this);" type="radio">Union Bank of India
Debit Card</label></code>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
OR
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<b>INTERNET ENABLED BANK ACCOUNT</b>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="ABN_N1" />ABN AMRO Bank <label><input name="netBankingCards" value="UTI_N"
onclick="checkcardoptionccavenue(this);" type="radio">AXIS Bank</label>
<label>
<input name="netBankingCards" value="BOBCO_N" onclick="checkcardoptionccavenue(this);"
type="radio">Bank of Baroda Corporate Accounts</label></label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="BOB_N1" />Bank of Baroda Retail Accounts</label> <label><input name="netBankingCards"
value="BOI_N" onclick="checkcardoptionccavenue(this);" type="radio">Bank of India</label> <input
name="netBankingCards" value="BOM_N" onclick="checkcardoptionccavenue(this);"
type="radio">Bank of Maharashtra</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="BOR_N" />Bank of Rajasthan
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="CBIBAN_N" />Citibank Bank Account Online<input name="netBankingCards" onclick="checkcardoptionccavenue(this);"
type="radio" value="CITIUB_N" />City Union Bank</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="COP_N" />Corporation Bank<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="DEUNB_N" />Deutsche Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="FDEB_N" />Federal Bank</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="HDEB_N" />HDFC Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="ICPRF_N" />ICICI Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="IDBI_N" />IDBI Bank</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="NIIB_N" />IndusInd Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="JKB_N" />Jammu and Kashmir Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="KTKB_N" />Karnataka Bank</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="KVB_N" />Karur Vysya Bank<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="NKMB_N" />Kotak Mahindra Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="LVB_N" />Lakshmi Vilas Bank NetBanking</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="OBPRF_N" />Oriental Bank of Commerce<input name="netBankingCards" onclick="checkcardoptionccavenue(this);"
type="radio" value="PNBCO_N" />Punjab National Bank Corporate Accounts
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="NPNB_N" />Punjab National Bank Retail Accounts
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="SIB_N" />South Indian Bank<input name="netBankingCards" onclick="checkcardoptionccavenue(this);"
type="radio" value="SBI_N" />State Bank of India</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="SBT_N" />State Bank of Travancore
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="SYNBK_N" />Syndicate Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="UNI_N" />Union Bank of India</label>
</td>
</tr>
<tr>
<td class="style5" colspan="2">
<label>
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="VJYA_N" />Vijaya Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="YES_N" />YES Bank
<input name="netBankingCards" onclick="checkcardoptionccavenue(this);" type="radio"
value="BBK_N" />Bank of Bahrain & Kuwai</label>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="style6">
<input type="hidden" name="Merchant_Id" id="Merchant_Id" runat="server" />
<input type="hidden" name="Amount" id="Amount" runat="server" />
<input type="hidden" name="Order_Id" id="Order_Id" runat="server" />
<input type="hidden" name="Redirect_Url" class='formborder' id="Redirect_Url" runat="server">
<input type="hidden" name="billing_cust_name" id="billing_cust_name" runat="server" />
<input type="hidden" name="billing_cust_address" id="billing_cust_address" runat="server" />
<input type="hidden" name="billing_cust_city" id="billing_cust_city" runat="server" />
<input type="hidden" name="billing_cust_state" id="billing_cust_state" runat="server" />
<input type="hidden" name="billing_zip_code" id="billing_zip_code" runat="server" />
<input type="hidden" name="billing_cust_country" id="billing_cust_country" runat="server" />
<input type="hidden" name="billing_cust_tel" id="billing_cust_tel" runat="server" />
<input type="hidden" name="billing_cust_notes" id="billing_cust_notes" runat="server" />
<input type="hidden" name="billing_cust_email" id="billing_cust_email" runat="server" />
<input type="hidden" name="delivery_cust_name" id="delivery_cust_name" runat="server" />
<input type="hidden" name="delivery_cust_address" id="delivery_cust_address" runat="server" />
<input type="hidden" name="delivery_cust_city" id="delivery_cust_city" runat="server" />
<input type="hidden" name="delivery_cust_state" id="delivery_cust_state" runat="server" />
<input type="hidden" name="delivery_zip_code" id="delivery_zip_code" runat="server" />
<input type="hidden" name="delivery_cust_country" id="delivery_cust_country" runat="server" />
<input type="hidden" name="delivery_cust_tel" id="delivery_cust_tel" runat="server" />
</td>
</tr>
<tr>
<td>
</tr>
<tr>
<td colspan="2">
<input class="formborder"
postbackurl="~/https://www.ccavenue.com/servlet/new_txn.PaymentIntegration"
type="submit" value=" Pay Now! " /></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td class="footer_bg">
<uc2:footer ID="footer1" runat="server" />
</td>
</tr>
</table>
</div>
<div style="display: none">
<input type="hidden" name="Title" value="sample.com Payments" />
<!-- get user input -->
<table width="80%" align="center" border="0" cellpadding='0' cellspacing='0'>
<tr class="shade">
<td width="1%">
</td>
<td width="40%" align="right">
<strong><em>Virtual Payment Client URL: </em></strong>
</td>
<td width="59%">
<input type="text" name="virtualPaymentClientURL" size="63" value="https://migs.mastercard.com.au/vpcpay"
maxlength="250" />
</td>
</tr>
<tr>
<td colspan="3">
<hr width="75%">
</td>
</tr>
<tr class="title">
<td colspan="3" height="25">
<p>
<strong> Basic 3-Party Transaction Fields</strong></p>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>VPC Version: </em></strong>
</td>
<td>
<input type="text" name="vpc_Version" value="1" size="20" maxlength="8" />
</td>
</tr>
<tr class="shade">
<td>
</td>
<td align="right">
<strong><em>Command Type: </em></strong>
</td>
<td>
<input type="text" name="vpc_Command" value="pay" size="20" maxlength="16" />
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>Merchant AccessCode: </em></strong>
</td>
<td>
<input type="text" name="vpc_AccessCode" value="266FCC23" size="20" maxlength="8" />
</td>
</tr>
<tr class="shade">
<td>
</td>
<td align="right">
<strong><em>Merchant Transaction Reference: </em></strong>
</td>
<td>
<input type="text" name="vpc_MerchTxnRef" id="vpc_MerchTxnRef" runat="server" value="34534534"
size="20" maxlength="40" />
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>MerchantID: </em></strong>
</td>
<td>
<input type="text" name="vpc_Merchant" value="vamsisoft" size="20" maxlength="16" />
</td>
</tr>
<tr class="shade">
<td>
</td>
<td align="right">
<strong><em>Transaction OrderInfo: </em></strong>
</td>
<td>
<input type="text" name="vpc_OrderInfo" id="vpc_OrderInfo" runat="server" value="VPC Example"
size="20" maxlength="34" />
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>Purchase Amount: </em></strong>
</td>
<td>
<input type="text" name="vpc_Amount" id="vpc_Amount" value="100" size="20" maxlength="10"
runat="server" />
</td>
</tr>
<tr class="shade">
<td>
</td>
<td align="right">
<strong><em>Receipt ReturnURL: </em></strong>
</td>
<td>
<input type="text" name="vpc_ReturnURL" size="63" value="http://www.sample.com/sample.aspx"
maxlength="250" />
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>Payment Server Display Language Locale: </em></strong>
</td>
<td>
<input type="text" name="vpc_Locale" value="en" size="20" maxlength="5" />
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td colspan="2">
</td>
<td>
<input type="submit" name="SubButL" value="Pay Now!" />
</td>
</tr>
<tr>
<td colspan="3">
<hr width="75%">
</td>
</tr>
<tr class="title">
<td colspan="3">
<p>
<strong> Optional Supplementary Data Field</strong> <font size="1">(15 characters
alpha-numeric field)</font></p>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<strong><em>samplesampleNo: </em></strong>
</td>
<td>
<input type="text" name="vpc_TicketNo" maxlength="15" />
</td>
</tr>
<tr>
<td colspan="3">
<hr width="75%">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
/*lib.js for validations*/
<%@ page import = "java.sql.*, java.util.*, java.util.zip.*" %>
<%!
String verifyChecksum(String MerchantId , String OrderId, String Amount, String AuthDesc, String WorkingKey, String CheckSum) throws Exception {
String str = MerchantId+"|"+OrderId+"|"+Amount+"|"+AuthDesc+"|"+WorkingKey;
Adler32 adl = new Adler32();
adl.update(str.getBytes());
long adler = adl.getValue();
String newChecksum = String.valueOf(adl.getValue());
return (newChecksum.equals(CheckSum)) ? "true" : "false";
}
String getChecksum(String MerchantId, String OrderId, String Amount, String redirectUrl, String WorkingKey) throws Exception {
String str = MerchantId + "|" + OrderId + "|" + Amount + "|" + redirectUrl + "|" + WorkingKey;
Adler32 adl = new Adler32();
adl.update(str.getBytes());
return String.valueOf(adl.getValue());
}
%>
/*end lib*/
.cs code
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ticketdada;
public partial class payNow : System.Web.UI.Page
{
dada d = new dada();
cTicket oTicket = new cTicket();
protected void Page_Load(object sender, EventArgs e)
{
Session["Kinnera"] = "";
d = (dada)Session["user"];
if (Session["BId"] != null)
{
oTicket.getTicketDetails(Convert.ToInt32(Session["Bid"].ToString()));
lblTheaterName.Text = oTicket.TheaterName;
lblMovieName.Text = oTicket.moviename;
lblShowDate.Text = oTicket.ShowTime;
lblSeats.Text = oTicket.seats;
lblCost.Text = Session["Cost"].ToString();
//vpc_Amount.Value = Convert.ToInt32( Convert.ToDecimal(Session["Cost"].ToString()) * 100).ToString();
//vpc_MerchTxnRef.Value = Session["Bid"].ToString();
//vpc_OrderInfo.Value = oTicket.MobileNo + " " + oTicket.CodeId.ToString();
Merchant_Id.Value ="M_AAFdsdsdTTS_11906";
Amount.Value = "1.00";
Order_Id.Value = "OId" + Session["Bid"].ToString();
Redirect_Url.Value = "http://localhost:4183/ticketdada/tickets1.aspx";
billing_cust_name.Value = "billing_cust_name";
billing_cust_address.Value = "billing_cust_address";
billing_cust_city.Value = "billing_cust_city";
billing_cust_state.Value = "billing_cust_state";
billing_zip_code.Value = "500082";
billing_cust_country.Value = "billing_cust_country";
billing_cust_tel.Value = "1234567890";
billing_cust_notes.Value = "ticktes booking";
billing_cust_email.Value = "test@tktdada.com";
delivery_cust_name.Value = "delivery_cust_name";
delivery_cust_address.Value = "delivery_cust_address";
delivery_cust_city.Value = "delivery_cust_city";
delivery_cust_state.Value = "delivery_cust_state";
delivery_zip_code.Value = "500082";
delivery_cust_country.Value = "delivery_cust_country";
delivery_cust_tel.Value = "1234567890";
// oTicket.BookccTicket(oTicket.TicketId, true,oTicket.aseats,Session["smss"].ToString());
}
else
Response.Redirect("index.aspx");
try
{
if (Page.Request.QueryString["id"].Length > 0 && Page.Request.QueryString["id"].Length>0)
{
oTicket.getTicketDetails(Convert.ToInt32(Page.Request.QueryString["id"].ToString()));
lblTheaterName.Text = oTicket.TheaterName;
lblMovieName.Text = oTicket.moviename;
lblShowDate.Text = oTicket.ShowTime;
lblSeats.Text = oTicket.seats;
lblCost.Text = Page.Request.QueryString["cost"].ToString();//Session["Cost"].ToString();
//vpc_Amount.Value = "100";//Convert.ToInt32( Convert.ToDecimal(Session["Cost"].ToString()) * 100).ToString();
//vpc_MerchTxnRef.Value = Page.Request.QueryString["id"].ToString();
//vpc_OrderInfo.Value = oTicket.MobileNo + " " + oTicket.CodeId.ToString();
//Session["Source"]="Kinnera";
Merchant_Id.Value = Page.Request.QueryString["id"].ToString();
Amount.Value = "1.00";
Order_Id.Value = oTicket.MobileNo + " " + oTicket.CodeId.ToString();
Redirect_Url.Value = "tickets1.aspx";
billing_cust_name.Value = "vamsi";
billing_cust_address.Value = "hyd";
billing_cust_city.Value = "abcd";
billing_cust_state.Value = "a.p";
billing_zip_code.Value = "500082";
billing_cust_country.Value = "india";
billing_cust_tel.Value = "9290901070";
billing_cust_notes.Value = "ticktes booking";
billing_cust_email.Value = "vamsi@varmasoft.com";
delivery_cust_name.Value = "ticketdada";
delivery_cust_address.Value = "ticketdada";
delivery_cust_city.Value = "abcd";
delivery_cust_state.Value = "a.p";
delivery_zip_code.Value = "500082";
delivery_cust_country.Value = "india";
delivery_cust_tel.Value = "9290901070";
}
}
catch (Exception ex)
{
// Response.Redirect("index.aspx");
}
}
/* protected void btnPayNow_Click(object sender, EventArgs e)
{
Merchant_Id.Value = "M_AAFsdsdTTS_11906";
Amount.Value = "1.00";
Order_Id.Value = "kbs12sd";
Redirect_Url.Value = "tickets1.aspx";
billing_cust_name.Value = "vamsi";
billing_cust_address.Value = "hyd";
billing_cust_city.Value = "abcd";
billing_cust_state.Value = "a.p";
billing_zip_code.Value = "500082";
billing_cust_country.Value = "india";
billing_cust_tel.Value = "9290901070";
billing_cust_notes.Value = "ticktes booking";
billing_cust_email.Value = "vamsi@varmasoft.com";
delivery_cust_name.Value = "ticketdada";
delivery_cust_address.Value = "ticketdada";
delivery_cust_city.Value = "abcd";
delivery_cust_state.Value = "a.p";
delivery_zip_code.Value = "500082";
delivery_cust_country.Value = "india";
delivery_cust_tel.Value = "9290901070";
//Response.Redirect("https://www.ccavenue.com/servlet/new_txn.PaymentIntegration");
//Response.Redirect("tickets1.aspx");
Session.Timeout = 20;
}*/
}
Hey can you please share code.
ReplyDeleteThanks,
rev
please put de complete example. we are new for payment getway
Deletethanks in advance...