|
|
|
|
@ -41,7 +41,7 @@ class EROnlineCheckInPaymentDetails extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDetails> with SingleTickerProviderStateMixin {
|
|
|
|
|
late ProjectViewModel projectViewModel;
|
|
|
|
|
late EROnlineCheckInPaymentDetailsResponse erOnlineCheckInPaymentDetailsResponse;
|
|
|
|
|
EROnlineCheckInPaymentDetailsResponse? erOnlineCheckInPaymentDetailsResponse;
|
|
|
|
|
String? selectedPaymentMethod;
|
|
|
|
|
String? selectedInstallmentPlan;
|
|
|
|
|
String transID = "";
|
|
|
|
|
@ -277,7 +277,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.75,
|
|
|
|
|
child: getPaymentMethods(),
|
|
|
|
|
),
|
|
|
|
|
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar,
|
|
|
|
|
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar,
|
|
|
|
|
isBold: true, isTotal: true),
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
DefaultButton(
|
|
|
|
|
@ -308,13 +308,13 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
|
|
|
|
|
if (projectViewModel.havePrivilege(103)) {
|
|
|
|
|
startApplePay();
|
|
|
|
|
} else {
|
|
|
|
|
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!, appo);
|
|
|
|
|
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, appo);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!, appo);
|
|
|
|
|
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, appo);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
patientShare: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax,
|
|
|
|
|
patientShare: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
|
|
|
|
|
isFromAdvancePayment: false,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -391,7 +391,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
|
|
|
|
|
applePayInsertRequest.liveServiceID = "0";
|
|
|
|
|
applePayInsertRequest.latitude = "0.0";
|
|
|
|
|
applePayInsertRequest.longitude = "0.0";
|
|
|
|
|
applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString();
|
|
|
|
|
applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString();
|
|
|
|
|
applePayInsertRequest.isSchedule = "0";
|
|
|
|
|
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
|
|
|
|
|
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
|
|
|
|
|
@ -417,7 +417,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
|
|
|
|
|
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
|
|
|
|
|
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
|
|
|
|
|
orderDescription: "ER Online Check-In Payment",
|
|
|
|
|
orderAmount: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax,
|
|
|
|
|
orderAmount: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
|
|
|
|
|
merchantReference: transID,
|
|
|
|
|
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
|
|
|
|
|
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
|
|
|
|
|
|