public class LocalPayment
extends java.lang.Object
Constructor and Description |
---|
LocalPayment() |
Modifier and Type | Method and Description |
---|---|
static void |
approvePayment(BraintreeFragment fragment,
LocalPaymentRequest request)
Initiates the browser switch for a payment flow by opening a browser where the customer can authenticate with their bank.
|
static void |
startPayment(BraintreeFragment fragment,
LocalPaymentRequest request,
BraintreeResponseListener<LocalPaymentRequest> listener)
Prepares the payment flow for a specific type of local payment.
|
public static void startPayment(BraintreeFragment fragment, LocalPaymentRequest request, BraintreeResponseListener<LocalPaymentRequest> listener)
fragment
- BraintreeFragment
request
- LocalPaymentRequest
with the payment details.listener
- BraintreeResponseListener
the callback to which the LocalPaymentRequest
will be sent
with a payment ID for preprocessing and an approval URL. Once ready, use approvePayment(BraintreeFragment, LocalPaymentRequest)
to initiate the browser switch.public static void approvePayment(BraintreeFragment fragment, LocalPaymentRequest request)
fragment
- BraintreeFragment
request
- LocalPaymentRequest
which has already been sent to startPayment(BraintreeFragment, LocalPaymentRequest, BraintreeResponseListener)
and now has an approvalUrl and paymentId.