|
|
|
|
@ -37,9 +37,9 @@ 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/PayFortWebLive/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 PRESCRIPTION_PAYMENT_WITH_ORDERID =
|
|
|
|
|
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
|
|
|
|
|
@ -63,7 +63,7 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
AuthProvider authProvider = new AuthProvider();
|
|
|
|
|
InAppBrowser browser = new InAppBrowser();
|
|
|
|
|
|
|
|
|
|
AuthenticatedUser authUser;
|
|
|
|
|
// AuthenticatedUser authUser;
|
|
|
|
|
AppoitmentAllHistoryResultList appo;
|
|
|
|
|
|
|
|
|
|
String deviceToken;
|
|
|
|
|
@ -125,16 +125,16 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
this.deviceToken = deviceToken;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getPatientData() async {
|
|
|
|
|
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
|
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
authUser = data;
|
|
|
|
|
}
|
|
|
|
|
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
|
|
|
|
|
lat = await this.sharedPref.getDouble(USER_LAT);
|
|
|
|
|
long = await this.sharedPref.getDouble(USER_LONG);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// getPatientData() async {
|
|
|
|
|
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
|
// var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
// authUser = data;
|
|
|
|
|
// }
|
|
|
|
|
// if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
|
|
|
|
|
// lat = await this.sharedPref.getDouble(USER_LAT);
|
|
|
|
|
// long = await this.sharedPref.getDouble(USER_LONG);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) {
|
|
|
|
|
paymentType = _PAYMENT_TYPE.PACKAGES;
|
|
|
|
|
@ -146,7 +146,7 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID, BuildContext context,
|
|
|
|
|
[var appoDate, var appoNo, var clinicID, var doctorID, var installments]) async {
|
|
|
|
|
this.browser = browser;
|
|
|
|
|
await getPatientData();
|
|
|
|
|
// await getPatientData();
|
|
|
|
|
if (paymentMethod == "ApplePay") {
|
|
|
|
|
getDeviceToken();
|
|
|
|
|
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
|
|
|
|
|
@ -213,7 +213,7 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
tamaraRequestModel.orderDescription = orderDesc;
|
|
|
|
|
tamaraRequestModel.isInstallment = true;
|
|
|
|
|
tamaraRequestModel.projectID = num.parse(projId);
|
|
|
|
|
tamaraRequestModel.accessCode = authUser.mobileNumber;
|
|
|
|
|
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber;
|
|
|
|
|
tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0";
|
|
|
|
|
tamaraRequestModel.customerName = patientName;
|
|
|
|
|
tamaraRequestModel.fileNumber = patientID.toString();
|
|
|
|
|
@ -254,7 +254,7 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
AuthenticatedUser authenticatedUser, InAppBrowser browser) {
|
|
|
|
|
this.browser = browser;
|
|
|
|
|
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
|
|
|
|
|
getPatientData();
|
|
|
|
|
// getPatientData();
|
|
|
|
|
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
|
|
|
|
|
if (order.customValuesXml.contains("ApplePay")) {
|
|
|
|
|
safariBrowser.open(url: Uri.parse(value));
|
|
|
|
|
@ -300,7 +300,7 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
|
// if (servID == "4")
|
|
|
|
|
// form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.PREAUTH_SERVICE_URL);
|
|
|
|
|
// else
|
|
|
|
|
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
|
|
|
|
|
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
|
|
|
|
|
|
|
|
|
|
if (servID != null) {
|
|
|
|
|
form = form.replaceFirst('SERV_ID', servID);
|
|
|
|
|
|