CardEntry

object CardEntry

Lets the application collect card information from the customer.

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Use this function to handle results of the card entry activity. This function should be called from Activity.onActivityResult with the provided data parameter. callback will be called immediately with the result of the card entry activity.

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

Sets an optional handler that will be called from a background thread with the card result, before the card entry activity finishes. This allows the application to perform additional work such as attempting to charge the card and offers the ability to retry (for instance in case of a network error).

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).

Link copied to clipboard
fun startCardEntryActivity(activity: Activity, collectPostalCode: Boolean = true, requestCode: Int = DEFAULT_CARD_ENTRY_REQUEST_CODE)

Starts an activity that lets the application collect card information from the customer.

Link copied to clipboard
fun startGiftCardEntryActivity(activity: Activity, requestCode: Int = DEFAULT_CARD_ENTRY_REQUEST_CODE)

******************* BETA API ******************* Starts an activity that lets the application collect gift card information from the customer.