OTP Management
Send OTP
OTPManager.requestOTP(recipient: recipient, recipientType: recipientType, purpose: purpose) { error in
if error == nil {
NotificationUI.showMessage(type: .success, title: "Send Success", message: "Please check your \(recipientType.rawValue)")
} else {
NotificationUI.showMessage(type: .error, title: "Send Failed", message: error!.localizedDescription)
}
}
Verify OTP
OTPManager.verifyOTP(code: code, purpose: purpose, session: sid, recipient: recipient, recipientType: recipientType) {
error in
if error == nil {
NotificationUI.showMessage(type: .success, title: "Validation Success", message: "The code is valid")
} else {
NotificationUI.showMessage(type: .error, title: "Check Input", message: error!.localizedDescription)
}
}