-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
6c534a9
commit 3144972
Showing
234 changed files
with
28,291 additions
and
4,842 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,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 --> |
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,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 |
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,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 ./... | ||
|
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 @@ | ||
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 ./... |
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,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 | ||
|
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 |
---|---|---|
@@ -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* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.