This commit is contained in:
Hamza-Ayed
2024-10-10 16:22:30 +03:00
parent ebb57a699b
commit 9b0caf3bed
21 changed files with 1142 additions and 630 deletions

View File

@@ -662,25 +662,28 @@ class PaymentController extends GetxController {
onPayment: (PaymobResponse response) {},
);
if (response!.responseCode == 'APPROVED') {
Get.defaultDialog(
barrierDismissible: false,
title: 'Payment Successful'.tr,
titleStyle: AppStyle.title,
// backgroundColor: AppColor.greenColor,
content: Text(
'The payment was approved.'.tr,
style: AppStyle.title,
),
confirm: MyElevatedButton(
kolor: AppColor.greenColor,
title: 'OK'.tr,
onPressed: () async {
Get.back();
method();
},
),
);
// if (response!.responseCode == 'APPROVED') {
if (response!.responseCode == '200' && response.success == true) {
Toast.show(context, 'Payment Successful'.tr, AppColor.greenColor);
method();
// Get.defaultDialog(
// barrierDismissible: false,
// title: 'Payment Successful'.tr,
// titleStyle: AppStyle.title,
// // backgroundColor: AppColor.greenColor,
// content: Text(
// 'The payment was approved.'.tr,
// style: AppStyle.title,
// ),
// confirm: MyElevatedButton(
// kolor: AppColor.greenColor,
// title: 'OK'.tr,
// onPressed: () async {
// Get.back();
// method();
// },
// ),
// );
} else {
Get.defaultDialog(
barrierDismissible: false,