Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Option to use dotenv instead of assigning Environment Variables #225

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nhall-tink
Copy link
Contributor

Nodejs gives us a way to load config files into the project using dotenv.

This is to give the option to use the dotenv file, meaning that there are no system level changes needed on the users computer. Which should help simplify the setup, and mean that it is easier to for users to run a couple of demo's at the same time.

Comment on lines +1 to +2
REACT_APP_TINK_LINK_PAYMENT_CLIENT_ID=
TINK_LINK_PAYMENT_CLIENT_SECRET=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these all the variables this project uses? Lets list them all so we have a better idea what needs to be setup prior to running it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After review, as this is a one-time payment, the only thing the client needs is the Client Id & Secret to create a session with Tink Link.

We could potentially parameterise something like the Product information, as it's hard coded a the moment. Which would mean the demo could be quickly repurposed via the config file, instead of changing server values.

  destinations: [
    {
      accountNumber: env.process.BANK_ACCOUNT_NUMBER,
      type: env.process.PAYMENT_TYPE
      reference: env.process.REFERENCE
    },
  ],
  recipientName: env.process.RECIPIENT_NAME
  sourceMessage: env.process.SOURCE_MESSAGE
  remittanceInformation: {
    type: env.process.RM_INFO_TYPE
    value: env.process.RM_INFO_VALUE
  },

Let me know your thoughts

Copy link
Contributor

@rtelicak rtelicak Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about moving all existing env variables in to this new .env variables, not creating a new ones. If REACT_APP_TINK_LINK_PAYMENT_CLIENT_ID and TINK_LINK_PAYMENT_CLIENT_SECRET is the only two, lets merge this.

cc: @shuma

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtelicak thanks! I don't have merge perms still but happy to see this move forward!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants