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

Custom endpoint url #500

Closed
terrierscript opened this issue Jun 2, 2022 · 1 comment · Fixed by #504
Closed

Custom endpoint url #500

terrierscript opened this issue Jun 2, 2022 · 1 comment · Fixed by #504

Comments

@terrierscript
Copy link

terrierscript commented Jun 2, 2022

Is your feature request related to a problem? Please describe.
In some case (e.g. testing, proxy), we need to set custom SDK endpoint but this SDK cannot set this.

Describe the solution you'd like
In python-sdk, we can set custom endpoint url with base_url option.
https://github.com/paypay/paypayopa-sdk-python/blob/7074930f4bf1700b0dc53a41fb1fff700cbdec32/paypayopa/client.py#L77-L79

Describe alternatives you've considered
If you append PayPayRestSDK.setConfig interface, we can change endpoint like (PayPayRestSDK.setHttpsClient)

Additional context

@curtisfennerpaypay
Copy link
Contributor

SDK version 2.1.0 was released with an updated Configure method.

You can use it to set a custom host name and port for the SDK:

const PAYPAY = require('@paypayopa/paypayopa-sdk-node');
PAYPAY.Configure({
    // Use custom base url and port
    conf: new PAYPAY.Conf({ hostName: "stg-api.sandbox.paypay.ne.jp", portNumber: 443 }),

    // Specify your sandbox API key and sandbox API secret.
    clientId: API_KEY,
    clientSecret: API_SECRET,
});

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

Successfully merging a pull request may close this issue.

2 participants