createOtp(int, String, Locale, String, Map< String, String >, Long, long) method

Creates a new CustomerOtp in the database.

Syntax

long createOtp ( int otpType , String receiver , Locale locale , String referenceId , Map< String, String > msgParams , Long customerId , long callerId ) throws OtpValidationException

Parameters

Returns

the ID of the newly created Otp

Exceptions

Usage

The OTP itself is either automatically generated according to the rules defined with the OTP type or the provided otp is used. The OTP is sent out in an email or SMS to the customer. A list of parameters can be provided to further customize the message. The key for the otp parameter is "otp". A SecureRandom is used to generate the OTP.

the ID of the newly created Otp