Hello,

I'm integrating the CyberSource credit card processing gateway into an
Ultracart II shopping cart from Joe Scavitto. Everything with the cart is
working and functioning(sometimes thats a feat in itself). The gateway code (an
include file) has security hashes and code that it inserts into the
form(additional hidden fields for authentication purposes). I want to call this
jscript function which resides in the include file, from the context of a form
on an asp page.

The server is IIS 6 and my pages are ASP/VBScript on the server. The functions
in the include file are jscript. The user manual for the gateway just calls the
function by name. When I try that I get this error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'InsertSignature'

/ClientsStore/ssl/confirmation.asp, line 391


InsertSignature is the function I'm trying to run. Here is a snippet of that
function:

function InsertSignature(amount)
{
var time = timestamp();
var merchantID = getMerchantID();
var data = merchantID + "" + amount + "" + time;
var pub = getPublicKey();
var pvt = getPrivateKey();
var pub_hash = hopHash(data, pub);
var pvt_hash = hopHash(data, pvt);

Now then, whoever wrote that code at Cybersource is assuming that my server
runs javascript as its server script language and therefore it works on their
systems( they are running jsp pages ). I can't use a trigger like onclick or
onsubmit - because that function adds fields to the form itself.

How can I call this witrhout an error in my form on my page?

Thanks.


Hello,

I'm integrating the CyberSource credit card processing gateway into an
Ultracart II shopping cart from Joe Scavitto. Everything with the cart is
working and functioning(sometimes thats a feat in itself). The gateway code (an
include file) has security hashes and code that it inserts into the
form(additional hidden fields for authentication purposes). I want to call this
jscript function which resides in the include file, from the context of a form
on an asp page.

The server is IIS 6 and my pages are ASP/VBScript on the server. The functions
in the include file are jscript. The user manual for the gateway just calls the
function by name. When I try that I get this error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'InsertSignature'

/ClientsStore/ssl/confirmation.asp, line 391


InsertSignature is the function I'm trying to run. Here is a snippet of that
function:

function InsertSignature(amount)
{
var time = timestamp();
var merchantID = getMerchantID();
var data = merchantID + "" + amount + "" + time;
var pub = getPublicKey();
var pvt = getPrivateKey();
var pub_hash = hopHash(data, pub);
var pvt_hash = hopHash(data, pvt);

Response.Write('\n');
Response.Write('\n');
Response.Write('\n');
Response.Write('\n');
Response.Write('\n');
}



Now then, whoever wrote that code at Cybersource is assuming that my server
runs javascript as its server script language and therefore it works on their
systems( they are running jsp pages ). I can't use a trigger like onclick or
onsubmit - because that function adds fields to the form itself.

How can I call this witrhout an error in my form on my page?

Thanks.



function InsertSignature(amount)
{
var time = timestamp();
var merchantID = getMerchantID();
var data = merchantID + "" + amount + "" + time;
var pub = getPublicKey();
var pvt = getPrivateKey();
var pub_hash = hopHash(data, pub);
var pvt_hash = hopHash(data, pvt);

alert('The amount passed in was: ' + amount ) ;

Response.Write('<input type="hidden" name="amount" value="' + amount +
'">\n');
Response.Write('<input type="hidden" name="orderPage_timestamp" value="' +
time + '">\n');
Response.Write('<input type="hidden" name="merchantID" value="' + merchantID
+ '">\n');
Response.Write('<input type="hidden" name="orderPage_signaturePublic"
value="' + pub_hash + '">\n');
Response.Write('<input type="hidden" name="orderPage_signaturePrivate"
value="' + pvt_hash +'">\n');
}