Environment

@objc(PPCEnvironment)
enum Environment
extension Environment : CaseIterable, Equatable, Hashable, RawRepresentable

Used to determine which endpoints to target for interactions with the PayPal API.

  • Creates a new instance with the specified raw value.

    If there is no value of the type that corresponds with the specified raw value, this initializer returns nil. For example:

    enum PaperSize: String {
        case A4, A5, Letter, Legal
    }
    
    print(PaperSize(rawValue: "Legal"))
    // Prints "Optional("PaperSize.Legal")"
    
    print(PaperSize(rawValue: "Tabloid"))
    // Prints "nil"
    

    Declaration

    Swift

    init?(rawValue: Int)
  • The live environent for use in production

    Declaration

    Swift

    case live
  • Provide a way to return the name of the case rather than its String representation.

    Declaration

    Swift

    var name: String { get }
  • The environment used for development and testing

    Declaration

    Swift

    case sandbox
  • Environment for internal PayPal use. Inaccessible for third party.

    Declaration

    Swift

    case stage
  • URL used for staging environment. Main PayPal staging is used as a default.

    Declaration

    Swift

    static var stageURL: String