// Signio.s Copyright (C) Desiderata Software 2000 // // This file may be used and/or altered as necessary // as long as it is being used to work with // Desiderata Software's "Winductor" product. // // The file is being provided AS IS // // Interface to SIGNIO (http://www.signio.com/) // credit-card service. // Module globals. DllHandle signioLib := LoadLibrary( "C:\Signio\Win32\lib\PFPro.dll" ); // From "Windows NT" platform SDK String signioHost := "test.signio.com"; // Change to "connect.signio.com" for going live! int signioPort := 443; String signioParams[String]; String signioResults[String]; // SignioSet is called to set parameters to // be sent to Signio. Proc SignioSet( String param, String value ); signioParams[ param ] := value; EndProc; // After all necessary parameters have // been set, SignioCharge is called to // transmit the charge to Signio. Proc SignioCharge() : bool; // Build parameter list. String param; String paramlist := ""; String result; for param in ArrayIndices( signioParams ) do if paramlist != "" then paramlist := paramlist + "&"; endif; paramlist := paramlist + param + "=" + signioParams[param]; endfor; CallFunction( signioLib, "PNInit" ); CallFunction( signioLib, "ProcessPNTransaction", signioHost, signioPort, "", // Proxy host 0, // Proxy port "", // Proxy login "", // Proxy password paramList, Length( paramList ), 30, // Timeout, GetBuffer( result, 512 )); CallFunction( signioLib, "PNCleanup" ); // Parse result String token, value; for token in Tokens( result, "&" ) do if MatchString( token, "*=*", param, value ) then signioResults[ param ] := value; endif; endfor; return signioResults[ "RESULT" ] = "0"; EndProc; // After SignioCharge has been called, // SignioGet can be called to obtain // the various returned parameters. Proc SignioGet( String param ) : String; return signioResults[ param ]; EndProc;