Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We need Expo support ! #379

Closed
jitunayak opened this issue Dec 26, 2021 · 13 comments
Closed

We need Expo support ! #379

jitunayak opened this issue Dec 26, 2021 · 13 comments

Comments

@jitunayak
Copy link

Describe the feature you'd like:

Currently most of the react native apps are based on EXPO framework. As it has some of the enterprise features such as eas build and easy to publish updates to Play Store/App Store. As of Razorpay only supports bare workflow which is react-native cli support. Razorpay has native modules dependency. So it can't be installed directly on expo. But after SDK 41. They have added support for building native modules with dev client (Separate binary just like Expo GO) but it will contain the native code modules in binary.

Suggested implementation:

Expo allows to implement native modules by building Config Plugins (Basically you tell expo what are the native code changes required ). When user run expo install razorpay. Expo will automatically configure native code changes with out ejecting the app.

Describe alternatives you've considered:

Similar implementation made in Stripe.
Currently we are using stripe payments as it supports expo. They have their UPI payment option in beta. But i feel Razorpay is still better for Indian consumers.

Teachability, Documentation, Adoption, Migration Strategy:

https://docs.expo.dev/guides/config-plugins/

! This is expo thread request for Razorpay support. https://expo.canny.io/feature-requests/p/support-for-razorpay

@sunn0e
Copy link

sunn0e commented Feb 3, 2022

Just came here to say this! Stripe has made it easier to use their SDK whereas Razorpay is still stuck with JS/html only solution in a webview. You just need to make a config plugin[0] for android specific code[1], ios does not need much effort[2].
Kindly look into this.

  1. https://docs.expo.dev/guides/config-plugins/
  2. https://docs.expo.dev/guides/config-plugins/
  3. https://www.npmjs.com/package/react-native-razorpay

@devcoderbuzz
Copy link

just following this. Not sure why no one is able to generate a plugin for this. :(

@deepaktiwari09
Copy link

are you able to use it in expo?

@devcoderbuzz
Copy link

Can someone pls share the android plugin pls ??

@AdarshJais
Copy link

Any working solution for this issue?

@kkyusufk
Copy link

kkyusufk commented Aug 29, 2022

Hi, just adding my 2 cents.
To integrate a project with expo, you need to create a JS-only module unless I am mistaken.
The only way to use native modules like this one is to use EAS builds to build your application which will spit out your project in native code and then we can use native modules. https://docs.expo.dev/build/introduction/
Also, the reason why Stripe works with expo is because expo integrated stripe in their code base as a native module.
This issue adds more clarity on how they achieved it stripe/stripe-react-native#3

@kkyusufk
Copy link

Hey Folks, let me know if the above paragraph answered your questions so that we can close this issue.

@AdarshJais
Copy link

Hi @kkyusufk ,

Thanks for your 2 cents, It gives a bit of clarity on the approach but recently I read a comment from Michael Wood regarding creating a config plugin that could make the integration simpler.

Link: https://expo.canny.io/feature-requests/p/support-for-razorpay

Could you please review it once and let's know the best way to continue with Razorpay with the expo?

@iprojectscloud-git
Copy link

iprojectscloud-git commented Sep 3, 2022

As of Expo SDK 46, and react-native-razorpay version 2.2.9, just installing the SDK with:

yarn add react-native-razorpay

and creating a dev client seems sufficient. There is no need to modify any .gradle or .java files. It all works automatically due to react native autolinking.

@kkyusufk
Copy link

kkyusufk commented Sep 4, 2022

@iprojectscloud-git thanks for the comment. You are absolutely right in case of android.

@AdarshJais We would be reviewing the README and add a new section for EXPO support as well as remove stuff which is not required.
For now, We are confirming whether iOS needs some extra modification or not.
I will update this issue once we have confirmed and updated the readme.

@gerzonc
Copy link

gerzonc commented Sep 12, 2022

Not sure if @kkyusufk already got it listed yet, but I made a config plugin to add support for UPI Intent on iOS. Can anyone take a look on it and check if there is something missing or that requires further changes? Thanks!

@gerzonc
Copy link

gerzonc commented Sep 15, 2022

Not sure if @kkyusufk already got it listed yet, but I made a config plugin to add support for UPI Intent on iOS. Can anyone take a look on it and check if there is something missing or that requires further changes? Thanks!

Seems like there is no need for config plugin, in fact, we could just customize infoPlist directly from app.json on Expo. So based on the docs, Expo has 100% support for react-native-razorpay without any issues

@AdarshJais
Copy link

Here you go: #420

Please follow the instructions provided in the modified Readme pull request, and let me know if you encounter any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants