Sagepay Environment Setup
Note: Broadleaf Commerce currently offers integration with Sagepay through a commercial integration module. To obtain this third party integration or if you have any questions about this module, please contact us at info@broadleafcommerce.org
Prerequisites
- Users must establish their own test accounts with SagePay
Set up your Sagepay Account
- Register for a Sagepay developer account http://www.sagepay.com/developers/sign_up
- After registration you should receive information regarding your developer account.
- Note this information because it will be needed when you configure your environment properties
Once you have established an account with Sagepay, begin by including the Sagepay Module dependency to your pom.xml.
<dependency>
<groupId>com.broadleafcommerce</groupId>
<artifactId>broadleaf-sagepay-form</artifactId>
<version>${blc.sagepay.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
See the
README.md
file to learn how to obtain the sagepay Java SDK dependencies (sagepay-api and sagepay-util-nodep)
Make sure to include the dependency in your core
pom.xml as well.
<dependency>
<groupId>com.broadleafcommerce</groupId>
<artifactId>broadleaf-sagepay-form</artifactId>
</dependency>
You should now begin to setup your environment to work with Broadleaf Commerce Sagepay support.
The first step is to make Broadleaf Commerce aware of your Sagepay 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 Braintree API account details:
You can also store these configs in the Database by utilizing the blSystemPropertiesService
Properties File Config
- gateway.sagepay.form.cartDescription=? (e.g. My Cart)
- gateway.sagepay.form.genericErrorMessage=? (e.g. There was an error processing your Credit Card.)
- gateway.sagepay.form.billingErrorMessage=? (e.g. There was an error in your Billing Information. Please try again.)
- gateway.sagepay.form.purchaseUrl=https://test.sagepay.com/Simulator/VSPFormGateway.asp
- gateway.sagepay.form.successUrl=? (e.g. http://localhost:8080/sagepay-form/return)
- gateway.sagepay.form.failureUrl=? (e.g. http://localhost:8080/sagepay-form/error)
- gateway.sagepay.form.vendor=?
- gateway.sagepay.form.encryptionPassword=?
- gateway.sagepay.form.vendorEmail=?
- gateway.sagepay.form.sendEmail=?
- gateway.sagepay.form.emailMessage=? (e.g. Thanks for your order)
- gateway.sagepay.form.allowGiftAid=?
Staging Property Config
- gateway.sagepay.form.purchaseUrl=https://test.sagepay.com/gateway/service/vspform-register.vsp
Production Property Config
- gateway.sagepay.form.purchaseUrl=https://live.sagepay.com/gateway/service/vspform-register.vsp
Now that you have your environment set up, let's begin setting up the [[Sagepay Module]].