Integration
This section describes how to integrate CustomBrowser in your app module.
Getting Started
Add below dependency in your application's build.gradle.
If you are getting this error,
Default interface methods are only supported starting with Android N (--min-api 24): Landroidx/lifecycle/DefaultLifecycleObserver;onCreate(Landroidx/lifecycle/LifecycleOwner;)V
Add compileOptions on Apps Gradle,
From version 7.4.0 onwards it is mandatory to import UPI sdk dependency in case you want to make payments via any UPI option viz. : UPI Intent, Collect, Google Pay, PhonePe ,SamsungPay along with the changes mentioned here.
Merchants are advised to add below permission in application's AndroidManifest.xml to support OTP assist.
In case your application's supports min sdk less than 20 then kindly do these changes in your surl/furl.
CheckForPaymentAvailability
Function in CustomBrowser class. Checks for payment option type availability.
Invoking CustomBrowser
Invoking Custombrowser is just a 3 step procedure.
Create a basic object of CustomBrowserConfig like below(For more Configurations supported visit here):
Post Url can be any of the following:
Production - https://secure.payu.in/_payment
Staging - https://test.payu.in/_payment
2. Create an object of PayUCustomBrowserCallback.
3. Call method addCustomBrowser() like below:
Last updated