From 5c32e488d082090da46718c424495f130245a94f Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Sun, 19 Jun 2022 11:12:19 +0300 Subject: [PATCH] no message --- lib/analytics/flows/advance_payments.dart | 6 ++--- lib/analytics/flows/appointments.dart | 22 +++++++++---------- .../medical/balance/confirm_payment_page.dart | 6 +++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/lib/analytics/flows/advance_payments.dart b/lib/analytics/flows/advance_payments.dart index db52eb59..37f18068 100644 --- a/lib/analytics/flows/advance_payments.dart +++ b/lib/analytics/flows/advance_payments.dart @@ -67,10 +67,10 @@ class AdvancePayments{ } // R046 - payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ + payment_success({@required String hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ logger('payment_success', parameters: { - 'appointment_type' : appointment_type, - 'clinic_type_online' : clinic, + // 'appointment_type' : appointment_type, + // 'clinic_type_online' : clinic, 'payment_method' : payment_method, 'payment_type' : payment_type, 'hospital_name' : hospital, diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index 50a02c76..41bcbd69 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -181,17 +181,17 @@ class Appointment{ } // R049.1 // should be for appointment flow - appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ - logger('to_do_list_pay_now', parameters: { - 'action_type' : action, - 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, - 'appointment_type' : appointment.appointmentType, - 'clinic_type_online' : appointment.clinicName, - 'hospital_name' : appointment.projectName, - 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, - 'payment_type' : 'appointment', - }); - } + // appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ + // logger('to_do_list_pay_now', parameters: { + // 'action_type' : action, + // 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + // 'appointment_type' : appointment.appointmentType, + // 'clinic_type_online' : appointment.clinicName, + // 'hospital_name' : appointment.projectName, + // 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + // 'payment_type' : 'appointment', + // }); + // } // R027 appointment_reminder(bool value){ diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 4d3c7718..a8515478 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -406,7 +406,13 @@ class _ConfirmPaymentPageState extends State { service.checkPaymentStatus(transID, AppGlobal.context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { + String txn_ref = res['Merchant_Reference']; + String amount = res['Amount']; + String payment_method = res['PaymentMethod']; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; createAdvancePayment(res, appo); + projectViewModel.analytics.advancePayments.payment_success( + payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref, hospital: widget.advanceModel.hospitalsModel.name); } else { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: res['Response_Message']);