Broadleaf Microservices
  • v1.0.0-latest-prod

Verifone Environment Setup

Prerequisites

Adding the Verifone Services Dependency

Once you have registered a merchant account with Verifone, add the Broadleaf Verifone Maven dependency to your PaymentTransactionServices project.

<dependency>
    <groupId>com.broadleafcommerce.microservices</groupId>
    <artifactId>broadleaf-verifone</artifactId>
</dependency>
Note
The dependency’s version will be pulled from the Broadleaf release train pom.xml.

Configuring Your Integration

API Keys and Authentication

By default, the Basic authentication method is used for the REST API calls. You have to provide the user-uid and api key via properties. To get these API keys see the Obtaining API Keys section.

Once you have these keys, add them using the following properties:

broadleaf:
  verifone:
    user-id: {user uid}
    api-key: {api key}

Verifone Configuration

broadleaf:
  verifone:
    token-scope: {token scope} (1)
    payment-provider-contract-id: {Payment Provider Contract ID} (2)
    successful-transaction-reason-codes: {the list of codes for successful transaction response codes} (3)
    failure-types-by-code: {the list of codes for failed transaction response codes} (3)
    hard-decline-codes: {the list of codes that should be considered a HARD decline} (3)
  1. The token scope that is used to create the reuse token.

  2. The Payment Provider Contracts (PPC). This value can be sent from the UI when creating the payment. To do so specify it using payment_provider_contract key in paymentMethodProperties. By default, it is possible to specify one PPC per one application. For example, if the application id is some_app_id, use the next property broadleaf.verifone.application.some_app_id.payment-provider-contract-id. It is also possible to override com.broadleafcommerce.vendor.verifone.service.VerifonePaymentModificationService.resolvePaymentProviderContract method if one application has 2 and more PPC. This method has com.broadleafcommerce.paymentgateway.domain.PaymentInfo parameter that can be used to identify the different PPC for the same application.

  3. These properties are used to identify the result of the transaction using reason_code from the response. These properties have default values that should not be changed unless there is a specific reason to do so. See Reason codes for API transactions

Cart Operation Service Configuration

Add the following properties to declare the VERIFONE gateway as an available payment method.

broadleaf:
  cartoperation:
    service:
      checkout:
        checkout-payment-method-options:
          - payment-method-type: CREDIT_CARD
            payment-method-gateway-type: VERIFONE
          - payment-method-type: APPLE_PAY
            payment-method-gateway-type: VERIFONE
          - payment-method-type: GOOGLE_PAY
            payment-method-gateway-type: VERIFONE

VERIFONE should be added to the following property to declare when transactions for this gateway should be executed, relative to other gateways, during checkout processing.

broadleaf:
  cartoperation:
    service:
      checkout:
        payment-gateway-priorities:
          - ...
          - VERIFONE
          - ...

By default, Authorize transactions are executed by CartOps during checkout. If you wish to execute AuthorizeAndCapture transactions instead, define the following property:

broadleaf:
  cartoperation:
    service:
      checkout:
        checkout-transaction-types:
          VERIFONE: AUTHORIZE_AND_CAPTURE
Note

This property is application-discriminated, allowing different values to be provided on a per-tenant or per-application basis using the following property paths:

  • broadleaf.cartoperation.service.checkout.tenant.mytenant.checkout-transaction-types.VERIFONE=AUTHORIZE_AND_CAPTURE

  • broadleaf.cartoperation.service.checkout.application.myapplication.checkout-transaction-types.VERIFONE=AUTHORIZE_AND_CAPTURE

"mytenant" & "myapplication" being the Broadleaf Tenant and Application ids.

Configuration for OrderOperationServices

VERIFONE should be added to the following property to declare when ReverseAuthorize or Refund transactions for this gateway should be executed, relative to other gateways, when cancelling a fulfillment.

broadleaf:
  orderoperation:
    service:
      payment:
        cancel-payment-gateway-priorities:
          - ...
          - VERIFONE
          - ...

VERIFONE should be added to the following property to declare when Capture transactions for this gateway should be executed, relative to other gateways, when capturing payment for a fulfillment.

broadleaf:
  orderoperation:
    service:
      payment:
        capture-payment-gateway-priorities:
          - ...
          - VERIFONE
          - ...

VERIFONE should be added to the following property to declare when Refund transactions for this gateway should be executed, relative to other gateways, when refunding payment for a fulfillment return.

broadleaf:
  orderoperation:
    service:
      payment:
        refund-payment-gateway-priorities:
          - ...
          - VERIFONE
          - ...