|
|
|
|
@ -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
|
|
|
|
|
|