Suraj-Tiwari / react-native-payumoney

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

Merchant Key missing in release mode #43

Closed Moumit closed 4 years ago

Moumit commented 4 years ago

Working fine in debug mode but getting below exception in release mode, same code

09-13 01:15:35.341 10910 10950 E AndroidRuntime: java.lang.RuntimeException: Merchant Key missing
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.payumoney.core.d$b.<init>(SourceFile:84)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.payumoney.core.d$b.<init>(SourceFile:1)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.payumoney.core.d$b$a.v(SourceFile:1)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.surajtiwari.reactnativepayumoney.RNPayumoneyModule.pay(SourceFile:24)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.facebook.react.bridge.JavaMethodWrapper.invoke(SourceFile:18)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.facebook.react.bridge.JavaModuleWrapper.invoke(SourceFile:2)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:883)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:100)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(SourceFile:1)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:241)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(SourceFile:8)
09-13 01:15:35.341 10910 10950 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:919)
Moumit commented 4 years ago

This is resolved by adding below line in progurd.rules .. please also add on documentation

.........
-keep class com.surajtiwari.reactnativepayumoney.** { *; }
......
Suraj-Tiwari commented 4 years ago

thanks @Moumit, added in docs https://github.com/Suraj-Tiwari/react-native-payumoney/commit/18f8b571a6051df339342b4e2ff1a8a0968cba2e