Pay Flow Pro SDK test file (JAVA)

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 42622
interpreted = N
texte = **Warning: Involved Java and PayFlowPro question ahead** :-)Hi, I'm still having a heck of a time getting the PFP SDK working. This post is a bit envolved but I hoping some knowing person will take the time to help out.This is for use with the pure java download version. This should be the same test file for pretty much any of them.I am using the test file (below) and I have set (I think) all my specific perams.-----------start test file------------------- // Verisign, Inc. // http://www.verisign.com // See contact.txt for additional contact information// Verisign Payflow Pro Java Client import com.Verisign.payment.PFProAPI;class PFProJava { // Set defaults static String HostAddress = test-payflow.verisign.com; static Integer HostPort = Integer.decode(443); static String ParmList = TRXTYPE=A&TENDER=C&PARTNER=wfb&VENDOR=vrn481200420&USER=ouruser&PWD=ourpass&ACCT=4111111111111111&EXPDATE=0804&AMT=1.00; static Integer Timeout = Integer.decode(80); static String ProxyAddress = ; static Integer ProxyPort = Integer.decode(0); static String ProxyLogon = ; static String ProxyPassword = ; // Help system static void help() { System.out.println( Usage Error: \n ); System.out.println(pfpro ); System.out.println( host name 'test-payflow.verisign.com'); System.out.println( host port number '443'); System.out.println( parameter list 'ccNum=5105105105105105100&ccExpDate=1205&amount=1.23'); System.out.println( timeout(sec) - optional '30'); System.out.println( proxy name - optional 'proxy'); System.out.println( proxy port - optional '8080'); System.out.println( proxy logon name - optional 'admin'); System.out.println( proxy password - optional 'password'); } public static void main(String[] args) { PFProAPI pn = new PFProAPI(); // Check args, at least the first 3 must be there if (args.length < 3) { System.out.println( \nPFPRO + pn.Version() ); try { if ( args[0].equalsIgnoreCase(new String(-version)) ) { System.out.println(); return; } } catch (Exception e) { } help(); return; } // Place the arguments in the correct variables // Once we get an OutOfBounds exception, parsing will stop and the rest will // retain their default values. try { HostAddress = args[0]; HostPort = Integer.decode(args[1]); ParmList = args[2]; Timeout = Integer.decode(args[3]); ProxyAddress = args[4]; ProxyPort = Integer.decode(args[5]); ProxyLogon = args[6]; ProxyPassword = args[7]; } catch (Exception e) { } // Set the certificate path pn.SetCertPath(certs); // Call the client. pn.CreateContext(HostAddress, HostPort.intValue(), Timeout.intValue(), ProxyAddress, ProxyPort.intValue(), ProxyLogon, ProxyPassword); String rc = pn.SubmitTransaction(ParmList); System.out.println(rc); pn.DestroyContext(); } } -----------end test file------------------- I have compiled this to a .class file and ran it. I can't tell if it is working or not but I don't think it is. (I don't get back a result (0,1 etc..)I get: ------------start output------------------- PFPRO J305 Usage Error:pfpro host name 'test-payflow.verisign.com' host port number '443' parameter list 'ccNum=5105105105105105100&ccExpDate=1205&amount=1.23' timeout(sec) - optional '30' proxy name - optional 'proxy' proxy port - optional '8080' proxy logon name - optional 'admin' proxy password - optional 'password' ------------end output-------------------My questions: Can anyone tell if this was successful or not?If it was successful what do I need to do to get a back?Thanks, Donovan -- ------------------------------------------------------------------------ ------------------------------------------------------------------------<><> Donovan Brooke <><>->ï ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Pay Flow Pro SDK test file (JAVA) (Donovan 2002)
**Warning: Involved Java and PayFlowPro question ahead** :-)Hi, I'm still having a heck of a time getting the PFP SDK working. This post is a bit envolved but I hoping some knowing person will take the time to help out.This is for use with the pure java download version. This should be the same test file for pretty much any of them.I am using the test file (below) and I have set (I think) all my specific perams.-----------start test file------------------- // Verisign, Inc. // http://www.verisign.com // See contact.txt for additional contact information// Verisign Payflow Pro Java Client import com.Verisign.payment.PFProAPI;class PFProJava { // Set defaults static String HostAddress = test-payflow.verisign.com; static Integer HostPort = Integer.decode(443); static String ParmList = TRXTYPE=A&TENDER=C&PARTNER=wfb&VENDOR=vrn481200420&USER=ouruser&PWD=ourpass&ACCT=4111111111111111&EXPDATE=0804&AMT=1.00; static Integer Timeout = Integer.decode(80); static String ProxyAddress = ; static Integer ProxyPort = Integer.decode(0); static String ProxyLogon = ; static String ProxyPassword = ; // Help system static void help() { System.out.println( Usage Error: \n ); System.out.println(pfpro ); System.out.println( host name 'test-payflow.verisign.com'); System.out.println( host port number '443'); System.out.println( parameter list 'ccNum=5105105105105105100&ccExpDate=1205&amount=1.23'); System.out.println( timeout(sec) - optional '30'); System.out.println( proxy name - optional 'proxy'); System.out.println( proxy port - optional '8080'); System.out.println( proxy logon name - optional 'admin'); System.out.println( proxy password - optional 'password'); } public static void main(String[] args) { PFProAPI pn = new PFProAPI(); // Check args, at least the first 3 must be there if (args.length < 3) { System.out.println( \nPFPRO + pn.Version() ); try { if ( args[0].equalsIgnoreCase(new String(-version)) ) { System.out.println(); return; } } catch (Exception e) { } help(); return; } // Place the arguments in the correct variables // Once we get an OutOfBounds exception, parsing will stop and the rest will // retain their default values. try { HostAddress = args[0]; HostPort = Integer.decode(args[1]); ParmList = args[2]; Timeout = Integer.decode(args[3]); ProxyAddress = args[4]; ProxyPort = Integer.decode(args[5]); ProxyLogon = args[6]; ProxyPassword = args[7]; } catch (Exception e) { } // Set the certificate path pn.SetCertPath(certs); // Call the client. pn.CreateContext(HostAddress, HostPort.intValue(), Timeout.intValue(), ProxyAddress, ProxyPort.intValue(), ProxyLogon, ProxyPassword); String rc = pn.SubmitTransaction(ParmList); System.out.println(rc); pn.DestroyContext(); } } -----------end test file------------------- I have compiled this to a .class file and ran it. I can't tell if it is working or not but I don't think it is. (I don't get back a result (0,1 etc..)I get: ------------start output------------------- PFPRO J305 Usage Error:pfpro host name 'test-payflow.verisign.com' host port number '443' parameter list 'ccNum=5105105105105105100&ccExpDate=1205&amount=1.23' timeout(sec) - optional '30' proxy name - optional 'proxy' proxy port - optional '8080' proxy logon name - optional 'admin' proxy password - optional 'password' ------------end output-------------------My questions: Can anyone tell if this was successful or not?If it was successful what do I need to do to get a back?Thanks, Donovan -- ------------------------------------------------------------------------ ------------------------------------------------------------------------<><> Donovan Brooke <><>->ï ------------------------------------------------------------------------ ------------------------------------------------------------------------ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Donovan

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Where is f2? (1997) unsubscribe (2000) Listserver problem (1997) Location of Webcat site in folder hierarchy (1997) Multiple prices (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Help: sorting in found set. (2001) WC2.0 Memory Requirements (1997) More on EudoraPro Email (1998) Cookie Question (1999) WebCat2b15MacPlugin - [protect] (1997) WebCatalog 4.0.1 has been released! OSXS (2000) Formulas.db + Users.db (1997) [WebDNA] Ubuntu 14.04 LTS / Apache 2.4 (2014) Questions. (1998) FTP and [shell] (2003) Authenticate (1997) ups shipping based on weight (1999) Payment Processors (2005) SQL statements (2002)