Subversion Repositories SmartDukaan

Rev

Rev 2159 | Rev 2199 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2159 Rev 2163
Line -... Line 1...
-
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
<HTML>
2
<html>
2
<HEAD>
3
<head>
3
<TITLE>Saholic.com: Redirecting to EBS Payment Page</TITLE>
4
	<title>Saholic.com: Redirecting to EBS Payment Page</title>
4
</HEAD>
5
</head>
5
<script language="JavaScript">
-
 
6
function validate(){
-
 
7
	
-
 
8
	var frm = document.frmTransaction;
-
 
9
	var optFields = Array('description[delivery_address_2]','description[delivery_state]','description[delivery_telephone]','description[delivery_fax]', 'description[billing_address_2]','description[billing_state]', 'description[billing_telephone]','description[billing_fax]');
6
<body>
10
	var aName = Array();
-
 
11
	aName['account_id'] = 'Account ID';
-
 
12
	aName['reference_no'] = 'Reference No';
-
 
13
	aName['description'] = 'Description';
-
 
14
	aName['name'] = 'First Name';
-
 
15
	aName['name_2'] = 'Last Name';
-
 
16
	aName['address'] = 'Address 1';
-
 
17
	aName['city'] = 'City';
-
 
18
	aName['state'] = 'State';
-
 
19
	aName['postal_code'] = 'Post Code';
-
 
20
	aName['country'] = 'Country';
-
 
21
	aName['email'] = 'Email';
-
 
22
 
-
 
23
	for(var i = 0; i < frm.elements.length ; i++){
-
 
24
		
-
 
25
		if(!optFields.inArray(frm.elements[i].name)){
-
 
26
			if(frm.elements[i].value.length == 0){
-
 
27
				alert("Invalid input for " + aName[frm.elements[i].name]);
-
 
28
				frm.elements[i].focus();
-
 
29
				return false;
-
 
30
			}
-
 
31
			
-
 
32
			if(frm.elements[i].name == 'email]'){
-
 
33
				if(!validateEmail(frm.elements[i].value)){
-
 
34
					alert("Invalid input for " + aName[frm.elements[i].name]);
7
    <div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
35
					frm.elements[i].focus();
-
 
36
					return false;
-
 
37
				}		
-
 
38
			}
-
 
39
			if(frm.elements[i].name == 'reference_no]'){
-
 
40
				var d = new Date();
-
 
41
				frm.elements[i].value = d.getTime();
-
 
42
			}
-
 
43
		}
-
 
44
	}  
-
 
45
	return true;
-
 
46
}
-
 
47
function validateEmail(email) {
-
 
48
    //Validating the email field
8
	<div align="center" class="img">
49
    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-
 
50
	//"
-
 
51
    if (! email.match(re)) {
-
 
52
        return (false);
-
 
53
    }
-
 
54
    return(true);
-
 
55
}
-
 
56
 
-
 
57
 
-
 
58
Array.prototype.inArray = function (value)
-
 
59
// Returns true if the passed value is found in the
-
 
60
// array.  Returns false if it is not.
-
 
61
{
-
 
62
    var i;
-
 
63
    for (i=0; i < this.length; i++) {
-
 
64
        // Matches identical (===), not just similar (==).
9
		<img title="loading" alt="loading" src="/images/loading.gif">
65
        if (this[i] === value) {
-
 
66
            return true;
-
 
67
        }
-
 
68
    }
-
 
69
    return false;
-
 
70
};
-
 
71
 
-
 
72
</script>
10
	</div>
73
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
-
 
74
	<div style="display:none">
11
	<div style="display:none">
75
	 <form  method="post" action="https://secure.ebs.in/pg/ma/sale/pay/" name="frmTransaction" id="frmTransaction" onSubmit="return validate()">	 
12
		<form  method="post" action="https://secure.ebs.in/pg/ma/sale/pay/" name="frmTransaction" id="frmTransaction" onSubmit="return validate()">	 
76
           <!-- Account Id -->
13
           <!-- Account Id -->
77
           <input name="account_id" type="hidden" value="$action.getAccountId()" />
14
           <input name="account_id" type="hidden" value="$action.getAccountId()" />
78
 
15
 
79
           <!-- Transaction Details -->
16
           <!-- Transaction Details -->
80
           <input name="reference_no" type="hidden" value="$action.getId()" />
17
           <input name="reference_no" type="hidden" value="$action.getId()" />