merge-requests/581/merge
haroon amjad 4 years ago
parent b641f5b6a3
commit 4ba229c436

@ -405,7 +405,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 8.5; var VERSION_ID = 8.6;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
var PATIENT_OUT_SA = 0; var PATIENT_OUT_SA = 0;

@ -23,7 +23,7 @@ class PrescriptionReport {
String patientName; String patientName;
String phoneOffice1; String phoneOffice1;
String prescriptionQR; String prescriptionQR;
int prescriptionTimes; num prescriptionTimes;
String productImage; String productImage;
String productImageBase64; String productImageBase64;
String productImageString; String productImageString;

@ -22,7 +22,7 @@ class PrescriptionReportEnh {
String patientName; String patientName;
String phoneOffice1; String phoneOffice1;
Null prescriptionQR; Null prescriptionQR;
int prescriptionTimes; num prescriptionTimes;
Null productImage; Null productImage;
Null productImageBase64; Null productImageBase64;
String productImageString; String productImageString;

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
@ -410,7 +409,11 @@ class BaseAppClient {
} }
Future navigateToAppUpdate(context, String text) async { Future navigateToAppUpdate(context, String text) async {
Navigator.pushReplacement(context, FadePage(page: AppUpdatePage(appUpdateText: text))); Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)),
(Route<dynamic> route) => false,
);
} }
get(String endPoint, get(String endPoint,

@ -199,55 +199,55 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
if (projectViewModel.havePrivilege(90)) if (projectViewModel.havePrivilege(90))
// Container( Container(
// width: double.infinity, width: double.infinity,
// child: InkWell( child: InkWell(
// onTap: () { onTap: () {
// updateSelectedPaymentMethod("TAMARA"); updateSelectedPaymentMethod("TAMARA");
// }, },
// child: Card( child: Card(
// elevation: 0.0, elevation: 0.0,
// margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
// color: Colors.white, color: Colors.white,
// shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
// side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0),
// ), ),
// child: Padding( child: Padding(
// padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
// child: Row( child: Row(
// children: [ children: [
// Container( Container(
// width: 24, width: 24,
// height: 24, height: 24,
// decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
// ), ),
// mWidth(12), mWidth(12),
// Container( Container(
// height: 60.0, height: 60.0,
// padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
// width: 60, width: 60,
// child: Image.asset("assets/images/new/payment/tamara.png"), child: Image.asset("assets/images/new/payment/tamara.png"),
// ), ),
// mFlex(1), mFlex(1),
// if (selectedPaymentMethod == "TAMARA") if (selectedPaymentMethod == "TAMARA")
// Container( Container(
// decoration: containerRadius(CustomColors.green, 200), decoration: containerRadius(CustomColors.green, 200),
// padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
// child: Text( child: Text(
// TranslationBase.of(context).paymentSelected, TranslationBase.of(context).paymentSelected,
// style: TextStyle( style: TextStyle(
// color: Colors.white, color: Colors.white,
// fontSize: 11, fontSize: 11,
// ), ),
// ), ),
// ), ),
// ], ],
// ), ),
// ), ),
// ), ),
// ), ),
// ), ),
if (widget.isShowInstallments && projectViewModel.havePrivilege(91)) if (widget.isShowInstallments && projectViewModel.havePrivilege(91))
Container( Container(
width: double.infinity, width: double.infinity,
@ -382,6 +382,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
], ],
), ),
), ),
if(tamaraInstallmentDetails != null)
Column( Column(
children: [ children: [
...List.generate( ...List.generate(

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppUpdatePage extends StatefulWidget { class AppUpdatePage extends StatefulWidget {
@ -93,7 +94,17 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
openAppUpdateLink() { openAppUpdateLink() {
if (Platform.isAndroid) { if (Platform.isAndroid) {
_launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
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) {
print(e.toString());
});
} }
if (Platform.isIOS) { if (Platform.isIOS) {
_launchURL("https://itunes.apple.com/app/id733503978"); _launchURL("https://itunes.apple.com/app/id733503978");

@ -51,6 +51,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
String transID = ""; String transID = "";
String tamaraPaymentStatus;
String tamaraOrderID;
Pay _payClient; Pay _payClient;
@override @override
@ -378,6 +380,14 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
print("onBrowserLoadStart"); print("onBrowserLoadStart");
print(url); print(url);
if (widget.selectedPaymentMethod == "TAMARA") {
Uri uri = new Uri.dataFromString(url);
tamaraPaymentStatus = uri.queryParameters['paymentStatus'];
tamaraOrderID = uri.queryParameters['orderId'];
print(tamaraPaymentStatus);
print(tamaraOrderID);
}
MyInAppBrowser.successURLS.forEach((element) { MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) { if (url.contains(element)) {
if (browser.isOpened()) browser.close(); if (browser.isOpened()) browser.close();
@ -397,7 +407,19 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!"); print("onBrowserExit Called!!!!");
if (widget.selectedPaymentMethod == "TAMARA" && tamaraPaymentStatus != null && tamaraPaymentStatus == "approved") {
var res = {
"Amount": double.parse(widget.advanceModel.amount),
"ErrorMessage": null,
"Fort_id": tamaraOrderID,
"Merchant_Reference": "5058637919318707883366",
"PaymentMethod": "TAMARA",
"Response_Message": "Success"
};
createAdvancePayment(res, appo);
} else {
checkPaymentStatus(appo); checkPaymentStatus(appo);
}
} }
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
@ -422,7 +444,12 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
amount = widget.advanceModel.amount; amount = widget.advanceModel.amount;
payment_method = widget.selectedPaymentMethod; payment_method = widget.selectedPaymentMethod;
projectViewModel.analytics.advancePayments.payment_fail( projectViewModel.analytics.advancePayments.payment_fail(
payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, hospital: widget.advanceModel.hospitalsModel.name, error_type: res['Response_Message']); payment_type: 'wallet',
payment_method: payment_method,
txn_amount: "$amount",
txn_currency: currency,
hospital: widget.advanceModel.hospitalsModel.name,
error_type: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -21,14 +21,15 @@ enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT }
var _InAppBrowserOptions = InAppBrowserClassOptions( var _InAppBrowserOptions = InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions( inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true), crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions( ios: IOSInAppWebViewOptions(
applePayAPIEnabled: true, applePayAPIEnabled: true,
)), )),
crossPlatform: InAppBrowserOptions(hideUrlBar: true), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
ios: IOSInAppBrowserOptions( ios: IOSInAppBrowserOptions(
hideToolbarBottom: false, hideToolbarBottom: true,
toolbarBottomBackgroundColor: Colors.white, toolbarBottomBackgroundColor: Colors.white,
presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN
)); ));
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
@ -55,9 +56,9 @@ class MyInAppBrowser extends InAppBrowser {
static String PACKAGES_PAYMENT_SUCCESS_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentSuccess'; static String PACKAGES_PAYMENT_SUCCESS_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentSuccess';
static String PACKAGES_PAYMENT_FAIL_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentFailed'; static String PACKAGES_PAYMENT_FAIL_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentFailed';
static List<String> successURLS = ['success', 'PayFortResponse', 'PayFortSucess', 'mobilepaymentcomplete', 'orderdetails']; static List<String> successURLS = ['success', 'PayFortResponse', 'PayFortSucess', 'mobilepaymentcomplete', 'orderdetails', 'redirectToApplePay'];
static List<String> errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails']; static List<String> errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails', 'redirectToApplePay'];
final Function onExitCallback; final Function onExitCallback;
final Function onLoadStartCallback; final Function onLoadStartCallback;

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.4.97+404097 version: 4.4.98+404098
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save