StripeElixir.Services.TestHelpers.Terminal.ReaderService
(stripe_elixir v0.1.0)
Copy Markdown
View Source
Reader API operations.
Summary
Functions
Simulate presenting a payment method
Simulate a successful input collection
Simulate an input collection timeout
Functions
@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.
@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.
@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.