STPPinManagementService
Objective-C
@interface STPPinManagementService : NSObject
Swift
class STPPinManagementService : NSObject
STPAPIClient extensions to manage PIN on Stripe Issuing cards
-
The API Client to use to make requests.
Defaults to [STPAPIClient sharedClient]
Declaration
Objective-C
@property (nonatomic, strong) STPAPIClient *apiClient;
Swift
var apiClient: STPAPIClient! { get set }
-
Create a STPPinManagementService, you must provide an implementation of STPIssuingCardEphemeralKeyProvider
Declaration
Objective-C
- (instancetype)initWithKeyProvider: (id<STPIssuingCardEphemeralKeyProvider>)keyProvider;
Swift
init!(keyProvider: STPIssuingCardEphemeralKeyProvider!)
-
Retrieves a PIN number for a given card, this call is asynchronous, implement the completion block to receive the updates
Declaration
Objective-C
- (void)retrievePin:(NSString *)cardId verificationId:(NSString *)verificationId oneTimeCode:(NSString *)oneTimeCode completion:(STPPinCompletionBlock)completion;
Swift
func retrievePin(_ cardId: String!, verificationId: String!, oneTimeCode: String!, completion: STPPinCompletionBlock!)
-
Updates a PIN number for a given card, this call is asynchronous, implement the completion block to receive the updates
Declaration
Objective-C
- (void)updatePin:(NSString *)cardId newPin:(NSString *)newPin verificationId:(NSString *)verificationId oneTimeCode:(NSString *)oneTimeCode completion:(STPPinCompletionBlock)completion;
Swift
func updatePin(_ cardId: String!, newPin: String!, verificationId: String!, oneTimeCode: String!, completion: STPPinCompletionBlock!)