SCPOfflineDelegate
Objective-C
@protocol SCPOfflineDelegate <NSObject>
Swift
protocol OfflineDelegate : NSObjectProtocol
Implement this protocol to handle callbacks when the SDK is performing actions related to offline mode.
-
This method is called on the offline delegate when any of the underlying
offlineStatus
fields have changed.Declaration
Objective-C
- (void)terminal:(nonnull SCPTerminal *)terminal didChangeOfflineStatus:(nonnull SCPOfflineStatus *)offlineStatus;
Swift
func terminal(_ terminal: SCPTerminal, didChange offlineStatus: OfflineStatus)
-
This method is called on the offline delegate when a locally stored payment intent was forwarded to stripe.com.
Declaration
Objective-C
- (void)terminal:(nonnull SCPTerminal *)terminal didForwardPaymentIntent:(nonnull SCPPaymentIntent *)intent error:(nullable NSError *)error;
Swift
func terminal(_ terminal: SCPTerminal, didForwardPaymentIntent intent: SCPPaymentIntent, error: (any Error)?)
Parameters
intent
The SCPPaymentIntent that was forwarded. This will always be provided. If there was an error, the
intent
contains the local representation and theintent.offlineDetails
can be used to identify the payment.error
The error, if an error occurred.
-
This method is called on the offline delegate when the Stripe Terminal SDK encounters an error that is not specific to any particular Payment Intent. For example, if the SDK fails to fetch a connection token as part of the forwarding process, this method will be called with an appropriate error.
Note that if an error is encountered during the course of forwarding a specific payment intent,
didForwardPaymentIntent
will be called with a non-nilerror
argument.Declaration
Objective-C
- (void)terminal:(nonnull SCPTerminal *)terminal didReportForwardingError:(nonnull NSError *)error;
Swift
func terminal(_ terminal: SCPTerminal, didReportForwardingError error: any Error)