Broadleaf Microservices
  • v1.0.0-latest-prod

Environment Setup

  • Before configuring this module, you’ll need to ensure that your project includes the Broadleaf CreditAccountService which is used to manage Store Credit accounts & process transactions against their balances.

Adding this module to your project

Once you’ve verified that the CreditAccountService is registered with your project, add the Broadleaf Store Credit Maven dependency to your PaymentTransactionServices project.

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

Cart Operation Service Configuration

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

broadleaf:
  cartoperation:
    service:
      checkout:
        checkout-payment-method-options:
          - payment-method-type: STORE_CREDIT
            payment-method-gateway-type: BLC_STORE_CREDIT

BLC_STORE_CREDIT 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:
          - ...
          - BLC_STORE_CREDIT
          - ...

Store credit does not support Authorize transactions, so during checkout AuthorizeAndCapture transactions must be used. In CartOps, we must declare the following property:

broadleaf:
  cartoperation:
    service:
      checkout:
        checkout-transaction-types:
          BLC_STORE_CREDIT: AUTHORIZE_AND_CAPTURE

Configuration for OrderOperationServices

BLC_STORE_CREDIT 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:
          - ...
          - BLC_STORE_CREDIT
          - ...

BLC_STORE_CREDIT should be added to the following property to declare when AuthorizeAndCapture transactions for this gateway should be claimed, relative to other gateways being captured/claimed, when capturing/claiming payment for a fulfillment.

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

BLC_STORE_CREDIT 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:
          - ...
          - BLC_STORE_CREDIT
          - ...