diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index e115ebef..df7bdb83 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -161,8 +161,8 @@ dependencies { // implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:1.12.10") implementation("us.zoom.videosdk:zoomvideosdk-core:2.1.10") - implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:2.1.10") - implementation("us.zoom.videosdk:zoomvideosdk-annotation:2.1.10") +// implementation("us.zoom.videosdk:zoomvideosdk-videoeffects:2.1.10") +// implementation("us.zoom.videosdk:zoomvideosdk-annotation:2.1.10") // Networking implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11") @@ -206,8 +206,8 @@ dependencies { implementation("com.huawei.hms:health:6.11.0.300") implementation("com.huawei.hms:hmscoreinstaller:6.6.0.300") - implementation("com.github.kittinunf.fuel:fuel:2.3.1") - implementation("com.github.kittinunf.fuel:fuel-android:2.3.1") +// implementation("com.github.kittinunf.fuel:fuel:2.3.1") +// implementation("com.github.kittinunf.fuel:fuel-android:2.3.1") // implementation("com.opentok.android:opentok-android-sdk:2.25.2") @@ -219,14 +219,33 @@ dependencies { implementation("com.google.android.material:material:1.12.0") implementation("pl.droidsonroids.gif:android-gif-drawable:1.2.29") - implementation("com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1") +// implementation("com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1") androidTestImplementation("androidx.test:core:1.6.1") - implementation("com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0") +// implementation("com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5") // implementation(project(":vitalSignEngine")) } +tasks.matching { it.name.contains("minify") && it.name.contains("R8") }.configureEach { + doFirst { + inputs.files.forEach { file -> + if (file.isFile && (file.name.endsWith(".txt") || file.name.endsWith(".pro")) && file.canWrite()) { + val content = file.readText() + val sanitized = content + .replace(Regex("""(?m)^\s*-keep\s+class\s+\*\s*\{.*$"""), "# stripped -keep class *") + .replace(Regex("""(?m)^\s*-keep\s+class\s+androidx\.\*\*\s*\{.*$"""), "# stripped -keep class androidx.**") + .replace(Regex("""(?m)^\s*-keep\s+class\s+android\.\*\*\s*\{.*$"""), "# stripped -keep class android.**") + .replace(Regex("""(?m)^\s*-keep\s+class\s+com\.google\.\*\*\s*\{.*$"""), "# stripped -keep class com.google.**") + if (sanitized != content) { + println("Sanitizing overly broad ProGuard rules in: ${file.absolutePath}") + file.writeText(sanitized) + } + } + } + } +} + tasks.whenTaskAdded { if (name.contains("merge") && name.contains("NativeLibs")) { doLast { diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 68b506a1..f01c75f3 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -26,7 +26,7 @@ -keep class io.flutter.plugins.** { *; } -dontwarn io.flutter.embedding.** -keep class com.huawei.hms.flutter.** { *; } --repackageclasses +#-repackageclasses ## Flutter WebRTC -keep class com.cloudwebrtc.webrtc.** { *; } @@ -89,3 +89,15 @@ -keep interface com.payfort.fortpaymentsdk.** {*;} -keep class com.payfort.fortpaymentsdk.** {*;} + +# MyFatoorah SDK (scoped rules without global -keep class *) +-dontwarn org.slf4j.impl.** +-dontwarn java.lang.invoke.StringConcatFactory +-dontwarn com.google.android.play.core.** +-dontwarn android.content.res.** +-keep class org.xmlpull.** { *; } +-keepclassmembers class org.xmlpull.** { *; } +-keep class com.myfatoorah.sdk.** { *; } +-keep class com.myfatoorah.** { *; } +-keep class com.myfatoorahflutter.** { *; } +-keep class org.apache.http.** { *; } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b6188224..ffe48033 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -41,6 +41,11 @@ android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" tools:node="remove" /> + + + diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 29a4e9da..b07617f2 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -88,6 +88,31 @@ allprojects { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } + if (project.name == "myfatoorah_flutter") { + android.defaultConfig.consumerProguardFiles.clear() + android.buildTypes.all { + consumerProguardFiles.clear() + } + } + } + } + project.tasks.matching { it.name.contains("ConsumerProguardFiles") }.configureEach { + doLast { + outputs.files.forEach { dirOrFile -> + dirOrFile.walkTopDown() + .filter { it.isFile && (it.name.endsWith(".txt") || it.name.endsWith(".pro")) } + .forEach { proFile -> + val content = proFile.readText() + val sanitized = content + .replace(Regex("""(?m)^\s*-keep\s+class\s+\*\s*\{.*$"""), "# stripped -keep class *") + .replace(Regex("""(?m)^\s*-keep\s+class\s+androidx\.\*\*\s*\{.*$"""), "# stripped -keep class androidx.**") + .replace(Regex("""(?m)^\s*-keep\s+class\s+android\.\*\*\s*\{.*$"""), "# stripped -keep class android.**") + .replace(Regex("""(?m)^\s*-keep\s+class\s+com\.google\.\*\*\s*\{.*$"""), "# stripped -keep class com.google.**") + if (sanitized != content) { + proFile.writeText(sanitized) + } + } + } } } project.tasks.withType().configureEach { diff --git a/android/gradle.properties b/android/gradle.properties index 0e253cc0..f478a529 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,12 +1,12 @@ -#org.gradle.jvmargs=-xmx4608m android.enableR8=true -android.enableR8.fullMode=true +android.enableR8.fullMode=false android.enableJetifier=true android.useDeprecatedNdk=true -org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +#org.gradle.jvmargs=-Xmx6144m -XX:MaxMetaspaceSize=1024m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=2048m -XX:+UseG1GC -Dfile.encoding=UTF-8 +kotlin.daemon.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m org.gradle.daemon=true org.gradle.parallel=true -org.gradle.configureondemand=true android.useAndroidX=true android.enableImpeller=false # This builtInKotlin flag was added automatically by Flutter migrator diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 434a4219..9e252e16 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -43,7 +43,8 @@ plugins { id("com.google.gms.google-services") version("4.4.1") apply false // END: FlutterFire Configuration id("com.android.application") version "8.11.1" apply false - id("org.jetbrains.kotlin.android") version "2.2.20" apply false +// id("org.jetbrains.kotlin.android") version "2.2.20" apply false + id("org.jetbrains.kotlin.android") version "2.4.20" apply false } include(":app") diff --git a/assets/images/png/Carparking_services_image.png b/assets/images/png/Carparking_services_image.png index 9ce08c78..43a918cc 100644 Binary files a/assets/images/png/Carparking_services_image.png and b/assets/images/png/Carparking_services_image.png differ diff --git a/assets/images/png/bmi_image_1.png b/assets/images/png/bmi_image_1.png index db3a6133..91a5a7ca 100644 Binary files a/assets/images/png/bmi_image_1.png and b/assets/images/png/bmi_image_1.png differ diff --git a/assets/images/png/female_bmi.png b/assets/images/png/female_bmi.png index 437f1dc1..534edf1e 100644 Binary files a/assets/images/png/female_bmi.png and b/assets/images/png/female_bmi.png differ diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 5aee1311..bf30324e 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -1,7 +1,7 @@ import 'package:amazon_payfort/amazon_payfort.dart'; import 'package:flutter_amazonpaymentservices/environment_type.dart'; import 'package:hmg_patient_app_new/core/enums.dart'; -import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; +// import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; class ApiConsts { static const maxSmallScreen = 660; @@ -45,8 +45,8 @@ class ApiConsts { // var payFortEnvironment = FortEnvironment.test; // var applePayMerchantId = "merchant.com.hmgwebservices.uat"; - static var myFatoorahEnvironmentType = MFEnvironment.TEST; - static var myFatoorahCountry = MFCountry.SAUDIARABIA; + // static var myFatoorahEnvironmentType = MFEnvironment.TEST; + // static var myFatoorahCountry = MFCountry.SAUDIARABIA; static setBackendURLs() { switch (appEnvironmentType) { @@ -54,8 +54,8 @@ class ApiConsts { baseUrl = "https://hmgwebservices.com/"; payFortEnvironment = FortEnvironment.production; payFortEnvironmentType = EnvironmentType.production; - myFatoorahEnvironmentType = MFEnvironment.LIVE; - myFatoorahCountry = MFCountry.SAUDIARABIA; + // myFatoorahEnvironmentType = MFEnvironment.LIVE; + // myFatoorahCountry = MFCountry.SAUDIARABIA; applePayMerchantId = "merchant.com.hmgwebservices"; SERVICE_URL = "https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx"; TAMARA_URL = "https://mdlaboratories.com/tamaralive/Home/Checkout"; @@ -72,8 +72,8 @@ class ApiConsts { baseUrl = "https://uat.hmgwebservices.com/"; payFortEnvironment = FortEnvironment.test; payFortEnvironmentType = EnvironmentType.sandbox; - myFatoorahEnvironmentType = MFEnvironment.TEST; - myFatoorahCountry = MFCountry.KUWAIT; + // myFatoorahEnvironmentType = MFEnvironment.TEST; + // myFatoorahCountry = MFCountry.KUWAIT; applePayMerchantId = "merchant.com.hmgwebservices.uat"; SERVICE_URL = 'https://uat.hmgwebservices.com/HMGPayment/pages/SendPayFortRequest.aspx'; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; @@ -90,8 +90,8 @@ class ApiConsts { baseUrl = "https://uat.hmgwebservices.com/"; payFortEnvironment = FortEnvironment.test; payFortEnvironmentType = EnvironmentType.sandbox; - myFatoorahEnvironmentType = MFEnvironment.TEST; - myFatoorahCountry = MFCountry.KUWAIT; + // myFatoorahEnvironmentType = MFEnvironment.TEST; + // myFatoorahCountry = MFCountry.KUWAIT; applePayMerchantId = "merchant.com.hmgwebservices.uat"; SERVICE_URL = 'https://uat.hmgwebservices.com/HMGPayment/pages/SendPayFortRequest.aspx'; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; @@ -109,8 +109,8 @@ class ApiConsts { baseUrl = "https://webservices.hmg.com/"; payFortEnvironment = FortEnvironment.production; payFortEnvironmentType = EnvironmentType.production; - myFatoorahEnvironmentType = MFEnvironment.LIVE; - myFatoorahCountry = MFCountry.SAUDIARABIA; + // myFatoorahEnvironmentType = MFEnvironment.LIVE; + // myFatoorahCountry = MFCountry.SAUDIARABIA; applePayMerchantId = "merchant.com.hmgwebservices"; SERVICE_URL = "https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx"; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; @@ -128,8 +128,8 @@ class ApiConsts { baseUrl = "https://uat.hmgwebservices.com/"; payFortEnvironment = FortEnvironment.test; payFortEnvironmentType = EnvironmentType.sandbox; - myFatoorahEnvironmentType = MFEnvironment.TEST; - myFatoorahCountry = MFCountry.KUWAIT; + // myFatoorahEnvironmentType = MFEnvironment.TEST; + // myFatoorahCountry = MFCountry.KUWAIT; applePayMerchantId = "merchant.com.hmgwebservices.uat"; SERVICE_URL = 'https://uat.hmgwebservices.com/HMGPayment/pages/SendPayFortRequest.aspx'; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; @@ -147,8 +147,8 @@ class ApiConsts { baseUrl = "https://uat.hmgwebservices.com/"; payFortEnvironment = FortEnvironment.test; payFortEnvironmentType = EnvironmentType.sandbox; - myFatoorahEnvironmentType = MFEnvironment.TEST; - myFatoorahCountry = MFCountry.KUWAIT; + // myFatoorahEnvironmentType = MFEnvironment.TEST; + // myFatoorahCountry = MFCountry.KUWAIT; applePayMerchantId = "merchant.com.hmgwebservices.uat"; SERVICE_URL = 'https://uat.hmgwebservices.com/HMGPayment/pages/SendPayFortRequest.aspx'; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; diff --git a/lib/features/myfatoorah/myfatoorah_view_model.dart b/lib/features/myfatoorah/myfatoorah_view_model.dart index b76b251e..3799cfa5 100644 --- a/lib/features/myfatoorah/myfatoorah_view_model.dart +++ b/lib/features/myfatoorah/myfatoorah_view_model.dart @@ -16,7 +16,7 @@ import 'package:hmg_patient_app_new/generated/codegen_loader.g.dart'; import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; -import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; +// import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; class MyFatoorahViewModel extends ChangeNotifier { final AppState appState; @@ -36,7 +36,7 @@ class MyFatoorahViewModel extends ChangeNotifier { initiateCardPayment({ num amount = 10.0, paymentDescription = "", - String displayCurrencyIso = MFCurrencyISO.KUWAIT_KWD, + // String displayCurrencyIso = MFCurrencyISO.KUWAIT_KWD, required String paymentOption, required String liveServiceID, required String isScheduleLiveCare, @@ -46,117 +46,117 @@ class MyFatoorahViewModel extends ChangeNotifier { required String fileNumber, required String serviceID, required String projectID, - Function(MFGetPaymentStatusResponse)? onSuccess, + // Function(MFGetPaymentStatusResponse)? onSuccess, Function(String)? onError, }) async { - LoaderBottomSheet.showLoader(); - await MFSDK.init(MyFatoorahConfig.configAPIKey, ApiConsts.myFatoorahCountry, ApiConsts.myFatoorahEnvironmentType); - - MFSDK.setUpActionBar(toolBarTitle: paymentDescription, toolBarTitleColor: "#ffffff", toolBarBackgroundColor: '#ED1C2B', isShowToolBar: true); - - var request = MFExecutePaymentRequest(paymentMethodId: paymentOption.toLowerCase() == "mada" ? 6 : 2, invoiceValue: amount); - request.displayCurrencyIso = displayCurrencyIso; - request.customerName = ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? "Test test" : "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"; - request.customerEmail = "CustID_${appState.getAuthenticatedUser()!.patientId}@HMG.com"; - - await MFSDK.executePayment(request, appState.isArabic() ? MFLanguage.ARABIC : MFLanguage.ENGLISH, (invoiceId) async { - PayfortRequestInsertModel payfortRequestInsertModel = PayfortRequestInsertModel(); - - payfortRequestInsertModel.commandType = "SALE"; - payfortRequestInsertModel.amount = amount; - payfortRequestInsertModel.customerEmail = getIt.get().getAuthenticatedUser()!.emailAddress; - payfortRequestInsertModel.orderDescription = paymentDescription; - payfortRequestInsertModel.serviceID = serviceID; - payfortRequestInsertModel.paymentOption = paymentOption; - payfortRequestInsertModel.clientRequestID = invoiceId; - payfortRequestInsertModel.projectID = projectID; - payfortRequestInsertModel.fileNumber = getIt.get().getAuthenticatedUser()!.patientId.toString(); - payfortRequestInsertModel.customerName = "${getIt.get().getAuthenticatedUser()!.firstName} ${getIt.get().getAuthenticatedUser()!.lastName}"; - payfortRequestInsertModel.currency = getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED"; - payfortRequestInsertModel.liveServiceID = liveServiceID; - payfortRequestInsertModel.latitude = getIt.get().userLat.toString(); - payfortRequestInsertModel.longitude = getIt.get().userLong.toString(); - payfortRequestInsertModel.merchantReference = invoiceId; - payfortRequestInsertModel.deviceToken = await Utils.getStringFromPrefs(CacheConst.pushToken); - payfortRequestInsertModel.language = getIt.get().isArabic() ? "ar" : "en"; - payfortRequestInsertModel.integrationId = "6"; // PayTabs integration ID - payfortRequestInsertModel.isSchedule = isScheduleLiveCare; - payfortRequestInsertModel.appointmentDate = appointmentDate; - payfortRequestInsertModel.appointmentNo = appointmentNo; - payfortRequestInsertModel.doctorID = doctorID; - - // Call request insert API before payment - await paytabsRequestInsert(payfortRequestInsertModel: payfortRequestInsertModel); - - LoaderBottomSheet.hideLoader(); - }).then((value) async { - var valJson = value.toString(); - print(valJson); - - // // Create PayfortResponseInsertModel (same as Payfort implementation) - PayfortResponseInsertModel payfortResponseInsertModel = PayfortResponseInsertModel(); - - payfortResponseInsertModel.fortId = value.invoiceTransactions!.first.transactionId ?? ""; - payfortResponseInsertModel.commandType = "SALE"; - // payfortResponseInsertModel.amount = paytabsTransactionResponseModel.tranTotal ?? 0; - payfortResponseInsertModel.amount = amount; - payfortResponseInsertModel.sadadOLP = ""; - payfortResponseInsertModel.paymentOption = value.invoiceTransactions!.first.paymentGateway ?? ""; - payfortResponseInsertModel.customerIP = ""; - payfortResponseInsertModel.eCI = ""; - payfortResponseInsertModel.responseMessage = value.invoiceTransactions!.first.transactionStatus ?? ""; - payfortResponseInsertModel.cardNumber = value.invoiceTransactions!.first.cardNumber ?? ""; - payfortResponseInsertModel.cardBin = ""; - payfortResponseInsertModel.installmentsNumber = 0; - payfortResponseInsertModel.status = (value.invoiceStatus ?? "").toLowerCase() == "paid" ? "14" : "00"; - payfortResponseInsertModel.merchantRef = value.invoiceId.toString(); - payfortResponseInsertModel.isRefund = false; - payfortResponseInsertModel.remmeberMe = true; - payfortResponseInsertModel.reconciliationReference = ""; - - // Call response insert API after payment - await paytabsResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel); - - if ((value.invoiceStatus ?? "").toLowerCase() == "paid") { - if (onSuccess != null) { - onSuccess(value); - } - } else { - if (onError != null) { - onError(LocaleKeys.paymentFailedPleaseTryAgain.tr()); - } - } - }).catchError((error) { - if (onError != null) { - onError(error.message); - } - }); + // LoaderBottomSheet.showLoader(); + // await MFSDK.init(MyFatoorahConfig.configAPIKey, ApiConsts.myFatoorahCountry, ApiConsts.myFatoorahEnvironmentType); + // + // MFSDK.setUpActionBar(toolBarTitle: paymentDescription, toolBarTitleColor: "#ffffff", toolBarBackgroundColor: '#ED1C2B', isShowToolBar: true); + // + // var request = MFExecutePaymentRequest(paymentMethodId: paymentOption.toLowerCase() == "mada" ? 6 : 2, invoiceValue: amount); + // request.displayCurrencyIso = displayCurrencyIso; + // request.customerName = ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? "Test test" : "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"; + // request.customerEmail = "CustID_${appState.getAuthenticatedUser()!.patientId}@HMG.com"; + // + // await MFSDK.executePayment(request, appState.isArabic() ? MFLanguage.ARABIC : MFLanguage.ENGLISH, (invoiceId) async { + // PayfortRequestInsertModel payfortRequestInsertModel = PayfortRequestInsertModel(); + // + // payfortRequestInsertModel.commandType = "SALE"; + // payfortRequestInsertModel.amount = amount; + // payfortRequestInsertModel.customerEmail = getIt.get().getAuthenticatedUser()!.emailAddress; + // payfortRequestInsertModel.orderDescription = paymentDescription; + // payfortRequestInsertModel.serviceID = serviceID; + // payfortRequestInsertModel.paymentOption = paymentOption; + // payfortRequestInsertModel.clientRequestID = invoiceId; + // payfortRequestInsertModel.projectID = projectID; + // payfortRequestInsertModel.fileNumber = getIt.get().getAuthenticatedUser()!.patientId.toString(); + // payfortRequestInsertModel.customerName = "${getIt.get().getAuthenticatedUser()!.firstName} ${getIt.get().getAuthenticatedUser()!.lastName}"; + // payfortRequestInsertModel.currency = getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED"; + // payfortRequestInsertModel.liveServiceID = liveServiceID; + // payfortRequestInsertModel.latitude = getIt.get().userLat.toString(); + // payfortRequestInsertModel.longitude = getIt.get().userLong.toString(); + // payfortRequestInsertModel.merchantReference = invoiceId; + // payfortRequestInsertModel.deviceToken = await Utils.getStringFromPrefs(CacheConst.pushToken); + // payfortRequestInsertModel.language = getIt.get().isArabic() ? "ar" : "en"; + // payfortRequestInsertModel.integrationId = "6"; // PayTabs integration ID + // payfortRequestInsertModel.isSchedule = isScheduleLiveCare; + // payfortRequestInsertModel.appointmentDate = appointmentDate; + // payfortRequestInsertModel.appointmentNo = appointmentNo; + // payfortRequestInsertModel.doctorID = doctorID; + // + // // Call request insert API before payment + // await paytabsRequestInsert(payfortRequestInsertModel: payfortRequestInsertModel); + // + // LoaderBottomSheet.hideLoader(); + // }).then((value) async { + // var valJson = value.toString(); + // print(valJson); + // + // // // Create PayfortResponseInsertModel (same as Payfort implementation) + // PayfortResponseInsertModel payfortResponseInsertModel = PayfortResponseInsertModel(); + // + // payfortResponseInsertModel.fortId = value.invoiceTransactions!.first.transactionId ?? ""; + // payfortResponseInsertModel.commandType = "SALE"; + // // payfortResponseInsertModel.amount = paytabsTransactionResponseModel.tranTotal ?? 0; + // payfortResponseInsertModel.amount = amount; + // payfortResponseInsertModel.sadadOLP = ""; + // payfortResponseInsertModel.paymentOption = value.invoiceTransactions!.first.paymentGateway ?? ""; + // payfortResponseInsertModel.customerIP = ""; + // payfortResponseInsertModel.eCI = ""; + // payfortResponseInsertModel.responseMessage = value.invoiceTransactions!.first.transactionStatus ?? ""; + // payfortResponseInsertModel.cardNumber = value.invoiceTransactions!.first.cardNumber ?? ""; + // payfortResponseInsertModel.cardBin = ""; + // payfortResponseInsertModel.installmentsNumber = 0; + // payfortResponseInsertModel.status = (value.invoiceStatus ?? "").toLowerCase() == "paid" ? "14" : "00"; + // payfortResponseInsertModel.merchantRef = value.invoiceId.toString(); + // payfortResponseInsertModel.isRefund = false; + // payfortResponseInsertModel.remmeberMe = true; + // payfortResponseInsertModel.reconciliationReference = ""; + // + // // Call response insert API after payment + // await paytabsResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel); + // + // if ((value.invoiceStatus ?? "").toLowerCase() == "paid") { + // if (onSuccess != null) { + // onSuccess(value); + // } + // } else { + // if (onError != null) { + // onError(LocaleKeys.paymentFailedPleaseTryAgain.tr()); + // } + // } + // }).catchError((error) { + // if (onError != null) { + // onError(error.message); + // } + // }); } executeApplePayPayment() { - MFApplepay.executeApplePayPayment(onInvoiceCreated: (invoiceID) { - log( - invoiceID.toString(), - ); - }).then((value) { - log( - value.toString(), - ); - }).catchError((error) { - log(error.message); - }); + // MFApplepay.executeApplePayPayment(onInvoiceCreated: (invoiceID) { + // log( + // invoiceID.toString(), + // ); + // }).then((value) { + // log( + // value.toString(), + // ); + // }).catchError((error) { + // log(error.message); + // }); } initApplePayPayment(num invoiceValue) async { - await MFSDK.init(MyFatoorahConfig.configAPIKey, ApiConsts.myFatoorahCountry, ApiConsts.myFatoorahEnvironmentType); - - await MFSDK.initSession(MFInitiateSessionRequest(), MFLanguage.ENGLISH).then((value) async { - var executePaymentRequest = MFExecutePaymentRequest(invoiceValue: invoiceValue, sessionId: value.sessionId, displayCurrencyIso: MFCurrencyISO.SAUDIARABIA_SAR); - - MFApplepay.setupApplePay(value, executePaymentRequest, MFLanguage.ENGLISH, merchantName: "Dr Sulaiman Al Habib"); - }).catchError((error) { - log(error.message); - }); + // await MFSDK.init(MyFatoorahConfig.configAPIKey, ApiConsts.myFatoorahCountry, ApiConsts.myFatoorahEnvironmentType); + // + // await MFSDK.initSession(MFInitiateSessionRequest(), MFLanguage.ENGLISH).then((value) async { + // var executePaymentRequest = MFExecutePaymentRequest(invoiceValue: invoiceValue, sessionId: value.sessionId, displayCurrencyIso: MFCurrencyISO.SAUDIARABIA_SAR); + // + // MFApplepay.setupApplePay(value, executePaymentRequest, MFLanguage.ENGLISH, merchantName: "Dr Sulaiman Al Habib"); + // }).catchError((error) { + // log(error.message); + // }); } Future paytabsRequestInsert({required PayfortRequestInsertModel payfortRequestInsertModel, Function(dynamic)? onSuccess, Function(String)? onError}) async { diff --git a/lib/features/paytabs/paytabs_view_model.dart b/lib/features/paytabs/paytabs_view_model.dart index 35d3c85b..bffb6b91 100644 --- a/lib/features/paytabs/paytabs_view_model.dart +++ b/lib/features/paytabs/paytabs_view_model.dart @@ -1,14 +1,14 @@ import 'package:flutter/material.dart'; -import 'package:flutter_paytabs_bridge/BaseBillingShippingInfo.dart'; -import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart'; -import 'package:flutter_paytabs_bridge/PaymentSDKNetworks.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkApms.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkLocale.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkTokenFormat.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart'; -import 'package:flutter_paytabs_bridge/PaymentSdkTransactionType.dart'; -import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart'; +// import 'package:flutter_paytabs_bridge/BaseBillingShippingInfo.dart'; +// import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSDKNetworks.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkApms.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkLocale.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkTokenFormat.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart'; +// import 'package:flutter_paytabs_bridge/PaymentSdkTransactionType.dart'; +// import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/cache_consts.dart'; @@ -27,7 +27,7 @@ import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; class PayTabsViewModel extends ChangeNotifier { - late PaymentSdkConfigurationDetails paymentConfiguration; + // late PaymentSdkConfigurationDetails paymentConfiguration; final AppState appState; final PayfortRepo payfortRepo; final ErrorHandlerService errorHandlerService; @@ -42,148 +42,148 @@ class PayTabsViewModel extends ChangeNotifier { }); setPaymentConfiguration(String paymentDescription, num amount, int serviceID, int projectID, {bool isAddCard = false}) async { - String cartID = DateTime.now().millisecondsSinceEpoch.toString(); - - LoaderBottomSheet.showLoader(); - - await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID); - - paymentConfiguration = PaymentSdkConfigurationDetails( - profileId: paytabsProjectDetailsRespModel!.merchantIdentifier, - serverKey: paytabsProjectDetailsRespModel!.accessCode, - clientKey: paytabsProjectDetailsRespModel!.shaResponse, - - // profileId: PaymentSdkDefaultConfig.profileID, - // serverKey: PaymentSdkDefaultConfig.serverKey, - // clientKey: PaymentSdkDefaultConfig.clientKey, - - transactionType: PaymentSdkTransactionType.SALE, - cartId: cartID.substring((cartID.length - 5), cartID.length), - cartDescription: paymentDescription, - merchantName: PaymentSdkDefaultConfig.defaultMerchantName, - locale: appState.isArabic() ? PaymentSdkLocale.AR : PaymentSdkLocale.EN, - merchantApplePayIndentifier: ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat - ? PaymentSdkDefaultConfig.defaultMerchantAppleBundleIDUAT - : PaymentSdkDefaultConfig.defaultMerchantAppleBundleID, - // merchantApplePayIndentifier: PaymentSdkDefaultConfig.defaultMerchantAppleBundleIDUAT, - screentTitle: paymentDescription, - amount: amount.toDouble(), - showBillingInfo: false, - forceShippingInfo: false, - // currencyCode: PaymentSdkDefaultConfig.defaultCurrency, - currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED", - merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode, - billingDetails: BillingDetails( - "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", - "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", - appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", - "Riyadh", - "SA", - "Riyadh", - "Riyadh", - "12626"), - shippingDetails: ShippingDetails( - "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", - "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", - appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", - "Riyadh", - "SA", - "Riyadh", - "Riyadh", - "12626"), - alternativePaymentMethods: [], - linkBillingNameWithCardHolderName: true, - simplifyApplePayValidation: true, - ); - - paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( - // logoImage: "assets/images/png/hmg_logo.png", - backgroundColor: "ffffff", - backgroundColorDark: "ffffff", - secondaryColor: "191919", - secondaryColorDark: "191919", - primaryColor: "ffffff", - primaryColorDark: "ffffff", - // primaryFont: "Poppins", - titleFontColor: "2E3039", - titleFontColorDark: "2E3039", - // titleFont: "Poppins", - primaryFontColor: "2E3039", - primaryFontColorDark: "2E3039", - inputFieldBackgroundColor: "ffffff", - inputFieldBackgroundColorDark: "ffffff", - placeholderColor: "2E3039", - placeholderColorDark: "2E3039", - buttonColor: "ED1C2B", - buttonColorDark: "ED1C2B", - inputsCornerRadius: 12 - // buttonFont: "Poppins", - ); - paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.USER_OPTIONAL_DEFAULT_ON; - paymentConfiguration.tokenFormat = PaymentSdkTokenFormat.Hex32Format; - - notifyListeners(); + // String cartID = DateTime.now().millisecondsSinceEpoch.toString(); + // + // LoaderBottomSheet.showLoader(); + // + // await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID); + // + // paymentConfiguration = PaymentSdkConfigurationDetails( + // profileId: paytabsProjectDetailsRespModel!.merchantIdentifier, + // serverKey: paytabsProjectDetailsRespModel!.accessCode, + // clientKey: paytabsProjectDetailsRespModel!.shaResponse, + // + // // profileId: PaymentSdkDefaultConfig.profileID, + // // serverKey: PaymentSdkDefaultConfig.serverKey, + // // clientKey: PaymentSdkDefaultConfig.clientKey, + // + // transactionType: PaymentSdkTransactionType.SALE, + // cartId: cartID.substring((cartID.length - 5), cartID.length), + // cartDescription: paymentDescription, + // merchantName: PaymentSdkDefaultConfig.defaultMerchantName, + // locale: appState.isArabic() ? PaymentSdkLocale.AR : PaymentSdkLocale.EN, + // merchantApplePayIndentifier: ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat + // ? PaymentSdkDefaultConfig.defaultMerchantAppleBundleIDUAT + // : PaymentSdkDefaultConfig.defaultMerchantAppleBundleID, + // // merchantApplePayIndentifier: PaymentSdkDefaultConfig.defaultMerchantAppleBundleIDUAT, + // screentTitle: paymentDescription, + // amount: amount.toDouble(), + // showBillingInfo: false, + // forceShippingInfo: false, + // // currencyCode: PaymentSdkDefaultConfig.defaultCurrency, + // currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED", + // merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode, + // billingDetails: BillingDetails( + // "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", + // "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", + // appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", + // "Riyadh", + // "SA", + // "Riyadh", + // "Riyadh", + // "12626"), + // shippingDetails: ShippingDetails( + // "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", + // "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", + // appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", + // "Riyadh", + // "SA", + // "Riyadh", + // "Riyadh", + // "12626"), + // alternativePaymentMethods: [], + // linkBillingNameWithCardHolderName: true, + // simplifyApplePayValidation: true, + // ); + // + // paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( + // // logoImage: "assets/images/png/hmg_logo.png", + // backgroundColor: "ffffff", + // backgroundColorDark: "ffffff", + // secondaryColor: "191919", + // secondaryColorDark: "191919", + // primaryColor: "ffffff", + // primaryColorDark: "ffffff", + // // primaryFont: "Poppins", + // titleFontColor: "2E3039", + // titleFontColorDark: "2E3039", + // // titleFont: "Poppins", + // primaryFontColor: "2E3039", + // primaryFontColorDark: "2E3039", + // inputFieldBackgroundColor: "ffffff", + // inputFieldBackgroundColorDark: "ffffff", + // placeholderColor: "2E3039", + // placeholderColorDark: "2E3039", + // buttonColor: "ED1C2B", + // buttonColorDark: "ED1C2B", + // inputsCornerRadius: 12 + // // buttonFont: "Poppins", + // ); + // paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.USER_OPTIONAL_DEFAULT_ON; + // paymentConfiguration.tokenFormat = PaymentSdkTokenFormat.Hex32Format; + // + // notifyListeners(); } setAlternatePaymentConfiguration(String paymentDescription, num amount, int serviceID, int projectID, {bool isAddCard = false}) async { String cartID = DateTime.now().millisecondsSinceEpoch.toString(); - LoaderBottomSheet.showLoader(); - - await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID); - - paymentConfiguration = PaymentSdkConfigurationDetails( - profileId: paytabsProjectDetailsRespModel!.merchantIdentifier, - serverKey: paytabsProjectDetailsRespModel!.accessCode, - clientKey: paytabsProjectDetailsRespModel!.shaResponse, - transactionType: PaymentSdkTransactionType.SALE, - cartId: cartID.substring((cartID.length - 5), cartID.length), - cartDescription: paymentDescription, - merchantName: PaymentSdkDefaultConfig.defaultMerchantName, - locale: appState.isArabic() ? PaymentSdkLocale.AR : PaymentSdkLocale.EN, - screentTitle: paymentDescription, - amount: amount.toDouble(), - showBillingInfo: false, - forceShippingInfo: false, - // currencyCode: PaymentSdkDefaultConfig.defaultCurrency, - currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED", - merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode, - billingDetails: BillingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", - "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"), - shippingDetails: ShippingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", - "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"), - alternativePaymentMethods: [PaymentSdkAPms.TAMARA], - linkBillingNameWithCardHolderName: false, - simplifyApplePayValidation: true, - ); - - paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( - // logoImage: "assets/images/png/hmg_logo.png", - backgroundColor: "ffffff", - backgroundColorDark: "ffffff", - secondaryColor: "191919", - secondaryColorDark: "191919", - primaryColor: "ffffff", - primaryColorDark: "ffffff", - // primaryFont: "Poppins", - titleFontColor: "2E3039", - titleFontColorDark: "2E3039", - // titleFont: "Poppins", - primaryFontColor: "2E3039", - primaryFontColorDark: "2E3039", - inputFieldBackgroundColor: "ffffff", - inputFieldBackgroundColorDark: "ffffff", - placeholderColor: "2E3039", - placeholderColorDark: "2E3039", - buttonColor: "ED1C2B", - buttonColorDark: "ED1C2B", - inputsCornerRadius: 12 - // buttonFont: "Poppins", - ); - paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.USER_OPTIONAL_DEFAULT_ON; - paymentConfiguration.tokenFormat = PaymentSdkTokenFormat.Hex32Format; - - notifyListeners(); + // LoaderBottomSheet.showLoader(); + // + // await getPayTabsConfigurations(serviceId: serviceID, projectId: projectID); + // + // paymentConfiguration = PaymentSdkConfigurationDetails( + // profileId: paytabsProjectDetailsRespModel!.merchantIdentifier, + // serverKey: paytabsProjectDetailsRespModel!.accessCode, + // clientKey: paytabsProjectDetailsRespModel!.shaResponse, + // transactionType: PaymentSdkTransactionType.SALE, + // cartId: cartID.substring((cartID.length - 5), cartID.length), + // cartDescription: paymentDescription, + // merchantName: PaymentSdkDefaultConfig.defaultMerchantName, + // locale: appState.isArabic() ? PaymentSdkLocale.AR : PaymentSdkLocale.EN, + // screentTitle: paymentDescription, + // amount: amount.toDouble(), + // showBillingInfo: false, + // forceShippingInfo: false, + // // currencyCode: PaymentSdkDefaultConfig.defaultCurrency, + // currencyCode: getIt.get().getAuthenticatedUser()!.outSa! == 0 ? "SAR" : "AED", + // merchantCountryCode: PaymentSdkDefaultConfig.defaultMerchantCountryCode, + // billingDetails: BillingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", + // "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"), + // shippingDetails: ShippingDetails("${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" ?? "HMG Patient", + // "CustID_${appState.getAuthenticatedUser()!.patientId.toString()}@HMG.com", appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"), + // alternativePaymentMethods: [PaymentSdkAPms.TAMARA], + // linkBillingNameWithCardHolderName: false, + // simplifyApplePayValidation: true, + // ); + // + // paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( + // // logoImage: "assets/images/png/hmg_logo.png", + // backgroundColor: "ffffff", + // backgroundColorDark: "ffffff", + // secondaryColor: "191919", + // secondaryColorDark: "191919", + // primaryColor: "ffffff", + // primaryColorDark: "ffffff", + // // primaryFont: "Poppins", + // titleFontColor: "2E3039", + // titleFontColorDark: "2E3039", + // // titleFont: "Poppins", + // primaryFontColor: "2E3039", + // primaryFontColorDark: "2E3039", + // inputFieldBackgroundColor: "ffffff", + // inputFieldBackgroundColorDark: "ffffff", + // placeholderColor: "2E3039", + // placeholderColorDark: "2E3039", + // buttonColor: "ED1C2B", + // buttonColorDark: "ED1C2B", + // inputsCornerRadius: 12 + // // buttonFont: "Poppins", + // ); + // paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.USER_OPTIONAL_DEFAULT_ON; + // paymentConfiguration.tokenFormat = PaymentSdkTokenFormat.Hex32Format; + // + // notifyListeners(); } Future paytabsRequestInsert({required PayfortRequestInsertModel payfortRequestInsertModel, Function(dynamic)? onSuccess, Function(String)? onError}) async { @@ -225,38 +225,38 @@ class PayTabsViewModel extends ChangeNotifier { startApplePayPayment({Function(PaytabsTransactionResponseModel)? onSuccess, Function(String)? onError}) async { bool _callbackFired = false; // prevent duplicate callback invocations - await FlutterPaytabsBridge.startApplePayPayment(paymentConfiguration, (event) { - if (_callbackFired) return; // ignore any subsequent callback calls - - final transactionDetails = event["data"] as Map?; - if (event["status"] == "success") { - _callbackFired = true; - // Cast Map to Map - final data = Map.from(event["data"] as Map); - paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); - if (paytabsTransactionResponseModel.isSuccess!) { - onSuccess!(paytabsTransactionResponseModel); - } else { - // Transaction was processed but failed - final reason = - transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; - final responseCode = transactionDetails?["responseCode"] ?? ""; - final errorMessage = - responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; - onError!(errorMessage); - } - } else if (event["status"] == "error") { - _callbackFired = true; - final errorMessage = event["message"] ?? "An error occurred"; - debugPrint("Error occurred in transaction: $errorMessage"); - debugPrint("Full error event: $event"); - onError!(errorMessage); - } else if (event["status"] == "event") { - // Intermediate SDK events – do NOT mark _callbackFired, just log - final eventMessage = event["message"] ?? "Event occurred"; - debugPrint("Event occurred: $eventMessage"); - } - }); + // await FlutterPaytabsBridge.startApplePayPayment(paymentConfiguration, (event) { + // if (_callbackFired) return; // ignore any subsequent callback calls + // + // final transactionDetails = event["data"] as Map?; + // if (event["status"] == "success") { + // _callbackFired = true; + // // Cast Map to Map + // final data = Map.from(event["data"] as Map); + // paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); + // if (paytabsTransactionResponseModel.isSuccess!) { + // onSuccess!(paytabsTransactionResponseModel); + // } else { + // // Transaction was processed but failed + // final reason = + // transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; + // final responseCode = transactionDetails?["responseCode"] ?? ""; + // final errorMessage = + // responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; + // onError!(errorMessage); + // } + // } else if (event["status"] == "error") { + // _callbackFired = true; + // final errorMessage = event["message"] ?? "An error occurred"; + // debugPrint("Error occurred in transaction: $errorMessage"); + // debugPrint("Full error event: $event"); + // onError!(errorMessage); + // } else if (event["status"] == "event") { + // // Intermediate SDK events – do NOT mark _callbackFired, just log + // final eventMessage = event["message"] ?? "Event occurred"; + // debugPrint("Event occurred: $eventMessage"); + // } + // }); } startCardPayment({ @@ -312,72 +312,72 @@ class PayTabsViewModel extends ChangeNotifier { LoaderBottomSheet.hideLoader(); // Start PayTabs payment - FlutterPaytabsBridge.startCardPayment(paymentConfiguration, (event) async { - if (_callbackFired) return; // ignore any subsequent callback calls - - final transactionDetails = event["data"] as Map?; - if (event["status"] == "success") { - _callbackFired = true; - - LoaderBottomSheet.showLoader(); - - // Cast Map to Map - final data = Map.from(event["data"] as Map); - paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); - - // Create PayfortResponseInsertModel (same as Payfort implementation) - PayfortResponseInsertModel payfortResponseInsertModel = PayfortResponseInsertModel(); - - payfortResponseInsertModel.fortId = paytabsTransactionResponseModel.transactionReference ?? ""; - payfortResponseInsertModel.commandType = paytabsTransactionResponseModel.transactionType ?? "SALE"; - // payfortResponseInsertModel.amount = paytabsTransactionResponseModel.tranTotal ?? 0; - payfortResponseInsertModel.amount = num.parse(amount); - payfortResponseInsertModel.sadadOLP = ""; - payfortResponseInsertModel.paymentOption = paytabsTransactionResponseModel.paymentInfo?.paymentMethod ?? ""; - payfortResponseInsertModel.customerIP = ""; - payfortResponseInsertModel.eCI = ""; - payfortResponseInsertModel.responseMessage = paytabsTransactionResponseModel.payResponseReturn ?? ""; - payfortResponseInsertModel.cardNumber = paytabsTransactionResponseModel.paymentInfo!.paymentDescription; - payfortResponseInsertModel.cardBin = ""; - payfortResponseInsertModel.installmentsNumber = 0; - payfortResponseInsertModel.status = paytabsTransactionResponseModel.isSuccess! ? "14" : "00"; - payfortResponseInsertModel.merchantRef = transactionID; - payfortResponseInsertModel.isRefund = false; - payfortResponseInsertModel.remmeberMe = true; - payfortResponseInsertModel.reconciliationReference = ""; - - // Call response insert API after payment - await paytabsResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel); - - LoaderBottomSheet.hideLoader(); - - if (paytabsTransactionResponseModel.isSuccess!) { - if (onSuccess != null) { - onSuccess(paytabsTransactionResponseModel); - } - } else { - // Transaction was processed but failed - final reason = transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; - final responseCode = transactionDetails?["responseCode"] ?? ""; - final errorMessage = responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; - if (onError != null) { - onError(errorMessage); - } - } - } else if (event["status"] == "error") { - _callbackFired = true; - final errorMessage = event["message"] ?? "An error occurred"; - debugPrint("Error occurred in transaction: $errorMessage"); - debugPrint("Full error event: $event"); - if (onError != null) { - onError(errorMessage); - } - } else if (event["status"] == "event") { - // Intermediate SDK events – do NOT mark _callbackFired, just log - final eventMessage = event["message"] ?? "Event occurred"; - debugPrint("Event occurred: $eventMessage"); - } - }); + // FlutterPaytabsBridge.startCardPayment(paymentConfiguration, (event) async { + // if (_callbackFired) return; // ignore any subsequent callback calls + // + // final transactionDetails = event["data"] as Map?; + // if (event["status"] == "success") { + // _callbackFired = true; + // + // LoaderBottomSheet.showLoader(); + // + // // Cast Map to Map + // final data = Map.from(event["data"] as Map); + // paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); + // + // // Create PayfortResponseInsertModel (same as Payfort implementation) + // PayfortResponseInsertModel payfortResponseInsertModel = PayfortResponseInsertModel(); + // + // payfortResponseInsertModel.fortId = paytabsTransactionResponseModel.transactionReference ?? ""; + // payfortResponseInsertModel.commandType = paytabsTransactionResponseModel.transactionType ?? "SALE"; + // // payfortResponseInsertModel.amount = paytabsTransactionResponseModel.tranTotal ?? 0; + // payfortResponseInsertModel.amount = num.parse(amount); + // payfortResponseInsertModel.sadadOLP = ""; + // payfortResponseInsertModel.paymentOption = paytabsTransactionResponseModel.paymentInfo?.paymentMethod ?? ""; + // payfortResponseInsertModel.customerIP = ""; + // payfortResponseInsertModel.eCI = ""; + // payfortResponseInsertModel.responseMessage = paytabsTransactionResponseModel.payResponseReturn ?? ""; + // payfortResponseInsertModel.cardNumber = paytabsTransactionResponseModel.paymentInfo!.paymentDescription; + // payfortResponseInsertModel.cardBin = ""; + // payfortResponseInsertModel.installmentsNumber = 0; + // payfortResponseInsertModel.status = paytabsTransactionResponseModel.isSuccess! ? "14" : "00"; + // payfortResponseInsertModel.merchantRef = transactionID; + // payfortResponseInsertModel.isRefund = false; + // payfortResponseInsertModel.remmeberMe = true; + // payfortResponseInsertModel.reconciliationReference = ""; + // + // // Call response insert API after payment + // await paytabsResponseInsert(payfortResponseInsertModel: payfortResponseInsertModel); + // + // LoaderBottomSheet.hideLoader(); + // + // if (paytabsTransactionResponseModel.isSuccess!) { + // if (onSuccess != null) { + // onSuccess(paytabsTransactionResponseModel); + // } + // } else { + // // Transaction was processed but failed + // final reason = transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; + // final responseCode = transactionDetails?["responseCode"] ?? ""; + // final errorMessage = responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; + // if (onError != null) { + // onError(errorMessage); + // } + // } + // } else if (event["status"] == "error") { + // _callbackFired = true; + // final errorMessage = event["message"] ?? "An error occurred"; + // debugPrint("Error occurred in transaction: $errorMessage"); + // debugPrint("Full error event: $event"); + // if (onError != null) { + // onError(errorMessage); + // } + // } else if (event["status"] == "event") { + // // Intermediate SDK events – do NOT mark _callbackFired, just log + // final eventMessage = event["message"] ?? "Event occurred"; + // debugPrint("Event occurred: $eventMessage"); + // } + // }); } catch (error) { debugPrint("PayTabs Payment Error: $error"); LoaderBottomSheet.hideLoader(); @@ -435,36 +435,36 @@ class PayTabsViewModel extends ChangeNotifier { bool _callbackFired = false; // prevent duplicate callback invocations - FlutterPaytabsBridge.startAlternativePaymentMethod(paymentConfiguration, (event) { - if (_callbackFired) return; // ignore any subsequent callback calls - - final transactionDetails = event["data"] as Map?; - if (event["status"] == "success") { - _callbackFired = true; - // Cast Map to Map - final data = Map.from(event["data"] as Map); - paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); - if (paytabsTransactionResponseModel.isSuccess!) { - onSuccess!(paytabsTransactionResponseModel); - } else { - // Transaction was processed but failed - final reason = transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; - final responseCode = transactionDetails?["responseCode"] ?? ""; - final errorMessage = responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; - onError!(errorMessage); - } - } else if (event["status"] == "error") { - _callbackFired = true; - final errorMessage = event["message"] ?? "An error occurred"; - debugPrint("Error occurred in transaction: $errorMessage"); - debugPrint("Full error event: $event"); - onError!(errorMessage); - } else if (event["status"] == "event") { - // Intermediate SDK events – do NOT mark _callbackFired, just log - final eventMessage = event["message"] ?? "Event occurred"; - debugPrint("Event occurred: $eventMessage"); - } - }); + // FlutterPaytabsBridge.startAlternativePaymentMethod(paymentConfiguration, (event) { + // if (_callbackFired) return; // ignore any subsequent callback calls + // + // final transactionDetails = event["data"] as Map?; + // if (event["status"] == "success") { + // _callbackFired = true; + // // Cast Map to Map + // final data = Map.from(event["data"] as Map); + // paytabsTransactionResponseModel = PaytabsTransactionResponseModel.fromJson(data); + // if (paytabsTransactionResponseModel.isSuccess!) { + // onSuccess!(paytabsTransactionResponseModel); + // } else { + // // Transaction was processed but failed + // final reason = transactionDetails?["payResponseReturn"] ?? transactionDetails?["responseMessage"] ?? transactionDetails?["message"] ?? "Unknown error"; + // final responseCode = transactionDetails?["responseCode"] ?? ""; + // final errorMessage = responseCode.toString().isNotEmpty ? "Transaction failed (Code: $responseCode): $reason" : "Transaction failed: $reason"; + // onError!(errorMessage); + // } + // } else if (event["status"] == "error") { + // _callbackFired = true; + // final errorMessage = event["message"] ?? "An error occurred"; + // debugPrint("Error occurred in transaction: $errorMessage"); + // debugPrint("Full error event: $event"); + // onError!(errorMessage); + // } else if (event["status"] == "event") { + // // Intermediate SDK events – do NOT mark _callbackFired, just log + // final eventMessage = event["message"] ?? "Event occurred"; + // debugPrint("Event occurred: $eventMessage"); + // } + // }); } Future getPayTabsConfigurations({int? serviceId, int? projectId, int integrationId = 5, Function(dynamic)? onSuccess, Function(String)? onError}) async { diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart index 8b395e7b..c8d48173 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart @@ -87,7 +87,7 @@ class HospitalListItem extends StatelessWidget { deleteIcon: AppAssets.location_red, deleteIconSize: Size(9, 12), backgroundColor: AppColors.secondaryLightRedColor, - textColor: AppColors.errorColor, + textColor: AppColors.primaryRedColor, isEnglishOnly: true, ), ), diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart index b9df0744..b27a7504 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -35,8 +35,8 @@ import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/in_app_browser/InAppBrowser.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; -import 'package:myfatoorah_flutter/MFEnums.dart'; -import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; +// import 'package:myfatoorah_flutter/MFEnums.dart'; +// import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; import 'package:provider/provider.dart'; import 'package:smooth_corner/smooth_corner.dart'; @@ -55,7 +55,7 @@ class _ImmediateLiveCarePaymentPageState extends State(); myAppointmentsViewModel = Provider.of(context, listen: false); immediateLiveCareViewModel = Provider.of(context, listen: false); @@ -148,60 +148,60 @@ class _ImmediateLiveCarePaymentPageState extends State false); - Navigator.of(context).push( - CustomPageRoute( - page: ImmediateLiveCarePendingRequestPage(), - ), - ); - } else { - LoaderBottomSheet.hideLoader(); - showCommonBottomSheetWithoutHeight( - context, - child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), - callBackFunc: () {}, - isFullScreen: false, - isCloseButtonVisible: true, - ); - } - }, - onError: (errMessage) { - showCommonBottomSheetWithoutHeight( - context, - child: Utils.getErrorWidget(loadingText: errMessage.toString()), - callBackFunc: () {}, - isFullScreen: false, - isCloseButtonVisible: true, - ); - }); + // myFatoorahViewModel.initiateCardPayment( + // amount: num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0"), + // paymentDescription: "LiveCare Payment", + // displayCurrencyIso: appState.getAuthenticatedUser()!.outSa == 0 + // ? ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat + // ? MFCurrencyISO.KUWAIT_KWD + // : MFCurrencyISO.SAUDIARABIA_SAR + // : MFCurrencyISO.UAE_AED, + // paymentOption: selectedPaymentMethod, + // liveServiceID: immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID.toString(), + // isScheduleLiveCare: "false", + // appointmentDate: DateUtil.convertDateToString(DateTime.now()), + // appointmentNo: "0", + // doctorID: "0", + // fileNumber: appState.getAuthenticatedUser()!.patientId.toString(), + // serviceID: ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString(), + // projectID: (ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12).toString(), + // onSuccess: (response) async { + // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr()); + // await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare(response.invoiceId.toString()); + // await immediateLiveCareViewModel.getPatientLiveCareHistory(); + // LoaderBottomSheet.hideLoader(); + // if (immediateLiveCareViewModel.patientHasPendingLiveCareRequest) { + // Navigator.pushAndRemoveUntil( + // context, + // CustomPageRoute( + // page: LandingNavigation(), + // ), + // (r) => false); + // Navigator.of(context).push( + // CustomPageRoute( + // page: ImmediateLiveCarePendingRequestPage(), + // ), + // ); + // } else { + // LoaderBottomSheet.hideLoader(); + // showCommonBottomSheetWithoutHeight( + // context, + // child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), + // callBackFunc: () {}, + // isFullScreen: false, + // isCloseButtonVisible: true, + // ); + // } + // }, + // onError: (errMessage) { + // showCommonBottomSheetWithoutHeight( + // context, + // child: Utils.getErrorWidget(loadingText: errMessage.toString()), + // callBackFunc: () {}, + // isFullScreen: false, + // isCloseButtonVisible: true, + // ); + // }); } else if (appState.isPaytabsEnabled) { transID = Utils.getAppointmentTransID( immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!, @@ -370,60 +370,60 @@ class _ImmediateLiveCarePaymentPageState extends State false); - Navigator.of(context).push( - CustomPageRoute( - page: ImmediateLiveCarePendingRequestPage(), - ), - ); - } else { - LoaderBottomSheet.hideLoader(); - showCommonBottomSheetWithoutHeight( - context, - child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), - callBackFunc: () {}, - isFullScreen: false, - isCloseButtonVisible: true, - ); - } - }, - onError: (errMessage) { - showCommonBottomSheetWithoutHeight( - context, - child: Utils.getErrorWidget(loadingText: errMessage.toString()), - callBackFunc: () {}, - isFullScreen: false, - isCloseButtonVisible: true, - ); - }); + // myFatoorahViewModel.initiateCardPayment( + // amount: num.parse(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0"), + // paymentDescription: "LiveCare Payment", + // displayCurrencyIso: appState.getAuthenticatedUser()!.outSa == 0 + // ? ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat + // ? MFCurrencyISO.KUWAIT_KWD + // : MFCurrencyISO.SAUDIARABIA_SAR + // : MFCurrencyISO.UAE_AED, + // paymentOption: selectedPaymentMethod, + // liveServiceID: immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID.toString(), + // isScheduleLiveCare: "false", + // appointmentDate: DateUtil.convertDateToString(DateTime.now()), + // appointmentNo: "0", + // doctorID: "0", + // fileNumber: appState.getAuthenticatedUser()!.patientId.toString(), + // serviceID: ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString(), + // projectID: (ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12).toString(), + // onSuccess: (response) async { + // LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr()); + // await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare(response.invoiceId.toString()); + // await immediateLiveCareViewModel.getPatientLiveCareHistory(); + // LoaderBottomSheet.hideLoader(); + // if (immediateLiveCareViewModel.patientHasPendingLiveCareRequest) { + // Navigator.pushAndRemoveUntil( + // context, + // CustomPageRoute( + // page: LandingNavigation(), + // ), + // (r) => false); + // Navigator.of(context).push( + // CustomPageRoute( + // page: ImmediateLiveCarePendingRequestPage(), + // ), + // ); + // } else { + // LoaderBottomSheet.hideLoader(); + // showCommonBottomSheetWithoutHeight( + // context, + // child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."), + // callBackFunc: () {}, + // isFullScreen: false, + // isCloseButtonVisible: true, + // ); + // } + // }, + // onError: (errMessage) { + // showCommonBottomSheetWithoutHeight( + // context, + // child: Utils.getErrorWidget(loadingText: errMessage.toString()), + // callBackFunc: () {}, + // isFullScreen: false, + // isCloseButtonVisible: true, + // ); + // }); } else if (appState.isPaytabsEnabled) { transID = Utils.getAppointmentTransID( immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!, diff --git a/lib/presentation/book_appointment/widgets/clinic_card.dart b/lib/presentation/book_appointment/widgets/clinic_card.dart index 68b9b1e0..55ff51d6 100644 --- a/lib/presentation/book_appointment/widgets/clinic_card.dart +++ b/lib/presentation/book_appointment/widgets/clinic_card.dart @@ -45,9 +45,7 @@ class ClinicCard extends StatelessWidget { width: 24.w, height: 24.h, child: Utils.buildSvgWithAssets( - icon: getClinicIconPath(), - width: 24.w, - height: 24.h, + icon: getClinicIconPath(), iconColor: AppColors.primaryRedColor, width: 24.w, height: 24.h, fit: BoxFit.contain, errorAsset: "assets/images/clinicIcons/1.svg" // Note: Add error handling in the Utils.buildSvgWithAssets if possible diff --git a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart index 9ad98cb6..b6209843 100644 --- a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart +++ b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart @@ -32,18 +32,12 @@ class TypeSelectionWidget extends StatelessWidget { labelText: LocaleKeys.all.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( - color: selectedFacility == FacilitySelection.ALL - ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + color: selectedFacility == FacilitySelection.ALL ? AppColors.primaryRedColor : AppColors.chipBorderColorOpacity20, width: 1, ), borderRadius: BorderRadius.circular(10)), - backgroundColor: - selectedFacility == FacilitySelection.ALL - ?AppColors.secondaryLightRedColor: AppColors.whiteColor, - textColor: selectedFacility == FacilitySelection.ALL - ? AppColors.errorColor:AppColors.blackColor - , + backgroundColor: selectedFacility == FacilitySelection.ALL ? AppColors.secondaryLightRedColor : AppColors.whiteColor, + textColor: selectedFacility == FacilitySelection.ALL ? AppColors.primaryRedColor : AppColors.blackColor, ).onPress((){ onitemClicked(FacilitySelection.ALL); }), @@ -56,18 +50,13 @@ class TypeSelectionWidget extends StatelessWidget { labelText: LocaleKeys.hmgHospitals.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( - color: selectedFacility == FacilitySelection.HMG - ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + color: selectedFacility == FacilitySelection.HMG ? AppColors.primaryRedColor : AppColors.chipBorderColorOpacity20, width: 1, ), borderRadius: BorderRadius.circular(10)), backgroundColor: - selectedFacility == FacilitySelection.HMG - ?AppColors.secondaryLightRedColor: AppColors.whiteColor, - textColor: selectedFacility == FacilitySelection.HMG - ? AppColors.errorColor - : AppColors.blackColor, + selectedFacility == FacilitySelection.HMG ? AppColors.secondaryLightRedColor : AppColors.whiteColor, + textColor: selectedFacility == FacilitySelection.HMG ? AppColors.primaryRedColor : AppColors.blackColor, ).onPress((){ onitemClicked(FacilitySelection.HMG); }), @@ -81,18 +70,13 @@ class TypeSelectionWidget extends StatelessWidget { labelText: LocaleKeys.hmcMedicalClinic.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( - color: selectedFacility == FacilitySelection.HMC - ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + color: selectedFacility == FacilitySelection.HMC ? AppColors.primaryRedColor : AppColors.chipBorderColorOpacity20, width: 1, ), borderRadius: BorderRadius.circular(10)), backgroundColor: - selectedFacility == FacilitySelection.HMC - ?AppColors.secondaryLightRedColor: AppColors.whiteColor, - textColor: selectedFacility == FacilitySelection.HMC - ? AppColors.errorColor - : AppColors.blackColor, + selectedFacility == FacilitySelection.HMC ? AppColors.secondaryLightRedColor : AppColors.whiteColor, + textColor: selectedFacility == FacilitySelection.HMC ? AppColors.primaryRedColor : AppColors.blackColor, ).onPress((){ onitemClicked(FacilitySelection.HMC); }), diff --git a/pubspec.yaml b/pubspec.yaml index d7b449bf..2813badf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,8 +2,8 @@ name: hmg_patient_app_new description: "New HMG Patient App" publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 4.6.050+1 -#version: 4.6.1004+40501004 +#version: 4.6.050+2 +version: 4.6.1009+40501009 environment: sdk: ">=3.6.0 <4.0.0" @@ -104,7 +104,7 @@ dependencies: scrollable_positioned_list: ^0.3.8 in_app_review: ^2.0.11 - flutter_paytabs_bridge: ^2.7.14 +# flutter_paytabs_bridge: ^2.7.14 clarity_flutter: ^1.10.0 # flutter_amazonpaymentservices: ^0.0.13 flutter_amazonpaymentservices: @@ -115,7 +115,7 @@ dependencies: freerasp: ^8.2.1 safe_device: ^1.4.1 flutter_markdown_plus: ^1.0.12 - myfatoorah_flutter: ^3.3.2 +# myfatoorah_flutter: ^3.3.2 dev_dependencies: flutter_test: