public static void requestBillingAgreement ( BraintreeFragment fragment , PayPalRequest request , PayPalApprovalHandler handler ) { if ( request . getAmount ( ) == null ) { fragment . sendAnalyticsEvent ( "paypal.billing-agreement.selected" ) ; if ( request . shouldOfferCredit ( ) ) { fragment . sendAnalyticsEvent ( "paypal.billing-agreement.credit.offered" ) ; } requestOneTimePayment ( fragment , request , true , handler ) ; } else { fragment . postCallback ( new BraintreeException ( "There must be no amount specified for the Billing Agreement flow" ) ) ; } }
Starts the Billing Agreement flow for PayPal with custom PayPal approval handler .