Merge fixes & updates

merge-requests/34/merge
haroon amjad 5 years ago
parent 3b881f1ab3
commit b9d913e6a5

@ -59,24 +59,34 @@ class BaseAppClient {
onFailure('Error While Fetching data', statusCode);
} else {
var parsed = json.decode(response.body.toString());
if (isAllowAny) {
if (parsed['Response_Message'] != null) {
onSuccess(parsed, statusCode);
} else if (!parsed['IsAuthenticated']) {
if (parsed['isSMSSent'] == true) {
} else {
if (isAllowAny) {
onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 1) {
} else if (!parsed['IsAuthenticated']) {
if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 1) {
onSuccess(parsed, statusCode);
} else {
onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout();
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
logout();
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
}
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else {
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
}
}
} else {

@ -109,11 +109,13 @@ class _BookSuccessState extends State<BookSuccess> {
style: _getTextStyling()),
),
Container(
width: MediaQuery.of(context).size.width * 0.65,
margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text(
widget.docObject.doctorTitle +
" " +
widget.docObject.name,
overflow: TextOverflow.ellipsis,
style: _getTextStyling()),
),
],

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';

@ -42,14 +42,14 @@ class DoctorsListService extends BaseService {
"PatientOutSA": 0,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
"SessionID": "YckwoXhUmWBsnHKEKig",
"ClinicID": clinicID,
"ProjectID": projectID,
"ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": true,
"PatientID": authUser.patientID,
"gender": authUser.gender,
"age": authUser.age,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false,
"Latitude": 0,
"Longitude": 0,
@ -95,9 +95,9 @@ class DoctorsListService extends BaseService {
"ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": false,
"DoctorName": docName,
"PatientID": authUser.patientID,
"gender": authUser.gender,
"age": authUser.age,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false,
"Latitude": 0,
"Longitude": 0,

@ -8,18 +8,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// ignore: non_constant_identifier_names
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
'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 List<String> successURLS = [
'success',
@ -50,41 +49,6 @@ class MyInAppBrowser extends InAppBrowser {
@override
Future onLoadStart(String url) async {
onLoadStartCallback(url);
// print("\n\nStarted $url\n\n");
// if (successURLS.length != 0) {
// successURLS.forEach((element) {
// if (url.contains(element)) {
// try {
// if (browser.isOpened()) browser.close();
// isPaymentDone = true;
// Utils.hideProgressDialog();
// return;
// } on MissingPluginException catch (exception) {
// Utils.hideProgressDialog();
// } catch (error) {
// Utils.hideProgressDialog();
// }
// }
// });
// }
//
// if (errorURLS.length != 0) {
// errorURLS.forEach((element) {
// if (url.contains(element)) {
// try {
// if (browser.isOpened()) browser.close();
// isPaymentDone = false;
// Utils.hideProgressDialog();
// return;
// } on MissingPluginException catch (exception) {
// Utils.hideProgressDialog();
// } catch (error) {
// Utils.hideProgressDialog();
// }
// }
// });
// }
}
@override

Loading…
Cancel
Save