Advance SDK Configuration

If you require to alter the SDK behaviour then following customisations available for Android SDK.

Custom Initialisation of the SDK

If you require to initialise the SDK yourself then follow the steps below

  1. Add the following to your values.xml file.
<bool name="cashfree_pg_core_auto_initialize_enabled">false</bool>
  1. Initialize the SDK yourself before attempting payment.
 CFPaymentGatewayService.initialize(getContext()); // Application Context.
 AnalyticsUtil.sendPaymentEventsToBackend(); // required for error reporting.

🚧

Note

Make sure to initialise the SDK in Application class or Activity or Fragment creation to avoid any Runtime issues.

Enable logging to debugging issues

If you are facing trouble while making a payment, you can take a look at the SDK debug logs to try and identify the issue.
To enable SDK logging add the following to your values.xml file.

<integer name="cashfree_pg_logging_level">3</integer>

Following are the Logging levels.

  • VERBOSE = 2
  • DEBUG = 3
  • INFO = 4
  • WARN = 5
  • ERROR = 6
  • ASSERT = 7

🚧

Note

Make sure to set the logging level back to value '4' before going live.

Disable Quick Checkout in Payment Page

If you want to disable quick checkout flow in Drop Payment flow you can add the following to your values.xml file.

<bool name="cf_quick_checkout_enabled">false</bool>