createCustomerOtp(long, String, int, long, Map< String, String >, long) method

Creates a new CustomerOtp in the database.

Syntax

CustomerOtp createCustomerOtp ( long customerId , String otp , int otpType , long referenceId , Map< String, String > msgParams , long callerId ) throws OtpValidationException

Parameters

Returns

the newly created CustomerOtp

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 newly created CustomerOtp