no message

merge-update-with-lab-changes
haroon amjad 4 years ago
parent f8b3847d0a
commit 4bc67b37e0

@ -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

@ -1,11 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/apple_pay_response.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -43,7 +41,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
AppSharedPreferences sharedPref = AppSharedPreferences();
String transID = "";
ApplePayResponse applePayResponse;
Pay _payClient = Pay.withAssets([
'applepay.json',
@ -58,7 +55,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
if (widget.selectedPaymentMethod == "ApplePay") {
} else {
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
}
@ -95,6 +91,30 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// ApplePayButton(
// paymentConfigurationAsset: 'applepay.json',
// paymentItems: [
// PaymentItem(
// label: 'Advance Payment',
// amount: widget.advanceModel.amount,
// status: PaymentItemStatus.final_price,
// )
// ],
// style: ApplePayButtonStyle.black,
// type: ApplePayButtonType.plain,
// width: 200,
// height: 50,
// margin: const EdgeInsets.only(top: 15.0),
// onPaymentResult: (value) {
// print(value);
// },
// onError: (error) {
// print(error);
// },
// loadingIndicator: const Center(
// child: CircularProgressIndicator(),
// ),
// ),
Text(
TranslationBase.of(context).confirmThePayment,
textAlign: TextAlign.center,
@ -190,7 +210,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: DefaultButton(
TranslationBase.of(context).confirm.toUpperCase(),
() {
startApplePayPayment();
// startApplePayPayment();
// GifLoaderDialogUtils.showMyDialog(context);
// model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
@ -204,6 +224,21 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
);
}
List<PaymentItem> getPaymentItems() {
List<PaymentItem> _paymentItems = [];
_paymentItems.add(PaymentItem(
label: 'Advance Payment',
amount: widget.advanceModel.amount,
status: PaymentItemStatus.final_price,
));
return _paymentItems;
}
void onApplePayResult(paymentResult) {
print(paymentResult);
}
String getImagePath(String paymentMethod) {
switch (paymentMethod) {
case "MADA":
@ -296,23 +331,16 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
});
}
startApplePayPayment() {
var _paymentItems = [
PaymentItem(
label: TranslationBase.of(context).advancePayment,
amount: widget.advanceModel.amount,
status: PaymentItemStatus.final_price,
)
];
_payClient.userCanPay(PayProvider.apple_pay).then((value) async {
print(value);
final result = await _payClient.showPaymentSelector(
provider: PayProvider.apple_pay,
paymentItems: _paymentItems,
);
print(result);
});
}
// startApplePayPayment() {
// _payClient.userCanPay(PayProvider.apple_pay).then((value) async {
// print(value);
// final result = await _payClient.showPaymentSelector(
// provider: PayProvider.apple_pay,
// paymentItems: _paymentItems,
// );
// print(result);
// });
// }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();

Loading…
Cancel
Save