[thelist] Interfacing an unknown com object from ASP (long)

Cookstour cookie at yoyo.org
Tue Aug 20 09:21:01 CDT 2002


Hi gurus!

I wonder if anyone can help me with the following. We are working with a
company who (for political reasons!) have been chosen to be our supplier of
credit card authorisation services. The company have a technology that is
generally used in cash register systems and they have a couple of clients
who have interfaced their technology to perform web based card transactions.

The company have now produced a com object as a layer to their server
software which I can use from my ASP pages. The com object is produced in
Delphi. I have been able to get the card to register a correct test purchase
by using something like the following:

 set objKort = Server.CreateObject("comXXXXX.comX") ' OK - not the real name

 intCardCheck objKort.CardCheck ( 1, "1", 20, "4552xxxxxxxxxxxx", 50, 5,
0,"" ,"" ,"" ,"" ,"" )

This gives me a return value of 0 which their API tells me indicates a
correct transaction. The problem is that the last 5 empty values I am
passing are supposed to be return values. The API says that the CardCheck
function takes a certain number of values and returns a certain number of
values. However I would normally do something like:

 objKort.CardDetails = "4552xxxxxxxxxxxx" ' Card number
 objKort.Amount = 50
...etc
 objKort.CardCheck()

and then use something like

 Response.Write objKort.Message

to read the return values.

Their programmer says that in Delphi he would pass all the values as I
demonstrated in the first example and pass pointers for the return values.
I've never heard of doing this in ASP. The programmer, for the record, has
never worked with ASP before!

Am I missing something? Is there another way of using a com object in ASP
than I have mentioned above? Has anyone else come across a problem like this
before? What am I missing to get at the return values?

I hope someone has seen something like this before...

.steve

-------------------------------
http://www.cookstour.org
-------------------------------







More information about the thelist mailing list