25-5-30/1

This commit is contained in:
Hamza-Ayed
2025-05-30 16:57:40 +03:00
parent f3ada31b3b
commit ce3ae01a75
64 changed files with 857 additions and 939 deletions

View File

@@ -27,16 +27,9 @@ class SmsEgyptController extends GetxController {
}
}
Future<dynamic> sendSmsEgypt(String phone, otp) async {
Future<dynamic> sendSmsEgypt(String phone) async {
String sender = await getSender();
var body = jsonEncode({
"username": 'Sefer',
"password": AK.smsPasswordEgypt,
"message": "${AppInformation.appName} app code is $otp\ncopy it to app",
"language": box.read(BoxName.lang) == 'en' ? "e" : 'r',
"sender": sender, //"Sefer Egy", // todo add sefer sender name
"receiver": "2$phone"
});
var body = jsonEncode({"receiver": "2$phone"});
var res = await http.post(
Uri.parse(AppLink.sendSms),
@@ -46,19 +39,16 @@ class SmsEgyptController extends GetxController {
if (jsonDecode(res.body)['message'].toString() != "Success") {
await CRUD().post(link: AppLink.updatePhoneInvalidSMS, payload: {
"phone_number": EncryptionHelper.instance.encryptData(
'+2${Get.find<RegisterCaptainController>().phoneController.text}')
"phone_number":
('+2${Get.find<RegisterCaptainController>().phoneController.text}')
});
box.write(
BoxName.phoneDriver,
EncryptionHelper.instance.encryptData(
'+2${Get.find<RegisterCaptainController>().phoneController.text}'));
box.write(BoxName.phoneDriver,
('+2${Get.find<RegisterCaptainController>().phoneController.text}'));
box.write(BoxName.phoneVerified, '1');
await Get.put(LoginDriverController()).loginWithGoogleCredential(
box.read(BoxName.driverID).toString(),
EncryptionHelper.instance
.encryptData(box.read(BoxName.emailDriver).toString()),
(box.read(BoxName.emailDriver).toString()),
);
} else {
Get.defaultDialog(