SCPOfflineStatusDetails
Objective-C
@interface SCPOfflineStatusDetails : NSObject
Swift
class OfflineStatusDetails : NSObject
Contains status and statistics relevant to operating offline.
-
Returns the number of processed payment intents stored locally as an offline record to be forwarded when the iOS device goes back online.
This count will be nil after calling
clearCachedCredentials
.Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSNumber *paymentsCount;
Swift
var paymentsCount: NSNumber? { get }
-
Returns the total amount of processed offline payment intents stored locally. The key is the three-letter ISO currency code in lowercase. The amount is provided in the currency’s smallest unit and matches the unit used when creating payment intents.
example: [“usd”: 1980, “cad”: 2003]
Use this in your application to be able to enforce custom limits on the total amount of payments to be stored offline. To prevent future payments from being created while offline, you can use the
CreateConfiguration
sofflineBehavior
property when creating payment intents.This will reset to an empty dictionary after calling
clearCachedCredentials
.Declaration
Objective-C
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSNumber *> *_Nonnull paymentAmountsByCurrency;
Swift
var paymentAmountsByCurrency: [String : NSNumber] { get }
-
The current network status. At initialization, the network status has a value of
SCPNetworkStatusUnknown
.Declaration
Objective-C
@property (nonatomic, readonly) SCPNetworkStatus networkStatus;
Swift
var networkStatus: NetworkStatus { get }
-
Unavailable
You cannot directly instantiate this class.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
You cannot directly instantiate this class.
Declaration
Objective-C
+ (nonnull instancetype)new;