-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from 7SOATSquad30/docs/create-readme
docs: create readme
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Payments API | ||
|
||
## Como rodar | ||
|
||
Instalar dependências e buildar | ||
``` | ||
./gradlew build --refresh-dependencies | ||
``` | ||
|
||
Subir infra local | ||
``` | ||
docker-compose up -d database flyway | ||
``` | ||
|
||
Rodar aplicação | ||
``` | ||
./gradlew bootRun | ||
``` | ||
|
||
Swagger: http://localhost:8080/swagger-ui/index.html#/ | ||
|
||
## Como rodar com integração do Mercado Pago | ||
|
||
Configure as variáveis de ambiente: | ||
``` | ||
MERCADOPAGO_PUBLIC_KEY=secret | ||
MERCADOPAGO_PRIVATE_ACCESS_TOKEN=secret | ||
MERCADOPAGO_APP_USER_ID=secret | ||
MERCADOPAGO_POINT_OF_SALE_ID=secret | ||
MERCADOPAGO_NOTIFICATIONS_URL=url pública apontando pro endpoint /public/webhooks/mercadopago | ||
``` | ||
|
||
OBS: pra criar uma url pública local, pode criar um tunnel com ngrok: | ||
``` | ||
ngrok http 8080 | ||
``` |