Suraj-Tiwari / react-native-payumoney

React Native Payumoney (Android/IOS)
MIT License
18 stars 9 forks source link

Payumoney issue #45

Closed divyanshkhatri closed 3 years ago

divyanshkhatri commented 4 years ago

Hii suraj after installing the package by this command "npm i react-native-payumoney --save" i was just running the project by "react-native run-android" and it is suggesting to put "tools:replace="android:usesCleartextTraffic" under application tag that i did but still getting same issue.

Suraj-Tiwari commented 4 years ago

please share xml file

Suraj-Tiwari commented 4 years ago

You can also match it from here https://www.github.com/Suraj-Tiwari/react-native-payumoney/tree/master/example%2Fandroid%2Fapp%2Fsrc%2Fmain%2FAndroidManifest.xml

divyanshkhatri commented 4 years ago

That issue got solved thanks to you. But now, I am facing another issue.

This is my import statement. import PayuMoney from 'react-native-payumoney';

This is my function where I call PayuMoney.

onPressCheckout = () => { let options = { amount: 10.0, txid: "123123123" , productId: "test", name: "Name", email: "test@gmail.com", phone: "8826343434", id: "393463", key: "LLKwG0", surl: "https://www.payumoney.com/mobileapp/payumoney/success.php", furl: "https://www.payumoney.com/mobileapp/payumoney/failure.php", sandbox: true, hash: "d829abecdaf9f2835787b3f56d1c7565721ca2501e6414438e61948dab435f102fc93213008cdfa3474691cadcc2dabdde64cd58c128dd2afcf3b389d617919c" }; PayuMoney.pay(options).then((d) => { console.log(d); // WIll get a Success response with verification hash }).catch(e => { console.log(e); //In case of failture }); } I am getting the error: TypeError: _reactNativePayumoney.default.pay is not a function. (In '_reactNativePayumoney.default.pay(options)', '_reactNativePayumoney.default.pay' is undefined)

Can you please help, it is urgent. Thanks!

Note: I am using dummy values which I will generate later

Suraj-Tiwari commented 4 years ago

in readme check troubleshooting 'Edit android/app/proguard-rules.pro and add' section

Suraj-Tiwari commented 3 years ago

stale