|
|
|
|
@ -1310,7 +1310,11 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
if (value != null) {
|
|
|
|
|
final appType = appo.isLiveCareAppointment ? 'livecare' : 'regular';
|
|
|
|
|
if (selectedPaymentMethod == "ApplePay") {
|
|
|
|
|
startApplePay(appo, patientShareResponse);
|
|
|
|
|
if (projectViewModel.havePrivilege(103)) {
|
|
|
|
|
startApplePay(appo, patientShareResponse);
|
|
|
|
|
} else {
|
|
|
|
|
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
|
|
|
|
|
}
|
|
|
|
|
@ -1335,7 +1339,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
applePayInsertRequest.clientRequestID = transID;
|
|
|
|
|
applePayInsertRequest.clinicID = appo.clinicID;
|
|
|
|
|
applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR";
|
|
|
|
|
applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
|
|
|
|
|
// applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress;
|
|
|
|
|
applePayInsertRequest.customerEmail = "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com";
|
|
|
|
|
applePayInsertRequest.customerID = projectViewModel.authenticatedUserObject.user.patientID;
|
|
|
|
|
applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName;
|
|
|
|
|
applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
|
|
|
|
|
@ -1375,7 +1380,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
|
|
|
|
|
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
|
|
|
|
|
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
|
|
|
|
|
customerName: projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
|
|
|
|
|
customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
|
|
|
|
|
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
|
|
|
|
|
customerEmail: "CustID_${projectViewModel.authenticatedUserObject.user.patientID}@HMG.com",
|
|
|
|
|
orderDescription: "Appointment Payment",
|
|
|
|
|
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
|
|
|
|
|
merchantReference: transID,
|
|
|
|
|
|