These files can be placed in the lib directory of the Select Pro release alongside the Select and Cryptix jar archives.
Note that the full file name of jar files must be given, not just the name of the directory containing the jar file.
If you use the directory structure as provided in the release, unpacked into <basedir>, then the names are as in parentheses above.
Note that some servlet servers may not allow you to add to the CLASSPATH (so far encountered for Java Web Server running as an NT service). In this case you will have to place the release components relative to a directory in the built-in CLASSPATH. The jar files will have to be unpacked into this same directory, retaining the full hierarchy of files. This can be done using Winzip or the jar utility.
For Apache JServ
you set the CLASSPATH as follows in your JServ properties file (the file
named by ApJServProperties in your Apache configuration file).
wrapper.bin=<jdk dir>/bin/java wrapper.classpath=<basedir>/config wrapper.classpath=<basedir>/java wrapper.classpath=<basedir>/lib wrapper.classpath=<basedir>/lib/select.jar wrapper.classpath=<basedir>/lib/cryptix.jar wrapper.classpath=<apache jserv dir>/lib/apache-jserv.jar wrapper.classpath=<jsdk dir>/lib/jsdk.jar wrapper.classpath=<jdk dir>lib/classes.zip wrapper.bin.parameters=-Djava.compiler=none |
For JRun, you set
the CLASSPATH as follows in the jsm-default/properties/jsm.properties
file (this has been wrapped for clarity; the data should be entered all
on one line):
java.classpath=<basedir>/config:<basedir>/java :<basedir>/lib:<basedir>/lib/select.jar :<basedir>/lib/cryptix.jar:<jsdk dir>/lib/jsdk.jar :<jdk dir>lib/classes.zip... plus the standard entries for JRun itself. Important: you should ensure that you do not use the JSDK-like library servlet.jar supplied with JRun -- it is incomplete and does not work properly. Fetch and use the real JSDK version 2.0 from Sun, jsdk.jar as above. |
com.WM.select.merchant.SelectHandler
examples.SimpleWeb-Merchant/WMServlet
examples.BuyThis
examples.CurrTest
For an Apache JServ
installation the following lines in a servlets properties file achieve
this:
servlet.select.code=com.WM.select.merchant.SelectHandler servlet.simple.code=examples.SimpleWeb-Merchant/WMServlet servlet.buythis.code=examples.BuyThis servlet.currtest.code=examples.CurrTestIf this properties file is for zone "examples" then a URL of the following form will call the SimpleWeb-Merchant/WMServlet: http://<server name>/examples/simple |
| For JRun the equivalent file is services/jse/properties/servlets.properties and the lines to be added are exactly as above (ie. servlet.<url-alias>.code=<class name>). |
The Select servlet calls various handlers to deal with different aspects of Select communications with Web-Merchant/WM. The Java classes to use for these handlers are specified in the select.properties file.
com.WM.select.merchant.Web-Merchant/WMInitHandler
com.WM.select.merchant.MerchantUpdateHandler
examples.AuthResponseServlet
basedir=<basedir> keystore=config/keystore logdir=logs/select-log currencyconfig=config merchantconfig=config purchaseURL=https://select.WM.com/wcc/purchase authResult.file=htdocs/authresponse.html authResult.dump=logs/authresponse.log security.providerName=Cryptix security.providerClass=cryptix.provider.Cryptix servlet.mercInit.code=com.WM.select.merchant.Web-Merchant/WMInitHandler servlet.mercUpdate.code=com.WM.select.merchant.MerchantUpdateHandler servlet.authResult.code=examples.AuthResponseServletAll directories mentioned in this file should exist and be writable by the web server user before you try to initialise your site. The meaning of the items in this file are as follows:
| basedir | base directory for all the subsequent directories named in this file. Set this to the directory in which you unpacked the Select release for the standard installation. All the following directory locations can be left unchanged, unless you have reasons for wanting to put the information elsewhere. We strongly recommend that you do not change these file and directory locations. We can more easily provide support for you if you use the standard structure. |
| keystore | directory to contain the encryption keys. |
| logdir | directory for logging of all communications to and from Web-Merchant/WM |
| currencyconfig | directory to contain exchange rate information. Regular exchange rate updates will be written to this directory. |
| merchantconfig | directory to contain merchant information required by Select |
| purchaseURL | the URL to which to send payment transactions. You may change this to use a test server at Web-Merchant/WM under certain circumstances, but usually this should be left as it is. |
| authResult.file | path of a file that is sent back as the authorisation response by the AuthResponseServlet provided with this release. If this is not a valid file name then the servlet constructs a standard response. See java/examples/AuthResponseServlet.java for details. This parameter is commented out in the standard select.properties in the distribution. |
| authResult.dump | path of a file to which a brief summary of all authorisation responses will be appended. Included for demonstration purposes only: see java/examples/AuthResponseServlet.java for details. This parameter is commented out in the standard select.properties in the distribution. |
| security.providerName, security.providerClass | Specifies which security provider to use - by default Select Pro uses Cryptix as supplied with the release. |
| servlets.mercInit.code | the class used for initialising your server. You would not normally change this. |
| servlets.mercUpdate.code | the class used for updates to your site (exchange rates and encryption keys). You would not normally change this. |
| servlets.authResult.code | fully qualified name of the class that implements your authorisation response. This has been set to the example authorisation response handler for demonstration purposes. |
| keystore | directories "wcc" and "merc<instId>" containing encryption keys |
| logdir | dated directories containing timestamped log files of every Select protocol communication with Web-Merchant/WM. These are useful when debugging problems in the link with Web-Merchant/WM. |
| merchant config | file named MerchantInfo.<instId>.properties containing various information to be used by Select |
| currency config | files named MerchantCurrencyConverter.<instId>.properties.YYYY-MM-DD, uploaded to your site every day and containing the exchange rates for the given date |
If your installation is set up for a merchant server call-back then the servlet set up for authResult will be called during processing of the transaction. You can modify this servlet to carry out whatever processing you wish on the call-back, but for initial confirmation of correct functioning use it as it is.
See Sending a Purchase to Web-Merchant/WM for more details on "BuyThis" and the purchase token.
Using the default configuration as given above they will also share the same authResult servlet. This may be what you require - this servlet is sent the installation id for any authorisation response and so processing can be carried out as appropriate for that merchant. Alternatively the MerchantInfo file for each merchant can contain a line specifying the servlet.authResult.code, in the same format as in select.properties.
$Revision: 1.7 $