otpResend method
Future<Response<RazorpayOtpResendResponse> >
otpResend({
- required String paymentId,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayOtpResendResponse> ?
Resend OTP for S2S payments
@param paymentId - The unique identifier of the payment.
Implementation
Future<Response<RazorpayOtpResendResponse>> otpResend({
required String paymentId,
void Function(RazorpayApiException?, Response<RazorpayOtpResendResponse>?)?
callback,
}) async {
if (paymentId.isEmpty) {
throw ArgumentError('paymentId is mandatory');
}
return api.post<RazorpayOtpResendResponse>(
{'url': '$BASE_URL/$paymentId/otp/resend'},
fromJsonFactory: RazorpayOtpResendResponse.fromJson,
callback: callback,
);
}