How to implement PayPal in Expo ReactNative app using Webview without Nodejs - react-native

I am developing an Ecpo ReactNative app and i looking to integrate PayPal to allow users to purchase some products using Webview, but I don't know how to do it. I came across this article: https://medium.com/#adityasingh_32512/integrating-paypal-in-your-react-native-app-4dcf89e11dd which explains how to do it but he uses a nodejs server and i won't necessarily implement a Nodejs server...
I also came across this article: How to integrate Paypal using React Native expo? where they offer other solutions, but which didn't satisfy me.

If you don't use a server integration (nodejs or otherwise), then obviously only client-side JS will be available. Here is a demo pattern of what you can do: https://developer.paypal.com/demo/checkout/#/pattern/client
There's nothing React-specific about it.

Related

Can we develop a web and mobile application (Android, iOS, web) with single code base by using React Native?

Can you please help with this.
I am trying to develop mobile and web apps using react native with single code base for web, android and ios. Can we Develop Web and Mobile Application with single code base by using React Native?
The simple answer is yes. However, there are a lot of caveats that you could encounter along the road with certain device requirements and functionality where you may have to write conditional code, but it could still stay in the same codebase.
The easiest way to get started is by using Expo (https://expo.io), which would let you get started with a project that could be run on Android, iOS, and the Web (via React Native Web) all with very minimal setup on your part.

How to login to Facebook using react native for web platform

I'm trying to figure out how to implement a facebook login via a react-native for a web app. I can find lots of info on how to do this for IOS and Android, but nothing for a web app. I created my project using expo and also installed firebase, but I can't find enough info to tie all this together for a web app. I don't think it will matter, but I'm also using typescript. I would provide some code, but I can't even find a solution that compiles at this point.

React Native & Cosmos DB - How to get them working together?

There seem to be no direct support for React Native through Cosmos DB SDK or npm packages. The JS package #azure/cosmos while works on React Native for the Web, but does not build for the native apps. It fails to build due to Cryto incompatibility.
While Resource Tokens can serve as a solution for authentication, but App still needs to interact with the DB resources using an API.
So, how to go around this? Is utilizing Azure Functions as a mid-tier the only workaround?
Thanks
If you need basic functionality like querying, creating new items etc, you can get the react-native-azure-cosmos package.
However the functionality is a very limited subset of the full JS SDK.
There is no official SDK for now to target react native applications.
You will need to use an API App or Function app to interact with CosmosDB and call the HTTP endpoints from your device.

React Native PayPal integration without server dependency?

I have tried with using Web view and having a Node server with paypal-rest-sdk as backend.
The flow seems to be a work around. Is there any way to directly integrate the Paypal with React Native code without any server calls or web views.
This isn't really a React question -- if no server is used, then you would be doing a client-only HTML/JS integration such as this one: https://developer.paypal.com/demo/checkout/#/pattern/client
That's possible to do. It would all be happening in a full mobile web experience, which then becomes the PayPal Checkout.
If your question was whether it's technically possible to do "server"-style REST API calls from a purely native React app, please put that thought out of your mind. Your 'secret' API key should never be in the possession of a client-side App.

Using watson developer cloud with react native

I'm trying to integrate my already created IBM Watson chatbot into my react native mobile application. Any time I import watson-developer-cloud I get an error saying that Node.js standard libraries such as stream are not compatible with Expo. I've seen other people using watson services to create speech to text apps. I don't understand how they are using the services without the watson-developer-cloud package. I've seen some community created packages such as react-native-watson that supposedly can make this happen, but I can't get any of it to work. Is there any way I can make this work or is it impossible? Any suggestions are welcome and appreciated.
Just to help you with some path, for sure you can use React Native to built the UI for your app. But also you need the back-end and communicate with Watson API. (If you want you can use just the fetch from react native, but I really recommend you don't do that if your app will grow with time.
I really recommend you take a look at Watson developer Cloud, and use the Assistant Simple to understand the backend with Node.js. Also try to check the Watson Assistant API documentation.
For summary, you'll create one server with Node.js and express, and create routers in your backend, with theses routes, you gonna use fetch from React native to send HTTP requests to your routes, your backend will call Watson Assistant API and answer. Your fetch will get this response and show that to the user in your U.
Obs.: You can use any language in the backend and Watson Developer Cloud has a lot of examples using Watson Assistant with Java, Python, etc.
See the Official Watson Assistant API documentation.
See the Official use of Fetch in React Native.