Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Why i get 'false' used in React Native? #56

Closed
MoNodin opened this issue Jul 5, 2017 · 7 comments
Closed

Why i get 'false' used in React Native? #56

MoNodin opened this issue Jul 5, 2017 · 7 comments

Comments

@MoNodin
Copy link

MoNodin commented Jul 5, 2017

source code:
import adyenEncrypt from 'adyen-cse-web';
......
const cseInstance = adyenEncrypt.createEncryption(PUBLIC_KEY_DEV, options);
postData['adyen-encrypted-data'] = cseInstance.encrypt(cardData);

result:
Object {adyen-encrypted-data: false}

@ArnoudAdyen
Copy link
Contributor

Hi,

Instead of doing the creation of the encryption and the encryption directly following each other, it is advised to instantiate the encryption object earlier in the flow.

The engine needs time to gather random data . If there is not enough random data the encryption will fail.

Best,

Arnoud

@MoNodin
Copy link
Author

MoNodin commented Jul 12, 2017

Ok,I will check it and then feedback

@kbonnin
Copy link

kbonnin commented Aug 10, 2017

@MoNodin I'm in the exact same spot. Have you find a working solution yet?

Nevermind, my problem was with generationtime I assumed it was a unix timestamp since format was not documented, but looking at the library comments it should be in the same format as new Date().toISOString();

@sandor-anyvan
Copy link

We got false result for these cards ( first 6 digit only )
450875
454742
475117
543698
454742
448952
492181
529932
492181
598824
589433
454142
475121
465359
492181
443273
454638
546946
465904
465942
464154
475129
542011
518991
464941
465859
495944
455638
492942
454617
475129
465922
512687
465858
446261
557349
542011
465859
465902
552157
475130
475141
465848
465859
465941
462910
552157
475130
276367
444447
529930
465861
454313
465858
476242
513652
575129
552157

The cseInstance was built before we try to encrypt. The cseInstance.validate(cardData) returns with number incorrect error. Meanwhile we get processed few of these cards manually without error. Please advise.

@chocnut
Copy link

chocnut commented Feb 17, 2018

are you guys able to run the library on React Native?

@chocnut
Copy link

chocnut commented Mar 17, 2018

Anyways, If anyone want this in react-native I just released for react-native https://github.com/chocnut/RNAdyenCse

@MoNodin
Copy link
Author

MoNodin commented Jul 27, 2018

@kbonnin @chocnut @sandor-anyvan

Finally, I resolved it by using the Ayden Native Module created by our team, just like the library given by @chocnut Thank you guy, chocnut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants