naoufal / react-native-payments

Accept Payments with Apple Pay and Android Pay using the Payment Request API.
https://www.npmjs.com/package/react-native-payments
1.59k stars 412 forks source link

Cannot read property 'show' of undefined #148

Open Tiamatmate opened 5 years ago

Tiamatmate commented 5 years ago

I followed the setup tutorial.

  1. Installed library.

  2. Linked it. (There was a problem with MainApplication.java path, but I fixed it and linked again successfully)

  3. Set up Apple and Android pay (dependencies etc.)

  4. I imported library globally as in Readme.md

  5. Implemented Payment method data and payment details -I followed instructions on Google to create public key

  6. I call it in ComponentWillMount like: paymentRequest = new PaymentRequest(METHOD_DATA_ANDROID, DETAILS); paymentRequest.show()

And I get the warning that's in title of the issue.

saeedtkh commented 5 years ago

Hi, Did you find a way to fix it?

thomasgataly commented 5 years ago

same problem here, did you find a solution ?

matwming commented 5 years ago

you need to manually import the files in xcode

henriquezago commented 4 years ago

you need to manually import the files in xcode

shouldn't this be included in the README file?