public interface CheckoutManager
Modifier and Type | Method and Description |
---|---|
CallbackReference |
addCheckoutActivityCallback(CheckoutActivityCallback callback)
Adds a callback to handle the result of the checkout flow.
|
void |
startCheckoutActivity(android.content.Context context,
CheckoutParameters checkoutParameters)
Starts an activity that lets the application collect payment using Square's checkout flow.
|
void startCheckoutActivity(@NonNull android.content.Context context, @NonNull CheckoutParameters checkoutParameters)
Starts an activity that lets the application collect payment using Square's checkout flow.
Reader SDK must be authorized to start the checkout activity.
Add a CheckoutActivityCallback
with
addCheckoutActivityCallback(CheckoutActivityCallback)
to handle the result of the
checkout flow.
This method must be called from the main thread.
context
- An activity instance from which to start the checkout activity.checkoutParameters
- The parameters for the checkout flow.@NonNull CallbackReference addCheckoutActivityCallback(@NonNull CheckoutActivityCallback callback)
Adds a callback to handle the result of the checkout flow.
The callback is executed on the main thread.
callback
- The checkout callback to be added.CallbackReference
. To avoid memory leaks, clear the callback reference with
CallbackReference.clear()
any time a lifecycle destroy event occurs (e.g. Activity.onDestroy()
).startCheckoutActivity(Context, CheckoutParameters)