Search documentation of stripe_elixir

# StripeElixir.Services.TestHelpers.Terminal.ReaderService (stripe_elixir v0.1.0)

Copy Markdown View Source

Reader API operations.

## Summary

### Functions

present_payment_method(client, reader, params \\ %{}, opts \\ [])

Simulate presenting a payment method

succeed_input_collection(client, reader, params \\ %{}, opts \\ [])

Simulate a successful input collection

timeout_input_collection(client, reader, params \\ %{}, opts \\ [])

Simulate an input collection timeout

## Functions

# present_payment_method(client, reader, params \\ %{}, opts \\ [])

    @spec present_payment_method(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Simulate presenting a payment method

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

# succeed_input_collection(client, reader, params \\ %{}, opts \\ [])

    @spec succeed_input_collection(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Simulate a successful input collection

Use this endpoint to trigger a successful input collection on a simulated reader.

# timeout_input_collection(client, reader, params \\ %{}, opts \\ [])

    @spec timeout_input_collection(StripeElixir.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, StripeElixir.Error.t()}

Simulate an input collection timeout

Use this endpoint to complete an input collection with a timeout error on a simulated reader.