On This Page
Installing and Testing the Client
Minimum System Requirements For Linux
- Linux kernel 2.2, LibC6 on an Intel processor (for RedHat users, this currently corresponds to versions 7.1 and 7.2)
- PHP4 (minimum version 4.2.1) or PHP5 (5.0.0–5.0.3 and 5.1.0-5.1.2)
- GNU GCC
Minimum System Requirements For Windows
- Windows XP, 2000, or newer
- Minimum PHP version 4.2.1
The SDK supports UTF-8 encoding.
Failure to configure your client API host to a unique, public IP address will cause inconsistent transaction results.
The client API request ID algorithm uses a combination of IP address and system time, along with other values. In some architectures this combination might not yield unique identifiers.
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 Creating and Using Security Keys
.The Simple Order API client for PHP package includes the
ca-bundle.crt
, a
bundle of certificate files. The client expects to find the ca-bundle.crt
file in the same directory as your security keys. If you move it elsewhere, use the
sslCertFile configuration parameter to specify the file location. For more information, see
the description of the parameter sslCertFile.You must protect your security key to ensure that your
Cybersource
account is not compromised.Installing the Client
This section describes the installation steps for Linux and Windows environments.
Install the Client on Linux
- Go to the client downloads page on the Support Center.
- Download the latest client package. You can save the file in any directory.
- Unzip and untar the package. This creates a directory calledsimapi-php-n.n.n, wheren.n.nis the client version.
ADDITIONAL INFORMATION
Thesimapi-php-n.n.n/libdirectory contains symbolic links. If you install the client by copying thelibdirectory from some other location where you untarred the package, check to see if the symbolic links are still there. If they are not, you must recreate them. - Copy thephpN_cybersource.sofile into the PHP extension directory, where the N is 4 if your PHP version is 4.x.x; 5 if your PHP version is 5.0.0-5.0.2; 503 if your PHP version is 5.0.3.; or 512 if your version is 5.1.0-5.1.2.
- The extension directory is the one"extension_dir"is set to in thephp.inifile. If you do not already have"extension_dir"set to an explicit directory:Create an extension directory (outside of the client installation directory).Set"extension_dir"to that directory.Copy thephpN_cybersource.sofile to that directory location.
- If you are using an Oracle database, go to Special Installation Instructions for Oracle Users and follow the instructions.
ADDITIONAL INFORMATION
Otherwise, in thephp.inifile, locate the “Dynamic Extensions” section and add one of the following lines anywhere before the next section in the file:extension=php4_cybersource.so(if using PHP 4.x.x) orextension=php5_cybersource.so(if using PHP 5.0.0-5.0.2)extension=php503_cybersource.so(if using PHP 5.0.3) orextension=php512_cybersource.so(if using PHP 5.1.0-5.1.2) - Save thephp.inifile.
- Modify the environment variable LD_LIBRARY_PATH to include thelibdirectory of the Cybersource client. For example:
ADDITIONAL INFORMATION
export LD_LIBRARY_PATH=/baseDir/simapi-php-n.n.n/lib:$LD_LIBRARY_PATHwhere/baseDiris the directory where you untarred the Cybersource client package.If the web server is running as the user "nobody", you must useldconfiginstead of setting the LD_LIBRARY_PATH. In this case, update the/etc/ld.so.conffile to include the library path (/baseDir/simapi-php-n.n.n/lib), and runldconfigto update the configuration. - Configure the client. See Configuring Client Settings below.
- Test the client. See Testing the Client.
Install the Client on Windows
- Go to the client downloads page on the Support Center.
- Download the latest client package. You can save the file in any directory.
- Unzip the package. This creates a directory calledsimapi-php-n.n.n, wheren.n.nis the client version.
- Copy thephpN_cybersource.dllfile into the PHP extension directory, where the N is 4 if your PHP version is 4.x.x, or 5 if your PHP version is 5.x.x.
ADDITIONAL INFORMATION
The extension directory is the one"extension_dir"is set to in thephp.inifile. If you do not already have"extension_dir"set to an explicit directory:Create an extension directory (outside of the client installation directory).Set"extension_dir"to that directory.Copy thephpN_cybersource.dllfile to that directory location. - In thephp.inifile, locate the “Windows Extensions” section and add one of the following lines anywhere before the next section in the file:
ADDITIONAL INFORMATION
extension=php4_cybersource.dll(if using PHP 4.x.x) orextension=php5_cybersource.dll(if using PHP 5.0.0–5.0.2)extension=php503_cybersource.dll(if using PHP 5.0.3) orextension=php512_cybersource.dll(if using PHP 5.1.0-5.1.2) - Save thephp.inifile.
- Add thelibdirectory of theCybersourceclient package to the system PATH. This makes the DLLs included in the client package available to theCybersourcePHP extension. The client is installed on your system.
- Configure the client. See Configuring Client Settings below.
- Test the client. See Testing the Client.
Configuring Client Settings
To run the sample scripts included in the client package, you must set the configuration
parameters in the
cybs.ini
file, which is located in the <installation
directory>/samples
directory for Linux, and in the
nvp
, xml
, and store
subfolders inside
the samples
directory for Windows. You can also use this file when running
transactions in a production environment (see the function descriptions in PHP API for the Client). The following table
describes the parameters that you can set. The default cybs.ini
file that
comes with the client package does not include all of the parameters listed in the table.
The file includes only the parameters required to run the sample scripts.If you have multiple merchant IDs, or if you are a reseller handling multiple merchants,
you can use different configuration settings depending on the merchant ID. See Configuring Your Settings for Multiple Merchant IDs for more information.
Setting | Description |
|---|---|
merchantID | Merchant ID. The client uses this
value if you do not specify a merchant ID in the request itself. |
keysDirectory | Location of the merchant’s
security key. The client includes a keys directory that you
can use. Include the path, for example: ../keys , or
c:\simapi-php-1.0.0\keys .We recommend
that you store your key locally for faster request
processing. |
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. For a current list of the 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.
|
keyFilename | Name of the security key file name
for the merchant in the format
< security_key_filename> .p12 . |
serverURL | Alternate server URL to use. See
Using Alternate Server Configuration Settings for more information.
Give the complete URL because it will be used exactly as you specify
here. |
namespaceURI | Alternate namespace URI to use. See
Using Alternate Server Configuration Settings for more information.
Give the complete namespace URI because it will be used exactly as you specify
here. |
enableLog | Flag directing the client to log
transactions and errors. Use one of these values:
|
logDirectory | Directory to which to write the log
file. Note that the client will not create this directory for you; you must
specify an existing directory. The client includes a logs
directory that you can use. Include the path, for example:
../logs , or
c:\simapi-php-1.0.0\logs . |
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. |
sslCertFile | The location of the bundled file of
CA Root Certificates ( ca-bundle.crt ) which is included in the
client download package. The client automatically looks for the file in the
directory where your security key is stored (specified by keysDirectory). If
you move the file so it does not reside in keysDirectory, use this
configuration setting to specify the full path to the file, including the file
name. |
timeout | Length of time-out in seconds. The
default is 110. |
proxyServer | Proxy server to use. Allowable
formats include: <http://>server<:port> <http://>IP
address<:port> The http:// and
port are optional.The default port
is 1080. If your proxy server is listening on another port, you must specify
a port number. |
proxyUsername | Username used to authenticate
against the proxy server if required. If the proxy server requires the domain
name during authentication, add the domain name and a backslash:
<domain>\<username> |
proxyPassword | Password used to authenticate
against the proxy server, if required. |
Testing the Client
After you install and configure the client, test it immediately to ensure that the installation was successful.
Test the Client
- Go to the <installation directory>/samples/nvpdirectory.
- Run the testauthCaptureSample.phpscript by typing: php authCaptureSample.php
ADDITIONAL INFORMATION
where php is the command-line interface (CLI) version. Depending on the PHP version, php may be in the main PHP directory, thesapi/clidirectory, theclidirectory, or it may be namedphp-cli.exeorphp.exe.For example, for PHP 4.3.0 with Linux, you might have:<PHP directory>/sapi/cli/php authCaptureSample.phpOr for PHP 4.3.8 with Windows, you might have:<PHP directory>\cli\php authCaptureSample.phpor<PHP directory>\php.exe authCaptureSample.phpThe results of the test are displayed in the window.- If the test is successful, a decision of ACCEPT appears for both the credit card authorization and the follow-on capture.
- If the test is not successful, a different decision value or an error message appears.
Troubleshoot Client Test Failures
- Verify that yourcybs.inisettings are correct.
- Run the test again.
- If the test still fails, look at the error message and determine the return status value (a numeric value from -1 to 8).
- See the descriptions of the status values in Possible Return Status Values, and follow any instructions given there for the error you received.
- Run the test again.
- If the test still fails, contact Customer Support.
Run the XML Sample
- Go to the <installation directory>/sample/xmldirectory.
- For Windows, modify thecybs.iniin the folder with your settings (for Linux, make sure thesamples/cybs.inifile is set how you want it).
- Run the testauthSample.phpscript by typing: php authSample.php
ADDITIONAL INFORMATION
The results of the test are displayed in the window.- If the test is successful, you see a decision of ACCEPT for both the credit card authorization and the follow-on capture.
- If the test is not successful, you see a different decision value or an error message. See Troubleshoot Client Test Failures to troubleshoot the error.
RESULT
The client is installed and tested. You are ready to create your own code for
requesting
Cybersource
services. For information about creating requests, see Using Name-Value Pairs if you plan to use
name-value pairs, or Using XML if you plan to use
XML.Going Live
When you complete all of your system testing and are ready to accept real transactions from your customers, your deployment is ready to
go live
.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
Cybersource
merchant ID, test each one separately.Cybersource Essentials Merchants
Cybersource
Essentials MerchantsIf you use
Cybersource
Essentials services, you can use the Business Center
to go live. For a description of the process of going live, see the
“Steps for Getting Started” section in Getting Started with Cybersource Essentials.Configure your client so that it can send transactions to the
production server and not the test server. For more information, see the description of the
configuration setting sendToProduction.
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
has confirmed 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 key 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 setting sendToProduction.Updating the Client to Use a Later API Version
Cybersource
periodically updates the Simple Order API (previously called
the Web Services API). You can update your existing client to work with the new API
version. Go to https://ics2wsa.ic3.com/commerce/1.x/transactionProcessor for a list of the
available API versions. For transactions in India, go to
https://ics2ws.in.ic3.com/commerce/1.x/transactionProcessor. Or, if you are in test mode,
go to https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor.To update the client to use a later API version, update the value for the
targetAPIVersion
configuration parameter in the cybs.ini
file. For example, to use the 1.18 version of the API, set the property to 1.18
.Special Installation Instructions for Oracle Users
If you are using Linux and an Oracle database, you must:
- Load the Oracle extensions dynamically
- In thephp.inifile, load theCybersourceextension before the Oracle extensions
Load Oracle Extensions Dynamically After the Cybersource Extension
Cybersource
Extension- At a command prompt, go to your PHP directory.
- Typemake clean.
- Execute configure so that you are loading the Oracle extensions dynamically. To do this, include “shared,” before the path to each Oracle extension. For example, you might execute configure as follows:
ADDITIONAL INFORMATION
./configure --prefix=<target PHP directory> --with-apxs=/usr/local/apache_1.3.32/bin/apxs --with-oracle=shared,/home/u01/app/oracle/product/8.1.7 --with-oci8=shared,/home/u01/app/oracle/product/8.1.7 --without-mysql - Type:
ADDITIONAL INFORMATION
make make install - In the “Dynamic Extensions” section of thephp.inifile, add theCybersourceextension before the Oracle extensions:
ADDITIONAL INFORMATION
extension=phpN_cybersource.so(where N represents the version of PHP: 4, 5, 503, or 512)extension = oracle.soextension = oci8.so - Save thephp.inifile.
- Continue with the original installation instructions (see Step 7 in Installing the Client).