Create an instance of StoreCardViewController with a verification amount and a delegate to handle various outcomes of the operation:

let controller = StoreCardViewController(verificationAmount: 1.00, 
                                         delegate: self)

present(controller, animated: true, completion: nil)
StoreCardViewController *controller = [[StoreCardViewController alloc] initWithVerificationAmount:1.00
                                                                                         delegate:self];

[self presentViewController:controller animated:YES completion:nil];

 

The delegate must implement StoreCardDelegate’s methods.

func storeCardDidComplete(withData storedCard: StoredCard)
func storeCardDidFailWithError(_ error: MobilePaymentSDKError)
- (void)storeCardDidCompleteWithData:(StoredCard *)storedCard
- (void)storeCardDidFailWithError:(MobilePaymentSDKError *)error;

 

Update a Stored Card


Create an instance of UpdateStoredCardViewController with a verification amount and a delegate to handle various outcomes of the operation:

let controller = UpdateStoredCardViewController(cardToken: selectedCard.token
                                                verificationAmount: 1.00, 
                                                delegate: self)

present(controller, animated: true, completion: nil)
UpdateStoredCardViewController *controller = [[UpdateStoredCardViewController alloc] initWithCardToken:_card.token
                                                                                    verificationAmount:1.00
                                                                                              delegate:self];
[self presentViewController:controller animated:YES completion:nil];

 

The delegate must implement StoreCardDelegate’s methods.

 

func updateStoredCardDidComplete(withData storedCard: StoredCard, forCardWithToken cardToken: String)
func updateStoredCardDidFailWithError(_ error: MobilePaymentSDKError)
- (void)updateStoredCardDidCompleteWithData:(StoredCard *)storedCard forCardWithToken:(NSString *)cardToken
- (void)updateStoredCardDidFailWithError:(MobilePaymentSDKError *)error