Closed TheoGautier closed 2 years ago
Hello Theo,
Thank you for reporting the issue. We will make sure to resolve the issue so that SDK and server are aligned again.
Kind regards, Worldline support
Hello Theo,
A fix for this issue has been released in version 2.0.1 of the SDK.
Kind regards, Worldline support
Hi,
I have troubles retrieving a paymentProduct logo asset using the SDK. Sdk version:
onlinepayments-sdk-client-js: 2.0.0
Here is my code sample:
Value retrieved is a concatenation of assetUrl and logo displayHint retrieved from API:
"https://assets.test.cdn.v-psp.com/s2s/e5404cf549c7b2cb027e/https://assets.test.cdn.v-psp.com/hpp/e5404cf549c7b2cb027e/images/pm/VISA.gif", a concatenation of two urls
"https://assets.test.cdn.v-psp.com/s2s/e5404cf549c7b2cb027e"
{ "displayHints": { "displayOrder": 0, "label": "CB", "logo": "https://assets.test.cdn.v-psp.com/hpp/e5404cf549c7b2cb027e/images/pm/CB.gif" } }
It seems session assetUrl (asset base url) is not synced with paymentProduct logo asset path. The inner code of the sdk has this:
(url is session.assetUrl,
formatUrl
just adds a trailing "/" at the end of the base path). It seems to me that imageUrl should hence just be an image path, and not an absolute path.Can you please investigate this? I found a temp hack, which is
paymentProduct.displayHints.logo.replaceAll(session.assetUrl + "/", "")
Thanks, and have a nice day.