|
|
|
|
@ -352,7 +352,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
|
|
|
|
|
void startApplePay(AppoitmentAllHistoryResultList appo, String amount) async {
|
|
|
|
|
try {
|
|
|
|
|
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
|
|
|
|
|
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false);
|
|
|
|
|
print("TransactionID: $transID");
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(localContext);
|
|
|
|
|
|
|
|
|
|
@ -445,7 +445,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
|
|
|
|
|
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
|
|
|
|
|
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo);
|
|
|
|
|
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false);
|
|
|
|
|
selectedPaymentMethod = paymentMethod[0];
|
|
|
|
|
selectedInstallmentPlan = paymentMethod[1];
|
|
|
|
|
this.amount = amount.toString();
|
|
|
|
|
@ -491,7 +491,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
print("onBrowserExit Called!!!!");
|
|
|
|
|
try {
|
|
|
|
|
if (selectedPaymentMethod == "TAMARA") {
|
|
|
|
|
checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo);
|
|
|
|
|
checkTamaraPaymentStatus(transID, appo);
|
|
|
|
|
// if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
|
|
|
|
|
// updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallmentPlan), appo);
|
|
|
|
|
// } else {
|
|
|
|
|
@ -515,7 +515,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, num.parse(selectedInstallmentPlan), appo);
|
|
|
|
|
} else {
|
|
|
|
|
updateTamaraRequestStatus(
|
|
|
|
|
"Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
|
|
|
|
|
"Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -532,7 +532,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") {
|
|
|
|
|
addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
|
|
|
|
|
addNewCallForPatientER(transID);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['Response_Message']);
|
|
|
|
|
projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed(
|
|
|
|
|
@ -565,7 +565,7 @@ class _clinic_listState extends State<ClinicList> {
|
|
|
|
|
amount = res['Amount'].toString();
|
|
|
|
|
payment_method = res['PaymentMethod'];
|
|
|
|
|
if (paymentInfo == 'Success') {
|
|
|
|
|
addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
|
|
|
|
|
addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : transID);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['Response_Message']);
|
|
|
|
|
projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed(
|
|
|
|
|
|