- Java, Install using Homebrew:
brew install openjdk - Apache Maven, Install using Homebrew:
brew install maven - Spring Boot, Install via Maven dependencies in pom
- Stripe Java SDK, Install via Maven dependencies in pom
- Create a Stripe account
- Create a Stripe sandbox in the account
- In the sandbox create and copy the secret Stripe API key (starting with "
sk_") - In the sandbox create a (Connected) Account and note its id (starting with "
acct_") - Set the Stripe API key as the environment variable
STRIPE_SECRET_KEYexport STRIPE_SECRET_KEY=<sk_...>
or add it to the runtime in the IDE or Maven with a-D-flag - Set the id of the (Connected) Account for testing with the environment variable
TEST_ACCT_KEYexport TEST_ACCT_KEY=<acct_...>
or add it to the runtime in the IDE or Maven with a-D-flag - Run unit tests with
mvn test -DSTRIPE_SECRET_KEY=<sk_...> -DTEST_ACCT_KEY=<acct_...> - Start service with
mvn spring-boot:run