I want to use PayFort Sdk in react native with some libraries and getting error

576 views Asked by At

I want to use PayFort in my React Native and luckily I found out two of these libraries 1 is RN-Payfort-SDK and the other one is react-native-payfort-sdk and I am using it correctly but when I try to run the project both of the libraries throw me the same error

Could not find com.victor:lib:1.0.1.
Required by:project :app > project :react-native-payfort-sdk

After the error, I try to search a lot about this library and luckily found a problem that this library is not updated to mavenCenteral() as you all know jcenter() is not working anymore so the question is can someone help me regarding this library or any other method I'll be really thankful to you.

2

There are 2 answers

5
Muhammad Numan On BEST ANSWER

you can install react-native-payfort-sdk from my fork until this PR merge

just edit package.json

"react-native-payfort-sdk": "https://github.com/nomi9995/react-native-payfort-sdk#fix/victor-lib"

after adding this line, just do yarn install or npm install

after installing node_modules, you should clear cache from the android studio like this

enter image description here

1
sankar dunga On

You can still use jcenter() to resolve the above old libary com.victor:lib:1.0.1 as JCenter is still readable for old versions. Your application will work unless there is a newer versions of a library that are not available on jcenter