Stripe.Services.TestHelpers.Terminal.ReaderService (tiger_stripe v0.1.10)

Copy Markdown View Source

Reader API operations.

Summary

Functions

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

@spec present_payment_method(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.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(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.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(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}

Simulate an input collection timeout

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