ED Online Check-In

merge-update-with-lab-changes
haroon amjad 4 years ago
parent bbb99667f8
commit 8b7a6e7689

@ -141,11 +141,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
if (BASE_URL == "https://uat.hmgwebservices.com/") {
// if (BASE_URL == "https://uat.hmgwebservices.com/") {
print("URL : $url");
final jsonBody = json.encode(body);
print(jsonBody);
}
// }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -57,9 +57,12 @@ class _MyApp extends State<MyApp> {
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> checkForUpdate() async { // todo need to verify 'imp'
checkForUpdate() { // todo need to verify 'imp'
InAppUpdate.checkForUpdate().then((info) {
print("checkForUpdate!!!");
print(info.toString());
if (info.immediateUpdateAllowed) {
print("Immediate Allowed!!!");
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
}
}).catchError((e) {

@ -70,8 +70,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
serviceName: projectViewModel.isArabic ? service.textN : service.text));
else
removeSelected(num.tryParse(service.serviceID));
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
SizedBox(width: 6),

@ -14,6 +14,7 @@ class UserAgreementPage extends StatelessWidget {
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView(
child: Html(

@ -62,6 +62,7 @@ class _DdServicesPageState extends State<DdServicesPage> {
EdOnlineQuestionsPage(
changePageViewIndex: _changePageViewIndex,
selectedQuestions: selectedQuestions,
selectedHospital: triageInformationRequest.selectedHospital,
),
EdOnlineNotesPage(
changePageViewIndex: _changePageViewIndex,

@ -1,10 +1,13 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -15,16 +18,13 @@ class EdOnlineQuestionsPage extends StatefulWidget {
final Function changePageViewIndex;
List<TriageQuestionsModel> selectedQuestions;
EdOnlineQuestionsPage({Key key, this.selectedHospital,this.selectedQuestions, this.changePageViewIndex});
EdOnlineQuestionsPage({Key key, this.selectedHospital, this.selectedQuestions, this.changePageViewIndex});
@override
_EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState();
}
class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> {
@override
Widget build(BuildContext context) {
return BaseView<EdOnlineViewModel>(
@ -37,90 +37,160 @@ class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> {
children: [
...List.generate(
model.triageQuestionsModelList.length,
(index) =>
InkWell(
onTap: (){
setState(() {
if (widget.selectedQuestions
.contains(model.triageQuestionsModelList[index])) {
widget.selectedQuestions
.remove(model.triageQuestionsModelList[index]);
} else {
widget.selectedQuestions
.add(model.triageQuestionsModelList[index]);
}
});
},
child: Row(
children: [
Checkbox(
value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget.selectedQuestions
.contains(model.triageQuestionsModelList[index])) {
widget.selectedQuestions
.remove(model.triageQuestionsModelList[index]);
} else {
widget.selectedQuestions
.add(model.triageQuestionsModelList[index]);
}
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
model.triageQuestionsModelList[index].question,
fontSize: 15,
),
),
(index) => InkWell(
onTap: () {
setState(() {
if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) {
widget.selectedQuestions.remove(model.triageQuestionsModelList[index]);
} else {
widget.selectedQuestions.add(model.triageQuestionsModelList[index]);
}
});
},
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Row(
children: [
Checkbox(
value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]),
activeColor: Color(0xffD02127),
tristate: false,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (bool newValue) {
setState(() {
if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) {
widget.selectedQuestions.remove(model.triageQuestionsModelList[index]);
} else {
widget.selectedQuestions.add(model.triageQuestionsModelList[index]);
}
});
}),
SizedBox(width: 6),
Expanded(
child: Text(
model.triageQuestionsModelList[index].question,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
),
],
),
),
],
),
),
),
),
SizedBox(height: 80,)
SizedBox(
height: 120,
)
],
),
),
bottomSheet: Padding(
padding: const EdgeInsets.all(8.0),
bottomSheet: Container(
color: CustomColors.appBackgroudGreyColor,
child: Container(
height: 56,
color: CustomColors.appBackgroudGreyColor,
margin: EdgeInsets.all(14),
height: 45.0,
child: Row(
children: [
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(left: 5,right: 5),
child: SecondaryButton(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: RaisedButton(
color: new Color(0xffc5272d),
textColor: Colors.white,
color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).back.toUpperCase(),
onTap: () => widget.changePageViewIndex(1),
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
widget.changePageViewIndex(0);
},
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 16.0)),
),
),
),
SizedBox(width: 10,),
mWidth(7),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 5,right: 5),
child: SecondaryButton(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: RaisedButton(
color: CustomColors.green,
textColor: Colors.white,
color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).next.toUpperCase(),
disabled: widget.selectedQuestions.isEmpty,
onTap: () => widget.changePageViewIndex(3),
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: widget.selectedQuestions.isEmpty
? null
: () {
GifLoaderDialogUtils.showMyDialog(context);
model
.saveQuestionsInformation(
chiefComplaint: "", notes: "", selectedQuestions: widget.selectedQuestions, projectId: widget.selectedHospital.iD, selectedTime: DateTime.now())
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal)
AppToast.showErrorToast(message: model.error);
else {
widget.changePageViewIndex(4);
}
}).catchError((onError) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: onError.toString());
});
// widget.changePageViewIndex(4);
},
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 16.0)),
),
),
),
],
),
),
),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Container(
// height: 56,
// child: Row(
// children: [
// Expanded(
// child: Container(
// margin: EdgeInsets.only(left: 5, right: 5),
// child: SecondaryButton(
// textColor: Colors.white,
// color: Theme.of(context).primaryColor,
// label: TranslationBase.of(context).back.toUpperCase(),
// onTap: () => widget.changePageViewIndex(1),
// ),
// ),
// ),
// SizedBox(
// width: 10,
// ),
// Expanded(
// child: Container(
// margin: EdgeInsets.only(left: 5, right: 5),
// child: SecondaryButton(
// textColor: Colors.white,
// color: Theme.of(context).primaryColor,
// label: TranslationBase.of(context).next.toUpperCase(),
// disabled: widget.selectedQuestions.isEmpty,
// onTap: () => widget.changePageViewIndex(3),
// ),
// ),
// ),
// ],
// ),
// ),
// ),
),
);
}

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -140,33 +139,23 @@ class _EdOnlineSelectedHospitalPageState extends State<EdOnlineSelectedHospitalP
],
),
),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
(){},
// selectedProcList.length > 0 && getTotalValue() != "0.00"
// ? () {
// makePayment();
// }
// : null,
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
],
),
),
// bottomSheet:
// Container(
// height: 76,
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: SecondaryButton(
// // textColor: Colors.white,
// color: Theme.of(context).primaryColor,
// label: TranslationBase.of(context).next.toUpperCase(),
// disabled: (widget.triageInformationRequest.selectedHospital == null || _selected == 0),
// onTap: () => widget.changePageViewIndex(1)),
// ),
// ),
bottomSheet: Container(
color: CustomColors.appBackgroudGreyColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).next,
(widget.triageInformationRequest.selectedHospital == null || _selected == 0)
? null
: () {
widget.changePageViewIndex(2);
},
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
),
),
);
}

@ -7,12 +7,13 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -38,7 +39,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<EdOnlineViewModel>(
onModelReady: (model) => model.getPatientPaymentInformation(),
onModelReady: (model) async => await model.getPatientPaymentInformation(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
body: SingleChildScrollView(
@ -46,75 +47,129 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
child: Column(
children: [
Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10.0), color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0),
padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0),
child: Column(
children: <Widget>[
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0),
child: Text(TranslationBase.of(context).testFee, style: TextStyle(color: Colors.black, fontSize: 22.0, fontWeight: FontWeight.bold)),
),
if (model.erPatientShareModel != null)
Table(
children: [
TableRow(children: [
TableCell(child: Texts(TranslationBase.of(context).testFee)),
TableCell(child: Texts(model.erPatientShareModel.patientShare.toStringAsFixed(2))),
]),
TableRow(children: [
TableCell(child: Texts(TranslationBase.of(context).patientTaxToDo)),
TableCell(child: Texts(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2))),
]),
TableRow(children: [
TableCell(child: Texts(TranslationBase.of(context).patientShareTotalToDo)),
TableCell(child: Texts(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2))),
]),
],
decoration: cardRadius(12),
margin: EdgeInsets.fromLTRB(12.0, 30.0, 12.0, 5.0),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).payment,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
)),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 10, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientShareToDo),
),
Expanded(
child: _getNormalText(model.erPatientShareModel.patientShare.toStringAsFixed(2) ?? "0", isBold: true),
)
],
),
),
],
mDivider(Colors.grey[200]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientTaxToDo),
),
Expanded(
child: _getNormalText(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2) ?? "0", isBold: true),
)
],
),
),
mDivider(Colors.grey[200]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo),
),
Expanded(
child: _getNormalText(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2) ?? "0", isBold: true),
)
],
),
),
],
),
),
),
mHeight(50.0),
Text(
TranslationBase.of(context).payOptions,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
),
),
Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
],
),
),
bottomSheet: Container(
height: 76,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SecondaryButton(
color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).next.toUpperCase(),
onTap: () {
Navigator.push(context, FadePage(page: PaymentMethod(
onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) {
setState(() {});
},
))).then(
(value) {
//TODO Haroun call API here
print(value);
if (value != null) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.selectedHospital.iD;
openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo);
}
},
);
},
),
color: CustomColors.appBackgroudGreyColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
() {
Navigator.push(context, FadePage(page: PaymentMethod(
onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) {
setState(() {});
},
))).then(
(value) {
//TODO Haroun call API here
print(value);
if (value != null) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.selectedHospital.iD;
openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo);
}
},
);
},
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
),
),
);
}
_getNormalText(text, {bool isBold = false}) {
return Text(
text,
style: TextStyle(
fontSize: isBold ? 12 : 10,
letterSpacing: -0.5,
color: isBold ? Colors.black : Colors.grey[700],
fontWeight: FontWeight.w600,
),
);
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(),
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType,
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
}
onBrowserLoadStart(String url) {
@ -163,13 +218,12 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
});
}
ER_createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
ER_createAdvancePayment(payment_res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.ER_createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) {
service.ER_createAdvancePayment(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
ER_InsertEROnlinePaymentDetails(res, appo);
ER_InsertEROnlinePaymentDetails(payment_res, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
@ -177,11 +231,13 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
});
}
ER_InsertEROnlinePaymentDetails(res, AppoitmentAllHistoryResultList appo) {
ER_InsertEROnlinePaymentDetails(payment_res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) {
service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
Navigator.of(context).pop();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);

@ -404,7 +404,7 @@ class Signaling {
'to': session.remote_user?.id,
'from': session.local_user.id,
'candidate': {
'sdpMLineIndex': candidate.sdpMlineIndex,
'sdpMLineIndex': candidate.sdpMLineIndex,
'sdpMid': candidate.sdpMid,
'candidate': candidate.candidate,
},

@ -1393,7 +1393,6 @@ class DoctorsListService extends BaseService {
"PatientOutSA": authUser.outSA,
"PatientTypeID": authUser.patientType,
"ERAdvanceAmount": {
"AppointmentID": paymentReference,
"ProjectId": projectID,
"PatientId": authUser.patientID,
"ClinicId": 10,
@ -1436,7 +1435,6 @@ class DoctorsListService extends BaseService {
"EROnlineCheckinPaymentDetails": {
"CheckinDate": DateUtil.convertDateToString(DateTime.now()),
"ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()),
"AppointmentID": paymentReference,
"ProjectId": projectID,
"PatientId": authUser.patientID,
"ClinicId": 10,

@ -44,6 +44,7 @@ class _SplashScreenState extends State<SplashScreen> {
AppSharedPreferences().getAll().then((value){
debugPrint("ALL SHARED PREFERENCES!!!!!");
debugPrint(jsonEncode(value));
});
}

@ -53,7 +53,7 @@ class DateUtil {
static String convertDateToString(DateTime date) {
const start = "/Date(";
const end = "+0300)";
const end = "+0300)/";
int milliseconds = date.millisecondsSinceEpoch;
return start + "$milliseconds" + end;

@ -271,8 +271,6 @@ class PushNotificationHandler {
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async {
print("Firebase onMessageOpenedApp!!!");
// Utils.showPermissionConsentDialog(context, "onMessageOpenedApp", (){});
// newMessage(message);
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
@ -282,9 +280,15 @@ class PushNotificationHandler {
});
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
print("Push Notification onTokenRefresh: " + fcm_token);
onToken(fcm_token);
});
FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token){
print("Push Notification getToken: " + token);
onToken(token);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
}
}

@ -33,13 +33,13 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -162,7 +162,7 @@ class MyInAppBrowser extends InAppBrowser {
applePayInsertRequest.customerEmail = emailId;
applePayInsertRequest.customerID = authenticatedUser.patientID;
applePayInsertRequest.customerName = authenticatedUser.firstName;
applePayInsertRequest.deviceToken = await sharedPref.getString(PUSH_TOKEN);
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0;
applePayInsertRequest.projectID = projId;
applePayInsertRequest.serviceID = servID;

Loading…
Cancel
Save