chocnut / RNAdyenCse

React Native AdYen Client-Side Encryption (CSE)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined is not an object (evaluatiing'RNAdyenCse.encrypt')

mostain-unified opened this issue · comments

After submitting the form when I am trying to encrypt the credit card data it's showing the error given below -

undefined is not an object (evaluatiing'RNAdyenCse.encrypt') (ios only)

here is the screenshot
screen shot 1940-12-16 at 2 31 25 pm

I am also facing the same issue any solutions?

Did you install the Adyen sdk via CocoaPods?

I also have the same error.
It seems that the react-native NativeModules won't consist the RNAdyenCse module which might be due to module itself not being able to access the RNAdyenCse.m and RNAdyenCse.h files correctly?

For me the library was not automatically linking using react native link command. So I manually added it to Libraries folder and also linked binary in build phases. Now its working

for react native 0.60.3 still same problem.

did you also install the following dependency "adyen-cse-js": "git+https://github.com/Adyen/adyen-cse-web.git#v0.1.24",?

Actually not, but I found the problem, fixed and sent a pull request for it.

sorry for the late response as I have not had time to check the issue?

@orcunorcun I haven't tested your PR but is this issue still happening? As per @vivekjne he manually link the binary. Or this PR #8 will be much efficient?

Yes, I tried it today with RN version 0.60.4, but it still has same problem. So my PR works well for auto linking. But I am not sure, is there any another solution or not. @chocnut

@orcunorcun I will try it with RN 0.60.4. If anyone here can test it as well it will be great then I can merge your PR.

It works for me too. I just added another PR (#9) and this one makes it even AndroidX compatible with no more complaints from Android studio about the use of deprecated calls.

ok merging both of your PRs #8 and #9

@taschik can you rebase your PR there's a conflict from #8

ok merging both of your PR's #8 and #9

Thank you :)

Thanks for merging @chocnut . Would you mind publishing a new version to npmjs, too?

will do! I'm closing this issue now. thanks, everyone!