diff --git a/assets/applepay.json b/assets/applepay.json index 5b00d6d5..b33de32d 100644 --- a/assets/applepay.json +++ b/assets/applepay.json @@ -5,14 +5,13 @@ "displayName": "Sulaiman Al Habib", "merchantCapabilities": [ "3DS", - "debit", - "credit" + "credit", + "debit" ], "supportedNetworks": [ - "amex", "visa", - "discover", - "masterCard" + "masterCard", + "mada" ], "countryCode": "SA", "currencyCode": "SAR", diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 49f5e49b..564d98c2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -225,6 +225,8 @@ PODS: - Flutter - path_provider_ios (0.0.1): - Flutter + - pay_ios (0.0.1): + - Flutter - "permission_handler (5.1.0+2)": - Flutter - PromisesObjC (2.0.0) @@ -297,6 +299,7 @@ DEPENDENCIES: - native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - pay_ios (from `.symlinks/plugins/pay_ios/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`) - screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`) - searchable_dropdown (from `.symlinks/plugins/searchable_dropdown/ios`) @@ -407,6 +410,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_ios: :path: ".symlinks/plugins/path_provider_ios/ios" + pay_ios: + :path: ".symlinks/plugins/pay_ios/ios" permission_handler: :path: ".symlinks/plugins/permission_handler/ios" screen_brightness_ios: @@ -484,6 +489,7 @@ SPEC CHECKSUMS: OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5 + pay_ios: 8c7beb9c61d885f3f51b61f75f8793023fc8843a permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 69c2b10d..40b4afbf 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1752,4 +1752,5 @@ const Map localizedValues = { "ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"}, "successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."}, "pharmacyLiveCare": {"en": "Pharmacy LiveCare", "ar": "لايف كير صيدلية"}, + "ancillaryOrderPaymentSuccess": {"en": "Your payment for selected orders has been made successfully.", "ar": "تم سداد دفعتك للطلبات المحددة بنجاح."}, }; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index f2bc4091..4798b533 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -369,8 +370,10 @@ class _AnicllaryOrdersState extends State with SingleTic }), Utils.tableColumnValue('${value[i].procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', + isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', + isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), ]), ); } @@ -500,8 +503,8 @@ class _AnicllaryOrdersState extends State with SingleTic DoctorsListService service = new DoctorsListService(); service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, AppGlobal.context).then((res) { - print(res); GifLoaderDialogUtils.hideDialog(AppGlobal.context); + showAlertDialog(res['AncillaryOrderInvoiceList'][0]['InvoiceNo']); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -509,6 +512,17 @@ class _AnicllaryOrdersState extends State with SingleTic }); } + showAlertDialog(dynamic invoiceNo) { + AlertDialogBox( + context: context, + confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess + invoiceNo.toString(), + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + Navigator.of(context).pop(); + }).showAlertDialog(context); + } + bool checkIfProcedureSelected(AncillaryOrderProcDetailsList ancillaryOrderProcDetailsList) { if (selectedProcList.length > 0) { if (selectedProcList.contains(ancillaryOrderProcDetailsList)) { diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index b0f65e13..f306fe09 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -302,28 +302,6 @@ class _PaymentMethodState extends State { padding: EdgeInsets.all(16), color: Colors.white, child: - // selectedPaymentMethod == "ApplePay" - // ? ApplePayButton( - // paymentConfigurationAsset: 'applepay.json', - // paymentItems: _paymentItems, - // style: ApplePayButtonStyle.black, - // type: ApplePayButtonType.inStore, - // width: MediaQuery.of(context).size.width, - // height: 50, - // margin: const EdgeInsets.only(top: 15.0), - // onPaymentResult: (value) { - // print(value); - // // applePayResponse = ApplePayResponse.fromJson(value); - // // print(applePayResponse.token.data); - // }, - // onError: (error) { - // print(error); - // }, - // loadingIndicator: const Center( - // child: CircularProgressIndicator(), - // ), - // ) - // : Container( width: MediaQuery.of(context).size.width, height: 50.0, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 9ed7671a..ae0a9849 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2828,7 +2828,7 @@ class TranslationBase { String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode]; String get successRegister => localizedValues["successRegister"][locale.languageCode]; String get pharmacyLiveCare => localizedValues["pharmacyLiveCare"][locale.languageCode]; - + String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {