|
|
|
|
@ -150,10 +150,11 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.clinicID,
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.appointmentNo,
|
|
|
|
|
);
|
|
|
|
|
paytabsViewModel.setPaymentConfiguration(
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
);
|
|
|
|
|
await paytabsViewModel.setPaymentConfiguration(
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(),
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.projectID);
|
|
|
|
|
paytabsViewModel.startCardPayment(
|
|
|
|
|
paymentOption: selectedPaymentMethod,
|
|
|
|
|
liveServiceID: "0",
|
|
|
|
|
@ -179,7 +180,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
patientID: appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
patientType: appState.getAuthenticatedUser()!.patientType!,
|
|
|
|
|
onSuccess: (value) async {
|
|
|
|
|
print(value);
|
|
|
|
|
await myAppointmentsViewModel.addAdvanceNumberRequest(
|
|
|
|
|
advanceNumber: Utils.isVidaPlusProject(widget.patientAppointmentHistoryResponseModel.projectID)
|
|
|
|
|
? value.data['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
|
|
|
|
|
@ -263,7 +263,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
orderDescription: "Appointment Payment",
|
|
|
|
|
amount: myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString(),
|
|
|
|
|
onSucceeded: (paymentResult) async {
|
|
|
|
|
print("Payment Success Data: ${paymentResult.toString()}");
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
|
|
|
|
|
await myAppointmentsViewModel.createAdvancePayment(
|
|
|
|
|
paymentMethodName: selectedPaymentMethod,
|
|
|
|
|
@ -275,7 +274,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
patientID: appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
patientType: appState.getAuthenticatedUser()!.patientType!,
|
|
|
|
|
onSuccess: (value) async {
|
|
|
|
|
print(value);
|
|
|
|
|
await myAppointmentsViewModel.addAdvanceNumberRequest(
|
|
|
|
|
advanceNumber: Utils.isVidaPlusProject(widget.patientAppointmentHistoryResponseModel.projectID)
|
|
|
|
|
? value.data['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
|
|
|
|
|
@ -391,10 +389,11 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.clinicID,
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.appointmentNo,
|
|
|
|
|
);
|
|
|
|
|
paytabsViewModel.setPaymentConfiguration(
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
);
|
|
|
|
|
await paytabsViewModel.setPaymentConfiguration(
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(),
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.projectID);
|
|
|
|
|
paytabsViewModel.startCardPayment(
|
|
|
|
|
paymentOption: selectedPaymentMethod,
|
|
|
|
|
liveServiceID: "0",
|
|
|
|
|
@ -420,7 +419,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
patientID: appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
patientType: appState.getAuthenticatedUser()!.patientType!,
|
|
|
|
|
onSuccess: (value) async {
|
|
|
|
|
print(value);
|
|
|
|
|
await myAppointmentsViewModel.addAdvanceNumberRequest(
|
|
|
|
|
advanceNumber: Utils.isVidaPlusProject(widget.patientAppointmentHistoryResponseModel.projectID)
|
|
|
|
|
? value.data['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
|
|
|
|
|
@ -504,7 +502,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
amount: myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString(),
|
|
|
|
|
orderDescription: "Appointment Payment",
|
|
|
|
|
onSucceeded: (paymentResult) async {
|
|
|
|
|
print("Payment Success Data: ${paymentResult.toString()}");
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
|
|
|
|
|
await myAppointmentsViewModel.createAdvancePayment(
|
|
|
|
|
paymentMethodName: selectedPaymentMethod,
|
|
|
|
|
@ -516,7 +513,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
patientID: appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
patientType: appState.getAuthenticatedUser()!.patientType!,
|
|
|
|
|
onSuccess: (value) async {
|
|
|
|
|
print(value);
|
|
|
|
|
await myAppointmentsViewModel.addAdvanceNumberRequest(
|
|
|
|
|
advanceNumber: Utils.isVidaPlusProject(widget.patientAppointmentHistoryResponseModel.projectID)
|
|
|
|
|
? value.data['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString()
|
|
|
|
|
@ -640,7 +636,10 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
|
|
|
|
|
if (appState.isPaytabsEnabled) {
|
|
|
|
|
paytabsViewModel.setAlternatePaymentConfiguration(
|
|
|
|
|
"Appointment Payment", num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()));
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(),
|
|
|
|
|
widget.patientAppointmentHistoryResponseModel.projectID);
|
|
|
|
|
paytabsViewModel.startAlternatePayment(
|
|
|
|
|
liveServiceID: "0",
|
|
|
|
|
appointmentDate: widget.patientAppointmentHistoryResponseModel.appointmentDate!,
|
|
|
|
|
@ -1121,10 +1120,13 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
|
|
|
|
|
ApplePayInsertRequest applePayInsertRequest = ApplePayInsertRequest();
|
|
|
|
|
|
|
|
|
|
await payfortViewModel.getPayfortConfigurations(
|
|
|
|
|
serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(),
|
|
|
|
|
projectId: widget.patientAppointmentHistoryResponseModel.projectID,
|
|
|
|
|
integrationId: 2);
|
|
|
|
|
if (!appState.isPaytabsEnabled) {
|
|
|
|
|
await payfortViewModel.getPayfortConfigurations(
|
|
|
|
|
serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(), projectId: widget.patientAppointmentHistoryResponseModel.projectID, integrationId: 2);
|
|
|
|
|
} else {
|
|
|
|
|
await paytabsViewModel.setPaymentConfiguration("Appointment Payment", num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum(), widget.patientAppointmentHistoryResponseModel.projectID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
applePayInsertRequest.clientRequestID = transID;
|
|
|
|
|
applePayInsertRequest.clinicID = widget.patientAppointmentHistoryResponseModel.clinicID;
|
|
|
|
|
@ -1173,10 +1175,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
|
|
|
|
|
if (appState.isPaytabsEnabled) {
|
|
|
|
|
selectedPaymentMethod = "VISA";
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
paytabsViewModel.setPaymentConfiguration(
|
|
|
|
|
"Appointment Payment",
|
|
|
|
|
num.parse(myAppointmentsViewModel.patientAppointmentShareResponseModel!.patientShareWithTax!.toString()),
|
|
|
|
|
);
|
|
|
|
|
paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
|
|
|
|
|
await myAppointmentsViewModel.createAdvancePayment(
|
|
|
|
|
|