7/6/1
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../../constant/links.dart';
|
||||
import '../../constant/api_key.dart';
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../main.dart';
|
||||
@@ -21,15 +22,13 @@ class PaymobPayout extends GetxController {
|
||||
};
|
||||
var body = {
|
||||
'grant_type': 'password',
|
||||
'username': 'sefer_api_checker',
|
||||
'password': '#c3pSwbUxOKpQnr5hHZAgpkSW',
|
||||
'client_id': 'kmNWU5gKsL8LKVhsJFbOGTEb3YQ5sQhvBoB8pqoW',
|
||||
'client_secret':
|
||||
'htV6nFANLDd658ueTEuMrIqwjcXsocMXmBLAYof7FuutBcSxdTdoNqFl3EAvO6zrOgGPLdiMrofNp2V9ASVRpjoSlFjDNRzY7hfPunAJEgf2N5ZUuknN4QniaqIZvaNt'
|
||||
'username': AK.payMobOutUserName,
|
||||
'password': AK.payMobOutPassword,
|
||||
'client_id': AK.payMobOutClient_id,
|
||||
'client_secret': AK.payMobOutClientSecrret
|
||||
};
|
||||
var res = await http.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/o/token/'),
|
||||
Uri.parse('https://payouts.paymobsolutions.com/api/secure/o/token/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
);
|
||||
@@ -53,8 +52,7 @@ class PaymobPayout extends GetxController {
|
||||
"msisdn": msisdn, // "01023456789"
|
||||
});
|
||||
var res = await http.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
Uri.parse('https://payouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
);
|
||||
@@ -64,7 +62,7 @@ class PaymobPayout extends GetxController {
|
||||
'rideId': DateTime.now().toIso8601String(),
|
||||
'amount': ((-1) * (double.parse(dec['amount'])) + 5).toStringAsFixed(0),
|
||||
'payment_method': 'payout',
|
||||
'passengerID': 'myself',
|
||||
'passengerID': 'admin',
|
||||
'driverID': box.read(BoxName.driverID).toString(),
|
||||
});
|
||||
Get.snackbar('Transaction successful'.tr,
|
||||
@@ -94,8 +92,7 @@ class PaymobPayout extends GetxController {
|
||||
};
|
||||
var res = await http
|
||||
.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
Uri.parse('https://payouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user