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

Not able to open payment screen in release build in android #165

Closed
amanmehta25 opened this issue Mar 29, 2019 · 7 comments
Closed

Not able to open payment screen in release build in android #165

amanmehta25 opened this issue Mar 29, 2019 · 7 comments

Comments

@amanmehta25
Copy link

amanmehta25 commented Mar 29, 2019

compileSdkVersion: 28
BuildToolVersion: 28.0.3
React: 16.8.3
React-native: 0.59.0
React-native-razorpay: 2.0.20

It's working fine in debug mode. But in release mode, the payment screen is not opening at all.
The catch block gets executed on calling the razorpay checkout open method.

I am building the apk by compiling sub-projects on above-mentioned versions. Here is the code :

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 28
                buildToolsVersion '28.0.3'
            }
        }
    }
}

Not sure how to debug the issue further on this.

Let me know if you need any other details.

@sumedht
Copy link
Contributor

sumedht commented Apr 1, 2019

@amanmehta25 Can u share log with what exception u r getting

@amanmehta25
Copy link
Author

@sumedht

We are sending the below data as payment options while making RazorpayCheckout.open(paymentOptions) call -

const paymentOptions = {
        key,
        amount,
        name,
        order_id,
        description,
        prefill: {
            method,
            email,
            contact
        },
        theme: {
            color
        }
    };

And we are getting this error -

error = {
    code: 3,
    description: {
        code: "BAD_REQUEST_ERROR",
        description: "The id provided does not exist"
    }
}

Note: This is working fine everytime in debug build.

@Mayur-Wadpalliwar
Copy link

@amanmehta25 You need to pass razorpay_order_id created using https://docs.razorpay.com/v1/page/orders under order_id param

@Mayur-Wadpalliwar
Copy link

@amanmehta25 Also check if razorpay_order_id was created using the same keys which are being used to invoke the checkout

@amanmehta25
Copy link
Author

Able to figure out this issue. I was passing the correct razorpay_order_id. There was some issue with the keys config only. Thanks a lot razorpay team for your help and support.

@ayushsingh9084
Copy link

Able to figure out this issue. I was passing the correct razorpay_order_id. There was some issue with the keys config only. Thanks a lot razorpay team for your help and support.

can you explain me how you resolve your issue?

@shashankmeddo
Copy link

Copy-keepclassmembers class * {
@android.webkit.JavascriptInterface ;
}

-keepattributes JavascriptInterface
-keepattributes Annotation

-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}

-optimizations !method/inlining/*

-keepclasseswithmembers class * {
public void onPayment*(...);
}

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

5 participants