|
|
|
|
@ -26,13 +26,37 @@ abstract class PaymentService {
|
|
|
|
|
|
|
|
|
|
class PaymentServiceImp implements PaymentService {
|
|
|
|
|
MyInAppBrowser? myInAppBrowser;
|
|
|
|
|
var inAppBrowserOptions = InAppBrowserClassOptions(
|
|
|
|
|
inAppWebViewGroupOptions:
|
|
|
|
|
InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true)),
|
|
|
|
|
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
|
|
|
|
|
android: AndroidInAppBrowserOptions(),
|
|
|
|
|
ios:
|
|
|
|
|
IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
|
|
|
|
|
|
|
|
|
|
// var inAppBrowserOptions = InAppBrowserClassOptions(
|
|
|
|
|
// inAppWebViewGroupOptions:
|
|
|
|
|
// InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true)),
|
|
|
|
|
// crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
|
|
|
|
|
// android: AndroidInAppBrowserOptions(),
|
|
|
|
|
// ios:
|
|
|
|
|
// IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
|
|
|
|
|
|
|
|
|
|
var inAppBrowserOptions = InAppBrowserClassSettings(
|
|
|
|
|
webViewSettings: InAppWebViewSettings(
|
|
|
|
|
useShouldOverrideUrlLoading: false,
|
|
|
|
|
transparentBackground: false,
|
|
|
|
|
isInspectable: false,
|
|
|
|
|
applePayAPIEnabled: true,
|
|
|
|
|
cacheEnabled: false,
|
|
|
|
|
),
|
|
|
|
|
browserSettings: InAppBrowserSettings(
|
|
|
|
|
hideUrlBar: true,
|
|
|
|
|
hideTitleBar: true,
|
|
|
|
|
hideDefaultMenuItems: true,
|
|
|
|
|
hideToolbarBottom: true,
|
|
|
|
|
hideToolbarTop: false,
|
|
|
|
|
hideCloseButton: false,
|
|
|
|
|
allowGoBackWithBackButton: true,
|
|
|
|
|
toolbarBottomBackgroundColor: Colors.black,
|
|
|
|
|
closeButtonColor: Colors.white,
|
|
|
|
|
presentationStyle: ModalPresentationStyle.FULL_SCREEN,
|
|
|
|
|
// toolbarTopBackgroundColor: Colors.black
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
String getUrlRequestByPaymentId({required int id, List<int>? appointmentIds, required PaymentTypes paymentType}) {
|
|
|
|
|
String urlRequest = "";
|
|
|
|
|
@ -91,7 +115,8 @@ class PaymentServiceImp implements PaymentService {
|
|
|
|
|
await myInAppBrowser!.openUrlRequest(
|
|
|
|
|
// Uri.parse(urlRequest)
|
|
|
|
|
urlRequest: URLRequest(url: WebUri(urlRequest)),
|
|
|
|
|
options: inAppBrowserOptions,
|
|
|
|
|
settings: inAppBrowserOptions,
|
|
|
|
|
// in: inAppBrowserOptions,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|