Documentation Index Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
PrimerPayPalScope manages the PayPal payment flow including redirect handling.
Declaration
@MainActor
public protocol PrimerPayPalScope : PrimerPaymentMethodScope where State == PrimerPayPalState
Properties
Property Type Description stateAsyncStream<PrimerPayPalState>Stream of PayPal state changes presentationContextPresentationContext.direct or .fromPaymentSelectiondismissalMechanism[DismissalMechanism]Supported dismissal methods
Customization
Property Type Description screenPayPalScreenComponent?Full screen replacement. Signature: (any PrimerPayPalScope) -> any View payButtonPayPalButtonComponent?Custom pay button. Signature: (any PrimerPayPalScope) -> any View submitButtonTextString?Submit button label
Methods
Method Description start()Begin the PayPal flow submit()Submit the payment onBack()Navigate back cancel()Cancel the PayPal flow
PrimerPayPalState
public struct PrimerPayPalState : Equatable {
public enum Status : Equatable {
case idle
case loading
case redirecting
case processing
case success
case failure ( String )
}
var status: Status
var paymentMethod: CheckoutPaymentMethod?
var surchargeAmount: String ?
}
Property Type Description statusStatusCurrent payment status paymentMethodCheckoutPaymentMethod?PayPal payment method details surchargeAmountString?Formatted surcharge amount
See also
Scopes overview All available scopes