public interface PaymentProcessor
extends java.io.Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
PaymentProcessor.CheckoutData |
static interface |
PaymentProcessor.OnPaymentListener |
Modifier and Type | Method and Description |
---|---|
android.support.v4.app.Fragment |
getFragment(PaymentProcessor.CheckoutData data,
android.content.Context context)
Fragment that will appear if
shouldShowFragmentOnPayment() is true
when user clicks this payment method. |
android.os.Bundle |
getFragmentBundle(PaymentProcessor.CheckoutData data,
android.content.Context context)
This bundle will be attached to the fragment that you expose in
getFragment(PaymentProcessor.CheckoutData, Context) |
int |
getPaymentTimeout()
If you how much time will take the request timeout
you can tell us to optimize the loading UI.
|
boolean |
shouldShowFragmentOnPayment()
method to know if the payment processor should pay through
a fragment or do it through background execution.
|
void |
startPayment(PaymentProcessor.CheckoutData data,
android.content.Context context,
PaymentProcessor.OnPaymentListener paymentListener)
Method that we will call if
shouldShowFragmentOnPayment() is false. |
void startPayment(@NonNull PaymentProcessor.CheckoutData data, @NonNull android.content.Context context, @NonNull PaymentProcessor.OnPaymentListener paymentListener)
shouldShowFragmentOnPayment()
is false.
we will place a loading for you meanwhile we call this method.data
- checkout data to the moment it's called.context
- that you may need to fill information.paymentListener
- when you have processed your payment
you should call PaymentProcessor.OnPaymentListener
int getPaymentTimeout()
shouldShowFragmentOnPayment()
is false.boolean shouldShowFragmentOnPayment()
@Nullable android.os.Bundle getFragmentBundle(@NonNull PaymentProcessor.CheckoutData data, @NonNull android.content.Context context)
getFragment(PaymentProcessor.CheckoutData, Context)
data
- checkout data to the moment it's called.context
- that you may need to fill information.@Nullable android.support.v4.app.Fragment getFragment(@NonNull PaymentProcessor.CheckoutData data, @NonNull android.content.Context context)
shouldShowFragmentOnPayment()
is true
when user clicks this payment method.
inside Fragment.onAttach(Context)
context will be an instance of PaymentProcessor.OnPaymentListener
data
- checkout data to the moment it's called.context
- that you may need to fill information.