Last active
November 7, 2019 10:22
-
-
Save amixpal/0c1832427d2df4f73e2efbd14aaa3a48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func createCard(token: STPToken) { | |
if let customerId = UserDefaults.standard.value(forKey: ApiParametersConstant.STRIPE_CUSTOMER_ID) { | |
let attributes = RappleActivityIndicatorView.attribute(style: RappleStyle.apple) | |
RappleActivityIndicatorView.startAnimatingWithLabel("Fetching card details...", attributes: attributes) | |
CardManager.sharedInstance.createCard(customerId: customerId as! String, token: token.tokenId) { (success, response) in | |
DispatchQueue.main.async() { | |
RappleActivityIndicatorView.stopAnimation() | |
} | |
if (success) { | |
self.skipButton.setTitle("Done", for: .normal) | |
self.updateCardVerify() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment