diff --git a/lib/config/config.dart b/lib/config/config.dart index 3589e93d..288d7fd3 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -408,7 +408,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 9.7; +var VERSION_ID = 9.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -431,6 +431,7 @@ var GET_PAtIENTS_INSURANCE_UPDATED = var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; var INSURANCE_SCHEMES = "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; +var UPDATE_MANUAL_INSURANCE = "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; var INSURANCE_COMPANIES = "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; var GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; @@ -733,6 +734,9 @@ var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; +var GET_TAMARA_PAYMENT_STATUS = + 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; + var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c921c5b9..509a415d 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1860,5 +1860,6 @@ const Map localizedValues = { "paymentOnly": { "en": "Payment", "ar": "معلقة" }, "pendingOnly": { "en": "Pending", "ar": "مدفوعات" }, "insuranceClassName": { "en": "Insurance Class", "ar": "فئة التأمين" }, + "insuranceRequestSubmit": { "en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح." }, "NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" }, }; diff --git a/lib/core/model/insurance/insuranceManualUpdateRequest.dart b/lib/core/model/insurance/insuranceManualUpdateRequest.dart new file mode 100644 index 00000000..13fee506 --- /dev/null +++ b/lib/core/model/insurance/insuranceManualUpdateRequest.dart @@ -0,0 +1,64 @@ +class InsuranceManualUpdateRequest { + String setupID; + String patientIdentificationID; + int projectID; + String mobileNo; + int activityId; + String component; + bool enableLogging; + String insuranceCompanyName; + String cardHolderName; + String memberShipNo; + String policyNo; + String schemeClass; + int requestType; + + InsuranceManualUpdateRequest( + {this.setupID, + this.patientIdentificationID, + this.projectID, + this.mobileNo, + this.activityId, + this.component, + this.enableLogging, + this.insuranceCompanyName, + this.cardHolderName, + this.memberShipNo, + this.policyNo, + this.schemeClass, + this.requestType}); + + InsuranceManualUpdateRequest.fromJson(Map json) { + setupID = json['SetupID']; + patientIdentificationID = json['PatientIdentificationID']; + projectID = json['ProjectID']; + mobileNo = json['MobileNo']; + activityId = json['activityId']; + component = json['component']; + enableLogging = json['enableLogging']; + insuranceCompanyName = json['InsuranceCompanyName']; + cardHolderName = json['CardHolderName']; + memberShipNo = json['MemberShipNo']; + policyNo = json['PolicyNo']; + schemeClass = json['SchemeClass']; + requestType = json['RequestType']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['ProjectID'] = this.projectID; + data['MobileNo'] = this.mobileNo; + data['activityId'] = this.activityId; + data['component'] = this.component; + data['enableLogging'] = this.enableLogging; + data['InsuranceCompanyName'] = this.insuranceCompanyName; + data['CardHolderName'] = this.cardHolderName; + data['MemberShipNo'] = this.memberShipNo; + data['PolicyNo'] = this.policyNo; + data['SchemeClass'] = this.schemeClass; + data['RequestType'] = this.requestType; + return data; + } +} diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart index 9cb2eb28..c30c86e7 100644 --- a/lib/core/service/insurance_service.dart +++ b/lib/core/service/insurance_service.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart'; import 'package:diplomaticquarterapp/core/model/insurance/ReauestInsuranceApprovalModel.dart'; +import 'package:diplomaticquarterapp/core/model/insurance/insuranceManualUpdateRequest.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart'; import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart'; @@ -187,6 +188,22 @@ class InsuranceCardService extends BaseService { return Future.value(localRes); } + Future submitManualInsuranceUpdateRequest(InsuranceManualUpdateRequest insuranceManualUpdateRequest) async { + dynamic localRes; + await baseAppClient.post( + UPDATE_MANUAL_INSURANCE, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: insuranceManualUpdateRequest.toJson(), + ); + return Future.value(localRes); + } + Future getInsuranceCompanies() async { dynamic localRes; await baseAppClient.post( diff --git a/lib/models/insurance/insuranceCompaniesSchemeModel.dart b/lib/models/insurance/insuranceCompaniesSchemeModel.dart new file mode 100644 index 00000000..ed5ce65e --- /dev/null +++ b/lib/models/insurance/insuranceCompaniesSchemeModel.dart @@ -0,0 +1,72 @@ +class InsuranceCompaniesSchemeModel { + String setupID; + int projectID; + int companyID; + int subCategoryID; + String subCategoryDesc; + String subCategoryDescN; + String validFrom; + String validTo; + var isInpatient; + int roomCategory; + bool isActive; + int createdBy; + String createdOn; + int editedBy; + String editedOn; + + InsuranceCompaniesSchemeModel( + {this.setupID, + this.projectID, + this.companyID, + this.subCategoryID, + this.subCategoryDesc, + this.subCategoryDescN, + this.validFrom, + this.validTo, + this.isInpatient, + this.roomCategory, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + InsuranceCompaniesSchemeModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + companyID = json['CompanyID']; + subCategoryID = json['SubCategoryID']; + subCategoryDesc = json['SubCategoryDesc']; + subCategoryDescN = json['SubCategoryDescN']; + validFrom = json['ValidFrom']; + validTo = json['ValidTo']; + isInpatient = json['IsInpatient']; + roomCategory = json['RoomCategory']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['CompanyID'] = this.companyID; + data['SubCategoryID'] = this.subCategoryID; + data['SubCategoryDesc'] = this.subCategoryDesc; + data['SubCategoryDescN'] = this.subCategoryDescN; + data['ValidFrom'] = this.validFrom; + data['ValidTo'] = this.validTo; + data['IsInpatient'] = this.isInpatient; + data['RoomCategory'] = this.roomCategory; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index b03d8b37..e4ea7eaa 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; @@ -40,9 +42,13 @@ class _AnicllaryOrdersState extends State with SingleTic MyInAppBrowser browser; String transID = ""; BuildContext localContext; + String selectedInstallmentPlan; List selectedProcList = []; + String tamaraPaymentStatus; + String tamaraOrderID; + void initState() { super.initState(); } @@ -477,10 +483,11 @@ class _AnicllaryOrdersState extends State with SingleTic PaymentMethod( onSelectedMethod: (String method, [String selectedInstallmentPlan]) { selectedPaymentMethod = method; - print(selectedPaymentMethod); + this.selectedInstallmentPlan = selectedInstallmentPlan; openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan); }, patientShare: double.parse(getTotalValue()), + isFromAdvancePayment: !projectViewModel.havePrivilege(94), )); } @@ -503,6 +510,7 @@ class _AnicllaryOrdersState extends State with SingleTic browser, false, "3", + // Need to get new Service ID from Ayman for Ancillary Tamara "", model.ancillaryListsDetails[0].appointmentDate, model.ancillaryListsDetails[0].appointmentNo, @@ -515,6 +523,18 @@ class _AnicllaryOrdersState extends State with SingleTic print("onBrowserLoadStart"); print(url); + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']; + tamaraOrderID = uri.queryParameters['orderId']; + } + } + MyInAppBrowser.successURLS.forEach((element) { if (url.contains(element)) { if (browser.isOpened()) browser.close(); @@ -534,7 +554,50 @@ class _AnicllaryOrdersState extends State with SingleTic onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - checkPaymentStatus(appo); + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID, appo); + } else { + checkPaymentStatus(appo); + } + + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(this.selectedInstallmentPlan), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(this.selectedInstallmentPlan), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus.toLowerCase() == "approved") { + createAdvancePayment(res, appo); + // addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { @@ -653,7 +716,7 @@ class _AnicllaryOrdersState extends State with SingleTic } else { if (value.isApprovalCreated && value.approvalNo != 0) { insuranceText = "Approved"; - } else if(value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { + } else if (value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { insuranceText = "Approval Rejected - Please visit receptionist"; } else { insuranceText = "Sent For Approval"; @@ -669,7 +732,7 @@ class _AnicllaryOrdersState extends State with SingleTic } else { if (value.isApprovalCreated && value.approvalNo != 0) { color = Color(0xff359846); - } else if(value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { + } else if (value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { color = Color(0xffD02127); } else { color = Color(0xffCC9B14); diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 36c45740..29b76598 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -41,7 +41,7 @@ class BookConfirm extends StatefulWidget { DoctorsListService service; PatientShareResponse patientShareResponse; - AuthenticatedUser authUser; + // AuthenticatedUser authUser; @override _BookConfirmState createState() => _BookConfirmState(); @@ -55,8 +55,8 @@ class _BookConfirmState extends State { @override void initState() { - widget.authUser = new AuthenticatedUser(); - getPatientData(); + // widget.authUser = new AuthenticatedUser(); + // getPatientData(); widget.service = new DoctorsListService(); widget.patientShareResponse = new PatientShareResponse(); super.initState(); @@ -166,9 +166,9 @@ class _BookConfirmState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: [ - showInfo(TranslationBase.of(context).name, widget.authUser.firstName + " " + widget.authUser.lastName), - showInfo(TranslationBase.of(context).gender, widget.authUser.genderDescription), - showInfo(TranslationBase.of(context).age, widget.authUser.age.toString()) + showInfo(TranslationBase.of(context).name, projectViewModel.user.firstName + " " + projectViewModel.user.lastName), + showInfo(TranslationBase.of(context).gender, projectViewModel.user.genderDescription), + showInfo(TranslationBase.of(context).age, projectViewModel.user.age.toString()) ], ), ], @@ -447,16 +447,16 @@ class _BookConfirmState extends State { return docSpeciality; } - getPatientData() async { - AppSharedPreferences sharedPref = AppSharedPreferences(); - if (await sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); - setState(() { - print(data); - widget.authUser = data; - }); - } - } + // getPatientData() async { + // AppSharedPreferences sharedPref = AppSharedPreferences(); + // if (await sharedPref.getObject(USER_PROFILE) != null) { + // var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + // setState(() { + // print(data); + // widget.authUser = data; + // }); + // } + // } Future navigateToHome(context) async { Navigator.of(context).popAndPushNamed(HOME); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index c00edc46..8f0aa939 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -23,7 +23,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'QRCode.dart'; @@ -343,7 +342,6 @@ class _BookSuccessState extends State { break; case 90: return _getQRAppo(); - } } @@ -597,7 +595,7 @@ class _BookSuccessState extends State { authenticatedUser, widget.browser, widget.patientShareResponse.isLiveCareAppointment, - widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.serviceID.toString() : "2", + "2", widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, @@ -608,8 +606,6 @@ class _BookSuccessState extends State { } onBrowserLoadStart(String url) { - print(url); - if (selectedPaymentMethod == "TAMARA") { if (Platform.isAndroid) { Uri uri = new Uri.dataFromString(url); @@ -622,7 +618,6 @@ class _BookSuccessState extends State { } } - // if (selectedPaymentMethod != "TAMARA") { MyInAppBrowser.successURLS.forEach((element) { if (url.contains(element)) { if (widget.browser.isOpened()) widget.browser.close(); @@ -630,9 +625,7 @@ class _BookSuccessState extends State { return; } }); - // } - // if (selectedPaymentMethod != "TAMARA") { MyInAppBrowser.errorURLS.forEach((element) { if (url.contains(element)) { if (widget.browser.isOpened()) widget.browser.close(); @@ -640,18 +633,18 @@ class _BookSuccessState extends State { return; } }); - // } } onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { try { if (selectedPaymentMethod == "TAMARA") { - if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { - updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); - } else { - updateTamaraRequestStatus( - "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); - } + checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); + // } else { + // updateTamaraRequestStatus( + // "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); + // } } else { checkPaymentStatus(appo); } @@ -660,6 +653,24 @@ class _BookSuccessState extends State { } } + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(selectedInstallments), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { @@ -943,7 +954,6 @@ class _BookSuccessState extends State { getAppoQR(context) { DoctorsListService service = new DoctorsListService(); service.generateAppointmentQR(widget.patientShareResponse, context).then((res) { - print(res); GifLoaderDialogUtils.hideDialog(context); navigateToQR(context, res['AppointmentQR']); }).catchError((err) { diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index 08ec442a..6c814066 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -276,12 +276,13 @@ class _CovidPaymentSummaryState extends State { print("onBrowserExit Called!!!!"); try { if (widget.selectedPaymentMethod == "TAMARA") { - if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { - updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); - } else { - updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", - num.parse(widget.selectedInstallmentPlan), appo); - } + checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); + // } else { + // updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", + // num.parse(widget.selectedInstallmentPlan), appo); + // } } else { checkPaymentStatus(appo); } @@ -290,6 +291,24 @@ class _CovidPaymentSummaryState extends State { } } + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); + } else { + updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", + num.parse(widget.selectedInstallmentPlan), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 4bff1cd0..5e151793 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -345,36 +345,36 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { Container( margin: EdgeInsets.only(top: 12), child: AppExpandableNotifier( - isExpand: true, - hasCounter: true, - counter: (widget.ancillaryLists.isNotEmpty) ? widget.ancillaryLists[0].ancillaryOrderList.length.toString() : "0", - title: TranslationBase.of(context).anicllaryOrders, - bodyWidget: widget.ancillaryLists.length != 0 - ? Container( - padding: EdgeInsets.all(12), - child: ListView.separated( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - reverse: true, - itemBuilder: (context, index) { - return DoctorCard( - onTap: () => ancillaryOrdersDetails(widget.ancillaryLists[0].ancillaryOrderList[index], widget.ancillaryLists[0].projectID), - isInOutPatient: true, - name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName), - billNo: widget.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(), - profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", - subName: widget.ancillaryLists[0].projectName, - isLiveCareAppointment: false, - date: DateUtil.convertStringToDate(widget.ancillaryLists[0].ancillaryOrderList[index].orderDate), - isSortByClinic: true, - ); - }, - itemCount: widget.ancillaryLists[0].ancillaryOrderList.length, - separatorBuilder: (context, index) => SizedBox(height: 14), - ), - ) - : getNoDataWidget(context), - )), + isExpand: true, + hasCounter: true, + counter: (widget.ancillaryLists.isNotEmpty) ? widget.ancillaryLists[0].ancillaryOrderList.length.toString() : "0", + title: TranslationBase.of(context).anicllaryOrders, + bodyWidget: widget.ancillaryLists.length != 0 + ? Container( + padding: EdgeInsets.all(12), + child: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + reverse: true, + itemBuilder: (context, index) { + return DoctorCard( + onTap: () => ancillaryOrdersDetails(widget.ancillaryLists[0].ancillaryOrderList[index], widget.ancillaryLists[0].projectID), + isInOutPatient: true, + name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName), + billNo: widget.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(), + profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + subName: widget.ancillaryLists[0].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(widget.ancillaryLists[0].ancillaryOrderList[index].orderDate), + isSortByClinic: true, + ); + }, + itemCount: widget.ancillaryLists[0].ancillaryOrderList.length, + separatorBuilder: (context, index) => SizedBox(height: 14), + ), + ) + : getNoDataWidget(context), + )), ], ), ), @@ -869,6 +869,18 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } getAppoQR(context, AppoitmentAllHistoryResultList appo) { + // GifLoaderDialogUtils.showMyDialog(context); + PatientShareResponse patientShareResponse = new PatientShareResponse(); + + patientShareResponse.doctorNameObj = appo.doctorNameObj; + patientShareResponse.doctorSpeciality = appo.doctorSpeciality; + patientShareResponse.projectName = appo.projectName; + patientShareResponse.appointmentDate = appo.appointmentDate; + patientShareResponse.appointmentNo = appo.appointmentNo; + patientShareResponse.clinicID = appo.clinicID; + patientShareResponse.projectID = appo.projectID; + patientShareResponse.isFollowup = appo.isFollowup; + FlutterNfcKit.nfcAvailability.then((value) { if (value == NFCAvailability.available) { PatientShareResponse patientShareResponse = new PatientShareResponse(); @@ -886,6 +898,12 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported); } }); + projectViewModel.analytics.todoList.to_do_list_check_in(appo); + + DoctorsListService service = new DoctorsListService(); + service.generateAppointmentQR(patientShareResponse, context).then((res) {}).catchError((err) { + print(err); + }); } Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment) async { @@ -940,7 +958,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { authenticatedUser, widget.browser, appo.isLiveCareAppointment, - appo.isLiveCareAppointment ? widget.patientShareResponse.serviceID.toString() : "2", + "2", appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "", appo.appointmentDate, appo.appointmentNo, @@ -989,16 +1007,35 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); if (selectedPaymentMethod == "TAMARA") { - if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { - updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); - } else { - updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); - } + checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); + // } else { + // updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); + // } } else { checkPaymentStatus(appo); } } + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, res["tamara_order_id"], num.parse(selectedInstallments), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallments), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { @@ -1045,7 +1082,6 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { addVIDARequestInsert("0", tamaraOrderID, appo); else getAppoQR(context, appo); - // autoGenerateInvoiceTamara(appo); }).catchError((err) { print(err); AppToast.showErrorToast(message: err); @@ -1053,30 +1089,6 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { }); } - // autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) { - // GifLoaderDialogUtils.showMyDialog(context); - // var apptData = { - // "AppointmentNo": appo.appointmentNo.toString(), - // "DoctorID": appo.doctorID.toString(), - // "ServiceID": appo.serviceID.toString(), - // "ProjectID": appo.projectID.toString(), - // "ClinicID": appo.clinicID.toString(), - // "AppointmentDate": appo.appointmentDate.toString(), - // }; - // DoctorsListService service = new DoctorsListService(); - // service.autoGenerateInvoiceTamara(appo.projectID, appo.appointmentNo.toString(), projectViewModel.user.mobileNumber).then((res) { - // GifLoaderDialogUtils.hideDialog(context); - // if (appo.isLiveCareAppointment) - // addVIDARequestInsert("0", tamaraOrderID, apptData); - // else - // getAppoQR(context, appo); - // }).catchError((err) { - // print(err); - // AppToast.showErrorToast(message: err); - // GifLoaderDialogUtils.hideDialog(context); - // }); - // } - checkPaymentStatus(AppoitmentAllHistoryResultList appo) { String txn_ref; num amount; @@ -1106,7 +1118,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { error_type: res['Response_Message']); } }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); + if(mounted) GifLoaderDialogUtils.hideDialog(context); print(err); }); } diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 76220ea8..e7d57363 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -133,6 +133,7 @@ class _AttachInsuranceCardImageDialogState extends State { InsuranceCardService _insuranceCardService = locator(); List insuranceCompaniesList = []; + List insuranceCompaniesSchemesList = []; int _selectedInsuranceCompanyIndex = -1; + int _selectedInsuranceCompanySchemeIndex = -1; InsuranceCompaniesGetModel selectedInsuranceCompanyObj; + InsuranceCompaniesSchemeModel selectedInsuranceCompaniesSchemesObj; @override void initState() { @@ -121,31 +127,7 @@ class _UpdateInsuranceManuallyState extends State { SizedBox(height: 12), InkWell( onTap: () { - List list = [ - RadioSelectionDialogModel(TranslationBase.of(context).myAccount, 0), - RadioSelectionDialogModel(TranslationBase.of(context).myFamilyFiles, 1), - RadioSelectionDialogModel(TranslationBase.of(context).otherAccount, 2), - ]; - showDialog( - context: context, - builder: (cxt) => RadioSelectionDialog( - listData: list, - // selectedIndex: - // beneficiaryType == BeneficiaryType.MyAccount ? 0 : (beneficiaryType == BeneficiaryType.MyFamilyFiles ? 1 : (beneficiaryType == BeneficiaryType.OtherAccount ? 2 : -1)), - onValueSelected: (index) { - var type; - if (index == 0) { - // type = BeneficiaryType.MyAccount; - } else if (index == 1) { - // type = BeneficiaryType.MyFamilyFiles; - } else { - // type = BeneficiaryType.OtherAccount; - } - - setState(() {}); - }, - ), - ); + confirmSelectInsuranceCompanySchemeDialog(); }, child: Container( padding: EdgeInsets.all(8), @@ -156,7 +138,7 @@ class _UpdateInsuranceManuallyState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - TranslationBase.of(context).insuranceClassName, + selectedInsuranceCompaniesSchemesObj != null ? selectedInsuranceCompaniesSchemesObj.subCategoryDesc : TranslationBase.of(context).insuranceClassName, style: TextStyle( fontSize: 14, fontWeight: FontWeight.w600, @@ -175,11 +157,29 @@ class _UpdateInsuranceManuallyState extends State { bottomSheet: Container( color: Theme.of(context).scaffoldBackgroundColor, padding: EdgeInsets.all(18), - child: DefaultButton(TranslationBase.of(context).submit, () {}), + child: DefaultButton( + TranslationBase.of(context).submit, + isFormValid() ? () { + submitManualInsuranceUpdateRequest(); + } : null, + disabledColor: Colors.grey, + ), ), ); } + bool isFormValid() { + if (selectedInsuranceCompanyObj != null && + _cardHolderNameTextController.text.isNotEmpty && + _membershipNoTextController.text.isNotEmpty && + _policyNoTextController.text.isNotEmpty && + selectedInsuranceCompaniesSchemesObj != null) { + return true; + } else { + return false; + } + } + void confirmSelectInsuranceCompanyDialog() { List list = [ for (int i = 0; i < insuranceCompaniesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesList[i].companyName, i), @@ -200,6 +200,25 @@ class _UpdateInsuranceManuallyState extends State { ); } + void confirmSelectInsuranceCompanySchemeDialog() { + List list = [ + for (int i = 0; i < insuranceCompaniesSchemesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesSchemesList[i].subCategoryDesc, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedInsuranceCompanySchemeIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedInsuranceCompanySchemeIndex = index; + selectedInsuranceCompaniesSchemesObj = insuranceCompaniesSchemesList[index]; + setState(() {}); + }, + ), + ); + } + void getInsuranceCompanies() { GifLoaderDialogUtils.showMyDialog(context); _insuranceCardService.getInsuranceCompanies().then((value) { @@ -210,11 +229,37 @@ class _UpdateInsuranceManuallyState extends State { }); } + void submitManualInsuranceUpdateRequest() { + GifLoaderDialogUtils.showMyDialog(context); + + InsuranceManualUpdateRequest insuranceManualUpdateRequest = new InsuranceManualUpdateRequest(); + + insuranceManualUpdateRequest.projectID = selectedInsuranceCompanyObj.projectID; + insuranceManualUpdateRequest.requestType = 2; + insuranceManualUpdateRequest.mobileNo = projectViewModel.user.mobileNumber; + insuranceManualUpdateRequest.cardHolderName = _cardHolderNameTextController.text; + insuranceManualUpdateRequest.insuranceCompanyName = selectedInsuranceCompanyObj.companyName; + insuranceManualUpdateRequest.memberShipNo = _membershipNoTextController.text; + insuranceManualUpdateRequest.policyNo = _policyNoTextController.text; + insuranceManualUpdateRequest.patientIdentificationID = projectViewModel.user.patientIdentificationNo; + insuranceManualUpdateRequest.schemeClass = selectedInsuranceCompaniesSchemesObj.subCategoryDesc; + insuranceManualUpdateRequest.setupID = selectedInsuranceCompanyObj.setupID; + + _insuranceCardService.submitManualInsuranceUpdateRequest(insuranceManualUpdateRequest).then((value) { + AppToast.showSuccessToast(message: TranslationBase.of(context).insuranceRequestSubmit); + Navigator.pop(context); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + }); + } + void getInsuranceScheme() { GifLoaderDialogUtils.showMyDialog(context); _insuranceCardService.getInsuranceSchemes(selectedInsuranceCompanyObj.projectID, selectedInsuranceCompanyObj.companyID).then((value) { value.forEach((result) { - insuranceCompaniesList.add(InsuranceCompaniesGetModel.fromJson(result)); + insuranceCompaniesSchemesList.add(InsuranceCompaniesSchemeModel.fromJson(result)); }); GifLoaderDialogUtils.hideDialog(context); }); diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 263f2c09..e01522c5 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart'; -import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCareInfoDialog.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; @@ -356,12 +355,13 @@ class _clinic_listState extends State { print("onBrowserExit Called!!!!"); try { if (selectedPaymentMethod == "TAMARA") { - if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { - updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallmentPlan), appo); - } else { - updateTamaraRequestStatus( - "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); - } + checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallmentPlan), appo); + // } else { + // updateTamaraRequestStatus( + // "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); + // } } else { checkPaymentStatus(appo); } @@ -370,6 +370,24 @@ class _clinic_listState extends State { } } + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(selectedInstallmentPlan), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 55e3fc31..9c0b157e 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -206,6 +206,7 @@ class _RateAppointmentDoctorState extends State { doctor.doctorImageURL = model.appointmentDetails.doctorImageURL; doctor.clinicName = model.appointmentDetails.clinicName; doctor.projectName = model.appointmentDetails.projectName; + doctor.date = model.appointmentDetails.appointmentDate; doctor.actualDoctorRate = 5; return doctor; diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index f6033004..07f5e2fc 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -922,6 +922,18 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + Future getTamaraPaymentStatus(String orderID) async { + hasError = false; + dynamic localRes; + await baseAppClient.get(GET_TAMARA_PAYMENT_STATUS + "$orderID", isRCService: false, isExternal: true, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + return Future.value(localRes); + } + Future addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 2759358e..032ad072 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2869,6 +2869,7 @@ class TranslationBase { String get NFCNotSupported => localizedValues["NFCNotSupported"][locale.languageCode]; String get paymentOnly => localizedValues["paymentOnly"][locale.languageCode]; String get pendingOnly => localizedValues["pendingOnly"][locale.languageCode]; + String get insuranceRequestSubmit => localizedValues["insuranceRequestSubmit"][locale.languageCode]; } diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index b0065d82..49b213f2 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -33,15 +33,15 @@ Widget getPaymentMethods() { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Image.asset("assets/images/new/payment/Mada.png", - width: 50, height: 50), + width: 40, height: 40), Image.asset("assets/images/new/payment/tamara_en.png", - width: 50, height: 50), + width: 40, height: 40), Image.asset("assets/images/new/payment/visa.png", - width: 50, height: 50), + width: 40, height: 40), Image.asset("assets/images/new/payment/Mastercard.png", - width: 50, height: 50), + width: 50, height: 40), Image.asset("assets/images/new/payment/Apple_Pay.png", - width: 50, height: 50), + width: 40, height: 40), ], ), ); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index a8efc40d..47fc885b 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -57,7 +57,7 @@ class MyInAppBrowser extends InAppBrowser { static List successURLS = ['success?', 'PayFortResponse', 'PayFortSucess', 'mobilepaymentcomplete', 'orderdetails', 'redirectToApplePay', 'mdlaboratories.com/?']; - static List errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails', 'redirectToApplePay', 'mdlaboratories.com/?']; + static List errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails', 'redirectToApplePay', 'mdlaboratories.com/?', 'cancel', 'canceled']; final Function onExitCallback; final Function onLoadStartCallback;