Skip to content

Commit

Permalink
Merge pull request #2 from TrustlyInc/DEV
Browse files Browse the repository at this point in the history
[Dev 191064] - new public backend example app for receiving webhooks and creating payments
  • Loading branch information
marcosrivereto authored Oct 27, 2023
2 parents 893f4ba + 566af80 commit c3d0a4f
Show file tree
Hide file tree
Showing 44 changed files with 16,385 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .development.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ACCESS_ID=<ACCESS_ID provided by Trustly>
ACCESS_KEY=<ACCESS_KEY provided by Trustly>
BASE_URL=<TRUSTLY API URL> (https://sandbox.trustly.one/api/v1)
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<p align="center">
Alpha Merchant App - Simple Backend
</p>


## Description

Simple backend to demonstrate how to implement the endpoints to integrate with Trustly.

## Requirements

- node 16 or higher

## Clone the app

```bash
# clone the repository
$ git clone https://github.com/TrustlyInc/trustly-nestjs-example.git
```

## Configuring Trustly API credentials
In the `.development.env` file replace environment variables values:
- ACCESS_ID
- ACCESS_KEY
- BASE_URL

## Install dependencies
```bash
# install dependencies
$ npm install
```

## Running the app
```bash
# development
$ npm run start:dev
```

## Swagger
```
http://localhost:8080/api
```
1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Trustly NestJS Example</h1>
8 changes: 8 additions & 0 deletions nest-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}
Loading

0 comments on commit c3d0a4f

Please sign in to comment.