Blocks
-
A block called with a connection token or an error from your backend.
See
SCPConnectionTokenProvider
Declaration
Objective-C
typedef void (^SCPConnectionTokenCompletionBlock)(NSString *_Nullable, NSError *_Nullable)
Swift
typealias ConnectionTokenCompletionBlock = (String?, Error?) -> Void
Parameters
token
The connection token from your backend server.
error
An error if one occurred, or nil.
-
A block called with an optional error.
Declaration
Objective-C
typedef void (^SCPErrorCompletionBlock)(NSError *_Nullable)
Swift
typealias ErrorCompletionBlock = (Error?) -> Void
Parameters
error
The error, or nil if no error occured.
-
A block called with a logline from the SDK.
Declaration
Objective-C
typedef void (^SCPLogListenerBlock)(NSString *_Nonnull)
Swift
typealias LogListenerBlock = (String) -> Void
Parameters
logline
An internal logline from the SDK.
-
A block called with a PaymentIntent or an error.
Declaration
Objective-C
typedef void (^SCPPaymentIntentCompletionBlock)(SCPPaymentIntent *_Nullable, NSError *_Nullable)
Swift
typealias PaymentIntentCompletionBlock = (SCPPaymentIntent?, Error?) -> Void
Parameters
intent
The PaymentIntent, or nil.
error
An error if one occurred, or nil.
-
A block called with a PaymentMethod.
Declaration
Objective-C
typedef void (^SCPPaymentMethodCompletionBlock)(SCPPaymentMethod *_Nullable, NSError *_Nullable)
Swift
typealias PaymentMethodCompletionBlock = (SCPPaymentMethod?, Error?) -> Void
Parameters
paymentMethod
A PaymentMethod object, or nil if an error occurred.
error
An error if one occurred, or nil.
-
A block called with a PaymentIntent or a ProcessPaymentError
Declaration
Objective-C
typedef void (^SCPProcessPaymentCompletionBlock)( SCPPaymentIntent *_Nullable, SCPProcessPaymentError *_Nullable)
Swift
typealias ProcessPaymentCompletionBlock = (SCPPaymentIntent?, SCPProcessPaymentError?) -> Void
Parameters
intent
The PaymentIntent, or nil.
error
An error if one occurred, or nil.
-
A block called with a reader object or an error.
Declaration
Objective-C
typedef void (^SCPReaderCompletionBlock)(SCPReader *_Nullable, NSError *_Nullable)
Swift
typealias ReaderCompletionBlock = (SCPReader?, Error?) -> Void
Parameters
reader
A reader object, or nil.
error
An error if one occurred, or nil.
-
A block called with a ReaderSoftwareUpdate or an error. If there is no update and no error the block will be called with
(nil, nil)
.Declaration
Objective-C
typedef void (^SCPReaderSoftwareUpdateCompletionBlock)( SCPReaderSoftwareUpdate *_Nullable, NSError *_Nullable)
Swift
typealias ReaderSoftwareUpdateCompletionBlock = (SCPReaderSoftwareUpdate?, Error?) -> Void
Parameters
update
An update object, or nil.
error
An error if one occurred, or nil.
-
A block called with a Refund or a ProcessRefundError.
Declaration
Objective-C
typedef void (^SCPProcessRefundCompletionBlock)( SCPRefund *_Nullable, SCPProcessRefundError *_Nullable)
Swift
typealias ProcessRefundCompletionBlock = (SCPRefund?, SCPProcessRefundError?) -> Void
Parameters
refund
The Refund, or nil.
error
An error if one occurred, or nil.