Giter VIP home page Giter VIP logo

adyen-3ds2-js-utils's People

Contributors

pabloai avatar ribeiroguilherme avatar rikterbeek avatar simonrood avatar sponglord avatar trigalti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adyen-3ds2-js-utils's Issues

base64 encoding issue

In your code:

const encodeBase64URL = (dataStr) => {
    let base64 = window.btoa(dataStr);
    let base64url = base64.split('=')[0]; // Remove any trailing '='s

    base64url = base64url.replace('/\+/g', '-'); // 62nd char of encoding
    base64url = base64url.replace('/\//g', '_'); // 63rd char of encoding

    return base64url;
};

Those 62nd and 63rd character replacements will not work as the regex is not a regex but a string. Possibly you're looking for the following instead?:

    base64url = base64url.replace(/\+/g, '-'); // 62nd char of encoding
    base64url = base64url.replace(/\//g, '_'); // 63rd char of encoding

ES5 syntax for getBrowserInfo util function

Currently getBrowserInfo function is written in ES6 syntax. Is it possible to modify it to use ES5 syntax, as usually node-modules are excluded from transpilation process?

Possible workaround here is to use file from dist folder, but it is 3KB more in bundle.

e.data.indexOf is not a function

Describe the bug
I am not sure how to reproduce it but we are using New-relic for monitoring and it logged a lot of error-incidents:-

Error: e.data.indexOf is not a function
at anonymous in https://checkoutshopper-live.adyen.com/checkoutshopper/sdk/3.1.0/adyen.js
Line 4 : Column 249399
at e.value in https://checkoutshopper-live.adyen.com/checkoutshopper/sdk/3.1.0/adyen.js
Line 4 : Column 249419

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome
  • Version 88

Node Version suggestion

Could you please also suggest the version of node.js that work for the development of this code base?
thank you

Example in the README is invalid

Hi,
I noticed that example in the README is a bit misleading. It's states following invocation is valid

window.ThreedDS2Utils.collectBrowserInfo()

but correct should be

window.ThreedDS2Utils.getBrowserInfo()

because collectBrowserInfo is exported as getBrowserInfo

Cheers
Michal

Option B installation - 'rm' is not recognized as an internal or external command,

I was presented with the following:

'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @adyen/[email protected] build: rm -rf dist/ && webpack --config webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @adyen/[email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

My npm version is 6.4.1.
Any idea? The "threeds2-js-utils.js" gets created anyway.

403 error on test challenge submit.

I am testing ChallengeShopper flow using the helper functions in documentation,
const perform3DSChallenge = (responseData) => {}

On clicking "Pay", page reloads and iframe opens "Please authenticate (Challenge simulation)
".
I enter "password" in password input field and submit, iframe does not close, flow breaks and in the network tab, column time is "Pending" with status 403.
On clicking the link "https://pal-test.adyen.com/threeds2simulator/acs/challenge.shtml" in initiator column I get:
Challenge Failed
No creq, answer or acsTransId present

Whats missing?

Problems building the library for 'Option B' installation

Hi,

It does appears that the module uglifyjs-webpack-plugin has not been included in the devDependencies section of package.json, raising the following error when attempting to build from a fresh clone of the repo:

Error: Cannot find module 'uglifyjs-webpack-plugin'

It also appears as though the beta version of the module is being referenced - is this intended?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.