sadadPayVerifyOtp static method
Implementation
static Future<bool?> sadadPayVerifyOtp({required String token, required String otp, required String userId}) async {
final url = Uri.parse(
ApiEndPoint.sadadPayVerifyOTP,
);
Map<String, String> header = {'Content-Type': 'application/json', "Authorization": token};
Map<String, dynamic> body = {"otp": int.parse(otp), "userId": int.parse(userId)};
var result = await http.post(
url,
headers: header,
body: json.encode(body),
);
if (result.statusCode == 200) {
return true;
var response = jsonDecode(result.body);
}
var response = jsonDecode(result.body);
print(response);
return false;
}