BTPayPalRequest
Objective-C
@interface BTPayPalRequest : NSObject
Swift
class BTPayPalRequest : NSObject
Base options for PayPal Checkout and PayPal Vault flows.
Note
Do not instantiate this class directly. Instead, use BTPayPalCheckoutRequest or BTPayPalVaultRequest.-
Defaults to false. When set to true, the shipping address selector will be displayed.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isShippingAddressRequired) BOOL shippingAddressRequired;
Swift
var isShippingAddressRequired: Bool { get set }
-
Defaults to false. Set to true to enable user editing of the shipping address.
Note
Only applies whenshippingAddressOverride
is set.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isShippingAddressEditable) BOOL shippingAddressEditable;
Swift
var isShippingAddressEditable: Bool { get set }
-
Optional: A locale code to use for the transaction.
Note
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
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *localeCode;
Swift
var localeCode: String? { get set }
-
Optional: A valid shipping address to be displayed in the transaction flow. An error will occur if this address is not valid.
Declaration
Objective-C
@property (nonatomic, strong, nullable) BTPostalAddress *shippingAddressOverride;
Swift
var shippingAddressOverride: BTPostalAddress? { get set }
-
Optional: Landing page type. Defaults to
BTPayPalRequestLandingPageTypeDefault
.Note
Setting the BTPayPalRequest’s landingPageType changes the PayPal page to display when a user lands on the PayPal site to complete the payment. BTPayPalRequestLandingPageTypeLogin specifies a PayPal account login page is used. BTPayPalRequestLandingPageTypeBilling specifies a non-PayPal account landing page is used.Declaration
Objective-C
@property (nonatomic) BTPayPalRequestLandingPageType landingPageType;
Swift
var landingPageType: BTPayPalRequestLandingPageType { get set }
-
Optional: The merchant name displayed inside of the PayPal flow; defaults to the company name on your Braintree account
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *displayName;
Swift
var displayName: String? { get set }
-
Optional: A non-default merchant account to use for tokenization.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *merchantAccountID;
Swift
var merchantAccountID: String? { get set }
-
Optional: The line items for this transaction. It can include up to 249 line items.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<BTPayPalLineItem *> *lineItems;
Swift
var lineItems: [BTPayPalLineItem]? { get set }
-
Optional: Display a custom description to the user for a billing agreement. For Checkout with Vault flows, you must also set requestBillingAgreement to true on your BTPayPalCheckoutRequest.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *billingAgreementDescription;
Swift
var billingAgreementDescription: String? { get set }
-
Optional: The window used to present the ASWebAuthenticationSession.
Note
If your app supports multitasking, you must set this property to ensure that the ASWebAuthenticationSession is presented on the correct window.Declaration
Objective-C
@property (nonatomic, strong, nullable) UIWindow *activeWindow;
Swift
var activeWindow: UIWindow? { get set }
-
Optional: A risk correlation ID created with Set Transaction Context on your server.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *riskCorrelationId;
Swift
var riskCorrelationId: String? { get set }