CyberSource SOAP API Environment Setup
BroadleafCommerce currently offers credit card payment services through our implementation of the CyberSource SOAP payment API. Secure communication to the vendor's remote API is negotiated internally by BroadleafCommerce according to CyberSource's specifications. Please review the following prerequisites before proceeding
Note - This integration method requires a high level of PCI compliance because it is necessary for credit card information to be passed through your servers which are then relayed to CyberSource via the SOAP API. If you are looking to avoid most PCI concerns, consider looking into the [[CyberSource Silent Post Module]]
Note - the steps for establishing an account and setting up your pom.xml's are the same as Secure Acceptance SOP. You do not need to repeat them twice if you are using CyberSource for both Secure Acceptance SOP and SOAP API. However, the key generation and added properties are different between the two methods.
Prerequisites
- Users must establish their own test account with CyberSource in order to use the BroadleafCommerce CyberSource payment functionality (http://www.cybersource.com/register/). Note, this is only a test account - you will need to contact a CyberSource sales representative to set up a real merchant account.
- Familiarize yourself with the CyberSource SOAP API (http://www.cybersource.com/support_center/implementation/downloads/soap_api/SOAP_toolkits.pdf). BroadleafCommerce takes care of all the heavy lifting here, but it doesn't hurt to have the documentation that describes the destination urls, etc... should you need to reference them in the future.
- Log in to the CyberSource Business Center (https://ebctest.cybersource.com/ebctest/login/Login.do). Once logged in, generate a security key so that BroadleafCommerce can interact with the test environment. Click "Account Management" in the left navagation, followed by "Transaction Security Keys". Now click the "Security Keys for the SOAP Toolkit API" link. Finally, click the "generate key" button to create a new key. Copy this key value to a safe place, as you will need to include it in your BroadleafCommerce environment configuration in the next steps.
Once you have established an account with CyberSource, you should begin to setup your environment to work with Broadleaf Commerce CyberSource support. The first step is to make Broadleaf Commerce aware of your CyberSource account credentials. This is accomplished through environment configuration (see [[Runtime Environment Configuration]]).
Initial Setup
Note: If you have already setup Secure Acceptance SOP, you do not need to make any pom changes
Once you have established an account with CyberSource and configured your settings in the Business Center so that you have an active account,
begin by including the CyberSource Module dependency to your Broadleaf application's parent pom.xml.
<dependency>
<groupId>com.broadleafcommerce</groupId>
<artifactId>broadleaf-cybersource-payment</artifactId>
<version>1.3.0-GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Make sure to include the dependency in your CORE pom.xml as well:
<dependency>
<groupId>com.broadleafcommerce</groupId>
<artifactId>broadleaf-cybersource-payment</artifactId>
</dependency>
The next step is to make Broadleaf Commerce aware of your CyberSource account credentials.
This is accomplished through environment configuration (see [[Runtime Environment Configuration]]).
Broadleaf allows you to create your own property files per environment (e.g. common.properties, local.properties, development.properties, integrationdev.properties, integrationqa.properties, staging.properties, and production.properties)
You will need to enter the following key/value pairs in the appropriate locations and replace the "?" with your Cybersource account details:
You can also store these configs in the Database by utilizing the blSystemPropertiesService
. See the java docs for more details.
Properties File Config
- gateway.cybersource.soap.libVersion=1.4/1.5.1
- gateway.cybersource.soap.merchantId=?
- gateway.cybersource.soap.transactionKey=?
- gateway.cybersource.soap.serverUrl=https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor
Production Property Config
- gateway.cybersource.soap.serverUrl=https://ics2ws.ic3.com/commerce/1.x/transactionProcessor