View Source ExCashfreeSDK.PaymentGateway.Payments (ExCashfreeSDK v0.1.4)
Payments APIs implementation for Cashfree SDK
Summary
Functions
If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
Types
@type otp_action() :: :SUBMIT_OTP | :RESEND_OTP
@type preauth_action() :: :CAPTURE | :VOID
Functions
@spec preauthorization(String.t(), preauth_action(), float()) :: {:ok, any()} | {:error, any()}
@spec submit_or_resend_otp(String.t(), otp_action(), String.t()) :: {:ok, any()} | {:error, any()}
If you accept OTP on your own page, you can use the below API to send OTP to Cashfree.
Examples
iex> ExCashfreeSDK.PaymentGateway.submit_or_resend_otp("cf_payment_id", :SUBMIT_OTP, "123456")
{:ok, %{}}