Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ios xcode 7 issue with this method call in stripe
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)
}
})
}
@felixdkatt

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2015

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) -> ()')

@felixdkatt

This comment has been minimized.

Copy link
Owner Author

commented Sep 22, 2015

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
You can’t perform that action at this time.