1. Setting up the SDK

Gradle Changes

Add Cashfree maven repository

Add to your module's build.gradle file if your gradle version is less than 6.+ or below.

repositories 
{
    maven 
    { 
      url 'https://maven.cashfree.com/release'
      content {
        includeGroup "com.cashfree.pg"
        }
    }
}

If you are using Gradle version 7.+ in your project then add the maven repository in your settings.gradle file

dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  repositories {
  ...
    maven 
    { 
      url 'https://maven.cashfree.com/release'
    }
  }
}

add the following lines to the dependencies section of the build.gradle file

implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.gridlayout:gridlayout:1.0.0'

implementation 'com.cashfree.pg:api:1.1.3'

You can use the ChangeLog to get the latest version of the SDK here.

Application Integrity

The latest versions of our Android SDK(1.1.0 and newer) comes with Play Integrity API integration which prevents applications from using our payment features if the application is distributed outside of playstore. This enables us to protect our merchants from potentially risky and fraudulent interactions, such as cheating and unauthorized access, allowing us to respond with appropriate actions to prevent attacks and reduce abuse.

Apps on Google Play

In the Play Console, navigate to the Release section of the left menu. Go to Setup > App integrity. Select the Integrity API tab and enable it.

1074

Apps distributed outside Google Play Store

If your application is distributed outside of the play store get in touch with your account manager or write an email to [email protected]