On This Page
Installing and Testing the Client
Minimum System Requirements
- This client is supported on the Windows 2000/XP/2003, Linux, and Solaris platforms.
- The minimum Java SDK supported are Oracle or IBM Java SDK 1.6 or later. Depending on the package that you choose, you also need one of these:
- For Oracle Java SDK versions earlier than 1.4.0, you need the Java Secure Socket Extension (JSSE) 1.0.3_02 or later (see http://java.sun.com/products/jsse).
- For IBM Java SDK, you need IBMJSEE 1.0.2 or later.
- Maven 3 or later.
- Unlimited Strength Jurisdiction Policy files from Oracle® (US_export_policy.jarandlocal_policy.jar), available at: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Transaction Security Keys
The first thing you must do is create your security key. The client uses the security key
to add a digital signature to every request that you send. This signature helps ensure that
no one else can use your
Cybersource
account to process orders. You specify the location of
your key when you configure the client.You must generate two transaction security keys—one for the
Cybersource
production environment and one for the test environment. For
information about generating and using security keys, see ).You must protect your security key to ensure that your
Cybersource
account is not compromised.Installing the Client
The Java SDK is available to install from GitHub: https://github.com/CyberSource/cybersource-sdk-java
Using a Package Manager
We recommend using the Maven Package Manager to install the Java SDK.
Install the JAVA SDK (Maven Package Manager)
- Add the dependency to your application pom.xml.
ADDITIONAL INFORMATION
<dependency> <groupId>com.cybersource</groupId> <artifactId>cybersource-sdk-java</artifactId> <version>6.0.1</version> </dependency> - Run mvn install.
Install the JAVA SDK (Gradle)
- Add the dependency to your build.gradle.
ADDITIONAL INFORMATION
dependencies { compile 'com.cybersource:cybersource-sdk-java:6.0.1' }
Install the Files Individually
The Java SDK jar file is available to download independently from GitHub: http://search.maven.org/remotecontent?filepath=com/cybersource/cybersource-sdk-java/6.0.1/cybersource-sdk-java-6.0.1.jar.
- Download the latest jar file. The current version iscybersource-sdk-java-6.0.1.jar.
- Save the jar file to an appropriate location.
- Import the com.cybersource.ws.client package.
Configuring Client Properties
The client requires certain properties to run transactions. The samples provided in the
<main directory>
/samples/nvp
and <main
directory>/samples/xml
folders read a file called
cybs.properties
into a Properties object which is passed to the
runTransaction() method. Configuration Properties describes the properties that you can set. Note that
the default cybs.properties
file that comes with the client package does
not include all of the properties listed in the table. It includes only the ones required
to run the sample.The client also includes additional property configuration capabilities. For example, you
can configure for multiple merchants or configure using system properties. For more
information, see Advanced
Configuration Information.
For Java SDK 1.4.x, the client sets the system properties
https.proxyHost
and https.proxyPort
to the values of the client properties
proxyHost
and proxyPort
. If these system properties
are defined beforehand, possibly by using the -D
option in the command
line, the system properties will take precedence.Property | Description |
|---|---|
merchantID | This client uses this value if you
do not specify a merchant ID in the request itself. This value is case
sensitive. |
keysDirectory | Location of the merchant’s
security keys. Although UNC paths are allowed, for faster request processing,
we recommend that you store your key locally. You must use forward slashes even
in a Windows environment (for example: c:/keys) . The client
includes a keys directory that you can use. |
sendToProduction | Flag that indicates whether the
transactions for this merchant should be sent to the production server. Use one
of these values:
|
targetAPIVersion | Version of the Simple Order API to
use, such as 1.18 . For the list of available versions, go to
https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor. For
transactions in India, go to https://ics2ws.in.ic3.com/commerce/1.x/transactionProcessor. Do not
set this property to the current version of the client. See Client Versions, for more
information. |
keyFilename | Name of the security key file name
in the format
< security_key_name> .p12 . |
serverURL | Alternative server URL to use. For
more information, see Using Alternate Server Properties. Give the complete URL because it
will be used exactly as specified here. |
namespaceURI | Alternative namespace URI to use.
Give the complete namespace URI because it will be used exactly as specified
here. For more information, see Using Alternate Server
Properties. |
enableLog | Flag directing the client to log
transactions and errors. Use one of these values:
|
logDirectory | Directory to which to write the log
file. UNC paths are allowed. You must use forward slashes even in a Windows
environment, for example: c:/logs . The client does not create
this directory; instead you must specify an existing directory. The client
includes a logs directory that you can use. |
logFilename | Log file name. The client uses
cybs.log by default. |
logMaximumSize | Maximum size in megabytes for the
log file. The default value is "10" . When the log file reaches
the specified size, it is archived into
cybs.log .<yyyymmddT hhmmssxxx> and a new
log file is started. The xxx indicates milliseconds. |
timeout | Ignore this property. Instead set a specific amount of
time that is acceptable to your business. Number of seconds to wait for
reply before timing out. Default value is 130. This property does not
have an effect if useHttpClient is false and you are
using cybsclients14.jar . |
useHttpClient | Flag directing the client to use
Apache HttpClient for the HTTPS communication. Use one of these values:
|
proxyHost | Optional host name or IP address of
the HTTP proxy server. |
proxyPort | Port number of the proxy server. The
default is 8080. This property is ignored if you do not specify
proxyHost . |
proxyUser | User name used to authenticate
against the proxy server if required. |
proxyPassword | Password used to authenticate
against the proxy server if required. |
Testing the Client
The client tests and samples are configured to run with Maven. Before you test the client,
update the client properties with your test merchant credentials (see Configuring Client Properties).
Run the SDK Integration Tests
- Configure your merchant credentials in test_cybs.properties (<main directory>/src/test/resources).
- Runmvn failsafe:integration-testfrom the main directory.
Run the Samples (Java)
- Configure your merchant credentials in cybs.properties (<main directory>/samples/nvp or xml).
- Runmvn exec:javafrom samples directory (<main directory>/samples/nvp or xml).
Going Live
When you finish configuring and testing the client, your deployment is ready to go live.
Make sure that your client is set to send transactions to the
production server, not the test server. See the description of
sendToProduction
.Cybersource Essentials Merchants
Cybersource
Essentials MerchantsIf you use
Cybersource
Essentials services, you can use the Business Center
site to go live. You must also configure your client so that it sends transactions to
the production server and not the test server. See the description of the
sendToProduction
property in Configuration Properties.After your deployment goes live, use real card numbers and other data to test every card
type you support. Because these are real transactions in which you are buying from
yourself, use small monetary amounts to do the tests. Process an authorization, then
capture the authorization, and later refund the money. Use your bank statements to verify
that money is deposited into and withdrawn from your merchant bank account as expected. If
you have more than one merchant ID, test each one separately.
Cybersource Advanced Merchants
Cybersource
Advanced MerchantsIf you use
Cybersource
Advanced services, see Getting Started with Cybersource Advanced for information about
going live.When your deployment goes live, your
Cybersource
account is updated so that
you can send transactions to the Cybersource
production server. If you have
not already done so, you must provide your banking information to Cybersource
so that your processor can deposit funds to your merchant bank account.After
Cybersource
confirms that your account is live, make sure that you
update your system so that it can send requests to the production server
(ics2wsa.ic3.com
or ics2ws.in.ic3.com
in India) using
your security keys for the production environment. The test server
(ics2wstesta.ic3.com
) cannot be used for real transactions. For more
information about sending transactions to the production server. see the description of the
configuration property sendToProduction
.After your deployment goes live, use real card numbers and other data to test every card
type, currency, and
Cybersource
application that your integration supports.
Because these are real transactions in which you are buying from yourself, use small
monetary amounts to do the tests. Use your bank statements to verify that money is
deposited into and withdrawn from your merchant bank account as expected. If you have more
than one merchant ID, test each one separately.