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 413 forks source link

ReactNativePayments.supportedGateways #61

Open prodrom opened 6 years ago

prodrom commented 6 years ago

Hi guys,

I imported the library into the project. But when I run it I get such an error. What can i do to you ?

Thanks..

Andreyco commented 6 years ago

Have you linked the lib?

prodrom commented 6 years ago

I did everything in tutroial and i linked lib. But when i run it i have this (ReactNativePayments.supportedGateways) error. @Andreyco

iM-GeeKy commented 6 years ago

I too received the same problem as commented in issue #19.

Hulk-Tron commented 6 years ago

I too received this error did search a lot to resolve this issue but my failed getting supportedGateways of undefined error

Andreyco commented 6 years ago

This seems to be issue with linking a lib. Could you try again?

Hulk-Tron commented 6 years ago

Yes i had succesfully resolve this problem and also understand the problem too. This error is because the payment native sdk is unable to find payment methods you need to install the payment methods manulaly. Step to resolve:

  1. Instal payment cli.
  2. Add payment method extension like braintree or stripe using paymentcli.
  3. Manually drag or drop payment extension into ur project folder.
rmp613 commented 6 years ago

@Hulk-Tron Hi, When you say "drag or drop payment extension" what exactly do you mean? The whole react-native-payments-addon-*** folder? Cheers

Hulk-Tron commented 6 years ago

@rmp613 brother i believe the documentation for react-native-payments is incomplete there are another section which tell you to install payment-cli and install payment extension like stripe or braintree using the payment cli once you install the payment extension using the payment cli manually drop the braintree or stripe extension into framework. Thanks

rmp613 commented 6 years ago

@Hulk-Tron Thanks for your reply I'm still a bit confused sorry. I installed payment-cli and the braintree addon. Then I attempted to drag and drop the braintree extension into my frameworks folder and ensured they are linked but I still get the same supported gateways error :( Would you mind further explaining the steps required? For example: After installing payment-cli and the extension using the payment cli I went into the node_modules/react-native-payments-addon-braintree/Carthage/Build/ios folder and dragged all of the frameworks into my frameworks folder. Then I made sure they were all linked to my project in the "Linked Frameworks and Libraries" part of the general tab in xcode. Then when I rebuilt I had the same error: [tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Cannot read property 'supportedGateways' of undefined

Cheers

davekedar commented 5 years ago

@Hulk-Tron can you please help us understand how you have solved this ?

lenichols commented 4 years ago

+1