pull/379/head
haroon amjad 2 weeks ago
parent 445d4d9385
commit a4e1ec4459

@ -1,6 +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';
class ApiConsts {
static const maxSmallScreen = 660;
@ -44,12 +45,17 @@ class ApiConsts {
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
static var myFatoorahEnvironmentType = MFEnvironment.TEST;
static var myFatoorahCountry = MFCountry.SAUDIARABIA;
static setBackendURLs() {
switch (appEnvironmentType) {
case AppEnvironmentTypeEnum.prod:
baseUrl = "https://hmgwebservices.com/";
payFortEnvironment = FortEnvironment.production;
payFortEnvironmentType = EnvironmentType.production;
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";
@ -66,6 +72,8 @@ class ApiConsts {
baseUrl = "https://uat.hmgwebservices.com/";
payFortEnvironment = FortEnvironment.test;
payFortEnvironmentType = EnvironmentType.sandbox;
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";
@ -77,12 +85,13 @@ class ApiConsts {
symptomsCheckerApi = symptomsCheckerApiUAT;
symptomsCheckerUsername = 'guest_user';
symptomsCheckerPassword = '123456';
break;
case AppEnvironmentTypeEnum.uat:
baseUrl = "https://uat.hmgwebservices.com/";
payFortEnvironment = FortEnvironment.test;
payFortEnvironmentType = EnvironmentType.sandbox;
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";
@ -100,6 +109,8 @@ class ApiConsts {
baseUrl = "https://webservices.hmg.com/";
payFortEnvironment = FortEnvironment.production;
payFortEnvironmentType = EnvironmentType.production;
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";
@ -117,6 +128,8 @@ class ApiConsts {
baseUrl = "https://uat.hmgwebservices.com/";
payFortEnvironment = FortEnvironment.test;
payFortEnvironmentType = EnvironmentType.sandbox;
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";
@ -134,6 +147,8 @@ class ApiConsts {
baseUrl = "https://uat.hmgwebservices.com/";
payFortEnvironment = FortEnvironment.test;
payFortEnvironmentType = EnvironmentType.sandbox;
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";

@ -48,12 +48,18 @@ class AppState {
bool isPaytabsEnabled = false;
bool isPayfortHostedPageEnabled = true;
bool isMyFatoorahEnabled = false;
void setIsPaytabsEnabled(bool value) {
isPaytabsEnabled = value;
// isPaytabsEnabled = true;
}
void setIsMyFatoorahEnabled(bool value) {
isMyFatoorahEnabled = value;
// isMyFatoorahEnabled = true;
}
void setIsPayfortHostedPageEnabled(bool value) {
isPayfortHostedPageEnabled = value;
// isPayfortHostedPageEnabled = false;

@ -772,9 +772,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
patientMyDoctorsList = apiResponse.data!;
isPatientMyDoctorsLoading = false;
if (!isTop8) {
isMyDoctorsDataToBeLoaded = false;
}
// if (!isTop8) {
isMyDoctorsDataToBeLoaded = false;
// }
notifyListeners();
if (onSuccess != null) {

@ -219,6 +219,9 @@ class DoctorCard extends StatelessWidget {
);
} else {
bookAppointmentsViewModel.setSelectedDoctor(doctorsListResponseModel);
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
clinicID: doctorsListResponseModel.clinicID, clinicDescription: doctorsListResponseModel.clinicName, isLiveCareClinicAndOnline: false, liveCareServiceID: 0, liveCareClinicID: 0);
bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule
? await bookAppointmentsViewModel.getLiveCareDoctorFreeSlots(

Loading…
Cancel
Save