25-4-29/1
This commit is contained in:
@@ -243,18 +243,17 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
|
||||
box.read(BoxName.countryCode) == 'Egypt'
|
||||
? CupertinoActionSheetAction(
|
||||
child: Text('💳 Pay with Credit Card'.tr),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
if (controller.selectedAmount != 0) {
|
||||
controller.payWithPayMob(
|
||||
context,
|
||||
controller.selectedAmount.toString(),
|
||||
box.read(BoxName.countryCode) == 'Egypt' ? 'EGP' : 'JOD',
|
||||
() async {
|
||||
await controller.addPassengerWallet();
|
||||
controller.changePromoSheetDialogue();
|
||||
await controller.getPassengerWallet();
|
||||
},
|
||||
// () async {
|
||||
// await controller.addPassengerWallet();
|
||||
// controller.changePromoSheetDialogue();
|
||||
);
|
||||
await controller.getPassengerWallet();
|
||||
} else {
|
||||
Toast.show(context, '⚠️ You need to choose an amount!'.tr,
|
||||
AppColor.redColor);
|
||||
@@ -278,7 +277,7 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
|
||||
box.read(BoxName.phoneWallet) != null
|
||||
? CupertinoActionSheetAction(
|
||||
child: Text('💰 Pay with Wallet'.tr),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
if (controller.selectedAmount != 0) {
|
||||
controller.isLoading = true;
|
||||
controller.update();
|
||||
@@ -286,12 +285,8 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
|
||||
context,
|
||||
controller.selectedAmount.toString(),
|
||||
box.read(BoxName.countryCode) == 'Egypt' ? 'EGP' : 'JOD',
|
||||
() async {
|
||||
await controller.addPassengerWallet();
|
||||
controller.changePromoSheetDialogue();
|
||||
await controller.getPassengerWallet();
|
||||
},
|
||||
);
|
||||
await controller.getPassengerWallet();
|
||||
controller.isLoading = false;
|
||||
controller.update();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user