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

Analtyics at registration and liveacare payment fail

See merge request Cloud_Solution/diplomatic-quarter!604
merge-requests/581/merge
haroon amjad 2 years ago
commit 8e27cfba9b

@ -111,6 +111,8 @@ PODS:
- GoogleUtilities/UserDefaults (~> 7.6)
- nanopb (~> 2.30908.0)
- Flutter (1.0.0)
- flutter_app_icon_badge (0.0.1):
- Flutter
- flutter_hms_gms_availability (0.0.1):
- Flutter
- flutter_inappwebview (0.0.1):
@ -120,6 +122,8 @@ PODS:
- flutter_inappwebview/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- flutter_ios_voip_kit (0.0.1):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_native_timezone (0.0.1):
@ -279,8 +283,10 @@ DEPENDENCIES:
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_app_icon_badge (from `.symlinks/plugins/flutter_app_icon_badge/ios`)
- flutter_hms_gms_availability (from `.symlinks/plugins/flutter_hms_gms_availability/ios`)
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- flutter_ios_voip_kit (from `.symlinks/plugins/flutter_ios_voip_kit/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_timezone (from `.symlinks/plugins/flutter_native_timezone/ios`)
- flutter_nfc_kit (from `.symlinks/plugins/flutter_nfc_kit/ios`)
@ -370,10 +376,14 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
flutter_app_icon_badge:
:path: ".symlinks/plugins/flutter_app_icon_badge/ios"
flutter_hms_gms_availability:
:path: ".symlinks/plugins/flutter_hms_gms_availability/ios"
flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview/ios"
flutter_ios_voip_kit:
:path: ".symlinks/plugins/flutter_ios_voip_kit/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_timezone:
@ -463,8 +473,10 @@ SPEC CHECKSUMS:
FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425
FirebaseMessaging: 82c4a48638f53f7b184f3cc9f6cd2cbe533ab316
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_app_icon_badge: 844847adbd7a1c6f325d6b41b942428981b839cc
flutter_hms_gms_availability: babc50b18670e99780270bc18d9b17d0a07cd77e
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
flutter_ios_voip_kit: a3b4c5bd0cfda5069b5605a6d1dc60ecf99c6299
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_timezone: 5f05b2de06c9776b4cc70e1839f03de178394d22
flutter_nfc_kit: 965c98c3fa68f5609f1cc89abb968fe1b8ffdbaa

@ -89,13 +89,15 @@ class LiveCare{
}
// R037
livecare_immediate_consultation_payment_failed({@required String appointment_type, clinic, hospital, payment_method, payment_type, error_code, error_message}){
// appointment_type
// clinic_type_online
// payment_method
// payment_type
// hospital_name
// error_code
// error_message
livecare_immediate_consultation_payment_failed({@required String appointment_type, clinic, payment_method, payment_type, txn_amount, txn_currency, error_message}){
logger('livecare_immediate_consult_payment_fail', parameters: {
'payment_method' : payment_method,
'appointment_type' : appointment_type,
'payment_type' : payment_type,
'clinic_type_online' : clinic,
'transaction_amount' : txn_amount,
'transaction_currency' : txn_currency,
'error_type' : error_message
});
}
}

@ -53,10 +53,15 @@ class LoginRegistration{
}
// R010:registration_confirmation
registration_confirmation({@required String by}){
registration_confirmation(){
// verification_method: by
logger('registration_confirmation', parameters: {
'verification_method' : by
logger('registration_confirmation');
}
registration_fail({@required String errorType}){
// verification_method: by
logger('registration_fail', parameters: {
'error_type' : errorType
});
}

@ -73,6 +73,9 @@ class _clinic_listState extends State<ClinicList> {
ProjectViewModel projectViewModel;
String selectedPaymentMethod = "";
String amount = "";
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -299,6 +302,9 @@ class _clinic_listState extends State<ClinicList> {
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
selectedPaymentMethod = paymentMethod[0];
this.amount = amount.toString();
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0],
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]);
}
@ -330,15 +336,22 @@ class _clinic_listState extends State<ClinicList> {
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
String amount;
String payment_method;
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
amount = res['Amount'].toString();
payment_method = res['PaymentMethod'];
if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
} else {
AppToast.showErrorToast(message: res['Response_Message']);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed(
appointment_type: 'livecare', payment_type: 'appointment', payment_method: selectedPaymentMethod, txn_amount: this.amount, txn_currency: currency, error_message: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -1,7 +1,4 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -280,7 +277,8 @@ class _RegisterInfo extends State<RegisterInfo> {
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () {
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details');
}, textColor: Colors.white, color: Color(0xffD02127))),
@ -288,17 +286,10 @@ class _RegisterInfo extends State<RegisterInfo> {
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(
page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register,
(){
nextPage();
page == 1
? locator<GAnalytics>().loginRegistration.registration_personal_info()
: locator<GAnalytics>().loginRegistration.registration_patient_info();
},
textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)
),
child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () {
nextPage();
page == 1 ? locator<GAnalytics>().loginRegistration.registration_personal_info() : locator<GAnalytics>().loginRegistration.registration_patient_info();
}, textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)),
),
],
)));
@ -356,6 +347,7 @@ class _RegisterInfo extends State<RegisterInfo> {
sharedPref.setString(TOKEN, result.authenticationTokenID),
AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister),
checkIfUserAgreedBefore(result),
projectViewModel.analytics.loginRegistration.registration_confirmation()
}
})
.catchError((err) {
@ -368,6 +360,7 @@ class _RegisterInfo extends State<RegisterInfo> {
okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context);
projectViewModel.analytics.loginRegistration.registration_fail(errorType: err);
});
}

@ -404,7 +404,7 @@ class Signaling {
'to': session.remote_user?.id,
'from': session.local_user.id,
'candidate': {
'sdpMLineIndex': candidate.sdpMLineIndex,
'sdpMLineIndex': candidate.sdpMlineIndex,
'sdpMid': candidate.sdpMid,
'candidate': candidate.candidate,
},

Loading…
Cancel
Save