Migration From Android Embedded to Android Intent SDK
- Remove the below code from ‘repositories’ section of your project level build.gradle file
maven {
url '<url>'
credentials {
username '<username>'
password '<password>'
}
}


- Add the below code to ‘repositories’ section of your project level build.gradle file.
maven {
url "https://phonepe.mycloudrepo.io/public/repositories/phonepe-intentsdk-android"
}


- Remove below line from ‘dependencies’ section of your app build.gradle.
compile 'phonepe.thinsdk.android.release:merchantsdk:x.x.x'


- Add below line to ‘dependencies’ section of your app build.gradle.
For release notes.
implementation 'phonepe.intentsdk.android.release:IntentSDK:1.6.5'


- Remove the import statements as mentioned below in your java class:
import com.phonepe.android.sdk.api.PhonePeInitException;
import com.phonepe.android.sdk.api.builders.TransactionRequestBuilder;
import com.phonepe.android.sdk.base.model.TransactionRequest;
- Add the import statements as mentioned below in your java class:
import com.phonepe.intent.sdk.api.PhonePeInitException;
import com.phonepe.intent.sdk.api.TransactionRequest;
import com.phonepe.intent.sdk.api.TransactionRequestBuilder;
- Add below lines inside application tag of your AndroidManifest.xml file.
<!-- Keep it true in testing environment to view the log statements-->
<meta-data
android:name="com.phonepe.android.sdk.Debuggable"
android:value="false"/>
<!-- Keep it true in testing environment-->
<meta-data
android:name="com.phonepe.android.sdk.isUAT"
android:value="false"/>
- Display the PhonePe option only when PhonePe app is installed in the device.
- Display the PhonePe option on your checkout page only when PhonePe app is installed on the device.
- You may call below SDK function to check the PhonePe app availability in the device.
try {
PhonePe.isUPIAccountRegistered(new ShowPhonePeCallback() {
@Override
public void onResponse(boolean show) {
Log.d(TAG, "onResponse: "+show);
Toast.makeText(MainActivity.this, show? "YES":"NO", Toast.LENGTH_SHORT).show();
}
});
} catch (PhonePeInitException e) {
e.printStackTrace();
}
Updated 6 months ago