Created
September 22, 2015 17:26
-
-
Save felixdkatt/0ce3f01643541e6bc884 to your computer and use it in GitHub Desktop.
ios xcode 7 issue with this method call in stripe
This file contains hidden or 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 paymentAuthorizationViewController(controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: ((PKPaymentAuthorizationStatus) -> Void)) { | |
STPAPIClient.sharedClient().createTokenWithPayment(payment, completion: { (token: STPToken!, error: NSError!) -> Void in | |
if (error != nil) { | |
print(error) | |
completion(PKPaymentAuthorizationStatus.Failure) | |
}else{ | |
completion(PKPaymentAuthorizationStatus.Success) | |
} | |
}) | |
} |
STPAPIClient.sharedClient().createTokenWithPayment(payment, completion: { (token, error) -> Void in
did not fix the issue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error highlights the stripe call
PaymentController.swift:209:75: Invalid conversion from throwing function of type '(STPToken!, NSError!) throws -> Void' to non-throwing function type 'STPCompletionBlock' (aka '(Optional, Optional) -> ()')