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

@ -405,7 +405,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 = 8.5;
var VERSION_ID = 8.6;
var SETUP_ID = '91877';
var LANGUAGE = 2;
var PATIENT_OUT_SA = 0;

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

@ -22,7 +22,7 @@ class PrescriptionReportEnh {
String patientName;
String phoneOffice1;
Null prescriptionQR;
int prescriptionTimes;
num prescriptionTimes;
Null productImage;
Null productImageBase64;
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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
@ -410,7 +409,11 @@ class BaseAppClient {
}
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,

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

@ -51,6 +51,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
String transID = "";
String tamaraPaymentStatus;
String tamaraOrderID;
Pay _payClient;
@override
@ -378,6 +380,14 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
print("onBrowserLoadStart");
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) {
if (url.contains(element)) {
if (browser.isOpened()) browser.close();
@ -397,7 +407,19 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
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(AppoitmentAllHistoryResultList appo) {
@ -422,7 +444,12 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
amount = widget.advanceModel.amount;
payment_method = widget.selectedPaymentMethod;
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) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -21,14 +21,15 @@ enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT }
var _InAppBrowserOptions = InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true),
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions(
applePayAPIEnabled: true,
)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
ios: IOSInAppBrowserOptions(
hideToolbarBottom: false,
hideToolbarBottom: true,
toolbarBottomBackgroundColor: Colors.white,
presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN
));
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_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 onLoadStartCallback;

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

Loading…
Cancel
Save