Skip to content

Commit

Permalink
Android SKD update 2.1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
kishan-cashfree committed Jul 3, 2024
1 parent b4154a7 commit 4d85cc5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation 'com.cashfree.pg:api:2.1.16'
implementation 'com.cashfree.pg:api:2.1.17'

androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/cashfree/sdk_sample/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import com.cashfree.pg.core.api.upi.CFUPI

data class Config(
// CFSession Inputs
val orderID: String = "order_4303292iSWwBghN1nOebKgo4P87Mg0dAI",
val paymentSessionID: String = "session_2APItsq13elTiiiC9zmxp-jPA_Q9x4LkZaQxI-Zn9hLNrj6VOnEkIZcgRMLD-X8yqOQradKcNYADtLW2FAbsGCPw54b_5v1O_odBF-Ex0o9M",
val orderID: String = "order_101024392ijDpmT2x2gzR0QsELvD3gFp6X5",
val paymentSessionID: String = "session_XN0VD4UyE9L2iJjQ4zZG-_4aXhFYDx3S3TGwpbLK3ZcRCJEClRr1YmFmicrkl-EyGOF4Z9ybtJaa29n8zTXtcdATPlvTdpXgx9I8RbGTxuC6",
val environment: CFSession.Environment = CFSession.Environment.SANDBOX,

//Card Payment Inputs
Expand All @@ -22,11 +22,11 @@ data class Config(

//UPI Collect mode
val collectMode: CFUPI.Mode = CFUPI.Mode.COLLECT,
val upiVpa: String = "testsuccess@gocash",
val upiVpa: String = "testfailure@gocash",

// UPI Intent mode
val intentMode: CFUPI.Mode = CFUPI.Mode.INTENT,
val upiAppPackage: String = "com.google.android.apps.nbu.paisa.user",
val upiAppPackage: String = "com.cashfree.cashfreetestupi",

//Wallet mode
val channel: String = "phonepe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public void doCardPayment(View view) {
.build();
cfCardPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfCardPayment.setLoaderEnable(true);

Expand Down Expand Up @@ -189,7 +190,8 @@ public void doCardEMIPayment(View view) {
.build();
cfCardPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfCardPayment.setLoaderEnable(true);
CFCorePaymentGatewayService.getInstance().doPayment(ElementCheckoutActivity.this, cfCardPayment);
Expand Down Expand Up @@ -224,7 +226,8 @@ public void doNetBankingPayment(View view) {
.build();
cfNetBankingPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfNetBankingPayment.setLoaderEnable(true);
CFCorePaymentGatewayService.getInstance().doPayment(ElementCheckoutActivity.this, cfNetBankingPayment);
Expand Down Expand Up @@ -267,7 +270,8 @@ public void doWalletPayment(View view) {
.build();
cfWalletPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfWalletPayment.setLoaderEnable(true);
CFCorePaymentGatewayService.getInstance().doPayment(ElementCheckoutActivity.this, cfWalletPayment);
Expand Down Expand Up @@ -302,7 +306,8 @@ public void doPayLaterPayment(View view) {
.build();
cfPayLaterPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfPayLaterPayment.setLoaderEnable(true);
CFCorePaymentGatewayService.getInstance().doPayment(ElementCheckoutActivity.this, cfPayLaterPayment);
Expand Down Expand Up @@ -358,7 +363,8 @@ private void initiatePayment(CFUPI.Mode mode, String id) {
.build();
cfupiPayment.setTheme(theme);
/**
* To set Loader UI before order pay network call
* To set Loader UI before order pay network call.
* This is optional for merchants. If they specially want to show UI loader then only enable it.
*/
cfupiPayment.setLoaderEnable(true);
CFCorePaymentGatewayService.getInstance().doPayment(ElementCheckoutActivity.this, cfupiPayment);
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = "https://maven.cashfree.com/release" }
}
}
rootProject.name = "Cashfree Android Sample"
Expand Down

0 comments on commit 4d85cc5

Please sign in to comment.