Merge branch 'zik_development_v2.5' into 'development_v2.5'

Zik development v2.5

See merge request Cloud_Solution/diplomatic-quarter!603
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 2d366bcf7b

@ -67,10 +67,10 @@ class AdvancePayments{
} }
// R046 // 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: { logger('payment_success', parameters: {
'appointment_type' : appointment_type, // 'appointment_type' : appointment_type,
'clinic_type_online' : clinic, // 'clinic_type_online' : clinic,
'payment_method' : payment_method, 'payment_method' : payment_method,
'payment_type' : payment_type, 'payment_type' : payment_type,
'hospital_name' : hospital, 'hospital_name' : hospital,

@ -41,8 +41,8 @@ class Appointment{
// R018.1 // R018.1
book_appointment_select_clinic({@required String appointment_type, clinic}){ book_appointment_select_clinic({@required String appointment_type, clinic}){
// appointment_type: regular | livecare // appointment_type: regular | livecare
// clinic_type : $clinic_type // clinic_type : $clinic_type
logger('book_appointment_select_clinic', parameters: { logger('book_appointment_select_clinic', parameters: {
'appointment_type' : appointment_type, 'appointment_type' : appointment_type,
'clinic_type' : clinic 'clinic_type' : clinic
@ -101,15 +101,15 @@ class Appointment{
// R023 // R023
book_appointment_date_selection({@required String appointment_type, @required day, @required DoctorList doctor}){ book_appointment_date_selection({@required String appointment_type, @required day, @required DoctorList doctor}){
logger('book_appointment_date_selection', parameters: { logger('book_appointment_date_selection', parameters: {
'appointment_type' : appointment_type, 'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName, 'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName, 'hospital_name' : doctor.projectName,
'treatment_type' : GAnalytics.TREATMENT_TYPE ?? '', 'treatment_type' : GAnalytics.TREATMENT_TYPE ?? '',
'doctor_name' : doctor.name, 'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName, 'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.genderDescription, 'doctor_gender' : doctor.genderDescription,
'appointment_day' : day 'appointment_day' : day
}); });
} }
// R024.1 // R024.1
@ -182,7 +182,7 @@ class Appointment{
// R049.1 // should be for appointment flow // R049.1 // should be for appointment flow
appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ appointment_actions(AppoitmentAllHistoryResultList appointment, String action){
logger('to_do_list_pay_now', parameters: { logger('appointment_actions', parameters: {
'action_type' : action, 'action_type' : action,
'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE,
'appointment_type' : appointment.appointmentType, 'appointment_type' : appointment.appointmentType,
@ -232,14 +232,16 @@ class Appointment{
// R036 // R036
payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){
// appointment_type logger('payment_success', parameters: {
// clinic_type_online 'appointment_type' : appointment_type,
// payment_method 'payment_method' : payment_method,
// payment_type: 'appointment' 'payment_type' : payment_type,
// hospital_name 'hospital_name' : hospital,
// transaction_number 'clinic_type_online' : clinic,
// transaction_amount 'transaction_number' : txn_number,
// transaction_currency 'transaction_amount' : txn_amount,
'transaction_currency' : txn_currency,
});
} }
@ -260,15 +262,14 @@ class Appointment{
// R053 // R053
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document // Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){ appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){
logger('appointment_details_cancel', parameters: {
});
}
appointment_cancel(){
logger('cancel_appointment', parameters: { logger('cancel_appointment', parameters: {
'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, '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',
}); });
} }
} }

@ -406,7 +406,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
service.checkPaymentStatus(transID, AppGlobal.context).then((res) { service.checkPaymentStatus(transID, AppGlobal.context).then((res) {
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') { 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); 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 { } else {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);

Loading…
Cancel
Save