Package-level declarations

Types

Link copied to clipboard
object CardEntry

Lets the application collect card information from the customer.

Link copied to clipboard

Commands that determine the behavior of the Square card entry activity after the completion of a CardNonceBackgroundHandler.

Link copied to clipboard

Represents the result of a card entry activity. The result will be an instance of Success if the request is successful, or Canceled if the customer cancels the request.

Link copied to clipboard

A callback invoked on a background thread after the customer successfully enters their card information and before the card entry activity finishes. This lets the application perform additional work using the card information, such as as charging the card.

Link copied to clipboard
interface Feature

Functions

Link copied to clipboard
inline fun <T> Call<T>.enqueue(crossinline callback: (T) -> Unit)

Asynchronously send the request and notify callback of the result.

Link copied to clipboard
inline fun CardEntry.handleActivityResult(data: Intent?, crossinline callback: (CardEntryActivityResult) -> Unit)
Link copied to clipboard
inline fun CardEntry.setCardNonceBackgroundHandler(crossinline handler: (CardDetails) -> CardEntryActivityCommand)

Adds a callback to handle the result of the card entry prior to finishing the card entry activity. This allows the application to perform additional work such as saving the card to a server, and offers the ability to retry by returning CardEntryActivityCommand.ShowError (for instance in case of a network error).