requestPaypalNonce static method
Future<BraintreePaymentMethodNonce?>
requestPaypalNonce(
- String authorization,
- BraintreePayPalRequest request
Requests a PayPal payment method nonce.
authorization
must be either a valid client token or a valid tokenization key.
request
should contain all the information necessary for the PayPal request.
Returns a Future that resolves to a BraintreePaymentMethodNonce
if the user confirmed the request,
or null
if the user canceled the Vault or Checkout flow.
Implementation
static Future<BraintreePaymentMethodNonce?> requestPaypalNonce(
String authorization,
BraintreePayPalRequest request,
) async {
final result = await _kChannel.invokeMethod('requestPaypalNonce', {
'authorization': authorization,
'request': request.toJson(),
});
if (result == null) return null;
return BraintreePaymentMethodNonce.fromJson(result);
}