|
|
|
|
@ -27,10 +27,12 @@ abstract class PaymentService {
|
|
|
|
|
class PaymentServiceImp implements PaymentService {
|
|
|
|
|
MyInAppBrowser? myInAppBrowser;
|
|
|
|
|
var inAppBrowserOptions = InAppBrowserClassOptions(
|
|
|
|
|
inAppWebViewGroupOptions: InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true)),
|
|
|
|
|
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));
|
|
|
|
|
ios:
|
|
|
|
|
IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
|
|
|
|
|
|
|
|
|
|
String getUrlRequestByPaymentId({required int id, List<int>? appointmentIds, required PaymentTypes paymentType}) {
|
|
|
|
|
String urlRequest = "";
|
|
|
|
|
@ -87,7 +89,8 @@ class PaymentServiceImp implements PaymentService {
|
|
|
|
|
onBrowserLoadStart(onFailure: onFailure, onSuccess: onSuccess, url: url);
|
|
|
|
|
});
|
|
|
|
|
await myInAppBrowser!.openUrlRequest(
|
|
|
|
|
urlRequest: URLRequest(url: Uri.parse(urlRequest)),
|
|
|
|
|
// Uri.parse(urlRequest)
|
|
|
|
|
urlRequest: URLRequest(url: WebUri(urlRequest)),
|
|
|
|
|
options: inAppBrowserOptions,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|