From b5b15f3e858e619cba96208bcfc35d16eb0f2a94 Mon Sep 17 00:00:00 2001 From: Kishan_maurya Date: Wed, 11 Sep 2024 17:37:25 +0530 Subject: [PATCH] Android Version 2.1.20 updated --- app/build.gradle | 9 +-------- app/src/main/java/com/cashfree/sdk_sample/Config.kt | 4 ++-- .../sdk_sample/java/ElementCheckoutActivity.java | 3 +++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cf92d50..e38eddc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,13 +61,6 @@ dependencies { implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.material3:material3' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - implementation 'com.cashfree.pg:api:2.1.19' - - androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00') - androidTestImplementation 'androidx.compose.ui:ui-test-junit4' - debugImplementation 'androidx.compose.ui:ui-tooling' - debugImplementation 'androidx.compose.ui:ui-test-manifest' + implementation 'com.cashfree.pg:api:2.1.20' } 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 4a28cdb..62aa548 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 = "devstudio_95987450", - val paymentSessionID: String = "session_Diki726QGmNZ3GRLMjM0G5HdSQ3CoaQFsU6qLVY4NRrOr98KtY0MWbMRo0kD_jkDHilmYpXX2Iurk1bHlgUXKiyPOeKXKTc_yJsWb4qm4pXY", + val orderID: String = "devstudio_272366234679", + val paymentSessionID: String = "session_XMb4ZaTSh28_jDZUUYCnPunUc7qEG-du57oawTj1kgnqy5lrukxCtk23z5o2WQ12SzExpuSbKJH_U2-R4YRN5l1oL-2jzzuLiHYmu0lY800D", val environment: CFSession.Environment = CFSession.Environment.SANDBOX, //Card Payment Inputs 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 76fffdd..737b8ad 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 @@ -136,6 +136,7 @@ public void doCardPayment(View view) { .setCardExpiryMonth(cardMM) .setCardExpiryYear(cardYY) .setCVV(cardCVV) + .setChannel("post") //This will be required for merchant if they want native opt flow .build(); //To Set your theme on Cashfree UI @@ -152,9 +153,11 @@ public void doCardPayment(View view) { .setCard(cfCard) .build(); cfCardPayment.setTheme(theme); + /** * To set Full Screen Loader UI before order pay network call. * This is optional for merchants. If they specially want to show UI loader then only enable it. + * Note : If Merchant wants to use Native OTP flow in card payment then this is required. */ cfCardPayment.setCfSDKFlow(CFPayment.CFSDKFlow.WITH_CASHFREE_FULLSCREEN_LOADER);