Skip to content

Commit

Permalink
feat(integrations): allow to link multiple psp accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Jan 15, 2024
1 parent d690c11 commit 29d76d9
Show file tree
Hide file tree
Showing 26 changed files with 4,306 additions and 1,161 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
name: TestE2E
# name: TestE2E

on:
pull_request:
types: [opened, reopened, review_requested, ready_for_review, synchronize]
# on:
# pull_request:
# types: [opened, reopened, review_requested, ready_for_review, synchronize]

jobs:
cypress-run:
if: github.event.pull_request.draft == false
name: Run Test E2E
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
# jobs:
# cypress-run:
# if: github.event.pull_request.draft == false
# name: Run Test E2E
# runs-on: ubuntu-latest
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v4

- name: Checkout API Git repository
uses: actions/checkout@v4
with:
repository: getlago/lago-api
ref: ${{ github.event.inputs.api_branch }}
path: api
token: ${{ secrets.GH_TOKEN }}
# - name: Checkout API Git repository
# uses: actions/checkout@v4
# with:
# repository: getlago/lago-api
# ref: ${{ github.event.inputs.api_branch }}
# path: api
# token: ${{ secrets.GH_TOKEN }}

- name: Build Front local image
run: |
docker build -t getlago/front:ci ./
# - name: Build Front local image
# run: |
# docker build -t getlago/front:ci ./

- name: Build API local image
run: |
docker build -t getlago/api:ci ./api
# - name: Build API local image
# run: |
# docker build -t getlago/api:ci ./api

- name: Launch APP + API
env:
LAGO_RSA_PRIVATE_KEY: ${{ secrets.LAGO_RSA_PRIVATE_KEY }}
LAGO_LICENSE: ${{ secrets.LAGO_LICENSE }}
run: |
docker-compose -f ./ci/docker-compose.ci.yml up -d db redis api front
# - name: Launch APP + API
# env:
# LAGO_RSA_PRIVATE_KEY: ${{ secrets.LAGO_RSA_PRIVATE_KEY }}
# LAGO_LICENSE: ${{ secrets.LAGO_LICENSE }}
# run: |
# docker-compose -f ./ci/docker-compose.ci.yml up -d db redis api front

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20

- name: Cypress run
uses: cypress-io/github-action@v6
env:
CYPRESS_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
browser: chrome
record: false
config: baseUrl=http:https://localhost,viewportHeight=99999,viewportWidth=1280
spec: |
cypress/e2e/00-auth/*
cypress/e2e/10-resources/*
cypress/e2e/t10-*
cypress/e2e/t20-*
cypress/e2e/t30-*
# - name: Cypress run
# uses: cypress-io/github-action@v6
# env:
# CYPRESS_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# with:
# browser: chrome
# record: false
# config: baseUrl=http:https://localhost,viewportHeight=99999,viewportWidth=1280
# spec: |
# cypress/e2e/00-auth/*
# cypress/e2e/10-resources/*
# cypress/e2e/t10-*
# cypress/e2e/t20-*
# cypress/e2e/t30-*
61 changes: 34 additions & 27 deletions ditto/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,17 @@
"text_62b1edddbf5f461ab971277d": "Stripe",
"text_62b1edddbf5f461ab9712795": "Payment provider",
"text_62b1edddbf5f461ab97127ad": "Connected",
"text_62b1edddbf5f461ab971272b": "Connect to Stripe",
"text_62b1edddbf5f461ab9712739": "To connect to Stripe, please enter the API secret key associated with your Stripe account.",
"text_62b1edddbf5f461ab9712748": "API secret key",
"text_62b1edddbf5f461ab9712756": "Type an API secret key",
"text_62b1edddbf5f461ab971276d": "Cancel",
"text_62b1edddbf5f461ab9712773": "Connect to Stripe",
"text_62b1edddbf5f461ab9712743": "Stripe API secret key successfully added",
"text_62b1edddbf5f461ab97126ee": "Stripe",
"text_62b1edddbf5f461ab9712707": "Stripe",
"text_62b1edddbf5f461ab971270d": "Connected",
"text_62b1edddbf5f461ab971271f": "Payment provider",
"text_62b1edddbf5f461ab971273f": "API secret key",
"text_62b1edddbf5f461ab9712787": "Edit",
"text_62b1edddbf5f461ab971279f": "Delete",
"text_62b1edddbf5f461ab971272d": "Edit Stripe API secret key",
"text_62b1edddbf5f461ab9712737": "By editing the API secret key, upcoming data will not be synchronised to the connected Stripe account.",
"text_62b1edddbf5f461ab9712754": "Type a new API secret key",
"text_62b1edddbf5f461ab9712769": "Edit API secret key",
"text_62b1edddbf5f461ab97126f6": "Stripe API secret key successfully edited",
"text_62b1edddbf5f461ab97126e4": "Delete Stripe API secret key",
"text_62b1edddbf5f461ab97126f0": "By deleting the API secret key, the existing connection will not be used anymore and upcoming data will not be synchronised to the connected Stripe account. Are you sure?",
"text_62b1edddbf5f461ab971270f": "Delete API secret key",
"text_62b1edddbf5f461ab9712758": "Stripe API secret key successfully deleted",
"text_62b328ead9a4caef81cd9c9c": "Default payment provider",
"text_62b328ead9a4caef81cd9c9e": "Search or select a payment provider",
Expand Down Expand Up @@ -781,8 +770,6 @@
"text_65281f686a80b400c8e2f6dd": "Overridden",
"text_65281f686a80b400c8e2f6c3": "No active subscriptions",
"text_65281f686a80b400c8e2f6c6": "Assign this plan to a customer to create an active subscription.",
"text_645d071272418a14c1c76a5f": "Connect to Adyen",
"text_645d071272418a14c1c76a6b": "To connect to Adyen, please enter the API key generated from your Adyen account and the Merchant Account.",
"text_645d071272418a14c1c76ad8": "Connect to Adyen",
"text_645d071272418a14c1c76a93": "Adyen connection successfully added",
"text_645d071272418a14c1c76a6d": "Adyen",
Expand All @@ -792,14 +779,10 @@
"text_645d071272418a14c1c76acc": "Live prefix (optional)",
"text_645d071272418a14c1c76ae0": "HMAC Signature (optional)",
"text_645d071272418a14c1c76a67": "Edit Adyen Connection",
"text_645d071272418a14c1c76a73": "By editing the API key or the Merchant Account, upcoming data will be synchronized to the newly connected Adyen account.",
"text_645d071272418a14c1c76adc": "Edit Adyen connection",
"text_645d071272418a14c1c76a3e": "Adyen connection successfully edited",
"text_645d071272418a14c1c76a5d": "Delete Adyen connection",
"text_645d071272418a14c1c76a69": "By deleting this Adyen connection, the existing connection will not be used anymore and upcoming data will not be synchronized to the connected Adyen account. Are you sure?",
"text_645d071272418a14c1c76a81": "Delete connection",
"text_645d071272418a14c1c76b25": "Adyen connection successfully deleted",
"text_645d0728ea0a5a7bbf76d5c7": "Automatically create this customer in Adyen",
"text_645d0728ea0a5a7bbf76d5c7": "Create automatically this customer in Adyen",
"text_645d0728ea0a5a7bbf76d5c9": "To ensure customer creation, their external ID must contain a minimum of 3 characters, and the payment registration must be completed using the checkout URL sent via webhook.",
"text_63e27c56dfe64b846474ef0c": "Start now to share real-time information thanks to webhooks",
"text_63ebaf555f88d954d73beb7e": "No webhook message here",
Expand Down Expand Up @@ -1363,6 +1346,37 @@
"text_64b04d6b13f1cc00ab4bf6bf": "Available only for customers invoices in EUR currency",
"text_64aeb7b998c4322918c84237": "Payment methods",
"text_64aeb7b998c4322918c8423b": "Card & SEPA Direct Debit",
"text_6584550dc4cec7adf8615049": "Connect to Stripe",
"text_6584550dc4cec7adf861504b": "To connect to Stripe, please enter the API secret key associated with your Stripe account.",
"text_6584550dc4cec7adf861504d": "Connection name",
"text_6584550dc4cec7adf861504f": "Type a name",
"text_6584550dc4cec7adf8615051": "Connection code",
"text_6584550dc4cec7adf8615053": "Type a code",
"text_65845f35d7d69c3ab4793dac": "Edit connection",
"text_65845f35d7d69c3ab4793dad": "Delete connection",
"text_658461066530343fe1808cd7": "Delete connection to {{name}}",
"text_658461066530343fe1808cdb": "By deleting the connection, it will not be used anymore and upcoming data will not be synchronized to the connected Stripe account. Are you sure?",
"text_658461066530343fe1808cd9": "Edit connection to {{name}}",
"text_658461066530343fe1808cdd": "Edit information linked to this GoCardless connection.",
"text_658461066530343fe1808cc2": "By deleting the connection, it will not be used anymore and upcoming data will not be synchronized to the connected Adyen account. Are you sure?",
"text_65846181a741a1401ecdddb7": "By deleting the connection, it will not be used anymore and upcoming data will not be synchronized to the connected GoCardless account. Are you sure?\n\nTo fully remove this connection, please do it also in GoCardless.",
"text_659d5de7c9b7f51394f7f3fd": "Delete connection",
"text_658466afe6140b469140e1f9": "Finalize connection to GoCardless",
"text_658466afe6140b469140e1fb": "To finalize the connection with GoCardless, please enter an account name and a code.",
"text_658466afe6140b469140e207": "Connect to GoCardless",
"text_658466afe6140b469140e1fa": "Connect to Adyen",
"text_658466afe6140b469140e1fc": "To connect to Adyen, please enter the API key generated from your Adyen account and the Merchant Account.",
"text_65846763e6140b469140e235": "Add a connection",
"text_65846763e6140b469140e239": "Connected accounts",
"text_6584697bc905b246e70e5528": "Edit information linked to this Stripe connection.",
"text_65846a0ed9fdbd46c4afc42d": "Edit information linked to this Adyen connection.",
"text_658567dffff71e31ea5f0d33": "Reconnect via OAuth",
"text_658567dffff71e31ea5f0d3e": "Secret key",
"text_65940198687ce7b05cd62b61": "Connected account",
"text_65940198687ce7b05cd62b62": "Search or select a connected account",
"text_65940198687ce7b05cd62b63": "Please connect an Adyen account in the Settings -> Integration section",
"text_65940198687ce7b05cd62b64": "Please connect a Stripe account in the Settings -> Integration section",
"text_65940198687ce7b05cd62b65": "Please connect a Gocardless account in the Settings -> Integration section",
"text_64c7a89b6c67eb6c98898167": "Net payment term",
"text_64c7a89b6c67eb6c98898182": "Period within which a customer is expected to pay for an invoice after it has been issued.\nNeed more flexibility? Set a payment term at the customer level to override the one above.",
"text_64c7a89b6c67eb6c988980eb": "The duration within which a customer is expected to remit payment after the invoice is issued. Note that it may impact all invoices already in draft.",
Expand Down Expand Up @@ -1402,21 +1416,15 @@
"text_6566f920a1d6c35693d6ce0f": "Invoice numbering successfully edited",
"text_6566f920a1d6c35693d6cd77": "10 char. maximum",
"text_634ea0ecc6147de10ddb6625": "GoCardless",
"text_634ea0ecc6147de10ddb6629": "GoCardless",
"text_634ea0ecc6147de10ddb662d": "Connected",
"text_634ea0ecc6147de10ddb6631": "Payment provider",
"text_635bd8acb686f18909a57c87": "Reconnect",
"text_634ea0ecc6147de10ddb663d": "OAuth connection",
"text_634ea0ecc6147de10ddb6641": "Lago is connected to GoCardless via an OAuth connection. From Lago, you can only reconnect the two apps, to remove this connection, please do it in GoCardless.",
"text_635bd8acb686f18909a57c93": "Use this secret key to set up webhooks in GoCardless",
"text_634ea0ecc6147de10ddb6645": "GoCardless successfully connected",
"text_634ea0ecc6147de10ddb6643": "Payment provider",
"text_634ea0ecc6147de10ddb6646": "Connected",
"text_634ea0ecc6147de10ddb6648": "GoCardless",
"text_635bdbda84c98758f9bba8a0": "Connect Payment service provider in the <a href=\"{{link}}\">Integrations section</a>",
"text_635bdbda84c98758f9bba8aa": "Automatically create this customer in GoCardless",
"text_635bdbda84c98758f9bba8aa": "Create automatically this customer in GoCardless",
"text_635bdbda84c98758f9bba8ae": "To ensure customer creation, you must fill in an email address, and the mandate registration must be completed using the checkout URL sent via webhook.",
"text_635bdbda84c98758f9bba89e": "Automatically create this customer in Stripe",
"text_635bdbda84c98758f9bba89e": "Create automatically this customer in Stripe",
"text_6360ddae753a8b3e11c80c66": "Copy text",
"text_6360ddae753a8b3e11c80c6c": "Secret key copied to clipboard",
"text_636df520279a9e1b3c68cc67": "API keys & ID",
Expand Down Expand Up @@ -1683,7 +1691,6 @@
"text_65564e8e4af2340050d431be": "Insights",
"text_65564e8e4af2340050d431bf": "Total monthly income, covering all financial aspects including taxes, discounts like credit notes, coupons, and credits, for an accurate financial overview.",
"text_637f813d31381b1ed90ab315": "API Token",
"text_637f813d31381b1ed90ab322": "Copy key",
"text_637f813d31381b1ed90ab30e": "This API secret key is used to connect Stripe to Lago, edit it to make a new connection",
"text_637f813d31381b1ed90ab2f6": "API keys & ID",
"text_637f813d31381b1ed90ab300": "Find all keys and IDs to connect Lago.",
Expand Down
2 changes: 2 additions & 0 deletions ditto/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,7 @@ sources:
fileName: ⚙️ [WIP] - Integration - Lago EU tax integration
- name: 👍 [Ready for dev] - Invoices - Display unit price to item in invoices
id: 659e67cc6afb842e8db57be5
- name: 👍 [Ready for dev] - Settings - Several PSP Accounts
id: 6584550ac28443047853c17f
format: flat
variants: true
3 changes: 3 additions & 0 deletions ditto/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ module.exports = {
"project_64c7a896197f1907cbc6371c": {
"base": require('./-ready-for-dev---settings---net-payment-term__base.json')
},
"project_6584550ac28443047853c17f": {
"base": require('./-ready-for-dev---settings---several-psp-accounts__base.json')
},
"project_64aeb7b7d5628db33254c4bb": {
"base": require('./-ready-for-dev---settings--customers---lago-x-stripe-sdd__base.json')
},
Expand Down
Loading

0 comments on commit 29d76d9

Please sign in to comment.