[Seaside] Interaction with non-Seaside site

Nevin Pratt nevin at smalltalkpro.com
Thu Jul 17 11:40:04 CEST 2003


  Derek,

My "server-to-server" scheme looks like it would work.  Here's sample 
code for my IonGate gateway (but with 'mymerchantloginname' replaced 
with the actual name for me):

    | args resultStream |
    args _ Dictionary new.
    args at: 'login' put: #('mymerchantloginname' );
         at: 'amount' put: #('1.50' );
         at: 'CardType' put: #('VISA' );
         at: 'cardnum' put: #('4111111111111111' );
         at: 'Expires' put: #('1104' );
         at: 'Cardname' put: #( 'NEVIN PRATT');
         at: 'Address' put: #('3734 SOUTH 800 WEST' );
         at: 'City' put: #('BOUNTIFUL' );
         at: 'State' put: #('UT' );
         at: 'ZIP' put: #( '84010' );
         at: 'Country' put: #('USA' );
         at: 'Phone' put: #('801-992-3137' );
         at: 'Email' put: #('nevin at smalltalkpro.com' );
         at: 'Invoiceno' put: #('1529' );
         at: 'Description' put: #('ITEMS 225 2x226' );
         at: 'receipturl' put: #('DISPLAY' );
         at: 'returnallerrors' put: #('YES' );
         yourself.
    resultStream _ HTTPClient httpPostDocument: 
'http://secure.iongate.com/iongate.asp' args: args.
    resultStream inspect.
   
With the above code, the 'resultStream' returns a MIMEDocument.  The 
MIMEDocument has a 'content' ivar value that contains a string.  I look 
for a line in that string beginning with RESPONSECODE=.  The value after 
the equals ('=') should be AA.  If it is anything else, I next look for 
a line in that string beginning with AUTHRESPONSE=.  The text that 
follows the AUTHRESPONSE is the reason the card charge was declined.

For the above actual code sample, but with my own 'merchantloginname', I 
get the following for those values:

RESPONSECODE=ND
AUTHRESPONSE=INVALID CARD

That is what I expected, since the card number in the sample code above 
is obviously wrong.

Another thing I discovered (through trial and error) is that for my 
IonGate gateway, the field names mentioned in the code are *case 
sensitive*!!!  For example, 'ZIP' works, but 'Zip' does not work, 
'Cardname' works, but 'CARDNAME' does not work, etc.

Anyway, for you, something very similar to the above should work.  But, 
now the problem:

The above sample code has
   http://secure.iongate.com/iongate.asp
instead of
   https://secure.iongate.com/iongate.asp

I'm sure you can see the issue there :-)  I use (and have configured) 
'Stunnel' as an SSL server, but the above code requires an SSL client to 
connect to IonGate's SSL server.  Thus, Stunnel needs to be configured 
to be usable as both an SSL client *and* an SSL server (or else I need 
some other SSL client mechanism, or else I need to go with API #2 from 
my previous email and use the SSL client capabilities of the customer's 
browser).

I've not yet resolved that issue.

Nevin

-- 
Nevin Pratt
Bountiful Baby
http://www.bountifulbaby.com
(801) 992-3137





More information about the Seaside mailing list