Skip to content
New issue

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

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

Already on GitHub? # to your account

GET /sessions/{id}?sessionResult={sessionResult} issue using adyen API Library #1097

Open
kekkovad opened this issue Dec 19, 2024 · 0 comments

Comments

@kekkovad
Copy link

Describe the bug
Trying to perform the GET /sessions/{id}?sessionResult={sessionResult} I got HTTP 500 (errorCode 701) as response.
I'm developing Hosted Checkout solution with Node.js

To Reproduce
Perform the call as shown in the docs (Hosted Checkout):

// Adyen Node API Library v18.0.0
// Require the parts of the module you want to use
const { Client, CheckoutAPI } = require('@adyen/api-library');
// Initialize the client object
// For the live environment, additionally include your liveEndpointUrlPrefix.
const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"});

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.getResultOfPaymentSession("sessionId", "string");

https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Web&integration=Hosted+Checkout&programming_language=js#step-5-get-the-outcome

Additional context
the following is not working for me:
const response = checkoutAPI.PaymentsApi.getResultOfPaymentSession(sessionId, sessionResult);

But the GET call works if I use axios this way
https://checkout-test.adyen.com/v69/sessions/${sessionId}?sessionResult=${sessionResult}

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant