FILTER BY TAG

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.jar
    and
    local_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)

  1. 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>
  2. Run mvn install.

Install the JAVA SDK (Gradle)

  1. Add the dependency to your build.gradle.

    ADDITIONAL INFORMATION

    dependencies { compile 'com.cybersource:cybersource-sdk-java:6.0.1' }

Install the Files Individually

  1. Download the latest jar file. The current version is
    cybersource-sdk-java-6.0.1.jar
    .
  2. Save the jar file to an appropriate location.
  3. Import the com.cybersource.ws.client package.

Configuring Client Properties

The client requires certain properties to run transactions. The samples provided in the &lt;main directory&gt;
/samples/nvp
and &lt;main directory&gt;
/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.
Configuration Properties
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:
  • false
    : Send to the test server. (default setting)
  • true
    : Send to the production server
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
&lt;
security_key_name
&gt;
.
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:
  • false
    : Do not enable logging (default setting)
  • true
    : Enable logging
    Logging can cause very large log files to accumulate. Therefore, we recommend that you use logging only when troubleshooting problems. To comply with all Payment Card Industry (PCI) and Payment Application (PA) Data Security Standards regarding the storage of credit card and card verification number data, the logs that are generated contain only masked credit card and card verification number data (CVV, CVC2, CVV2, CID, CVN).
    Follow these guidelines:
  • Use debugging temporarily for diagnostic purposes only.
  • If possible, use debugging only with test credit card numbers.
  • Never store clear text card verification numbers.
  • Delete the log files as soon as you no longer need them.
  • Never send email to
    Cybersource
    containing personal and account information, such as customers' names, addresses, card or check account numbers, and card verification numbers.
    For more information about PCI and PABP requirements, see www.visa.com/cisp.
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
.&lt;yyyymmdd
T
hhmmssxxx&gt; 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:
  • false
    : (default setting) Do not use Apache HttpClient. Use built-in HttpURLConnection. The timeout property does not have an effect if useHttpClient is
    false
    and you are using
    cybsclients14.jar
    .
  • true
    : Use Apache HttpClient.
    When useHttpClient is
    true
    , your CLASSPATH must include the three
    commons-*.jar
    files shipped with the package.
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

  1. Configure your merchant credentials in test_cybs.properties (&lt;main directory&gt;/src/test/resources).
  2. Run
    mvn failsafe:integration-test
    from the main directory.

Run the Samples (Java)

  1. Configure your merchant credentials in cybs.properties (&lt;main directory&gt;/samples/nvp or xml).
  2. Run
    mvn exec:java
    from samples directory (&lt;main directory&gt;/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

If 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

If 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.