Documentation Home

Paymetrics Environment Setup

Prerequisites

  • Users must establish their own accounts with Paymetrics in order to use the BroadleafCommerce Paymetrics payment functionality.
  • Please familiarize yourself with the Paymetrics XiPay API before proceeding.

Once you have established an account with Paymetrics, begin by including the Paymetrics Module dependency to your pom.xml.

<dependency>
  <groupId>com.broadleafcommerce</groupId>
  <artifactId>broadleaf-xipay</artifactId>
  <version>1.0.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-xipay</artifactId>
</dependency>

You should now begin to setup your environment to work with Broadleaf Commerce Paymetrics support.
The first step is to make Broadleaf Commerce aware of your Paymetrics 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 Paymetrics XiPay account details:

Broadleaf supports form (by default) and iframe Paymetrics integration methods.

You can also store these configs in the Database by utilizing the blSystemPropertiesService

Note - the username and password, GUID, and secret are assigned on a per-organization basis, while each merchant gets its own merchant ID. The process URL is what your Paymetrics controller should be mapped to (the default is /paymetrics/process). It should also be relative (it should exclude the base site name). The endpoint is the XiPay URL used for the SOAP API. The preloader URL is the base URL to load the XiSecure Javascript that will generate the client-side form.

Note - if your username contains a backslash, it needs to be escaped by adding a second backslash, or it will not work.

Integration method

Possible values can be form or iframe. If property is not specified, form used by default.

  • paymetrics.configuration.integrationMethod=?

Account

  • paymetrics.configuration.user=?
  • paymetrics.configuration.password=?
  • paymetrics.configuration.guid=?
  • paymetrics.configuration.secret=?
  • paymetrics.configuration.merchant.id=?

Endpoints

  • paymetrics.configuration.processUrl=?
  • paymetrics.configuration.xipay.endpoint=?
  • paymetrics.configuration.preloaderUrl=?
  • paymetrics.configuration.iframe.hostUrl=?
  • paymetrics.configuration.iframe.cssUrl=?