PayPalCheckoutRequest

class PayPalCheckoutRequest @JvmOverloads constructor(val amount: String, val hasUserLocationConsent: Boolean, var intent: PayPalPaymentIntent = PayPalPaymentIntent.AUTHORIZE, var userAction: PayPalPaymentUserAction = PayPalPaymentUserAction.USER_ACTION_DEFAULT, var currencyCode: String? = null, var shouldRequestBillingAgreement: Boolean = false, var shouldOfferPayLater: Boolean = false, var localeCode: String? = null, var billingAgreementDescription: String? = null, var isShippingAddressRequired: Boolean = false, var isShippingAddressEditable: Boolean = false, var shippingAddressOverride: PostalAddress? = null, var landingPageType: PayPalLandingPageType? = null, var displayName: String? = null, var merchantAccountId: String? = null, var riskCorrelationId: String? = null, var userAuthenticationEmail: String? = null, var userPhoneNumber: PayPalPhoneNumber? = null, var lineItems: List<PayPalLineItem> = emptyList()) : PayPalRequest

Represents the parameters that are needed to start the PayPal Checkout flow

See also

Constructors

Link copied to clipboard
constructor(amount: String, hasUserLocationConsent: Boolean, intent: PayPalPaymentIntent = PayPalPaymentIntent.AUTHORIZE, userAction: PayPalPaymentUserAction = PayPalPaymentUserAction.USER_ACTION_DEFAULT, currencyCode: String? = null, shouldRequestBillingAgreement: Boolean = false, shouldOfferPayLater: Boolean = false, localeCode: String? = null, billingAgreementDescription: String? = null, isShippingAddressRequired: Boolean = false, isShippingAddressEditable: Boolean = false, shippingAddressOverride: PostalAddress? = null, landingPageType: PayPalLandingPageType? = null, displayName: String? = null, merchantAccountId: String? = null, riskCorrelationId: String? = null, userAuthenticationEmail: String? = null, userPhoneNumber: PayPalPhoneNumber? = null, lineItems: List<PayPalLineItem> = emptyList())

Properties

Link copied to clipboard

The transaction amount in currency units (as * determined by setCurrencyCode). For example, "1.20" corresponds to one dollar and twenty cents. Amount must be a non-negative number, may optionally contain exactly 2 decimal places separated by '.' and is limited to 7 digits before the decimal point.

Link copied to clipboard

Display a custom description to the user for a billing agreement. This property is optional.

Link copied to clipboard

A valid ISO currency code to use for the transaction. Defaults to merchant currency code if not set.

Link copied to clipboard
open override var displayName: String?

The merchant name displayed in the PayPal flow; defaults to the company name on your Braintree account.

Link copied to clipboard
open override val hasUserLocationConsent: Boolean

is a required property that informs the SDK if your application has obtained consent from the user to collect location data in compliance with Google Play Developer Program policies This flag enables PayPal to collect necessary information required for Fraud Detection and Risk Management.

Link copied to clipboard

Payment intent. Must be set to PayPalPaymentIntent.SALE for immediate payment, PayPalPaymentIntent.AUTHORIZE to authorize a payment for capture later, or PayPalPaymentIntent.ORDER to create an order.

Link copied to clipboard

Whether to allow the the shipping address to be editable. Defaults to false. Set to true to enable user editing of the shipping address. Only applies when PayPalRequest.shippingAddressOverride is set with a PostalAddress.

Link copied to clipboard

Whether to hide the shipping address in the flow. Defaults to false. When set to true, the shipping address selector will be displayed.

Link copied to clipboard

Use this option to specify the PayPal page to display when a user lands on the PayPal site to complete the payment.

Link copied to clipboard
open override var lineItems: List<PayPalLineItem>

The line items for this transaction. It can include up to 249 line items.

Link copied to clipboard
open override var localeCode: String?

A locale code to use for the transaction. Supported locales are:

da_DK, de_DE, en_AU, en_GB, en_US, es_ES, es_XC, fr_CA, fr_FR, fr_XC, id_ID, it_IT, ja_JP, ko_KR, nl_NL, no_NO, pl_PL, pt_BR, pt_PT, ru_RU, sv_SE, th_TH, tr_TR, zh_CN, zh_HK, zh_TW, zh_XC.

Link copied to clipboard
open override var merchantAccountId: String?

Specify a merchant account Id other than the default to use during tokenization.

Link copied to clipboard
open override var riskCorrelationId: String?

A risk correlation ID created with Set Transaction Context on your server.

Link copied to clipboard

a custom PostalAddress, A valid shipping address to be displayed in the transaction flow. An error will occur if this address is not valid.

Link copied to clipboard

Offers PayPal Pay Later if the customer qualifies. Defaults to false.

Link copied to clipboard

Whether to request billing agreement during checkout.

Link copied to clipboard

The call-to-action in the PayPal Checkout flow.

Link copied to clipboard
open override var userAuthenticationEmail: String?

User email to initiate a quicker authentication flow in cases where the user has a PayPal Account with the same email.

Link copied to clipboard

User phone number used to initiate a quicker authentication flow in cases where the user has a PayPal Account with the phone number.

Functions

Link copied to clipboard
open override fun createRequestBody(configuration: Configuration?, authorization: Authorization?, successUrl: String?, cancelUrl: String?, appLink: String?): String
Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)