4/18/2
This commit is contained in:
@@ -462,6 +462,8 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'https://accept.paymob.com/unifiedcheckout/?publicKey=egy_pk_live_mbjDC9Ni6FSHKmsz8sOHiVk2xd7oWRve&clientSecret=egy_sk_live_c0904e9cf04506ae64f818d4e075b4a957e3713fdf7a22cb7da30a29e72442b5'
|
||||||
|
|
||||||
Future<void> payWithPayMob(
|
Future<void> payWithPayMob(
|
||||||
BuildContext context, String amount, currency, Function method) async {
|
BuildContext context, String amount, currency, Function method) async {
|
||||||
String newAmount = (double.parse(amount) * 100).toStringAsFixed(2);
|
String newAmount = (double.parse(amount) * 100).toStringAsFixed(2);
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class MapPagePassenger extends StatelessWidget {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
GoogleMapPassengerWidget(),
|
GoogleMapPassengerWidget(),
|
||||||
leftMainMenuIcons(), PaymobPackage(),
|
leftMainMenuIcons(),
|
||||||
|
// PaymobPackage(),
|
||||||
const PickerIconOnMap(),
|
const PickerIconOnMap(),
|
||||||
// PickerAnimtionContainerFormPlaces(),
|
// PickerAnimtionContainerFormPlaces(),
|
||||||
const MainBottomMenuMap(),
|
const MainBottomMenuMap(),
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
borderRadius: BorderRadius.circular(15)),
|
borderRadius: BorderRadius.circular(15)),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await PaymobManager().payWithPayMob(100, 'EGP');
|
// await PaymobManager().payWithPayMob(100, 'EGP');
|
||||||
// await Get.find<PaymentController>()
|
// await Get.find<PaymentController>()
|
||||||
// .payWithPayMob(context, '1100', 'EGP');
|
// .payWithPayMob(context, '1100', 'EGP');
|
||||||
// Initiates a payment with a card using the FlutterPaymob instance
|
// Initiates a payment with a card using the FlutterPaymob instance
|
||||||
@@ -142,21 +142,3 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class PaymobPackage extends StatelessWidget {
|
|
||||||
const PaymobPackage({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return InkWell(
|
|
||||||
onTap: () async {
|
|
||||||
// await Get.find<PaymentController>()
|
|
||||||
// .payWithPayMob(context, '11', 'EGP');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: Text('pay'),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user