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

Can't use SDK in multi-tenant environments #76

Open
mdwt opened this issue Oct 21, 2024 · 3 comments
Open

Can't use SDK in multi-tenant environments #76

mdwt opened this issue Oct 21, 2024 · 3 comments

Comments

@mdwt
Copy link

mdwt commented Oct 21, 2024

We want to integrate Cashfree into our multi-tenant platform, but it seems the current implementation of the SDK doesn't allow that because all the configuration parameters are all static variables of the Cashfree class, so you can only ever have one Cashfree merchant per runtime.

export class Cashfree {
...
    static XClientId?: string;
    static XClientSecret?: string;
    static XPartnerKey?: string;
    static XClientSignature?: string;
    static XPartnerMerchantId?: string;
...

Are there any plans to change this to member variables so that one can use different instances for different merchants?

@mdwt mdwt changed the title Can't use SDK for multi-tenant environments Can't use SDK in multi-tenant environments Oct 21, 2024
@suhas-cashfree
Copy link
Collaborator

Hi @mdwt

Initially, the SDK was designed to keep it simple. But yes, this use case of multiple creds has to be supported. Will get back to you once we discuss internally.

@suhas-cashfree
Copy link
Collaborator

Hi @mdwt
Use version 4.3.0
In this we have added a new method like
Cashfree.PGCreateOrderWithConfiguration()
This takes in a CashfreeConfiguration class as the first parameter and you can pass different merchants on each call.

@mdwt
Copy link
Author

mdwt commented Nov 7, 2024

great thank you!

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