public final class CheckoutController
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PaymentMethodHandler |
getCheckoutHandler(StartPaymentParameters paymentParameters)
Get a
PaymentMethodHandler that is capable of handling the whole checkout process. |
static PaymentMethodHandler |
getPaymentMethodHandler(Activity activity,
PaymentReference paymentReference,
PaymentMethod paymentMethod)
Get a
PaymentMethodHandler that is capable of handling a given PaymentMethod . |
static void |
handlePaymentSessionResponse(Activity activity,
java.lang.String encodedPaymentSession,
StartPaymentParametersHandler handler)
Handles a payment session response.
|
static void |
startPayment(Activity activity,
CheckoutSetupParametersHandler handler)
Starts the payment.
|
public static void startPayment(Activity activity, CheckoutSetupParametersHandler handler)
activity
- The current Activity
.handler
- The StartPaymentParametersHandler
that will receive the result callback.CheckoutSetupParametersHandler.onRequestPaymentSession(CheckoutSetupParameters)
,
StartPaymentParametersHandler#onError(CheckoutException)
public static void handlePaymentSessionResponse(Activity activity, java.lang.String encodedPaymentSession, StartPaymentParametersHandler handler)
activity
- The current Activity
.encodedPaymentSession
- The Base64-encoded payment session.handler
- The StartPaymentParametersHandler
that will receive the result callback.StartPaymentParametersHandler#onPaymentInitialized(StartPaymentParameters)
,
StartPaymentParametersHandler#onError(CheckoutException)
public static PaymentMethodHandler getCheckoutHandler(StartPaymentParameters paymentParameters)
PaymentMethodHandler
that is capable of handling the whole checkout process.paymentParameters
- The StartPaymentParameters
to handle.PaymentMethodHandler
.public static PaymentMethodHandler getPaymentMethodHandler(Activity activity, PaymentReference paymentReference, PaymentMethod paymentMethod)
PaymentMethodHandler
that is capable of handling a given PaymentMethod
.activity
- The current Activity
.paymentReference
- The PaymentReference
to handle.paymentMethod
- The PaymentMethod
to handle.PaymentMethodHandler
, or null
if non can handle the given PaymentMethod
.