wl-online-payments-direct / sdk-nodejs

Other
3 stars 0 forks source link

400 Bad Request CORS #2

Closed mho-drouot closed 2 years ago

mho-drouot commented 2 years ago

Client JS SDK: 2.0.0 Node.js SDK: onlinepayments-sdk-nodejs (npm) @ 3.2.0

cors_bad_request

After successfully creating a session, calling a promise (ex: getting payment products) returns an error (400 Bad Request).

session.getPaymentProduct(3, paymentDetails).then(product => { ... }, () => {...})

The same occurs with other APIs.

worldline-direct-support-team commented 2 years ago

Hi @mho-drouot, we're looking into this.

worldline-direct-support-team commented 2 years ago

Hi @mho-drouot, it seems that this issue occurs for the sdk-client-js, not this NodeJS SDK.

Could it be that you've changed the APIVERSION variable in the SDK to "client/v2"? If so, please revert it to "client/v1" as the client API is not available on v2.

If this is not the case, could you include the full request and response?

mho-drouot commented 2 years ago

Indeed. Topic closed.