<dependency>
<groupId>com.broadleafcommerce.microservices</groupId>
<artifactId>broadleaf-stripe</artifactId>
</dependency>
Users must register their own sandbox accounts with Stripe in order to use the BroadleafCommerce Stripe payment functionality in a test environment. This can be done here: https://dashboard.stripe.com
Please familiarize yourself with the Stripe Java API before proceeding: https://stripe.com/docs/quickstart
Once you have registered a merchant account with Stripe, add the Broadleaf Stripe Maven dependency to your PaymentTransactionServices project.
<dependency>
<groupId>com.broadleafcommerce.microservices</groupId>
<artifactId>broadleaf-stripe</artifactId>
</dependency>
Note
|
The dependency’s version will be pulled from the Broadleaf release train pom.xml .
|
Next, you will need to gather your Stripe API key and add them to your application via system properties.
Log in to your Stripe account
Set an account name in the top left of the Stripe dashboard or at https://dashboard.stripe.com/account
Find your API key by navigating to https://dashboard.stripe.com/account/apikeys
Provide your API key via the following properties:
broadleaf:
stripe:
rest:
private-api-key: {Your API key}
broadleaf:
stripe:
rest:
should-include-level-3-data: {true || false} (1)
Whether credit card level 3 data should be included in each transaction. This is most applicable for businesses that accept a significant portion of corporate credit cards. The inclusion of this data for corporate card transactions can lead to more favorable rates from the processing credit card companies.
Add the following properties to declare the STRIPE
gateway as an available payment method.
broadleaf:
cartoperation:
service:
checkout:
checkout-payment-method-options:
- payment-method-type: CREDIT_CARD
payment-method-gateway-type: STRIPE
STRIPE
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:
- ...
- STRIPE
- ...
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:
STRIPE: 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:
"mytenant" & "myapplication" being the Broadleaf Tenant and Application ids. |
STRIPE
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:
- ...
- STRIPE
- ...
STRIPE
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:
- ...
- STRIPE
- ...
STRIPE
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:
- ...
- STRIPE
- ...