|
|
|
|
@ -13,6 +13,7 @@ import 'package:flutter/services.dart';
|
|
|
|
|
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:share_plus/share_plus.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
class InPatientPendingAdvancePayment extends StatefulWidget {
|
|
|
|
|
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
|
|
|
|
|
@ -254,17 +255,17 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
|
|
|
|
|
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17;
|
|
|
|
|
service
|
|
|
|
|
.getInPatientPaymentLink(
|
|
|
|
|
projectViewModel.inPatientProjectID,
|
|
|
|
|
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
|
|
|
|
|
projectViewModel.inPatientProjectID,
|
|
|
|
|
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
|
|
|
|
|
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
|
|
|
|
|
orderID,
|
|
|
|
|
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
|
|
|
|
|
projectViewModel.user.emailAddress!,
|
|
|
|
|
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!,
|
|
|
|
|
projectViewModel.user.patientIdentificationNo!,
|
|
|
|
|
clinicID,
|
|
|
|
|
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
|
|
|
|
|
)
|
|
|
|
|
orderID,
|
|
|
|
|
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
|
|
|
|
|
projectViewModel.user.emailAddress!,
|
|
|
|
|
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!,
|
|
|
|
|
projectViewModel.user.patientIdentificationNo!,
|
|
|
|
|
clinicID,
|
|
|
|
|
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
|
|
|
|
|
)
|
|
|
|
|
.then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res["MessageStatus"] == 1) {
|
|
|
|
|
@ -273,7 +274,9 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
|
|
|
|
|
if (isCopy) {
|
|
|
|
|
Share.share(paymentLink);
|
|
|
|
|
} else {
|
|
|
|
|
this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
|
|
|
|
|
Uri uri = Uri.parse(paymentLink);
|
|
|
|
|
launchUrl(uri, mode: LaunchMode.externalApplication);
|
|
|
|
|
// this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res["endUserMessage"]);
|
|
|
|
|
|