How is anyone processing payments with React Native apps at present? - react-native

Trust me when I say I've tried every single solution people are currently downloading. tipsi-stripe, react-native-payments, react-native-paypal, you name it.
Every single guide says to link the library using link. Or automatically using yarn/npm. I've tried both ways, doesn't work. The new React Native version is certainly preventing this, and all the npm packages are failing. It seems no one can update the packages to work with react native yet.
If this is the case, how is anyone at all processing payments in react native? There doesn't appear to be any workable option here. Going to have to cancel my client's project due to impossible needs, simply payments.

I would think the best solution is to have a server or webservice that calls an API like PayPal v2/checkout/orders, to set up and capture a transaction. See "Create Order" and "Capture Order" here: https://developer.paypal.com/docs/business/checkout/server-side-api-calls/#server-side-api-calls
Then, for the approval flow, you can open a secure browser view to the approval_url the create call returns, having set the return_url in your creation to be a deeplink back to your app, which when opened immediately calls your server or webservice to do the capture and respond with success/failure.

Related

Functionality to auto pick up the call using expo react native

As part of a project I'm developing an application for the care of people with cognitive disorders, it may happen that such a person forgets where he put his phone. Therefore, it needs functionality that will allow the phone to be automatically answered when a trusted number calls. I don't know what I could use to create such functionality.
I create the application using expo-react-native. I tried to use the expo-phone-call library, but I can't install it because it shows an error that such a library doesn't exist. On the other hand, when trying to use react-native-phone-call, I kept getting errors with importing things.

stripe for expo (react native)

I am working on a mobile app based on expo (react-native) and I need double check if the mobile device supports apple payment. I found a library for stripe payment system #stripe/stripe-react-native and there are files that return method isApplePaySupported - true/false.
I need to use that method without installing that package and I have tried to extract the code which does that validation - I see that declaration of that method in that file node_modules#stripe\stripe-react-native\src\NativeStripeSdk.tsx but I cant find implementation. I mean the code which I can run and get the same response with that isApplePaySupported method.
I do not have big experience in structure of those react modules, but I check all files and can find the only declaration without implementation of that code. Can someone help me?
To rewrite this function yourself, you'll have to write code that interfaces with native components, specifically PassKit.
My recommendation would be to just install that ReactNative SDK from Stripe and use its functions as it does everything you need it to. Especially if you're taking payments with Apple Pay, you need to run the payment through some payment provider, so if you're using Stripe then you need to use Stripe's SDK to actually accept a payment.

Shopify app for altering the default checkout procedure

I need to create a solution for altering the checkout process.
Better said, I need to add some functionality to it with a remote app (I am not sure if this is the right way to do it).
Mainly, what is needed represents a process that calls an external API, using a private API key from a delivery company, that registers a pick-up from the buyers house and sends the product to our headquarters.The process should be started when the user completes the entire checkout system from shopify, after payment.
After that, some AWB should be returned to the users checkout page, or some response regarding the creation of the pick up.
My question is, let's say, using some language like javascript with node and Koa or express, how one can achieve that? I can't find any tutorials or something that would help me do this.

Is there any way of knowing (via code) if a user is in the app and using it right now?

I'm trying to incorporate a feature into one of my apps that allows you to message users that are, at that moment, in and using the app. I've searched for a while now, but with no luck finding any article, API, npm package, etc, that supports this concept - if it even is possible.
I'd rather use an API than see when the user was last on the app via a timestamp and then "guess" if the user is still using the app.
I'm using React Native.
Check that AppState equals to 'active'.
https://facebook.github.io/react-native/docs/appstate

Are there any registration/authentication api's which can be used in React Native

I'm developing an IoS and Android app using react-native, and am now starting to consider all the aspects of user registration, so that typically the person will provide some credentials, and then get sent an email (or possibly sms) enabling them to "verify" their account, after which point they are a registered user.
These registration processes (and subsequent emails/sms's seem to be fairly common , so I'm wondering if there are any API's which anyone has come across which make the job of creating the registration/activation process easier m rather than writing code from scratch ?
Many thanks in anticipation
It depends what you want when you ask for an API. If you're developing backend as well you can use Auth0.
If you want just to implement frontend, I guess you have to write your own code. Consider using something like redux or mobx to store your email and other things after logging in.
Anyways the REST part you have to write on your own. As for views you can google for it, for example there's react-native-login-screen