Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Improve Client Configuration Docs #1325

Open
tpater opened this issue Feb 19, 2024 · 1 comment
Open

[FEATURE] Improve Client Configuration Docs #1325

tpater opened this issue Feb 19, 2024 · 1 comment

Comments

@tpater
Copy link

tpater commented Feb 19, 2024

Is your feature request related to a problem? Please describe.
I've been studying official docs of setting up my configuration before going live: https://docs.adyen.com/development-resources/live-endpoints/?tab=web_1#checkout-endpoints

It says I should know my live prefix generated in live environment backoffice.
Also I should initiate the client with a proper Adyen's environment name ( live, live-us, live-au etc) depending on the reqion/country my Merchant Account is being setup.
It looks like current version of Environment enum supports only TEST & LIVE values. Is this a mistake or intentional action?
https://github.com/Adyen/adyen-node-api-library/blob/main/src/typings/enums/environment.ts

Current Config class does not have documented properties so it is hard to guess what author had in mind:
https://github.com/Adyen/adyen-node-api-library/blob/main/src/config.ts

I could not find anywhere docs on which countries belong to which Adyen's live regions: e.g.
live-apse: ["SG", "HK", "TH" // any other?]

Describe the solution you'd like
Please, provide more than one official example of initialising the Client e.g. with production-like settings (region-aware)
Please, extend existing Environment enum or put appropriate info of the underlying logic (if there is one).
Please, document whether live api prefix should also be passed to Config object or in case I'm using your library it is not required.

Nice to have: static mapping files or some utility functions to be able to resolve proper environment based on the country of origin of my user. Example:

export const reqionToCountryMapping: Record<AdyenEnvironment, Country[]> = {
  [AdyenEnvironment.LIVE]: [/* european countries */],
  [AdyenEnvironment.LIVE_US]: [Country.UNITED_STATES_OF_AMERICA],
  [AdyenEnvironment.LIVE_AU]: [Country.AUSTRALIA],
  [AdyenEnvironment.LIVE_IN]: [Country.INDIA],
  [AdyenEnvironment.LIVE_APSE]: [
    Country.SINGAPORE,
    Country.HONG_KONG,
    Country.JAPAN,
    Country.MALAYSIA,
    Country.NEW_ZEALAND,
    Country.PHILIPPINES,
    Country.SOUTH_KOREA,
    Country.TAIWAN,
    Country.THAILAND,
    Country.VIETNAM,
    // which other countries?
  ],
};
@DjoykeAbyah
Copy link
Contributor

Hi @tpater!

Thank you for reaching out to us and providing some suggestions!
We will start an investigation regarding this, and I'll get back to you once I know more. In the meantime, you can find an example of the client setup when going live in the README here.

Regards

Djoyke
Adyen

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

No branches or pull requests

2 participants