Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
This commit represents an effort made by the Checkout team to build a brand new SDK for GO. It ships a new instantiation layer that makes easier a less confusing to set up the SDK. From the point of view of usability, the new version follows similar principles, although major clients are now split/duplicated to reference different data schemes which makes it fully compatible with `default` (NAS) and `Previous` (ABC) account structures. This separation is statically forced during instantiation.

The SDK supports the following modules:

* Alternative Payments Clients & Sources (default/previous)
* Customers (default/previous)
* Disputes (default/previous)
* Instruments (default/previous)
* Payments (default/previous)
* Payments Hosted & Links (default/previous)
* Tokens (default/previous)
* Accounts (default)
* Balances (default)
* Card Metadata (default)
* Forex (default)
* Sessions (default)
* Transfers (default)
* Workflows (default)
* Events (previous)
* Sources (previous)

`README.md` was updated to match the new setup. Code of conduct and licence were reviewed.
  • Loading branch information
martinseco committed Jan 6, 2023
1 parent 6c534a9 commit 3144972
Show file tree
Hide file tree
Showing 234 changed files with 28,291 additions and 4,842 deletions.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: "Bug report"
about: Create a bug report
---

<!--- Provide a title with a general summary of the issue -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Environment
<!--- Include the following details: -->
* Checkout SDK version:
* Platform and version:
* Operating System and version:
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Description
<!--- Provide a clear and concise description of what the bug is -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Expected behavior
<!--- Describe what should happen -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Current behavior
<!--- Describe what happens instead -->
<!--- Errors, exceptions, stack traces, and relevant logs can be included -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Steps to reproduce
<!--- If applicable, provide a snippet of code that can be used to reproduce the issue -->
<!--- Please avoid adding any unrelated code -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Possible solution
<!--- Feel free to suggest a solution -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

- [ ] I may be able to implement this bug fix

### Additional information
<!--- Feel free to add any additional information that can help to diagnose and fix the issue -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "Feature request"
about: Request a new future or an improvement to an existing feature
---

<!--- Provide a title with a general summary of the feature -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Environment
<!--- Include the following details: -->
* Checkout SDK version:
* Platform and version:
* Operating System and version:
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

### Description
<!--- Provide a clear and concise description of what can be implemented -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

## Proposed Solution
<!--- Provide suggestions on how to implement the requested feature (optional) -->
<!--- Feel free to suggest any alternative solutions or features you've considered -->
<!--- PLEASE DO NOT SHARE ANY CREDENTIALS -->

- [ ] I may be able to implement this feature
37 changes: 37 additions & 0 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build-master
on:
push:
branches:
- master
jobs:
build:
if: "!contains(github.event.commits[0].message, 'Release')"
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
go:
- "1.14"
- "1.18"
steps:
- uses: actions/checkout@v2
- id: setup-go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- id: build-and-test
env:
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }}
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }}
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }}
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET }}
run:
go build && go test -v -timeout 5m ./...

36 changes: 36 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build-pull-request
on:
pull_request:
branches:
- master
- "feature/**"
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
go:
- "1.14"
- "1.18"
steps:
- uses: actions/checkout@v2
- id: setup-go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- id: build-and-test
env:
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }}
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }}
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }}
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET }}
run:
go build && go test -v -timeout 5m ./...
50 changes: 50 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: build-release
on:
push:
branches:
- master
paths:
- client/version.go
jobs:
build:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
strategy:
matrix:
go:
- "1.14"
steps:
- uses: actions/checkout@v2
- id: setup-go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- id: build-and-test
env:
CHECKOUT_PREVIOUS_SECRET_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_SECRET_KEY }}
CHECKOUT_PREVIOUS_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_PREVIOUS_PUBLIC_KEY }}
CHECKOUT_DEFAULT_SECRET_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_SECRET_KEY }}
CHECKOUT_DEFAULT_PUBLIC_KEY: ${{ secrets.IT_CHECKOUT_DEFAULT_PUBLIC_KEY }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_PAYOUT_SCHEDULE_CLIENT_SECRET }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_ID }}
CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET: ${{ secrets.IT_CHECKOUT_DEFAULT_OAUTH_ACCOUNTS_CLIENT_SECRET }}
run:
go build && go test -v -timeout 5m ./...
- id: read-version
run: echo "CURRENT_VERSION=v$( grep "VERSION" client/version.go | awk '{ print $4 }' | tr -d "\"")" >> $GITHUB_ENV
- id: print-version
run: echo "Releasing $CURRENT_VERSION"
- id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.CURRENT_VERSION }}
release_name: ${{ env.CURRENT_VERSION }}
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: false

19 changes: 16 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
.DS_Store
.env
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test
*.coverprofile

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

.idea
*.DS_Store*
10 changes: 0 additions & 10 deletions .gitmessage

This file was deleted.

2 changes: 0 additions & 2 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 3144972

Please sign in to comment.