diff --git a/app/build.gradle b/app/build.gradle index 3ecf1e2..02d48d3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' diff --git a/app/src/main/java/com/cashfree/sdk_sample/Config.kt b/app/src/main/java/com/cashfree/sdk_sample/Config.kt index a7f9f06..29f961f 100644 --- a/app/src/main/java/com/cashfree/sdk_sample/Config.kt +++ b/app/src/main/java/com/cashfree/sdk_sample/Config.kt @@ -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 @@ -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", diff --git a/app/src/main/java/com/cashfree/sdk_sample/java/ElementCheckoutActivity.java b/app/src/main/java/com/cashfree/sdk_sample/java/ElementCheckoutActivity.java index 76ef7bf..bc17533 100644 --- a/app/src/main/java/com/cashfree/sdk_sample/java/ElementCheckoutActivity.java +++ b/app/src/main/java/com/cashfree/sdk_sample/java/ElementCheckoutActivity.java @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); diff --git a/settings.gradle b/settings.gradle index 401bfea..40c15a9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,6 +10,7 @@ dependencyResolutionManagement { repositories { google() mavenCentral() + maven { url = "https://maven.cashfree.com/release" } } } rootProject.name = "Cashfree Android Sample"