pull/324/head
haroon amjad 1 month ago
parent 50f78942ed
commit 8ffd7485d6

@ -4,7 +4,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -1,5 +1,5 @@
class PaytabsTransactionResponseModel { class PaytabsTransactionResponseModel {
int? tranTotal; dynamic tranTotal;
String? transactionReference; String? transactionReference;
String? cartCurrency; String? cartCurrency;
String? cartDescription; String? cartDescription;
@ -13,10 +13,10 @@ class PaytabsTransactionResponseModel {
bool? isAuthorized; bool? isAuthorized;
String? trace; String? trace;
dynamic cartAmount; dynamic cartAmount;
int? merchantId; dynamic merchantId;
int? profileId; dynamic profileId;
bool? isProcessed; bool? isProcessed;
int? serviceId; dynamic serviceId;
PaymentInfo? paymentInfo; PaymentInfo? paymentInfo;
bool? isSuccess; bool? isSuccess;
@ -98,8 +98,8 @@ class PaytabsTransactionResponseModel {
class PaymentInfo { class PaymentInfo {
String? cardScheme; String? cardScheme;
String? cardType; String? cardType;
int? expiryMonth; dynamic expiryMonth;
int? expiryYear; dynamic expiryYear;
String? paymentDescription; String? paymentDescription;
String? paymentMethod; String? paymentMethod;

@ -3,6 +3,7 @@ import 'package:flutter_paytabs_bridge/BaseBillingShippingInfo.dart';
import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart'; import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart'; import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkLocale.dart'; import 'package:flutter_paytabs_bridge/PaymentSdkLocale.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTokenFormat.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart'; import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTransactionType.dart'; import 'package:flutter_paytabs_bridge/PaymentSdkTransactionType.dart';
import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart'; import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart';
@ -49,7 +50,8 @@ class PayTabsViewModel extends ChangeNotifier {
appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"), appState.getAuthenticatedUser()!.mobileNumber ?? "0000000000", "Riyadh", "SA", "Riyadh", "Riyadh", "12626"),
alternativePaymentMethods: [], alternativePaymentMethods: [],
linkBillingNameWithCardHolderName: true, linkBillingNameWithCardHolderName: true,
simplifyApplePayValidation: true); simplifyApplePayValidation: true,
);
paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations( paymentConfiguration.iOSThemeConfigurations = IOSThemeConfigurations(
// logoImage: "assets/images/png/hmg_logo.png", // logoImage: "assets/images/png/hmg_logo.png",
@ -71,9 +73,11 @@ class PayTabsViewModel extends ChangeNotifier {
placeholderColorDark: "2E3039", placeholderColorDark: "2E3039",
buttonColor: "ED1C2B", buttonColor: "ED1C2B",
buttonColorDark: "ED1C2B", buttonColorDark: "ED1C2B",
// buttonFont: "Poppins", inputsCornerRadius: 12
); // buttonFont: "Poppins",
);
paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.MERCHANT_MANDATORY; paymentConfiguration.tokeniseType = PaymentSdkTokeniseType.MERCHANT_MANDATORY;
paymentConfiguration.tokenFormat = PaymentSdkTokenFormat.Hex32Format;
notifyListeners(); notifyListeners();
} }

@ -795,6 +795,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
//TODO: Need to pass dynamic params to the Apple Pay instead of static values //TODO: Need to pass dynamic params to the Apple Pay instead of static values
await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) { await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) {
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration(
"Appointment Payment", "Appointment Payment",

@ -632,6 +632,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
//TODO: Need to pass dynamic params to the Apple Pay instead of static values //TODO: Need to pass dynamic params to the Apple Pay instead of static values
await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) { await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) {
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration("Advance Payment", num.parse((immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0"))); paytabsViewModel.setPaymentConfiguration("Advance Payment", num.parse((immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total ?? "0.0")));
paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async { paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async {

@ -680,6 +680,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
//TODO: Need to pass dynamic params to the Apple Pay instead of static values //TODO: Need to pass dynamic params to the Apple Pay instead of static values
await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) { await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) {
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration(
"Appointment Payment", "Appointment Payment",

@ -492,6 +492,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
//TODO: Need to pass dynamic params to the Apple Pay instead of static values //TODO: Need to pass dynamic params to the Apple Pay instead of static values
await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) { await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) {
if (appState.isPaytabsEnabled) { if (appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration(
"ER Online Check-In Payment", "ER Online Check-In Payment",

@ -389,6 +389,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
//TODO: Need to pass dynamic params to the Apple Pay instead of static values //TODO: Need to pass dynamic params to the Apple Pay instead of static values
await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) { await payfortViewModel.applePayRequestInsert(applePayInsertRequest: applePayInsertRequest).then((value) {
if(appState.isPaytabsEnabled) { if(appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration("Advance Payment", habibWalletVM.walletRechargeAmount); paytabsViewModel.setPaymentConfiguration("Advance Payment", habibWalletVM.walletRechargeAmount);
paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async { paytabsViewModel.startApplePayPayment(onSuccess: (PaytabsTransactionResponseModel transactionData) async {

@ -632,6 +632,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
} }
// Only proceed with Apple Pay if insert was successful // Only proceed with Apple Pay if insert was successful
if(appState.isPaytabsEnabled) { if(appState.isPaytabsEnabled) {
selectedPaymentMethod = "VISA";
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
paytabsViewModel.setPaymentConfiguration( paytabsViewModel.setPaymentConfiguration(
"Ancillary Orders Payment", "Ancillary Orders Payment",

Loading…
Cancel
Save