Calling
the AJAX XML Background Servlet
One of the biggest problems encounted when using AJAX (XMLDOM)
is the cross site (domain) scripting problem - Firefox in
particular will not allow it. This will always be a problem
if you intend to never leave your site, but want to process
the payment on our site. We have solved this problem for
you by providing a unique solution involving a combination
of XMLDOC and Javascript procesing on our server. The following
example illustrates this.
We have a demonstration page here,
which you can see the power of background AJAX processing.
You can also create your own page using this example for
testing, or contact us for
more example code.
-----------CUT HERE -----------------------------------------------------------------
<HTML><h1>Example SCNet Payment Servlet AJAX
Call</h1>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<script src="https://www.scnet.com.au/ipayby/psjs.js"></script>
<script>
function returnXML(xmldoc) {
alert("ReceiptNo " + xmldoc.getElementsByTagName('RECEIPTNO')[0].firstChild.data
+ "\nResponseCode " + xmldoc.getElementsByTagName('RESPONSECODE')[0].firstChild.data
+ "\nResponseText " + xmldoc.getElementsByTagName('RESPONSETEXT')[0].firstChild.data
+ "\nAmount " + xmldoc.getElementsByTagName('AMOUNT')[0].firstChild.data
+ "\nRRN " + xmldoc.getElementsByTagName('RRN')[0].firstChild.data
+ "\nSettlement_date " + xmldoc.getElementsByTagName('SETTLEMENT_DATE')[0].firstChild.data
+ "\nAuthID " + xmldoc.getElementsByTagName('AUTHID')[0].firstChild.data
+ "\nType " + xmldoc.getElementsByTagName('TYPE')[0].firstChild.data
+ "\nXID " + xmldoc.getElementsByTagName('XID')[0].firstChild.data
);
}
</script>
</head>
<body>
<input type="button" value="Click"
onClick="doPayment('amount=30.00&ccnumber=4444333322221111&ccexpiry=0807&cccvc=666&adminemail=you@some.com.au');">
</body>
</HTML>
-----------CUT HERE -----------------------------------------------------------------
|