Advance SDK Configuration

If you require to alter the SDK behaviour then following customisations available for React-Native SDK.

🚧

Note

These configurations will only affect Android Platform.

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>

Add Custom Analytics subscriber

From our React-Native SDK version 2.0.1 onwards, you can subscribe to the analytics events generated from our Drop checkout payment flow and push it to the analytics platform of your choice directly from your application.

If you want to enable this feature in Drop Payment flow you can add the following line to your values.xml file.

<bool name="cashfree_custom_analytics_subscriber_enabled">true</bool>
CFPaymentGatewayService.setEventSubscriber({
            onReceivedEvent(eventName, map) {
                console.log('Event recieved on screen: ' +
                    eventName +
                    ' map: ' +
                    JSON.stringify(map));
            },
});

componentWillUnmount() {
				...
        CFPaymentGatewayService.removeEventSubscriber();
}


Subscribe to Developer Updates